LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Ethernet interface number increases by one every boot (https://www.linuxquestions.org/questions/debian-26/ethernet-interface-number-increases-by-one-every-boot-546566/)

sniff 04-16-2007 04:30 PM

Ethernet interface number increases by one every boot
 
Hello,
I am testing Debian etch and I very impressed so far but I have a strange problem. Every time the system boots the number of the ethernet interface (i.e. eth0...) increases by one. I am now on eth10 from a starting point of 0. I have no idea what is going on, it works btw.

The ethernet interface in onboard and the chipset is nvidia nforce 400.

/etc/network/interfaces is as follows...
Quote:

# 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

# The primary network interface
# allow-hotplug eth0
auto eth0
iface eth0 inet dhcp
Anyone know whats going on?
Cheers,
Phil

farslayer 04-16-2007 08:05 PM

That looks like an oddity in udev..

You could try writing a rule that will assign the Ethernet interface to eth0 permanently.

http://www.reactivated.net/writing_u...#example-netif

I see by a quick search you are not the only one to have run into this, and not just on Etch, but I see no clear fix defined.

ironwalker 04-16-2007 10:20 PM

You could try editing;
/etc/udev/rules.d/z25_persistent-net.rules


Make sure your network card in there matches the mac address and change the eth line to eth0

example;

# PCI device 0x10de:0x0066 (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="mac address here", NAME="eth0

# PCI device 0x10b7:0x9201 (3c59x)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="mac address here", NAME="eth1

I have static addresses in interfaces file.Should work with dhcp too.

Have a look in /etc/udev/rules.d/z45_persistent-net-generator.rules,basically it writes to z25_persistent-net.rules.
I just noticed upon looking in the file that my 2 cards,although the names have not changed as I binded them to driver,mac,and eth0(you can name them anything you want by the way here),it seems to be repeated quite a bit....I am guessing for every reboot.
I am looking into this now.

sniff 04-18-2007 12:47 PM

Hello,
Okay in /etc/udev/rules.d/z25_persistent-net.rules there was a line defining the ethernet card 11 times. So the mac address was the same on each line. So I'm guessing that the line in /etc/udev/rules.d/z45_persistent-net-generator.rules that looks to see if the interface has already be set is not working correctly. I don't know how to fix it.

Phil

sniff 04-18-2007 01:53 PM

Hi,
Okay so I do know how to fix it. I decided that the thing that was generating the rules was causing the problem so I deactivated it by renaming it to /etc/udev/rules.d/z45_persistent-net-generator.rules.old. I then deleted all the incorrect entries in /etc/udev/rules.d/z25_persistent-net.rules leaving the first one that assigned the interface as eth0.

This now assigns the interface correctly and all is well.
Thanks for the tip chaps, very helpful.
Phil


All times are GMT -5. The time now is 12:48 PM.