ping www.baidu.com 不通(centos 7.2 )

版权声明:未经允许,不得转载 https://blog.csdn.net/wanchaopeng/article/details/82670100

ping: www.baidu.com: Temporary failure in name resolution

ping了一下外部地址,发现提示the host is unknow,可以断定是DNS的设置有问题

修改DNS 方法如下

cat /etc/resolv.conf 
# Generated by NetworkManager
nameserver 10.0.0.254

在/etc/resolv.conf 添加

cat /etc/resolv.conf 
# Generated by NetworkManager
nameserver 10.0.0.254
nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 168.95.1.1
nameserver 168.95.192.1

重启网卡

systemctl restart network

 

展开阅读全文

没有更多推荐了,返回首页