请大神帮忙看下如何排查,谢谢!
[root@localhost ~]# ping baidu.com
ping: baidu.com: 未知的名称或服务
[root@localhost ~]# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=42 time=142 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=42 time=142 ms
^C
--- 8.8.8.8 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 142.856/142.916/142.976/0.060 ms
vi /etc/resolv.conf
# Generated by NetworkManager
nameserver 8.8.8.8
vi /etc/sysconfig/network-scripts/ifcfg-ens160
TYPE="Ethernet"
BOOTPROTO="none"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="yes"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="ens160"
UUID="70b577b4-9e75-48e2-9c26-6ee37be67a19"
DEVICE="ens160"
ONBOOT="yes"
DNS1="8.8.8.8"
IPADDR="xx.xx.33.69"
PREFIX="25"
GATEWAY="xx.xx.33.126"
IPV6_PEERDNS="yes"
IPV6_PEERROUTES="yes"
IPV6_PRIVACY="no"
问题算是解决了,但是不知道原因,我换了个IP地址就好了。
换个dns服务器吧.
要么本机(地)dns配置问题,要么域名映射ip有问题。
nameserver换223.5.5.5试试