您的位置:首页 > 运维架构 > Linux

Linux多网卡多IP配置

2015-09-16 09:36 549 查看
echo "210 local100" >> /etc/iproute2/rt_tables
echo "220 local200" >> /etc/iproute2/rt_tables
echo "230 local300" >> /etc/iproute2/rt_tables

ip route add 192.168.0.0 dev eth0 src 192.168.0.251 table local100
ip route add 192.168.0.0 dev eth1 src 192.168.0.252 table local200
ip route add 192.168.0.0 dev eth2 src 192.168.0.253 table local300

ip route add default dev eth0 table local100
ip route add default dev eth1 table local200
ip route add default dev eth2 table local300

ip rule add from 192.168.0.251 table local100
ip rule add from 192.168.0.252 table local200
ip rule add from 192.168.0.253 table local300
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: