????#!/bin/bash
????# BY kerryhu
????# QQ:263205768
????# MAIL:king_819@163.com
????# BLOG:http://kerry.blog.51cto.com
????# Please manual operation yum of before Operation.....
????#???iproute2
????tar -zxvf iproute2-2.6.16-060323.tar.gz
????cd iproute2-2.6.16-060323
????make SBINDIR=/sbin
????make SBINDIR=/sbin install
????mv -v /sbin/arpd /usr/sbin

????ISP1 ?????222.188.110.32/27
????ISP2 ?????122.96.240.16/28
????eth0??222.188.110.43
?????????222.188.110.33
????eth1??122.96.240.18
?????????122.96.240.17
??????????????·???? T1 ?? T2?? ???? /etc/iproute2/rt_tables ?С?
????vi /etc/iproute2/rt_tables
????10 T1
????20 T2
???????????????????·????е?·???
????ip route add 222.188.110.32/27 dev eth0 src 222.188.110.43 table T1
????ip route add default via 222.188.110.43 table T1
????ip route add 122.96.240.16/28 dev eth1 src 122.96.240.18 table T2
????ip route add default via 122.96.240.17 table T2
????????“main”·???
????ip route add 222.188.110.32/27 dev eth0 src 222.188.110.43 table main
????ip route add 122.96.240.16/28 dev eth1 src 122.96.240.18 table main
????????????????·???
????ip route add default via 222.188.110.43
?????????????·?????????????????????·??????·?ɡ????????????
????????????????·??????????????????????????????????????????
???????????????????????????????e?????????????????·??????
????ip rule add from 222.188.110.43 table T1
????ip rule add from 122.96.240.18 table T2
??????????????????е???????????????????????????·?????
????ip route add default scope global nexthop via 222.188.110.43 dev eth0 weight 30 netxthop via 122.96.240.18 eth1 weight 70
???????????????????ISP??·?ɡ????????“weight”?????????????????????ISP????????????????