Routing question on RH9, two gateways
Hi all,
Sorry this is a pretty long post, here goes... I have a need to connect two adsl lines to a RedHat 9 box, via two ethernet cards (eth0 and eth1). The thing that is confusing me is getting the routes setup properly - namely the issue of gateways. The two adsl connections are on different subnets and have different gateways. I need to be able to access both connections, and have the linux box accessable from the web via both connections, but the routing table - as configured by the network scripts at boot time - looks like this: IP1: 1.1.1.102 gateway: 1.1.1.101 subnet mask: 255.255.255.252 dev: eth0 IP2 - 2.2.2.102 gateway: 2.2.2.101 subnet mask: 255.255.255.252 dev: eth1 eth2 is LAN... (both IP's made up) Code:
# route -n So, that's how the network scripts configure things for me at boot time, and I can access the internet and can access the box from the internet via either 1.1.1.102 or 2.2.2.102. But what the routing table info here is telling me is: route all traffic to/from 2.2.2.102 to anywhere THROUGH 1.1.1.102 - ie. through the default gateway. And everything breaks if I disconnect eth0 (1.1.1.102) - I can't get to the internet or access the box from the internet on 1.1.1.102 OR 2.2.2.102. This is no good. I think what I need to do is have the ADSL IP addresses added with their unique gateways instead of 0.0.0.0 (ie. the default gateway). Is that right? Does anyone know how I can multi-home this box and get around the problem of one default gateway? Thanks in advance for reading such a long post :) |
Time to read the Advanced Routing HOWTO, particularly Sections 4 & 5
|
Thanks Peter! Working my way through it...
|
All times are GMT -5. The time now is 11:23 AM. |