ip rou add default dev ppp1 table 101
ip rule add from iif ppp0 pref 160 table 102
ip rou add default dev ppp0 table 102
ip route add default scope global nexthop dev ppp1 weight 1 nexthop dev ppp0 weight 1
上面的最好放在/etc/pppoe/ppp中的ip-up的文件中对ADSL上线进行判断
这里要写shell了,
思路:ppp0 上线
ip route add default scope global nexthop dev ppp0
ppp1 上线
ip route add default scope global nexthop dev ppp1
ppp1与ppp0同时上线
ip route add default scope global nexthop dev ppp1 weight 1 nexthop dev ppp0 weight 1
在ip-down中
ppp0断线
ip route add default scope global nexthop dev ppp1
ppp1断线
ip route add default scope global nexthop dev ppp0
页:
[1]