10.12.2 Manage multiple net connections
[FIXME] Policy routing (by Phil Brutsche [email protected]
):
See the
iproute manual
for
details. Traffic control (tc) may also be interesting.
Environment:
eth0: 192.168.1.2/24; gateway 192.168.1.1
eth1: 10.0.0.2/24; gateway 10.0.0.1
No masquerading on this machine.
Special magic:
ip rule add from 192.168.1.2 lookup 1
ip rule add from 10.0.0.2 lookup 2
ip route add to default via 10.0.0.1 metric 0
ip route add to default via 192.168.1.1 metric 1
ip route add table 1 to 192.168.1.0/24 via eth0
ip route add table 1 to 10.0.0.2/24 via eth1
ip route add table 1 to default via 192.168.1.1
ip route add table 2 to 192.168.1.0/24 via eth0
ip route add table 2 to 10.0.0.2/24 via eth1
ip route add table 2 to default via 10.0.0.2
[FIXME] I've never done this. How to set up dialup as backup to a fast
connection with autodial features? Please send me a patch here :)