Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
network interface prob. switching from krnl 2.4.25 to 2.6.5
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
jbaesner
n00b
n00b


Joined: 18 Feb 2004
Posts: 14

PostPosted: Tue May 11, 2004 5:30 pm    Post subject: network interface prob. switching from krnl 2.4.25 to 2.6.5 Reply with quote

Hi all!

I've a small scary problem...

I've installed two network cards in my computer. One is for DSL and the second for my internal network. Using kernel 2.4.25 everything works fine.

Now I want to switch to kernel 2.6.5 and the modules for the network interfaces are found and loaded correctly.

But the scary difference is that eth0 is now eth1 and vice versa.

Overview:
Code:

              InterfaceA    InterfaceB
kernel 2.4.25   eth0           eth1
kernel 2.6.5    eth1           eth0

Is somebody out there who can tell me what to do to have it like it is with kernel 2.4.25?
Back to top
View user's profile Send private message
josh
Guru
Guru


Joined: 05 Feb 2003
Posts: 473
Location: Milky Way: Solar System: Earth: North America: USA: NY: Buffalo

PostPosted: Tue May 11, 2004 5:45 pm    Post subject: Reply with quote

I know exactly what you need, 'nameif'. Names network card interfaces based on mac address. just setup an /etc/mactab file like this:

Code:
# Begin /etc/mactab
eth0   00:50:04:67:DF:E3
eth1   00:09:5B:08:07:4D
# End /etc/mactab


this matches up the interface with the mac address. Your mac address will be different from mine of course. in fact, you can call them anything you want besides eth0 and eth1. After you create the file just do 'nameif' and your done. it might give you some errors, but it should be fine. and you might need to take down both cards before running nameif. I setup an /etc/init.d/nameif file that runs at start up:

Code:
#!/sbin/runscript

depend() {
        before net
}

start() {
        ebegin "Starting nameif"
        /sbin/nameif
        eend $?
}

stop() {
        ebegin "Stopping nameif"
        eend $?
}


then just do depscan.sh and add it to your runlevel (rc-update add nameif default)

good luck!
_________________
-Josh
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