-
在 /etc/iproute2/rt_tables 中添加自定义路由表
100 my_table
-
在自定义路由表中添加规则
ip route add default dev eth1 table my_table
-
添加路由策略,特定源IP使用自定义路由表
ip rule add from 192.168.0.0/24 my_table
在 /etc/iproute2/rt_tables 中添加自定义路由表
100 my_table
在自定义路由表中添加规则
ip route add default dev eth1 table my_table
添加路由策略,特定源IP使用自定义路由表
ip rule add from 192.168.0.0/24 my_table
本文标题:Linux基于源IP的策略路由
本文链接:https://www.haomeiwen.com/subject/aqxrnrtx.html
网友评论