Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Debian This forum is for the discussion of Debian Linux.


  Search this Thread
Old 04-16-2007, 05:30 PM   #1
Registered: Jan 2003
Location: Durham UK
Distribution: openSUSE/Debian
Posts: 330

Rep: Reputation: 42
Ethernet interface number increases by one every boot

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...
# 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?
Old 04-16-2007, 09:05 PM   #2
LQ Guru
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,243
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
That looks like an oddity in udev..

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

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.
Old 04-16-2007, 11:20 PM   #3
Registered: Feb 2003
Location: 1st hop-NYC/NewJersey shore,north....2nd hop-upstate....3rd hop-texas...4th hop-southdakota(sturgis)...5th hop-san diego.....6th hop-atlantic ocean! Final hop-resting in dreamland dreamwalking and meeting new people from past' night.
Distribution: Siduction, the only way to do Debian Unstable
Posts: 506

Rep: Reputation: Disabled
You could try editing;

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


# 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.

Last edited by ironwalker; 04-16-2007 at 11:35 PM.
Old 04-18-2007, 01:47 PM   #4
Registered: Jan 2003
Location: Durham UK
Distribution: openSUSE/Debian
Posts: 330

Original Poster
Rep: Reputation: 42
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.


Last edited by sniff; 04-18-2007 at 02:19 PM.
Old 04-18-2007, 02:53 PM   #5
Registered: Jan 2003
Location: Durham UK
Distribution: openSUSE/Debian
Posts: 330

Original Poster
Rep: Reputation: 42
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i shutdown the PHYSICAL interface of an ethernet interface markraem Linux - Networking 2 04-12-2007 03:29 PM
two nics; inconsistent network interface number assignment qanopus Linux - General 2 02-14-2007 10:25 AM
udev increases boot time by 2m:12s djeikyb Slackware 25 05-08-2006 08:24 AM
Ethernet interface starting but not getting IP swilliams2006 Linux - Networking 2 12-10-2005 07:51 PM
interface number assignment ralphb Linux - Wireless Networking 1 09-21-2004 03:01 PM > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 08:46 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration