IP是DHCP获得的。网络正常。
dns服务器也能ping 通,就是无法解析域名。痛苦中


求各位大仙帮忙。
1. 要上網時 會到 /etc/resolv.conf 找 dnssudo cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1
2. 所以 實際上是到 /run/resolvconf/resolv.conf 尋找 nameserversudo ls -al /etc/resolv.conf
lrwxrwxrwx 1 root root 29 11月 7 15:07 /etc/resolv.conf -> ../run/resolvconf/resolv.conf
重启后检查resolv.conf,写入正常。cat /etc/resolvconf/resolv.conf.d/head
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTE
nameserver 114.114.114.114
nameserver 8.8.4.4
可是还是无法解析域名。sudo cat /etc/resolv.conf
nameserver 114.114.114.114
nameserver 8.8.4.4
nameserver 127.0.1.1
域名服务器联通正常:lee@lee-VirtualBox:~$ dig http://www.163.com
; <<>> DiG 9.9.5-4.3-Ubuntu <<>> http://www.163.com
;; global options: +cmd
;; connection timed out; no servers could be reached
lee@lee-VirtualBox:~$ dig http://www.baidu.com
; <<>> DiG 9.9.5-4.3-Ubuntu <<>> http://www.baidu.com
;; global options: +cmd
;; connection timed out; no servers could be reached
请求再次分析,谢谢!ping 114.114.114.114
PING 114.114.114.114 (114.114.114.114) 56(84) bytes of data.
64 bytes from 114.114.114.114: icmp_seq=1 ttl=77 time=77.3 ms
64 bytes from 114.114.114.114: icmp_seq=2 ttl=87 time=93.9 ms
64 bytes from 114.114.114.114: icmp_seq=3 ttl=72 time=96.5 ms
; <<>> DiG 9.9.5-3-Ubuntu <<>> http://www.163.com
dig www.163.com
; <<>> DiG 9.9.5-3-Ubuntu <<>> 163.comdig 163.com
Registry Registrant ID:whois 163.com | grep Registrant
Registry Registrant ID:whois-protectwhois speedcdns.com | grep Registrant
1. ping -c 3 127.0.0.1lo Link encap:本地环回
inet 地址:127.0.0.1 掩码:255.0.0.0
2. ping -c 3 10.0.2.15inet 地址:10.0.2.15 广播:10.0.2.255 掩码:255.255.255.0
3. ping -c 3 10.0.2.10.0.0.0 10.0.2.1 0.0.0.0 UG 0 0 0 eth0
建議 順序改為sudo cat /etc/resolv.conf
nameserver 114.114.114.114
nameserver 8.8.4.4
nameserver 127.0.1.1
4、ping -c 3 forum.ubuntu.org.cnPING 10.0.2.1 (10.0.2.1) 56(84) bytes of data.
From 10.0.2.15 icmp_seq=1 Destination Host Unreachable
From 10.0.2.15 icmp_seq=2 Destination Host Unreachable
From 10.0.2.15 icmp_seq=3 Destination Host Unreachable
--- 10.0.2.1 ping statistics ---
3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 2015ms
pipe 3
5、ping 8.8.8.8 OKping: unknown host forum.ubuntu.org.cn
把下面指令 複製 貼進終端機 執行PING 10.0.2.1 (10.0.2.1) 56(84) bytes of data.
3 packets transmitted, 0 received, +3 errors, 100% packet loss
試試5、ping 8.8.8.8 OK
ping 114.114.114.114 OK
ping -c 3 192.157.249.221
PING 192.157.249.221 (192.157.249.221) 56(84) bytes of data.
--- 192.157.249.221 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2003ms
ping -c 3 10.0.2.3
PING 10.0.2.3 (10.0.2.3) 56(84) bytes of data.
64 bytes from 10.0.2.3: icmp_seq=1 ttl=63 time=0.126 ms
64 bytes from 10.0.2.3: icmp_seq=2 ttl=63 time=0.161 ms
64 bytes from 10.0.2.3: icmp_seq=3 ttl=63 time=0.289 ms
--- 10.0.2.3 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.126/0.192/0.289/0.070 ms