#根据源地址决定路由表 ip rule add from 192.168.10.0/24 table 100 ip rule add from 192.168.20.20 table 110 #根据目的地址决定路由表 ip rule add to 192.168.30.0/24 table 120 ip rule add to 192.168.40.0/24 table 130 #根据网卡设备决定路由表 ip rule add dev eth0 table 140 ip rule add dev eth1 table 150
ip rule del from 192.168.1.1 #根据IP删除 ip rule del prio 32765 #根据优先级删除 ip rule del table tablename #根据名称删除
添加路由标注id ip route add 192.168.8.0 via 192.168.9.9 dev eth1 table 10 ip route add default via 192.168.9.9 dev eth1 table 10