Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
alias and network module compile in kernel
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
loux.thefuture
Tux's lil' helper
Tux's lil' helper


Joined: 15 Nov 2005
Posts: 135

PostPosted: Wed Jun 21, 2006 4:01 pm    Post subject: alias and network module compile in kernel Reply with quote

Hello,
i'm asking if i can put something like this :
alias eth0 3c59x
alias eth1 skge
in my /etc/modules.d/alias
if i compile module 3c59x and skge in the kernel and not as module ?
thanks
loux
_________________
"So long and thanks for all the fishs !"
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Jun 21, 2006 4:42 pm    Post subject: Reply with quote

loux.thefuture,

That only works if you compile them as modules. With udev loading things without reading /etc/modules.conf that doesn't work properly either.

Abandon the names ethX - they may already be allocated whe your udev rules run.
Make a file called /etc/udev/rules.d/03-local-net.rules Only the number (03) is important, that should be less than any other rules files you have.
In the file put
Code:
# Name the eth interfaces correctly

KERNEL=="eth*", SYSFS{address}=="00:26:54:0b:c6:c6", NAME="eth_lan"
KERNEL=="eth*", SYSFS{address}=="00:0c:6e:14:c8:e7", NAME="eth_spare"
but use your own MAC addresses, which you can find from ifconfig - look at the HWAddr. You must use lowercase letters for the hex numbers.
The NAME= is arbitary but because udev may have created eth0 and eth1 do not use them.

Next fix /etc/init.d/, /etc/conf.d/net and rc-update to use your new names.
_________________
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
Monkeh
Veteran
Veteran


Joined: 06 Aug 2005
Posts: 1656
Location: England

PostPosted: Wed Jun 21, 2006 5:16 pm    Post subject: Reply with quote

Better way to do things (imo) is to use nameif. There's a script here: https://forums.gentoo.org/viewtopic-t-456219-highlight-nameif.html

Requires a couple of tweaks, and infact I may write up a decent one which can use /etc/conf.d for any number of interfaces.
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