LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 07-04-2002, 04:18 PM   #1
gilinko
LQ Newbie
 
Registered: Dec 2001
Location: Sweden
Distribution: Slackware
Posts: 11

Rep: Reputation: 0
Help with multiple NIC's


I have recently upgraded my box to 8.1 and in the upgrade I added two new NIC to my box whitch alread has two NIC's.

In "the past" I have had one NIC for internet access and one NIC for the internal network. No problem runing that. The new NIC's I going to be internet access so that I will have three NIC to the internet and one to the internal network.

The problem I'm having is that I can't get the NIC's to reach the gateway. I have edited the /etc/rc.d/rc.inet1 startup script to config the NIC's and it works like a charm.

The internal network works, but when I ping my gateway it's a dead end.

Pinging my own IP and hostname for the three NIC's work, but they just can't talk to the gateway and then the internet.

All cards are 3com NIC's and they work(had them in another mashine before).

/GI
 
Old 07-04-2002, 06:09 PM   #2
Excalibur
Senior Member
 
Registered: Jun 2002
Location: Northern VA, USA
Distribution: Ubuntu
Posts: 1,180

Rep: Reputation: 45
The problem sounds like a routing table entry problem. If each NIC has a unique IP assignment then it is probably a default gateway and/or each requires a gateway and then set a default. I have not set up such a config before so I am not able to provide any specifics. But the command that I think you need to work with is the route command.

man route (or info route)

To see your routing table use

route -n

The default gateway should have the letter g in the Flags column.
If a default gateway is not configured in the list then try

route add default gw gw.ip.address netmask 0.0.0.0 metric 1

If you get an error message then it may not be able to determine which NIC, then try adding eth1, or eth2, or eth3 on the end of the command.

Good luck
 
Old 07-04-2002, 11:01 PM   #3
pickledbeans
Member
 
Registered: Jun 2002
Location: Bailey, CO
Distribution: Slackware
Posts: 483

Rep: Reputation: 31
What errors, if any are you seeinng in :
/var/adm/messages
/var/adm/syslog/
var/adm/debug
dmesg
 
Old 07-04-2002, 11:57 PM   #4
gilinko
LQ Newbie
 
Registered: Dec 2001
Location: Sweden
Distribution: Slackware
Posts: 11

Original Poster
Rep: Reputation: 0
Update to the problems.

Slackware does set a default gateway when using the netconfig program. It does that like this:

/sbin/route add defaults gw GATEWAYIP metric 1

and doing route -n gives
Dest Gateway genmask flag metric ref use ifase
0.0.0.0 GATEWAYIP 0.0.0.0 UG 1 0 0 eth0

And when I plug the networkcable into eth0 I can ping the entire world, and I can ping my three interfaces that I have. But When I remove the network cable to eth0 end leave the others (eth1 eth2) in all net disaperes. I cant ping outward, and I can't ping my other IP's

So sure it works when I have the networkcable conected to eth0, but I want it to be redundant, so if eth0 goes down I still want to be able to access it by the other network interfaces.

@pickledbeans: Im not seeing any errors in these files
 
Old 07-05-2002, 02:08 AM   #5
Excalibur
Senior Member
 
Registered: Jun 2002
Location: Northern VA, USA
Distribution: Ubuntu
Posts: 1,180

Rep: Reputation: 45
The other NIC adapters will still route traffic destined for the network that they are configured for. The "default" gateway, is used when a request cannot be identified as a specific network request, and so it routes using the default that you select. If one NIC fails then configure one of the others as default.

Do you actually have three different gateways on each NIC available from different ISP's? Or do you just have three NICS and three cables terminated to the same device on the other end, thus using the same gateway for one ISP? Each NIC of course has to still have a unique IP assignment. But they also have to be on different networks in order for the routing table to identify anything different for each.

I would think it virtually impossible to setup redundancy for the same IP network addresses without having portable IP assignments and configuring the routers on the other end as well to handle it.

You may want to see if the program called "routed" would be of any use in your endeavor. I have used it on several machines to maintain the routing tables properly when connecting different networks together through a Linux box. It used to be started automatically back around Slack 4 and earlier. Sometime since Slack 7 they stopped I think. I know it caused me some problems when it wasn't needed. It is started from the /etc/rc.d/rc.inet2 file. It has an option using the "-g" to broadcast gateway assignments, but I think that is backwards to what you are looking for though.

I would be interested in knowing what your setup is in more detail and if you get it to work properly.

Lots of luck!
 
Old 07-05-2002, 04:12 AM   #6
gilinko
LQ Newbie
 
Registered: Dec 2001
Location: Sweden
Distribution: Slackware
Posts: 11

Original Poster
Rep: Reputation: 0
I'll try to explain my situation a little bit more.

I have one ISP, and I have three "real" IP's

Two of the NIC's goes thrue a hub and then to my socket in the wall(uplink port on hub)

The third is going thru another socket in the wall.

Both of these socets goes to different ports in the same switch, where the gateway is located. And I can't configure the switch(ISP's)

The one that doesn't go thru the hub(directly to the switch) is eth0 and it's cable has to be plugged in for the other two to be accessable from the internet. They all have the same gateway.

What I want is the ability to do: "ifconfig eth0 down", while still beeing able to connect to the server, thru one of the other NIC's (eth1, eth2).

I have tried to make route take the way over the eth1, but it doesn't work. Are there any other "software"(kernel, route prog. etc.) that I'm missing. I have compiled my kernel to be a minimal, so I have only added those things that I thouth that I needed. Maby something that has to be activated in the network part of th kernel??

There is one way to solve this problem, and that is to move the cable on eth0 to eth2 and then the problem would be solved, but I want to solve this problem(character flaw )

/GI
 
Old 07-05-2002, 08:00 AM   #7
pickledbeans
Member
 
Registered: Jun 2002
Location: Bailey, CO
Distribution: Slackware
Posts: 483

Rep: Reputation: 31
Does network load balancing cover this area? I've
seen items listed on freshmeat that deal with list?
 
Old 07-05-2002, 08:21 AM   #8
gilinko
LQ Newbie
 
Registered: Dec 2001
Location: Sweden
Distribution: Slackware
Posts: 11

Original Poster
Rep: Reputation: 0
I have talked to some people that I know and according to them, it's impossible to do what I want to do, with a multiple NIC configuration.

Bonding is something I will look in to when I get another mashine.

Thanx to all for your help eventhou we didn't solve the problem, but I learned a lot on the way.

/GI
 
Old 07-05-2002, 08:41 AM   #9
pickledbeans
Member
 
Registered: Jun 2002
Location: Bailey, CO
Distribution: Slackware
Posts: 483

Rep: Reputation: 31
One more time take a look at load balance, search freshmeat. And also post to linux-admin mailing list.
 
Old 07-05-2002, 11:33 AM   #10
gilinko
LQ Newbie
 
Registered: Dec 2001
Location: Sweden
Distribution: Slackware
Posts: 11

Original Poster
Rep: Reputation: 0
The thing is that I'm not looking to balance the load, just to shunt some type of trafic to another NIC, using a "public" IP, and keeping the other IP's sort of "secret". This to make one NIC more sercure and accessible from the entire web, and the others as a sort of limited security way in to my box, with harder restrictions(eg only ssh) and more agressive handling of the system. The issue about the networks ability to use certan NIC's to send trafic a special way, has been on the drawingbord for quite some time over at the linux kernel developers, as I have found out reading the mailinglists.

Thanx again for all your help.

/GI
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
assigning ip's to multiple NIC's in a Fedora Core 4 box vinnypie Linux - Networking 4 11-23-2005 04:21 PM
1 IP for 2 NIC's turbo_acura Linux - Networking 4 10-10-2005 05:33 PM
2 NIC's help troycus Linux - Networking 18 04-07-2005 09:01 PM
TWO NIC's bhughesiii Linux - Networking 8 09-23-2004 10:48 AM
2 NIC's plisken Linux - Networking 1 04-19-2003 04:32 PM


All times are GMT -5. The time now is 11:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration