简介

http://blog.sina.com.cn/s/blog_6753b15401010jqw.html #ubuntu 双线双网卡双IP实现方式
vi /etc/network/interfaces #网卡配置文件
auto eth0
iface eth0 inet static
address 113.200.88.250
netmask 255.255.255.248
network 113.200.88.248
broadcast 113.200.88.255
gateway 113.200.88.249
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 221.11.1.67
auto eth1
iface eth1 inet static
address 113.200.102.66
netmask 255.255.255.240
gateway 113.200.102.65
vi /etc/iproute2/rt_tables
251 unicom
ip route flush table unicom
ip route add default via 113.200.102.65 dev eth1 src 113.200.102.66 table unicom
ip rule add from 113.200.102.66 table unicom
vi /etc/init.d/networking #末尾加上
ip route flush table unicom
ip route add default via 113.200.102.65 dev eth1 src 113.200.102.66 table unicom
ip rule add from 113.200.102.66 table unicom
exit 0 之前