View previous topic :: View next topic |
Author |
Message |
jbaesner n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 18 Feb 2004 Posts: 14
|
Posted: Tue May 11, 2004 5:30 pm Post subject: network interface prob. switching from krnl 2.4.25 to 2.6.5 |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
josh Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/11544865294278c0ecb1f01.gif)
Joined: 05 Feb 2003 Posts: 473 Location: Milky Way: Solar System: Earth: North America: USA: NY: Buffalo
|
Posted: Tue May 11, 2004 5:45 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|