Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
two network card weirdness [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
erickfour
n00b
n00b


Joined: 16 Dec 2004
Posts: 32
Location: christchurch, NZ

PostPosted: Wed Dec 13, 2006 10:48 pm    Post subject: two network card weirdness [solved] Reply with quote

Hello--

This is probably an easy question. I thought that network cards were assigned eth0, etc. according to the order their drivers appear in /etc/modules.autoload.d/kernel-2.6. However, this doesn't seem to be the case for me. Here it is:

Code:

[w:~]$ cat /etc/modules.autoload.d/kernel-2.6
# /etc/modules.autoload.d/kernel-2.6:  kernel modules to load when system boots.

e100
8139too


e100 is the onboard network card which should be eth0, and 8139too is the one I want to be eth1. I've been monkeying around with NFS, and one reboot they just switched. Yes, the cables are set up properly.

Thanks,

Erick


Last edited by erickfour on Wed Dec 13, 2006 11:36 pm; edited 1 time in total
Back to top
View user's profile Send private message
loki_val
Retired Dev
Retired Dev


Joined: 13 Nov 2006
Posts: 418
Location: Denmark

PostPosted: Wed Dec 13, 2006 10:58 pm    Post subject: Reply with quote

From /etc/conf.d/net.example:
Code:
##############################################################################
# OPTIONAL MODULES

# INTERFACE RENAMING
# There is no consistent device renaming scheme for Linux.
# The preferred way of naming devices is via the kernel module directly or
# by using udev (http://www.reactivated.net/udevrules.php)

# If you are unable to write udev rules, then we do provide a way of renaming
# the interface based on it's MAC address, but it is not optimal.
# Here is how to rename an interface whose MAC address is 00:11:22:33:44:55
# to foo1
#rename_001122334455="foo1"

# You can also do this based on current device name - although this is not
# recommended. Here we rename eth1 to foo2.
#rename_eth1="foo2"


run
Code:
ifconfig
as root to get the mac address. As it says, you can also do this with udev. I'd be buggered if I could tell you how, though.
Back to top
View user's profile Send private message
KWhat
l33t
l33t


Joined: 04 Sep 2005
Posts: 660
Location: Los Angeles

PostPosted: Wed Dec 13, 2006 11:18 pm    Post subject: Reply with quote

I have noticed wiredness with this as well it happend to be the new udev doing interesting things. I solved the issue by editing the /etc/udev/rules.d/10-lirc.rules file. See the post https://forums.gentoo.org/viewtopic-t-523205-highlight-.html for full details.
Back to top
View user's profile Send private message
erickfour
n00b
n00b


Joined: 16 Dec 2004
Posts: 32
Location: christchurch, NZ

PostPosted: Wed Dec 13, 2006 11:36 pm    Post subject: Reply with quote

ok, it looks like this would do the trick,

http://www.reactivated.net/writing_udev_rules.html#example-netif

but for now it doesn't really matter what they are named, so I just changed what I do with them. it was a bit of a gentoo-surprise tho! thanks folks.
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