1 查看缺省规则
ip rule list
ip route list table local
ip route list table main
2 创建test规则路由
echo 200 test >> /etc/iproute2/rt_tables
ip rule add from 10.0.0.10 table test
ip rule ls
3 为test路由表创建路由项
ip route add default via 192.68.80.8 dev eth0 table john
ip route flush cache
ip rule list
ip route list table local
ip route list table main
2 创建test规则路由
echo 200 test >> /etc/iproute2/rt_tables
ip rule add from 10.0.0.10 table test
ip rule ls
3 为test路由表创建路由项
ip route add default via 192.68.80.8 dev eth0 table john
ip route flush cache
本文指导如何在系统中创建自定义路由表并添加路由项,通过使用`iprule`命令实现。
1538

被折叠的 条评论
为什么被折叠?



