现象系统无法上网,ping本地127.0.0.1不通,局域网IP也不通,网关也无法ping通
通过 ifconfig 查看网卡和lo回环口 都已启用
重启network服务报错如下:
# service network restart
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: Active connection state: activated
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/2 [ OK ]
Bringing up interface eth1: Active connection state: activated
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/3 [ OK ]
问题的原因是RedHat自己开发的NetworkManager管理工具和/etc/sysconfig/network-scripts/ifcfg-ethx配置不同步造成的。如果要消除这个提示,请关闭NetworkManager服务即可:
# chkconfig NetworkManager off --永久关闭服务,需要重启
# service NetworkManager stop --立即关闭服务,不需要重启
此时重新启动network服务即可