Ming-Ching Tiew
2004-May-13 02:53 UTC
Multiipath routing - can''t ping links from LAN after default routes
I have a Linux with 3 LAN interfaces doing multipath NAT to two internet links via ADSL. The question I have is after I added the default route on each of the routing table, I can''t ping the external interfaces of the Linux from the LAN ( pinging from the Linux itself is OK ). But pinging beyond the two external interfaces ( eg the default route ) is OK. I use symbolic names here :- # ip route add ${INSIDE_NETWORK} dev ${INSIDE_DEV} table first ip route add ${OUTSIDE_NETWORK} dev ${OUTSIDE_DEVICE} table first ip route add ${OUTSIDE_NETWORK2} dev ${OUTSIDE_DEVICE2} table first ip route add 127.0.0.0/8 dev lo table first # ip route add ${INSIDE_NETWORK} dev ${INSIDE_DEV} table second ip route add ${OUTSIDE_NETWORK} dev ${OUTSIDE_DEVICE} table second ip route add ${OUTSIDE_NETWORK2} dev ${OUTSIDE_DEVICE2} table second ip route add 127.0.0.0/8 dev lo table second # ip route add ${OUTSIDE_NETWORK} dev ${OUTSIDE_DEVICE} src ${OUTSIDE_IP} ip route add ${OUTSIDE_NETWORK2} dev ${OUTSIDE_DEVICE2} src ${OUTSIDE_IP2} # ip rule add from ${OUTSIDE_IP} table first ip rule add from ${OUTSIDE_IP2} table second # # weighted multipath routing # ip route add default scope global nexthop via \${OUTSIDE_GATEWAY} \ ${OUTSIDE_DEVICE} weight ${OUTSIDE_DEV_WEIGHT} \ nexthop ${OUTSIDE_GATEWAY2} dev ${OUTSIDE_DEVICE2} \ weight ${OUTSIDE_DEV2_WEIGHT} Everything is working if I just do as above, I can ping OUTSIDE_GATEWAY and OUTSIDE_GATEWAY2 AND OUTSIDE_IP and OUTSIDE_IP2. But If I added the two lines below :- ip route add default via ${OUTSIDE_GATEWAY} table first ip route add default via ${OUTSIDE_GATEWAY2} table second Then I can''t ping from my INSIDE_NETWORK to both the OUTSIDE_IP and OUTSIDE_IP2 but still able to ping OUTSIDE_GATEWAY and OUTSIDE_GATEWAY2. Why ? _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/