linux 添加、删除 route

删除路由

echo "########## os add route"
route del -net 192.168.56.0/24 

添加路由

echo "########## os add route"
route add -net 192.168.56.0/24 gw 192.168.56.254

删除默认路由

echo "########## os remove default route"
route del default 
route del default dev enp0s8
route del default dev enp0s9

添加默认路由

echo "########## os add route"
route add default gw 192.168.56.1
posted @ 2018-03-20 16:08  peiybpeiyb  阅读(1510)  评论(0编辑  收藏  举报