Linux网络配置 DNS配置信息丢失 原因分析及解决办法

在启动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
在这里插入图片描述

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值