ping www.baidu.com
ping: unknown host www.baidu.com
修改/etc/resolv.conf 配置文件
将主机的路由添加上去,或者添加共用域名解析
nameserver 192.168.1.1
nameserver 114.114.114.114
nameserver 8.8.8.8
nameserver 1.2.4.8
测试
ping www.baidu.com
PING www.a.shifen.com (14.215.177.39) 56(84) bytes of data.
64 bytes from 14.215.177.39: icmp_seq=1 ttl=1 time=325 ms
64 bytes from 14.215.177.39: icmp_seq=2 ttl=1 time=306 ms
^C
--- www.a.shifen.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 306.347/316.079/325.812/9.748 ms