如何使用 CentOS 6 永久删除/删除路线中的线路

Joh*_*ohn 5 route centos linux-networking deleting

root@new [~]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
178.18.23.200   0.0.0.0         255.255.255.255 UH    0      0        0 eth0
178.18.23.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1002   0        0 eth0
176.0.0.0       0.0.0.0         248.0.0.0       U     0      0        0 eth0
0.0.0.0         178.18.23.253   0.0.0.0         UG    0      0        0 eth0
Run Code Online (Sandbox Code Playgroud)

我可以删除 176.0.0.0 条目

route delete -net 176.0.0.0/5
Run Code Online (Sandbox Code Playgroud)

这有效,但重启后这条线又回来了。知道如何永久删除它吗?

Chr*_*ian 6

检查 /etc/sysconfig/network-scripts/route-eth0,

对于包含路由的文件,在 /etc 中递归地为 176.0.0.0 Grep

# grep -r "176.0.0.0" /etc