如何使用 CentOS 6 永久刪除/刪除路線中的線路

如何使用 CentOS 6 永久刪除/刪除路線中的線路
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

我可以刪除 176.0.0.0 條目

route delete -net 176.0.0.0/5

這可行,但重啟後這條線又回來了。知道如何永久刪除它嗎?

答案1

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

在 /etc 中遞歸尋找包含路由的檔案中的 176.0.0.0

# grep -r "176.0.0.0" /etc

相關內容