This is a discussion on Networking question within the Debian Linux support forums, part of the Debian Linux category; --> I've got Debian etch installed on an HP laptop. The laptop has an Intel 10/100 LAN chip, and firewire. ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I've got Debian etch installed on an HP laptop. The laptop has an Intel 10/100 LAN chip, and firewire. I've also installed a Netgear GA511NAR gigabit Cardbus card into the laptop. I also have a 802.11b PCMCIA card, but it currently is not installed in the laptop. I'm trying to understand how the interfaces end up being named. Right now I have eth1 and eth3 up. dmesg refers to eth0 and eth2, but I don't understand why. I'd prefer if the onboard was eth0, the gig was eth1 and any added cards went from there, but I'd be happy just to understand why the interfaces and coming up as they do. Any help is appreciated! Output from dmesg | grep eth : e100: eth0: e100_probe: addr 0xe0204000, irq 10, MAC addr 00:02:3F:2F:31:B0 eth1394: eth0: IEEE-1394 IPv4 over 1394 Ethernet (fw-host0) eth2: RTL8169sb/8110sb at 0xe078e000, 00:0f:b5:45:95:54, IRQ 9 e100: eth1: e100_watchdog: link up, 100Mbps, full-duplex r8169: eth3: link up My interfaces file: # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # Netgear 1000mb Cardbus interface allow-hotplug eth2 iface eth2 inet static address 10.0.11.19 netmask 255.255.255.0 gateway 10.0.11.1 # Onboard Intel 100mb interface allow-hotplug eth1 iface eth1 inet static address 10.0.11.20 netmask 255.255.255.0 gateway 10.0.11.1 # Wireless-B PCMCIA card allow-hotplug eth3 iface eth3 inet dhcp Output from ifconfig: eth1 Link encap:Ethernet HWaddr 00:02:3F:2F:31:B0 inet addr:10.0.11.20 Bcast:10.0.11.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:112 errors:0 dropped:0 overruns:0 frame:0 TX packets:241 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:19267 (18.8 KiB) TX bytes:32272 (31.5 KiB) eth3 Link encap:Ethernet HWaddr 00:0F:B5:45:95:54 inet addr:10.0.11.131 Bcast:10.0.11.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:259 errors:0 dropped:0 overruns:0 frame:0 TX packets:5 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:29242 (28.5 KiB) TX bytes:864 (864.0 b) Interrupt:9 Base address:0xe000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:4 errors:0 dropped:0 overruns:0 frame:0 TX packets:4 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:280 (280.0 b) TX bytes:280 (280.0 b) |
| |||
| Noozer wrote: > I've got Debian etch installed on an HP laptop. The laptop has an Intel > 10/100 LAN chip, and firewire. I've also installed a Netgear GA511NAR > gigabit Cardbus card into the laptop. I also have a 802.11b PCMCIA card, but > it currently is not installed in the laptop. > > I'm trying to understand how the interfaces end up being named. Right now I > have eth1 and eth3 up. dmesg refers to eth0 and eth2, but I don't understand > why. > > I'd prefer if the onboard was eth0, the gig was eth1 and any added cards > went from there, but I'd be happy just to understand why the interfaces and > coming up as they do. > > Any help is appreciated! Have a look at /etc/udev/rules.d/z25_persistent-net.rules on the machine and change the interface names to suit your requirements. Reboot and update your /etc/network/interfaces file. |
| |||
| I demand that Noozer may or may not have written... > I've got Debian etch installed on an HP laptop. The laptop has an Intel > 10/100 LAN chip, and firewire. I've also installed a Netgear GA511NAR > gigabit Cardbus card into the laptop. I also have a 802.11b PCMCIA card, > but it currently is not installed in the laptop. > I'm trying to understand how the interfaces end up being named. Right now I > have eth1 and eth3 up. dmesg refers to eth0 and eth2, but I don't > understand why. /etc/udev/rules.d/z25_persistent-net.rules [snip] -- | Darren Salt | linux or ds at | nr. Ashington, | Toon | RISC OS, Linux | youmustbejoking,demon,co,uk | Northumberland | Army | <URL:http://www.youmustbejoking.demon.co.uk/> (PGP 2.6, GPG keys) When the gods wish to punish us, they answer our prayers. |
| |||
| On Sat, 15 Sep 2007 14:26:47 +0000, Noozer wrote: > I'm trying to understand how the interfaces end up being named. Right now I > have eth1 and eth3 up. dmesg refers to eth0 and eth2, but I don't understand > why. > > I'd prefer if the onboard was eth0, the gig was eth1 and any added cards > went from there, but I'd be happy just to understand why the interfaces and > coming up as they do. First, this has nothing to do with having two cards. It happens with single cards as well. This happens when ethernet cards have MAC addresses that don't have a matching entry in the udev lookup tables. The result is that udev assigns the card a random MAC address, which is different at each boot. Next, udev notices that the ethernet interface has a different MAC address from any in /etc/udev/rules.d/z25_persistent-net.rules, and adds a _new_ interface. I've seen this with Etch on an nForce board with onboard ethernet. I got up to having eth17 before I noticed...! You can fiddle with the udev rules, but the random-assigned MAC address is a killer. When it happened to me, I calculated it would take longer to sort it out in software than it would be to clear /etc/udev/rules.d/z25_persistent-net.rules, shutdown, swap in a spare ethernet card, and reboot. |
| |||
| I demand that Mark South may or may not have written... [snip; udev & eth* naming with reference to MAC addresses] > I've seen this with Etch on an nForce board with onboard ethernet. I got > up to having eth17 before I noticed...! > You can fiddle with the udev rules, but the random-assigned MAC address is > a killer. When it happened to me, I calculated it would take longer to > sort it out in software than it would be to clear > /etc/udev/rules.d/z25_persistent-net.rules, shutdown, swap in a spare > ethernet card, and reboot. This is fixed in udev 114. If you have an older version, adding this to the list of "ignore"s in z45_persistent-net-generator.rules should work: # ignore interfaces with random MAC addresses ATTR{address}=="?[2367abef]:*", GOTO="persistent_net_generator_end" -- | Darren Salt | linux or ds at | nr. Ashington, | Toon | RISC OS, Linux | youmustbejoking,demon,co,uk | Northumberland | Army | + Output *more* particulate pollutants. BUFFER AGAINST GLOBAL WARMING. The most harmful error in your program has not yet been discovered. |
| |||
| On Tue, 18 Sep 2007 14:38:41 +0100, Darren Salt wrote: > I demand that Mark South may or may not have written... > > [snip; udev & eth* naming with reference to MAC addresses] >> I've seen this with Etch on an nForce board with onboard ethernet. I got >> up to having eth17 before I noticed...! > >> You can fiddle with the udev rules, but the random-assigned MAC address is >> a killer. When it happened to me, I calculated it would take longer to >> sort it out in software than it would be to clear >> /etc/udev/rules.d/z25_persistent-net.rules, shutdown, swap in a spare >> ethernet card, and reboot. > > This is fixed in udev 114. If you have an older version, adding this to the > list of "ignore"s in z45_persistent-net-generator.rules should work: > > # ignore interfaces with random MAC addresses > ATTR{address}=="?[2367abef]:*", GOTO="persistent_net_generator_end" Thanks, I'll try that sometime soon. Can you please explain why the 2367abef skips adjacent pairs of digits? It's not obvious from where I'm sitting. |
| |||
| I demand that Mark South may or may not have written... > On Tue, 18 Sep 2007 14:38:41 +0100, Darren Salt wrote: [snip; random MAC addresses causing udev to do interface renaming] >> This is fixed in udev 114. If you have an older version, adding this to >> the list of "ignore"s in z45_persistent-net-generator.rules should work: >> # ignore interfaces with random MAC addresses >> ATTR{address}=="?[2367abef]:*", GOTO="persistent_net_generator_end" > Thanks, I'll try that sometime soon. > Can you please explain why the 2367abef skips adjacent pairs of digits? > It's not obvious from where I'm sitting. http://en.wikipedia.org/wiki/MAC_address explains it - look for "locally administered". -- | Darren Salt | linux or ds at | nr. Ashington, | Toon | RISC OS, Linux | youmustbejoking,demon,co,uk | Northumberland | Army | + Generate power using sun, wind, water, nuclear. FORGET COAL AND OIL. Who are you? |
| ||||
| On Tue, 18 Sep 2007 18:53:42 +0100, Darren Salt wrote: > I demand that Mark South may or may not have written... > >> On Tue, 18 Sep 2007 14:38:41 +0100, Darren Salt wrote: > [snip; random MAC addresses causing udev to do interface renaming] >>> This is fixed in udev 114. If you have an older version, adding this to >>> the list of "ignore"s in z45_persistent-net-generator.rules should work: > >>> # ignore interfaces with random MAC addresses >>> ATTR{address}=="?[2367abef]:*", GOTO="persistent_net_generator_end" > >> Thanks, I'll try that sometime soon. And having tried it across a couple of reboots, I notice that eth0 has remained eth0. Thanks, I once again have a spare ne2k ethernet card :-) I owe you one (1) net.beer if we ever meet in meatspace. >> Can you please explain why the 2367abef skips adjacent pairs of digits? >> It's not obvious from where I'm sitting. > > http://en.wikipedia.org/wiki/MAC_address explains it - look for "locally > administered". It did explain it, but in the most terse manner imaginable. Someone with more spare time could usefully expand that page somewhat. Cheers, M |