Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
eth0 and eth1 swap themselves after install
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
dieboy
n00b
n00b


Joined: 29 Mar 2004
Posts: 13

PostPosted: Sat Mar 24, 2007 3:44 pm    Post subject: eth0 and eth1 swap themselves after install Reply with quote

I really don't have a question, but I'd like to report an answer that i found after a long frustrating battle.


I have a HP Pavilion ZE4900 laptop, with a built in realtek 8139c card and a broadcom 802.11g card in it.

Well during the install, my realtek nic was on eth1, i set it up under the installer for 'have inet'. I can then open ephaniny, and browse the web fine. IE its using the realtek nic on eth1. Pretty simple huh?

Well I got everything installed, and all of a sudden eth1 was gone. Not installing, not preset etc. So i go and genkernel it up and make sure the correct realtek drivers are installed (8139too and 8139cp). After a kernel compile, i reboot quick and inrestingly enough, eth1 still fails.

So thinking the realtek was still on eth1 I spent about ten hours troubleshooting it.

Sooooo the lesson is if you install with the livecd, and are dealing with two nics, sometimes (for whatever messed up reason) after the install, eth1 and eth0 will have swapped. If you having problems similiar, its well worth to try to load up the other eth and see if its the one your trying to setup.

Good Luck and Cheers!

dieboy
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54831
Location: 56N 3W

PostPosted: Sat Mar 24, 2007 4:08 pm    Post subject: Reply with quote

dieboy,

The reason for eth0 and eth1 swapping is that the logical interface names are assigned in the order that the interfaces are initialised. There are several mechanisms at work.
Interfaces built into the kernel are initialised before modules are loaded.
Modular interfaces are initialised in modular load order.
The above can provide a degree of control but the right way to fix this is to assign interface names based the MAC address by writing udev rules.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
dieboy
n00b
n00b


Joined: 29 Mar 2004
Posts: 13

PostPosted: Sun Mar 25, 2007 3:47 am    Post subject: Reply with quote

Thanks, that would make perfect sense. I just never thought of it that way. Partly because i've never had two nics installed at once, or two of anything really except hds.

I'll have to look into udev rules, right now its working great and i'm a happy camper :)
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Sun Mar 25, 2007 3:58 am    Post subject: Reply with quote

See udev guide :wink:
Back to top
View user's profile Send private message
deface
Apprentice
Apprentice


Joined: 17 Mar 2007
Posts: 205

PostPosted: Mon Mar 26, 2007 2:38 am    Post subject: Reply with quote

and/or check out

/etc/udev/rules.d/70-persistant-net.rules
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum