UDEV Rules

As was experienced with similar Sun Fire based servers, the NICs created as devices in the Operating System get ordered in an unexpected manner. This can play havoc with the cabling & ports used on the switch.

Confirming NICs

# ethtool -p eth3

The above command can be used to confirm which NIC has been assigned to which eth device by Linux. When run, it will flash one (or more) of the LEDs on the NIC. By mapping out the order of the NICs with ethtool & using their MAC address, you can assign them into the desired order with some udev rules. To get a clean unaltered view of the NICs as Linux sees them initially, you'd need to move all the /etc/sysconfig/network-scripts/ifcfg-* files and the /etc/udev/rules/10-ethernet.rules file out of their current directories, before a system reboot.

It may be necessary to do this, if replacing one of the Quad NIC PCI cards due to hardware failure, or if building additional servers.

UDEV Rules Configuration

  

[root@fworksapp1 ~]# cat /etc/udev/rules.d/10-ethernet.rules 

KERNEL=="eth*", SYSFS{address}=="00:21:28:47:2d:7c", NAME="lan0"
KERNEL=="eth*", SYSFS{address}=="00:21:28:47:2d:7d", NAME="lan1"
KERNEL=="eth*", SYSFS{address}=="00:21:28:47:2d:7e", NAME="lan2"
KERNEL=="eth*", SYSFS{address}=="00:21:28:47:2d:7f", NAME="lan3"
KERNEL=="eth*", SYSFS{address}=="00:15:17:cf:25:3a", NAME="lan4"
KERNEL=="eth*", SYSFS{address}=="00:15:17:cf:25:3b", NAME="lan5"
KERNEL=="eth*", SYSFS{address}=="00:15:17:cf:25:38", NAME="lan6"

ETH vs. LAN

The standard method for the Linux kernel of naming its NIC devices as ETH, is being rewritten with the above udev rules, to using LAN as a naming convention. This is because of observed errors at system startup time when, for example eth3 already exists when a udev rule tried to rename a NIC with the given MAC address to eth3. The conflict would prevent the NIC device being created. So, by using a LAN naming convention (borrowed from HP/UX) any possible conflicts are avoided.