Routing question

Ben Boulanger ben at blackavar.com
Fri May 9 14:08:48 EDT 2003


On Fri, 9 May 2003 pll at lanminds.com wrote:
>    DEVICE=eth0			DEVICE=eth3 	       
>    ONBOOT=yes			ONBOOT=yes 	       
>    BOOTPROTO=none 		BOOTPROTO=none 	       
>    IPADDR=10.241.35.18		NETWORK=10.241.37.0    
>    NETMASK=255.255.255.0 	IPADDR=10.241.37.70    
>    NETWORK=10.241.35.0   	NETMASK=255.255.255.0  
>    BROADCAST=10.241.35.255	BROADCAST=10.241.37.255
>    GATEWAY=10.241.35.1		GATEWAY=10.241.37.1    

Yup, so pull that GATEWAY out and put it in /etc/sysconfig/network 
instead... I imagine that's been touched on already.

>    # netstat -rn
>    Kernel IP routing table
>    Destination  Gateway     Genmask         Flags   MSS Window  irtt Iface
>    10.241.35.0  0.0.0.0     255.255.255.0   U        40 0          0 eth0
>    10.241.37.0  0.0.0.0     255.255.255.0   U        40 0          0 eth3
>    127.0.0.0    0.0.0.0     255.0.0.0       U        40 0          0 lo
>    0.0.0.0      10.241.35.1 0.0.0.0         UG       40 0          0 eth0
> 
> With this configuration, everything *should* route out eth3, however,
> I can't seem to get this to work properly.  One NIC responds, but not
> the other.  In this case, eth0 reponds to pings from off these subnets
> (i.e. if I ping from 168.159.31.9), but not eth3.

Everything will route out eth0, everything for the 10.241.37.0/24 net will 
route out eth3, but nothing else.  

> If I add a second default route for the .37 subnet, like this:
>  
>     # netstat -rn
>     Kernel IP routing table
>     Destination  Gateway     Genmask         Flags   MSS Window  irtt Iface
>     10.241.35.0  0.0.0.0     255.255.255.0   U        40 0          0 eth0
>     10.241.37.0  0.0.0.0     255.255.255.0   U        40 0          0 eth3
>     127.0.0.0    0.0.0.0     255.0.0.0       U        40 0          0 lo
>     0.0.0.0      10.241.37.1 0.0.0.0         UG       40 0          0 eth3
>     0.0.0.0      10.241.35.1 0.0.0.0         UG       40 0          0 eth0

While not broken, this results in your default route being out eth3, which 
is the closed network, with no egress points, right?  What -should- happen 
is that if eth3 drops for some reason, your eth0 default route will take 
over since eth3's routes leave.

If you want to get to either NIC from either subnet, you're going to have 
to either route across the linux box or make sure the two networks can 
talk independent of the linux box.  I take it you mean this:

	10.241.35.0/24 can talk to 10.241.37.70
	10.241.37.0/24 can talk to 10.241.35.18

	as well as

	10.241.35.0/24 can talk to 10.241.35.18
	10.241.37.0/24 can talk to 10.241.37.70

	You want all traffic to route out eth0 (35.0/24) with the 
exception of 10.241.37.0/24.  

If you turn on IP forwarding, does it act as you would like?  

-- 

"Only two things are infinite, the universe and human stupidity,
 and I'm not sure about the former" -- Albert Einstein.




More information about the gnhlug-discuss mailing list