我无法从 Ubuntu 14.04 访问任何 Google 服务,例如 Google.com 或 GMail。这不是 ISP 问题,因为我可以使用与 PC 连接的同一 wifi 连接,使用智能手机访问 Google 服务。
如果我尝试使用 Chromium 浏览器访问 google.com 或 mail.google.com,它会一直加载,状态栏上会显示“正在解析主机”。如果我让它加载,经过很长时间后,它会返回一个空白的白页,没有任何错误消息。
jouni@OmniCorp:~$ host google.com
google.com has address 173.194.126.35
google.com has address 173.194.126.36
google.com has address 173.194.126.32
google.com has address 173.194.126.41
google.com has address 173.194.126.38
google.com has address 173.194.126.46
google.com has address 173.194.126.39
google.com has address 173.194.126.37
google.com has address 173.194.126.34
google.com has address 173.194.126.33
google.com has address 173.194.126.40
google.com has IPv6 address 2404:6800:4001:801::1000
google.com mail is handled by 20 alt1.aspmx.l.google.com.
google.com mail is handled by 30 alt2.aspmx.l.google.com.
google.com mail is handled by 40 alt3.aspmx.l.google.com.
google.com mail is handled by 50 alt4.aspmx.l.google.com.
google.com mail is handled by 10 aspmx.l.google.com.
jouni@OmniCorp:~$ ping google.com
PING google.com (173.194.126.40) 56(84) bytes of data.
64 bytes from kul01s08-in-f8.1e100.net (173.194.126.40): icmp_seq=1 ttl=55 time=36.8 ms
64 bytes from kul01s08-in-f8.1e100.net (173.194.126.40): icmp_seq=2 ttl=55 time=38.0 ms
64 bytes from kul01s08-in-f8.1e100.net (173.194.126.40): icmp_seq=3 ttl=55 time=40.5 ms
64 bytes from kul01s08-in-f8.1e100.net (173.194.126.40): icmp_seq=4 ttl=55 time=40.3 ms
64 bytes from kul01s08-in-f8.1e100.net (173.194.126.40): icmp_seq=5 ttl=55 time=42.7 ms
64 bytes from kul01s08-in-f8.1e100.net (173.194.126.40): icmp_seq=6 ttl=55 time=35.6 ms
64 bytes from kul01s08-in-f8.1e100.net (173.194.126.40): icmp_seq=7 ttl=55 time=36.5 ms
64 bytes from kul01s08-in-f8.1e100.net (173.194.126.40): icmp_seq=8 ttl=55 time=35.7 ms
64 bytes from kul01s08-in-f8.1e100.net (173.194.126.40): icmp_seq=9 ttl=55 time=47.0 ms
64 bytes from kul01s08-in-f8.1e100.net (173.194.126.40): icmp_seq=10 ttl=55 time=35.4 ms
64 bytes from kul01s08-in-f8.1e100.net (173.194.126.40): icmp_seq=11 ttl=55 time=35.4 ms
^C
--- google.com ping statistics ---
11 packets transmitted, 11 received, 0% packet loss, time 9995ms
rtt min/avg/max/mdev = 35.472/38.595/47.012/3.544 ms
如果我运行
sudo service network-manager restart
此后,Google 服务可以运行几分钟。这个问题已经持续了几个星期。
有任何想法吗?
答案1
我有同样的问题。我按照以下步骤解决了它:
- 编辑 ...
vi /etc/ppp/peers/dsl-provider
- 通过
#
,像这样注释掉这一行:
#usepeerdns
- 编辑 ...
vi /etc/resolvconf/resolv.conf.d/head
- 确保它是这样的:
nameserver 8.8.8.8
顺便说一下,我的连接是拨号上网。如果你能管理在usepeerdns
哪里无线上网,你的问题也将得到解决。
答案2
可能是你的 ISP DNS 服务器出了问题。或者你的路由器。首先,检查你是否可以 ping 通 8.8.8.8。如果可以,请转到网络设置并将 DNS 设置为手动 8.8.8.8。如果已经是,请将其设置为 77.88.8.8
答案3
使用 vim 或 gedit 编辑 /etc/NetworkManager/NetworkManager.conf
用#号符号注释掉dns=dnsmasq这一行
它应该看起来像这样
[主要] 插件=ifupdown,keyfile
#dns=dnsmasq
[ifupdown] 管理=false
然后执行以下操作;
sudo /etc/init.d/nscd restart
sudo service network-manager restart