LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Need help to route traffic properly with 2 eth cards (https://www.linuxquestions.org/questions/linux-networking-3/need-help-to-route-traffic-properly-with-2-eth-cards-303907/)

mchan 03-20-2005 10:42 AM

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!

t3gah 03-20-2005 07:55 PM

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


All times are GMT -5. The time now is 02:18 AM.