臨時路由,機器重啓後消失
route add –host 192.168.4.2 dev eth0:1
route add –net 192.168.4.0/24 gw 192.168.4.250
route add –net 192.168.4.0 netmask 255.255.255.0 gw 192.168.4.250
route del –host 192.168.4.2 dev eth0:1
route del –net 192.168.4.0/24 192.168.4.250
route del–net 192.168.4.0 netmask 255.255.255.0 gw 192.168.4.250
永久路由
編輯或增加 配置文件
/etc/sysconfig/static-routes
any net 172.22.0.0/16 gw 172.22.4.254
any net 192.168.0.0/16 gw 172.22.4.254