Hi Gonzalo,
Maybe this can help writing your udev rule based on the pci bus numbering:
lspci | grep Eth | awk '{print "KERNEL==\"eth*\",
ID==\"0000:"$1"\",
NAME=\"eth"count++"\""}' >>
/etc/udev/rules.d/70-persistent-net.rules
cheers
peter
On 02/07/2012 08:42 AM, Gonzalo Servat wrote:
Hi All,
I've noticed that in RHEL 6.1, setting mac addresses in Cobbler (and, thus,
in /etc/sysconfig/network-scripts/ifcfg-* -> HWADDR) sometimes results in
interfaces being renamed. In /etc/udev/rules.d/70-persistent-net.rules, I
end up with:
# PCI device 0x8086:0x105e (e1000e)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:15:17:4a:2e:91", ATTR{type}=="1",
KERNEL=="eth*",
NAME="eth1"
# PCI device 0x8086:0x105e (e1000e)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:15:17:4a:2e:90", ATTR{type}=="1",
KERNEL=="eth*",
NAME="eth0"
# PCI device 0x14e4:0x164c (bnx2)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:1a:64:11:a1:60", ATTR{type}=="1",
KERNEL=="eth*",
NAME="eth2"
# PCI device 0x14e4:0x164c (bnx2)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:1a:64:11:a1:62", ATTR{type}=="1",
KERNEL=="eth*",
NAME="eth3"
# PCI device 0x8086:0x105e (e1000e) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:15:17:4a:2e:91", 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:1a:64:11:a1:62", ATTR{type}=="1",
KERNEL=="eth*",
NAME="eth1"
# PCI device 0x14e4:0x164c (bnx2) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:1a:64:11:a1:60", ATTR{type}=="1",
KERNEL=="eth*",
NAME="eth0"
# PCI device 0x8086:0x105e (e1000e) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:15:17:4a:2e:90", ATTR{type}=="1",
KERNEL=="eth*",
NAME="eth2"
The above is the result of specifying the 4 MAC addresses in Cobbler for
eth0/1/2/3. It ended up renaming eth0 to rename4 and eth1 to rename5!? By
removing the first 4 entries out of 70-persistent-net.rules, it brought up
eth0/1/2/3 correctly.
Any suggestions on how to manage consistent naming of NICs on RHEL 6?
Thanks in advance.
Gonzalo
_______________________________________________
cobbler mailing list
cobbler(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler
Telefon +41 31 370 22 00
Direkt +41 31 370 22 34
Mobile +41 78 892 84 86
Fax +41 31 370 22 01
Werfen Sie einen Blick in unseren Blog:
<