Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
eth0 and eth1 getting swapped during boot (solved)
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
agent_jdh
Veteran
Veteran


Joined: 08 Aug 2002
Posts: 1783
Location: Scotland

PostPosted: Thu Nov 30, 2006 12:51 am    Post subject: eth0 and eth1 getting swapped during boot (solved) Reply with quote

OK, first I admit I'd been playing around with things prior to putting a wireless card in my server, but I tried to put my system back to the way it was and it's behaving strangely.

No matter what I do, my RealTek gigabit adapter (that I want to connect to my local Lan to) is taking over eth0 from my Intel ethernet card during boot. The Intel card is connected to my adsl router. I want it to be eth0 - it's been like this for years, and the only h/w change was the gigabit card a few months ago.

My usual tried-and-tested method is to load the e100 module before the r8169 module in /etc/modules.autoload.d/kernel-2.6, this has stopped working. I've compiled the e100 driver directly into the kernel now, and still it gets swapped to eth1 somewhere during boot.

dmesg | less shows that when the compiled-in e100 driver gets loaded, it gets assigned eth0, then, when the r8169 module gets loaded, it supercedes the intel card and gets eth0, with the intel card bumped to eth1.

I've _never_ seen this happen before. How on earth have I managed to get it into this state?

Temporarily worked around by simply swapping the cables over, so my gigabit card is connected to the adsl router and the e100 card is feeding my network (all exclusively gigabit ... not any more!)

I did emerge the rt61 ebuild (the wireless card uses this) in advance of putting the new card in (I think it pulled in wireless-tools or something) ... I was doing some reading on how to configure the card and decided I'd wait until I've got more time at the weekend, and stick with wired for the moment.

So how do I get the Intel card back to being eth0? I've looked at the obvious config files (/etc/conf.d/net), tried the setting rename_INTELMACADDRESS=eth0 in there, as well as the relevant one for eth1, but nothing changes.

Appreciate any help!
_________________
Jingle Jangle Jewellery


Last edited by agent_jdh on Fri Dec 01, 2006 12:25 am; edited 1 time in total
Back to top
View user's profile Send private message
jathlon
Tux's lil' helper
Tux's lil' helper


Joined: 26 Sep 2006
Posts: 89
Location: Canada

PostPosted: Thu Nov 30, 2006 1:24 am    Post subject: Reply with quote

Quote:
I've _never_ seen this happen before. How on earth have I managed to get it into this state?


It usually happens when there has been a certain amount of mucking around in the network drivers part of the kernel code by Torvalds and crew. One way to fix it is to put a couple of aliases in /etc/modules.d/aliases and then run modules-update. The next time you restart your networking hopefully they will be correct.

The aliases that I've added look like;

Code:
# Try to enforce network card loading.
alias eth0 tulip
alias eth1 sky2


HTH

Tim
Back to top
View user's profile Send private message
zxy
Veteran
Veteran


Joined: 06 Jan 2006
Posts: 1160
Location: in bed in front of the computer

PostPosted: Thu Nov 30, 2006 1:39 am    Post subject: Reply with quote

You can use udev for this, and it works for sure. No swapping possible.

Here is the HOWTO
https://forums.gentoo.org/viewtopic-t-488670.html
_________________
Nature does not hurry, yet everything is accomplished.
Lao Tzu
Back to top
View user's profile Send private message
agent_jdh
Veteran
Veteran


Joined: 08 Aug 2002
Posts: 1783
Location: Scotland

PostPosted: Thu Nov 30, 2006 1:40 am    Post subject: Reply with quote

jathlon wrote:
Quote:
I've _never_ seen this happen before. How on earth have I managed to get it into this state?


It usually happens when there has been a certain amount of mucking around in the network drivers part of the kernel code by Torvalds and crew. One way to fix it is to put a couple of aliases in /etc/modules.d/aliases and then run modules-update. The next time you restart your networking hopefully they will be correct.

The aliases that I've added look like;

Code:
# Try to enforce network card loading.
alias eth0 tulip
alias eth1 sky2


HTH

Tim


Unfortunately that didn't work ... haven't changed my kernel. This box usually has quite a long uptime (months), so I've no idea what changes/update could have done this. udev maybe the other day?

EDIT - Just realised e100 is still built into the kernel ... I'll try again as a module.
_________________
Jingle Jangle Jewellery
Back to top
View user's profile Send private message
agent_jdh
Veteran
Veteran


Joined: 08 Aug 2002
Posts: 1783
Location: Scotland

PostPosted: Thu Nov 30, 2006 2:21 am    Post subject: Reply with quote

zxy wrote:
You can use udev for this, and it works for sure. No swapping possible.

Here is the HOWTO
https://forums.gentoo.org/viewtopic-t-488670.html


Hmmm... udev was updated recently - I'll look into this, but hopefully I'll get my wireless card up and running in the next couple of days, so I don't want to be making too many changes. The gigabit card will be eth0 when I get wireless going anyway.
_________________
Jingle Jangle Jewellery
Back to top
View user's profile Send private message
zxy
Veteran
Veteran


Joined: 06 Jan 2006
Posts: 1160
Location: in bed in front of the computer

PostPosted: Thu Nov 30, 2006 4:00 am    Post subject: Reply with quote

It's not hard to use udev, and not much to do, so it is easy to revert.
_________________
Nature does not hurry, yet everything is accomplished.
Lao Tzu
Back to top
View user's profile Send private message
agent_jdh
Veteran
Veteran


Joined: 08 Aug 2002
Posts: 1783
Location: Scotland

PostPosted: Thu Nov 30, 2006 11:35 am    Post subject: Reply with quote

zxy wrote:
It's not hard to use udev, and not much to do, so it is easy to revert.


Yeah, I can see that now. I'll maybe change it when I get home, or look through the udev rules to see if there's a reason for this new behaviour. None of the other files I modified should have done this. It's really just an irritant/curiosity as to why something that worked perfectly for over 3 years has started behaving oddly.

EDIT - custom udev rules fixed it anyway.
_________________
Jingle Jangle Jewellery
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