Linux禁用空路由

[root@localhost ~]# ip route
default via 192.168.1.254 dev eth0
169.254.0.0/16 dev eth0 scope link metric 1002    <----------这是一条空路由,要刪除它
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.108

---------------------------------------------------------------------------------------------------------

1、修改配置文件:vim /etc/default/grub
NOZEROCONF="yes"

2、重启网络服务:systemctl restart network

做如下验证:------------------------------------------------------------------------------------------

[root@localhost ~]# ip route
default via 192.168.1.254 dev eth0
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.108

posted @ 2018-08-14 20:44  nsd1804_wuwenfu  阅读(732)  评论(1编辑  收藏  举报