MultiPath :: 同時使用兩個以上ADSL
環境:
Linux(FC3) with eth0, eth1, eth2
local area
eth0: 192.168.10.254/24
ADSL 512k/8M
eth1: 111. 111.111.1/24 gw 111.111.111.254
FTTB 2M/2M
eth2: 222.222.222.142/28 gw 222.222.222.129
在rc.local裡面加一個 mpath.sh
== cut start ==
#!/bin/sh
ip rule add pref 10 to 192.168.10.0/24 table 10
ip route add 192.168.10.0/24 table 10 dev eth0
ip rule add pref 20 from 111.111.111.1 table 20
ip route add default table 20 via 111.111.111.254
ip rule add pref 30 from 222.222.222.142 table 30
ip route add default table 30 via 222.222.222.129
ip route show
ip route flush cache
== cut end ==
ref:
人牙1: Linux 上多條對外連線(Multi-Path)實作 / 作者﹕網中人
人牙2: Linux ADSL Multipath Routing Solution / Tommy Wu