我是靠谱客的博主 沉默冬日,这篇文章主要介绍给linux主机添加删除默认路由,现在分享给大家,希望可以做个参考。

route add default gw x.x.x.x 

route del default gw x.x.x.x

详细的路由添加方法

//添加到主机的路由
# route add –host 192.168.1.11 dev eth0
# route add –host 192.168.1.12 gw 192.168.1.1
//添加到网络的路由
# route add –net 192.168.1.11  netmask 255.255.255.0 eth0
# route add –net 192.168.1.11  netmask 255.255.255.0 gw 192.168.1.1
# route add –net 192.168.1.0/24 eth1
//添加默认网关
# route add default gw 192.168.2.1
//删除路由
# route del –host 192.168.1.11 dev eth0
--------------------- 

转载自:https://blog.csdn.net/xchong3/article/details/80773105 
 

最后

以上就是沉默冬日最近收集整理的关于给linux主机添加删除默认路由的全部内容,更多相关给linux主机添加删除默认路由内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(63)

评论列表共有 0 条评论

立即
投稿
返回
顶部