LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-20-2005, 10:42 AM   #1
mchan
LQ Newbie
 
Registered: Mar 2005
Posts: 1

Rep: Reputation: 0
Need help to route traffic properly with 2 eth cards


I have 2 eth cards in my linux PC which it is running Fedora core 3.
Here is my configuration.

Company Intranet ----- Linux PC ---- Router ---- private network

The Linux PC has 2 eth cards (eth0 and eth1)

eth0 is connected to Company Intranet which it get the IP address from DHCP server

eth1 is connected to Router which I assigned the static IP address and default gateway for eth1

If I only have eth 0 active, I can connect to company Intranet via ssh/telnet.
My DNS is working perfect. But as soon as I active eth1. My DNS doesn't work anymore. I cannot connect to company Intranet. It seems the linux PC route all the traffic via the default gateway I set for eth1. Therefore, all the traffic go to eth1. I know it because when I use "ping". I can see the traffic try to go out via the default gateway in eth1. If I specific using eth0 interface in PING, it work "ping -Ieth0 X.X.X.X"

My question is how I can manage the particular traffic go to private network
using eth1 and the rest of the traffic use eth0?

Let say my private network is "172.200.X.X".
When I ping 172.200.X.X, how can I tell linux to use eth1 instead of eth0?
On the other hand, if I try to ping 135.234.x.x. it should use eth0.

Any idea how to do it? Should I set the filter in the routing table in Linux?
If so, how to do it? Thanks!
 
Old 03-20-2005, 07:55 PM   #2
t3gah
Member
 
Registered: Dec 2004
Distribution: SuSE, RedHat, ubuntu, Debian
Posts: 734

Rep: Reputation: 30
Re: Need help to route traffic properly with 2 eth cards

Quote:
Originally posted by mchan
I have 2 eth cards in my linux PC which it is running Fedora core 3.
Here is my configuration.

Company Intranet ----- Linux PC ---- Router ---- private network

The Linux PC has 2 eth cards (eth0 and eth1)

eth0 is connected to Company Intranet which it get the IP address from DHCP server

eth1 is connected to Router which I assigned the static IP address and default gateway for eth1

If I only have eth 0 active, I can connect to company Intranet via ssh/telnet.
My DNS is working perfect. But as soon as I active eth1. My DNS doesn't work anymore. I cannot connect to company Intranet. It seems the linux PC route all the traffic via the default gateway I set for eth1. Therefore, all the traffic go to eth1. I know it because when I use "ping". I can see the traffic try to go out via the default gateway in eth1. If I specific using eth0 interface in PING, it work "ping -Ieth0 X.X.X.X"

My question is how I can manage the particular traffic go to private network
using eth1 and the rest of the traffic use eth0?

Let say my private network is "172.200.X.X".
When I ping 172.200.X.X, how can I tell linux to use eth1 instead of eth0?
On the other hand, if I try to ping 135.234.x.x. it should use eth0.

Any idea how to do it? Should I set the filter in the routing table in Linux?
If so, how to do it? Thanks!
The Linux Documentation Project ; HOWTO : Networking
http://www.tldp.org/HOWTO/HOWTO-INDEX/networking.html
 
  


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
routing traffic out different eth#?? cjs500 Linux - Networking 3 07-11-2005 12:59 AM
Need to route traffic through specific nic cards... Thaidog Linux - Networking 4 07-01-2005 07:31 PM
bypass local prerouting route for external eth interface? tblack Linux - Networking 1 09-27-2004 03:47 PM
command to see eth traffic? darazman Linux - Networking 8 10-25-2003 02:16 PM
2 static IP addresses on 2 eth cards Zingaro2002 Linux - Networking 8 01-21-2003 12:16 PM

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

All times are GMT -5. The time now is 08:20 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
Open Source Consulting | Domain Registration