You are not logged in.

#1 2010-12-23 19:34:20

art84
Member
Registered: 2010-12-05
Posts: 41

[SOLVED] eth0 and eth1 sometimes interchange at boot time

Hi

A very unpleasant problem: at boot time my NICs randomly interchange - eth0 becomes eth1 and conversely.

Normally, I get:

eth0      Link encap:Ethernet  HWaddr 00:19:66:xx:xx:xx
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 Kb)  TX bytes:0 (0.0 Kb)
          Interrupt:26

eth1      Link encap:Ethernet  HWaddr 00:60:97:xx:xx:xx
          inet addr:192.168.0.4  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:21 Base address:0xe800

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:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

but sometimes I get:

eth0      Link encap:Ethernet  HWaddr 00:60:97:xx:xx:xx
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:21 Base address:0xe800

eth1      Link encap:Ethernet  HWaddr 00:19:66:xx:xx:xx
          inet addr:192.168.0.4  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 Kb)  TX bytes:0 (0.0 Kb)
          Interrupt:26 Base address:0xa000

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:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

rc.conf

...
MOD_AUTOLOAD="yes"
MODULES=()

HOSTNAME="zion"

eth0="eth0 192.168.1.2 netmask 255.255.255.0 broadcast 192.168.1.255"
eth1="eth1 192.168.0.4 netmask 255.255.255.0 broadcast 192.168.0.255"
INTERFACES=(eth0 eth1)

gateway="default gw 192.168.1.1"
ROUTES=(gateway)

DAEMONS=(syslog-ng network !netfs !sshd crond)

Any ideas?

Thank you for any help.

Last edited by art84 (2010-12-24 08:00:16)

Offline

#2 2010-12-23 19:40:30

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: [SOLVED] eth0 and eth1 sometimes interchange at boot time


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#3 2010-12-23 20:07:24

art84
Member
Registered: 2010-12-05
Posts: 41

Re: [SOLVED] eth0 and eth1 sometimes interchange at boot time

Thank you, loafer
It seems you pointed exactly to the right place.

As I see, there are 3 solutions in the "Configuring Network" wiki section. Related to this, I have one more small question:
having the syntax

eth0="eth0 192.168.1.2 netmask 255.255.255.0 broadcast 192.168.1.255"
eth1="eth1 192.168.0.4 netmask 255.255.255.0 broadcast 192.168.0.255"
INTERFACES=(eth0 eth1)

which eth0 is a custom name and which one is a device name? or both must be the same?
can I write

mycustomname0="eth0 192.168.1.2 netmask 255.255.255.0 broadcast 192.168.1.255"
mycustomname1="eth1 192.168.0.4 netmask 255.255.255.0 broadcast 192.168.0.255"
INTERFACES=(mycustomname0 mycustomname1)

??

I ask this because I would like to use the following solution:

File: /etc/udev/rules.d/10-network.rules
SUBSYSTEM=="net", ATTR{address}=="aa:bb:cc:dd:ee:ff", NAME="lan0"

and then I will have to replace "eth0" with the new name "lan0" (because it says: "Some people have problems naming their interfaces after the old style: eth0, eth1, etc. Try something like "lan" or "wlan" if you experience this problem.")

Offline

#5 2010-12-23 23:18:27

art84
Member
Registered: 2010-12-05
Posts: 41

Re: [SOLVED] eth0 and eth1 sometimes interchange at boot time

fukawi2
sorry, but English is not my native language and everyone calls his/her problem with his/her own words (titles from your search list: "wireless switches", "Network interfaces trading places", "network interfaces", etc.)
searched for "network interchange", but as I see, I've chosen a wrong word "interchange"

Offline

#6 2010-12-24 01:01:29

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,356

Re: [SOLVED] eth0 and eth1 sometimes interchange at boot time

art84 wrote:

fukawi2
sorry, but English is not my native language and everyone calls his/her problem with his/her own words (titles from your search list: "wireless switches", "Network interfaces trading places", "network interfaces", etc.)
searched for "network interchange", but as I see, I've chosen a wrong word "interchange"

I think you'll find quite a few others here who don't have English as their 'native' language, but in this case its more a question of intelligent searching than anything else. Something along the lines of "eth0 eth1 network" would have worked. "different order network"? In general searching for only one phrase isn't a good idea.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#7 2010-12-24 07:59:49

art84
Member
Registered: 2010-12-05
Posts: 41

Re: [SOLVED] eth0 and eth1 sometimes interchange at boot time

ngoonee
A more general search (like "eth0 eth1 network" you proposed) gives 17 pages with 30 threads on each ... searching in 510 threads is not a very pleasant thing and not everyone has time to read them all, that's why people ask questions directly.
Probably it would be possible to find a solution/answer in 99% of cases without asking others (there are man's, books, web sites, etc), but this is the goal of such 'support' forums - it's like the process of finding out what o'clock it is: you could find it out by measuring stars' position, by measuring the sun's shadow, by going to 'down town' where probably there are public watches, but you also could ask someone with watches near you or walking on the street.
Anyway, nobody is forced to help me. If someone reads the thread and could answer in a few seconds "ah, you are looking for ..., read ... " I'm very thankful to that person. If my thread is redundant or it consumes resources, you could simply delete it.

Offline

#8 2010-12-24 08:18:50

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] eth0 and eth1 sometimes interchange at boot time

art84 - ngoonee and fukawi2 were making the point that this has been covered extensively here: you are expected to do your research before posting here - that is part of the Arch Way:

Arch Way wrote:

Arch Linux users have a tendency to solve problems themselves and share the results with the community and development team – a "do first, then ask" philosophy.

https://wiki.archlinux.org/index.php/The_Arch_Way

Closing


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB