LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-04-2006, 08:17 AM   #1
lucktsm
Member
 
Registered: May 2004
Location: Atlanta, GA USA
Distribution: Redhat ES4, FC4, FC5, slax, ubuntu, knoppix
Posts: 155

Rep: Reputation: 30
Question Question about multiple NIC Cards


Hi all,

I just added a second NIC to my FC4 server. I am using the second ethernet card for a second IP address I have. My questions is for routing. Do I need two default routes?

Each card goes to a seperate router on the lan. My route table:

192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
192.168.0.0 * 255.255.255.0 U 0 0 0 eth1
169.254.0.0 * 255.255.0.0 U 0 0 0 eth1
default 192.168.1.254 0.0.0.0 UG 0 0 0 eth0
default 192.168.0.1 0.0.0.0 UG 0 0 0 eth1


Does this look correct?

It seems to drop one of the default GW's periodically. Any suggestions would be greatly appreciated.
 
Old 01-04-2006, 10:40 AM   #2
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
any machine can have only one default route

you can define different routes for different interfaces ,but the default route will only be one

refer to iproute2 for more on this

regards
 
Old 01-04-2006, 12:29 PM   #3
lucktsm
Member
 
Registered: May 2004
Location: Atlanta, GA USA
Distribution: Redhat ES4, FC4, FC5, slax, ubuntu, knoppix
Posts: 155

Original Poster
Rep: Reputation: 30
Masand,

Thank you for the info about the default route. I appreciate it.

Luck
 
Old 01-04-2006, 10:51 PM   #4
lucktsm
Member
 
Registered: May 2004
Location: Atlanta, GA USA
Distribution: Redhat ES4, FC4, FC5, slax, ubuntu, knoppix
Posts: 155

Original Poster
Rep: Reputation: 30
I changed the route to have one default. Now the second nic is unreachable from the outside. Here's a route -n

Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.0.0 192.168.0.1 255.255.255.0 UG 0 0 0 eth1
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
0.0.0.0 192.168.1.254 0.0.0.0 UG 0 0 0 eth0

I have two routers, each one has port forwarding to port 80 from different IP Adresses from the net in this configuration only the 192.168.1.0 network us working.

The reason for the different ip's on port 80 is for different applications listenting on it. I have web servers on one and ssh server on the other.

Have I missed something?

Thanks...

Last edited by lucktsm; 01-04-2006 at 10:52 PM.
 
Old 01-04-2006, 11:13 PM   #5
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
can u give the O/P of

ip route show

and what ar ethe ip addresses of your router etc


regards
 
Old 01-05-2006, 08:42 AM   #6
lucktsm
Member
 
Registered: May 2004
Location: Atlanta, GA USA
Distribution: Redhat ES4, FC4, FC5, slax, ubuntu, knoppix
Posts: 155

Original Poster
Rep: Reputation: 30
The router addresses are:
192.168.1.254 for eth0 ip: 192.168.1.211
192.168.0.1 for eth1 ip: 192.168.0.211

I will have to get the rest of that later as I am not able to get to the machine at the moment.

I did a ping -I eth1 www.cnn.com and it says destination unreachable, but it works from eth0.
 
Old 01-06-2006, 07:54 AM   #7
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

Rep: Reputation: 184Reputation: 184
Have all of your hosts Default Gw's point at the same router, normally the internet router. If one of your hosts has another network on it then the other hosts need to vbe able to route to it.

Either set the Default Gateway up to route between the two networks, or set the host with the second network up as a router then on the Default Gateway put a network specific route with the routing host as the next hop.

Any traffic from a host to the second network will be redirected to the routing host.
 
Old 01-06-2006, 08:13 AM   #8
lucktsm
Member
 
Registered: May 2004
Location: Atlanta, GA USA
Distribution: Redhat ES4, FC4, FC5, slax, ubuntu, knoppix
Posts: 155

Original Poster
Rep: Reputation: 30
Thanks for the reply Baldy, going to give it a try.
 
  


Reply



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
Using multiple cards JawzofDETH Linux - Software 1 12-13-2005 02:24 PM
Using multiple cards JawzofDETH Mandriva 0 12-12-2005 06:52 PM
Multiple NIC routing question. angoyal Linux - Networking 1 08-27-2003 02:56 PM
multiple video cards question aldanor Linux - Newbie 1 12-27-2002 10:46 PM
Multiple NIC cards - public and private IPs harryinjapan Linux - Networking 2 12-02-2001 04:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:05 PM.

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
Open Source Consulting | Domain Registration