[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Network routing on multi-homed system



Hello,

Isaac Freeman a écrit :
> 
> iface eth1 inet static
> 	address 172.1.1.40
> 	netmask 255.255.255.224
> 
> 	# routing
> 	post-up ip route add 172.1.1.62/32 dev eth1 src 172.1.1.40 table external
> 	post-up ip route add default via 172.1.1.62 table external
> 	post-up ip rule add from 172.1.1.40 table external
> 	post-down ip rule del from 172.1.1.40 table external

IMO, your special routing is broken. Not all packets with the given
source address should be sent to the gateway, but only packets with a
destination address outside the LAN. Packets with a destination address
inside the LAN should be sent directly.

Either route the LAN prefix using the main table :

	post-up ip rule add to 172.1.1.32/27 table main

(to be created after thus inserted before the "from" rule)
or add a direct route for the prefix in the special table :

	post-up ip route add 172.1.1.32/27 dev eth1 table external

Same for both interfaces and servers.

Note : the routes to the gateways should not be necessary.


Reply to: