// Network card order RHEL/CentOS 6 | Light At The End Of The Tunnel Network card order RHEL/CentOS 6 – Light At The End Of The Tunnel

Light At The End Of The Tunnel

systems administration meanderings

Network card order RHEL/CentOS 6

In RHEL/CentOS 5 this was handled by

/etc/modprobe.conf
.

Now in RHEL/CentOS 6 this is now handled by udev. The file that controls everything is

/etc/udev/rules.d/70-persistent-net.rules

An example of how this file looks is shown below:-

# PCI device 0x14e4:0x164c (bnx2) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?", ATTR{address}=="00:19:b9:f2:d4:f7", ATTR{type}=="1", KERNEL=="eth", NAME="eth1"
    
# PCI device 0x8086:0x10d6 (igb) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?", ATTR{address}=="00:1b:21:0c:2a:70", ATTR{type}=="1", KERNEL=="eth", NAME="eth2"
    
# PCI device 0x8086:0x10d6 (igb) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?", ATTR{address}=="00:1b:21:0c:2a:71", ATTR{type}=="1", KERNEL=="eth", NAME="eth3"
    
# PCI device 0x8086:0x10d6 (igb) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?", ATTR{address}=="00:1b:21:0c:2a:75", ATTR{type}=="1", KERNEL=="eth", NAME="eth3"
    
# PCI device 0x14e4:0x164c (bnx2) (custom name provided by external tool)
#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?", ATTR{address}=="00:19:b9:f2:d4:f5", ATTR{type}=="1", KERNEL=="eth", NAME="eth6"
    
# PCI device 0x8086:0x10d6 (igb) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?", ATTR{address}=="00:1b:21:0c:2a:74", ATTR{type}=="1", KERNEL=="eth", NAME="eth3"
    
# PCI device 0x14e4:0x164c (bnx2) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?", ATTR{address}=="00:19:b9:f2:d4:f5", ATTR{type}=="1", KERNEL=="eth", NAME="eth0"
    
# PCI device 0x8086:0x107e (e1000e)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?", ATTR{address}=="00:15:17:d1:f4:7c", ATTR{type}=="1", KERNEL=="eth", NAME="eth5"

The above file is obviously wrong, just by editing the name parameter, you can reorder the NIC’s. I rebooted the box to ensure the changes took place.


Share

#