LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   2 NICs / 2 WANs, 1 dynamic 1 static -- on Slackware 9.1 (https://www.linuxquestions.org/questions/linux-networking-3/2-nics-2-wans-1-dynamic-1-static-on-slackware-9-1-a-129378/)

VioLaToR 12-27-2003 08:08 PM

2 NICs / 2 WANs, 1 dynamic 1 static -- on Slackware 9.1
 
I need some help hooking up 2 WANs to 2 separate NICs:

I have been running 1 internet connection on my Linksys PCI card with a static address. the device is using eth0 and tulip.o driver. There has never been any problem with this device or the settings on it.

My computer has an onboard LAN port but it has always been disabled. I enabled it and booted up the machine and the onboard NIC took over eth0 and the linksys card took eth1.

I need to know how to make sure that the linksys card ALWAYS keeps eth0 and remains with a static IP address that i have set using netconfig. Even if i turn on the onboard LAN or add other PCI NICs, i want to make sure that the existing card never loses it's designation to eth0.

The onboard NIC will not always be enabled. i only use this on occasion, and i want to turn it off when i do not use it. the onboard NIC uses rhine.o driver.

When i do turn it on, i need to be able to have it obtain an address from the DHCP server. I want the onboard NIC to always use the next available net device (should always be eth1) instead of taking over the eth0 and screwing up my existing network settings.

I also need to know how to activate the eth1 and get the DHCP when the system is currently running. I know that ifconfig eth1 up will activate the device, but that does not get any DHCP from the broadcast address.

If i need to provide more information on what i need to do, and what is currently happening, i will do my best.

phobox 12-28-2003 12:00 PM

You could try setting the irq's for the nic's in the bios, if the interfaces are handed out by the kernel on the basis of that. As for not getting the dhcp broadcast on command, I don't know because mine does it.

phobox 12-28-2003 12:06 PM

Actually, I just remembered you can assign interfaces based on MAC addesses and that will ensure your pci nic will always have eth0

VioLaToR 12-28-2003 06:28 PM

Quote:

Originally posted by phobox
Actually, I just remembered you can assign interfaces based on MAC addesses and that will ensure your pci nic will always have eth0
would you care to describe the method used to do such a thing?

phobox 12-29-2003 10:40 AM

Something like this...

http://www.mail-archive.com/linux-la.../msg01867.html

phobox 01-05-2004 12:39 AM

Incidentally, there is a better way to assign network interfaces based on mac address here:

http://xenotime.net/linux/doc/networ...face-names.txt

based on /etc/mactab file.

VioLaToR 02-24-2004 07:17 PM

i have played with the stuff in those two links, and i really have no idea how to make that work. those were for redhat systems, and i do not know the equivalencies of the stuff it was talking about. I tried to place the reference to nameif, and the /etc/mactab that i created, into /etc/rc.d/rc.inet1 and that did not work out for me.

/etc/rc.d/rc.inet1: line 99: nameif: command not found
nameif: reports error

that is what it tells me now. apparently that method is not for my slackware box.

I really could use some help to keep my NICs from changing eth# when i activate the backup NIC.

Thanks for the sources so far.

phobox 03-02-2004 02:28 AM

Here's a different explanation:
http://www.linuxfromscratch.org/hint...les/nameif.txt

I'm not sure why it's not finding nameif, since it is part of the basic networking system for linux, not specific for any distro. Maybe try the full pathname (/sbin/nameif for my debian system.)

VioLaToR 03-02-2004 03:53 AM

nameif does not exist in my filesystem at all.

/etc/rc.d/init.d/network does not exist in my filesystem.

/etc/sysconfig does not exist as a directory or a file.

By now i am sure you are fed up with me on this topic, but i just can't get this done.

I have checked several other files hoping for the correct equivalents:

/etc/networks
/etc/rc.d/rc.inet1
/etc/rc.d/rc.inet2

Those didn't have the proper things in them either.

:confused: :scratch: Am i just out of luck?

thanks again for your help.

phobox 03-03-2004 02:30 AM

Looks like you need to install the net-tools. Here is a link describing what exactly that is:

http://www.faqs.org/docs/linux_scrat...net-tools.html

and it also has a link to where you can download it's sources.

Also, here is a small description to help if you need to manually create a sysconfig directory:

http://www.comptechdoc.org/os/linux/...sysconfig.html

VioLaToR 03-03-2004 04:15 PM

i installed net-tools.

but there is a problem now. there are config files somewhere in my system already or it would not be working now. so i'm not going to start making conflicting files in /etc/sysconfig and really mess things up.

I tried using only the mactab and nameif but that fails. I need to rename the devices in the existing network configuration files. any idea where those are? They have to be in there somewhere or the devices would never work at all.

When i added a line to call on nameif, i put it in /etc/rc.d/rc.inet1 thinking that might get it early enough to work.

When i rebooted the system with the primary and the secondary NICs turned on, the primary was lost, and the secondary was once again eth0

still scratching my head and losing my mind. some slackware guys would sure be nice to see up in here!

Darin 03-03-2004 08:53 PM

/etc/rc.d/init.d/network and /etc/sysconfig are redhat/mandrake config files. Slackware uses a different type of config with simpler startup scripts in /etc/rc.d.

Anyhow, for Slackware try looking in /etc/rc.d/rc.netdevice or /etc/rc.d/rc.modules for the lines that load your ethernet modules rhine and tulip, if you are lucky just switching those around will make the onboard NIC be eth1. Another suggestion that may be a better way to do it is to edit /etc/modules.conf (if it is empty thats OK, if it doesn't exist make it 'touch /etc/modules.conf') and add lines:
alias eth0 tulip
alias eth1 rhine
(or whatever the actual network modules are called, the module names should be in your rc.netdevice and/or rc.modules files)


All times are GMT -5. The time now is 05:50 AM.