在启动NetworkManager的状况下,ping www.baidu.com不成功
重新配置DNS信息
重新启动网络
service network restart
重新查看DNS配置文件,发现DNS配置信息又一次丢失了。
所以,到这儿,我认为DNS配置信息丢失应该是NetworkManager引起的。
使用下边的方法,成功解决问题。
[root@localhost /etc]$ chkconfig NetworkManager off
[root@localhost /etc]$ chkconfig network on
[root@localhost /etc]$ services NetworkManager stop
-bash: services: command not found
[root@localhost /etc]$ service NetworkManager stop
Stopping NetworkManager daemon: [ OK ]
[root@localhost /etc]$ service network start
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
Bringing up interface eth1:
Determining IP information for eth1… failed; no link present. Check cable?
[FAILED]
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
[root@localhost /etc]$ service networks start
networks: unrecognized service
[root@localhost /etc]$ service network restart
Shutting down interface eth0: [ OK ]
Shutting down interface eth1: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: Determining if ip address 192.168.10.32 is already in use for device eth0…
[ OK ]
Bringing up interface eth1:
Determining IP information for eth1… failed; no link present. Check cable?
[FAILED]
[root@localhost /etc]$ ping www.baidu.com
PING www.a.shifen.com (14.215.177.38) 56(84) bytes of data.
64 bytes from www.baidu.com (14.215.177.38): icmp_seq=1 ttl=55 time=917 ms
64 bytes from www.baidu.com (14.215.177.38): icmp_seq=2 ttl=55 time=545 ms
64 bytes from www.baidu.com (14.215.177.38): icmp_seq=3 ttl=55 time=31.4 ms
64 bytes from www.baidu.com (14.215.177.38): icmp_seq=4 ttl=55 time=11.9 ms
64 bytes from www.baidu.com (14.215.177.38): icmp_seq=5 ttl=55 time=14.7 ms