Live Chat Software by Kayako
Knowledgebase
Reordering device names on ServerU L-800
Posted by Patrick Tracanelli on 07/Mar 17:41

Starting from Rangeley family of processors and northbridge chipset for those processors, Intel has slightly modified the way PCI bus information is passed for BIOS/EFI and, therefore, handled by ACPI. As a consequence some systems, including FreeBSD and some versions of Linux kernel, still probing devices in the order they actually appear on the bus, not according to the PCI bus device id.

See the output from this pciconf listing on ServerU Netmap L-800 on FreeBSD as an example:

# pciconf -l
hostb0@pci0:0:0:0: class=0x060000 card=0x00000000 chip=0x1f088086 rev=0x02 hdr=0x00
pcib1@pci0:0:1:0: class=0x060400 card=0x72708086 chip=0x1f108086 rev=0x02 hdr=0x01
pcib2@pci0:0:2:0: class=0x060400 card=0x72708086 chip=0x1f118086 rev=0x02 hdr=0x01
pcib3@pci0:0:3:0: class=0x060400 card=0x72708086 chip=0x1f128086 rev=0x02 hdr=0x01
pcib4@pci0:0:4:0: class=0x060400 card=0x80868086 chip=0x1f138086 rev=0x02 hdr=0x01
none0@pci0:0:11:0: class=0x0b4000 card=0x00008086 chip=0x1f188086 rev=0x02 hdr=0x00
hostb1@pci0:0:14:0: class=0x060000 card=0x00008086 chip=0x1f148086 rev=0x02 hdr=0x00
none1@pci0:0:15:0: class=0x080600 card=0x00008086 chip=0x1f168086 rev=0x02 hdr=0x00
none2@pci0:0:19:0: class=0x088000 card=0x00008086 chip=0x1f158086 rev=0x02 hdr=0x00
igb2@pci0:0:20:0: class=0x020000 card=0x1f418086 chip=0x1f418086 rev=0x03 hdr=0x00
igb3@pci0:0:20:1: class=0x020000 card=0x1f418086 chip=0x1f418086 rev=0x03 hdr=0x00
igb4@pci0:0:20:2: class=0x020000 card=0x1f418086 chip=0x1f418086 rev=0x03 hdr=0x00
igb5@pci0:0:20:3: class=0x020000 card=0x1f418086 chip=0x1f418086 rev=0x03 hdr=0x00
ehci0@pci0:0:22:0: class=0x0c0320 card=0x72708086 chip=0x1f2c8086 rev=0x02 hdr=0x00
ahci0@pci0:0:23:0: class=0x010601 card=0x72708086 chip=0x1f228086 rev=0x02 hdr=0x00
ahci1@pci0:0:24:0: class=0x010601 card=0x72708086 chip=0x1f328086 rev=0x02 hdr=0x00
isab0@pci0:0:31:0: class=0x060100 card=0x72708086 chip=0x1f388086 rev=0x02 hdr=0x00
none3@pci0:0:31:3: class=0x0c0500 card=0x72708086 chip=0x1f3c8086 rev=0x02 hdr=0x00
igb0@pci0:1:0:0: class=0x020000 card=0x0000ffff chip=0x15338086 rev=0x03 hdr=0x00
igb1@pci0:2:0:0: class=0x020000 card=0x0000ffff chip=0x15338086 rev=0x03 hdr=0x00

As we can see, even though Intel i210 ports get a later pci bus device id, they are probed first, and therefore they get a driver device id first. The bad consequence is that we have ports misordered on the system compared to actual physical ports ordering on the device.

It means for L-800 for example:

Physical port 0: igb2
Physical port 1: igb3
Physical port 2: igb4
Physical port 3: igb5
Physical port 4: igb0
Physical port 5: igb1

This same behavior is known and will soon be fixed on the systems. However, it's still annoying so far. In this case, you can rename and reorder the Interfaces on the system. On FreeBSD this can be done via ifconfig <if> name <newname> command, while on Linux you need to set persistent udev rules (usually at /etc/udev/rules.d/70-persistent-net.rules), for example:

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="84:44:64:b7:4e:38", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth4"

Will rename device with mac address 84:44:64:b7:4e:38 to eth4 (physical port 4).

We have prepared a script that does the job on FreeBSD based systems. You can download it here:

Copy it to /etc/rc.d/netifname on your FreeBSD system and add netifname_enable="YES" to /etc/rc.conf:

# fetch -o /etc/rc.d/ https://download.serveru.us/ServerUinstaller/nic-ordering/netifname
# echo 'netifname_enable="YES"' >> /etc/rc.conf

(or sysrc netifname_enable="YES")

While on Linux system you can download and adjust the following udev example conf:

(3 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
Help Desk Software by Kayako