Linux靜態路由相關

臨時路由,機器重啓後消失

 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

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章