源地址策略路由

$ cat /etc/iproute2/rt_tables

reserved values

255 local
254 main
253 default
0 unspec

local

1 inr.ruhep

251 unicom
252 telecom

$ cat /etc/rc.local

tel/cnc

.......
ip rule add from 202.104.102.128/25 table telecom
ip rule add from 123.58.55.128/25 table unicom

$ cat /etc/init.d/network
..................
ip route flush table telecom
ip route add default via 202.104.102.129 dev eth1 table telecom
ip route flush table unicom
ip route add default via 123.58.55.129 dev eth1 table unicom
exit $rc

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • hexdump -C 查看二进制文件 xxd:查看二进制文件 whatis 简单描述命令的用途whatis c...
    JevonWei阅读 950评论 0 0
  • 一.Ip协议特征 (1)internet协议特征 运行于 OSI 网络层  面向无连接的协议  独立处理数据包...
    楠人帮阅读 987评论 0 0
  • Linux的ip命令和ifconfig类似,但前者功能更强大,并旨在取代后者。使用ip命令,只需一个命令,你就能很...
    garyond阅读 5,525评论 1 7
  • NAME dnsmasq - A lightweight DHCP and caching DNS server....
    ximitc阅读 2,982评论 0 0
  • 链接:写的好。看明白了。http://kittenyang.com/anchorpoint/再复制一下结论。 总结...
    请叫我魔法师阅读 699评论 0 0

友情链接更多精彩内容