[LARTC] Trying to understand Routing for muliple networks

zen30267@zen.co.uk zen30267@zen.co.uk
Wed, 1 Oct 2003 11:52:19 GMT


Hi All,

I am trying to understand how to setup routing for multiple uplinks using a Bering firewall.

Using this document

http://lartc.org/howto/lartc.rpdb.multiple-links.html

1) Am I correct in that I can safely leave out these commands, since these routes are automatically setup by Bering?

ip route add $P1_NET dev $IF1 src $IP1
ip route add $P2_NET dev $IF2 src $IP2

2) I am also struggling to understand which of the commands are responsible for ensuring that packets arriving on one interface, are equally returned on the same interface.

Is it achieved by this?

ip rule add from $IP1 table T1
ip rule add from $IP2 table T2

or this?

ip route add $P0_NET     dev $IF0 table T1
ip route add $P2_NET     dev $IF2 table T1
ip route add 127.0.0.0/8 dev lo   table T1
ip route add $P0_NET     dev $IF0 table T2
ip route add $P1_NET     dev $IF1 table T2
ip route add 127.0.0.0/8 dev lo   table T2

Regards,

Simon Chalk.