Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Installing Squeeze with newer kernels on servers with 4, 6 or more interfaces, I keep getting this really annoying problem: interfaces are always mixed up across cards, and don't even follow ascending hardware address order. What's going on?

Typical example of 70-persistent-net.rules on a machine with 2 dual port GigE cards :

# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.


# PCI device 0x8086:0x105e (e1000e)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="68:05:ca:04:f8:5e", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x8086:0x105e (e1000e)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="68:05:ca:04:f8:5f", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"

# PCI device 0x8086:0x10c9 (igb)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:25:90:72:55:71", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth3"

# PCI device 0x8086:0x10c9 (igb)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:25:90:72:55:70", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

I know I can change the order easily; however I must not forget doing it on all and every server else it will cause all sorts of weird problems; it's particularly annoying when it mixes up 1 GigE and 10 GigE interfaces.

share|improve this question
1  
I think the devices are numbered in the order that they are initialized the first time round, which is pretty random. Why does it matter? As you note, if you don't like the order, you can change it manually. The numbers are arbitrary anyway, what did you hope to see? –  Gilles May 10 '12 at 0:26
    
Under previous releases, ordering was coherent: the lower PCI devices came first, and they were always ordered by their MAC address. That had the fortunate effect that the network ports on the motherboard always were eth0 and eth1, and that the ports of additional cards were logically numbered (top port even numbered, low port odd). Now it's a mess and I need to identify each card by plugging and unplugging cables to identify which is which and reorder them properly. It's error prone and time consuming. –  wazoox May 10 '12 at 20:31
    
So what is your question? –  poige Jun 10 '12 at 11:09
    
The question is : is there a way to avoid this mix up? there must be one, see answer. –  wazoox Jun 12 '12 at 21:06

1 Answer 1

up vote 0 down vote accepted

Apparently the latest squeeze upgrade (6.0.5) fixed that. So that probably was some udev bug, or udev rules generator script bug.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.