我遇到了一个奇怪的问题......我的默认网关返回" 0.0.0.0"即使我的配置看起来不错,至少对我来说。
情况:
CentOS 6.6
2 Network card : eth2 = 1 public, eth3 = 1 private
Public IP : 51.XX.XX.XX/32
Public Gateway : 151.XX.XX.XX
所以我已经配置了
/etc/sysconfig/network
GATEWAY=151.XX.XX.XX
GATEWAYDEV=eth2
/etc/sysconfig/netword-scripts/ifcfg-eth2
DEFROUTE=yes
NM_CONTROLLED=no
结果:
cmd : route
Dest : default, Gateway : *, Genmask : 0.0.0.0
- >网络文件中没有IP
当我这样做时:
ip route replace default via 151.XX.XX.XX dev eth2
它有效,但它是非持久的
我到目前为止已尝试过:
Config with the GW with /etc/sysconfig/network
Config with the GW with /etc/sysconfig/network-scripts/ifcfg-eth2 -> does not even set the 0.0.0.0 def GW
Config with the GW with /etc/sysconfig/network-scripts/route-eth2 -> does not even set the 0.0.0.0 def GW
干杯