标签:efault reboot tables etc static 直接 课堂 安装centos7 replace
最近有客户需求,要在服务器上安装centos72、在/etc/iproute2/rt_tables 里面加上
252 cmcc
251 cnc
250 ctc
3、在/etc/init.d/networking 加上
ip route replace default via 101.X.X.X dev em1
ip route replace default via 43.X.X.X dev em2
ip route replace default via 117.X.X.X dev em3
ip route flush table ctc
ip route add default via 101.X.X.1 dev em1 src 101.X.X.X table ctc proto static
ip rule add from 101.X.X.X table ctc
ip route flush table cnc
ip route add default via 43.X.X.1 dev em2 src 43.X.X.X table cnc proto static
ip rule add from 43.X.X.X table cnc
ip route flush table cmcc
ip route add default via 117.X.X.1 dev em3 src 117.X.X.X table cmcc proto static
ip rule add from 117.X.X.X table cmcc
4、reboot一下
测试都可以正常通信
未完,待续~
Linux小课堂开课了(7)-三线IP刷路由-移动-联通-电信
标签:efault reboot tables etc static 直接 课堂 安装centos7 replace
原文地址:https://blog.51cto.com/11293100/2411834