看来我可以 ping 通 Google DNS 到它的 IPv6 地址 2001:4860:4860::8888,但我无法 ping 通它的 IPv4 地址 8.8.8.8
luka@luka-Inspiron-3458:~$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
^C
--- 8.8.8.8 ping statistics ---
173 packets transmitted, 0 received, 100% packet loss, time 173374ms
luka@luka-Inspiron-3458:~$ ping6 2001:4860:4860::8888
PING 2001:4860:4860::8888(2001:4860:4860::8888) 56 data bytes
64 bytes from 2001:4860:4860::8888: icmp_seq=1 ttl=48 time=286 ms
64 bytes from 2001:4860:4860::8888: icmp_seq=2 ttl=48 time=60.6 ms
64 bytes from 2001:4860:4860::8888: icmp_seq=3 ttl=48 time=61.3 ms
64 bytes from 2001:4860:4860::8888: icmp_seq=4 ttl=48 time=60.8 ms
64 bytes from 2001:4860:4860::8888: icmp_seq=5 ttl=48 time=60.9 ms
64 bytes from 2001:4860:4860::8888: icmp_seq=6 ttl=48 time=60.2 ms
64 bytes from 2001:4860:4860::8888: icmp_seq=7 ttl=48 time=59.5 ms
64 bytes from 2001:4860:4860::8888: icmp_seq=8 ttl=48 time=60.8 ms
^C
--- 2001:4860:4860::8888 ping statistics ---
8 packets transmitted, 8 received, 0% packet loss, time 7010ms
rtt min/avg/max/mdev = 59.573/88.846/286.406/74.672 ms
这台笔记本电脑的互联网连接速度非常慢(我使用的是 Ubuntu 16.04),页面加载需要几个小时,有时还会以“无法访问站点”结尾,我相信这是因为这个问题。我也无法 ping 通路由器的 IP,即 192.168.1.254。我家里的其他每台电脑都可以毫无问题地使用互联网,即使是同一台笔记本电脑,当我在 Windows 上启动时,连接也没有任何问题。
cat /etc/network/interfaces 的输出
luka@luka-Inspiron-3458:~$ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
ifconfig 的输出:
eth0 Link encap:Ethernet HWaddr 20:47:47:29:b9:98
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:11920 errors:0 dropped:0 overruns:0 frame:0
TX packets:11920 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:778490 (778.4 KB) TX bytes:778490 (778.4 KB)
wlan0 Link encap:Ethernet HWaddr b4:6d:83:9b:1d:6f
inet addr:192.168.1.75 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: 2806:10a6:5:177c:b66d:83ff:fe9b:1d6f/64 Scope:Global
inet6 addr: 2806:10a6:5:177c:c61:441f:5f13:8edf/64 Scope:Global
inet6 addr: fe80::b66d:83ff:fe9b:1d6f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9990 errors:0 dropped:0 overruns:0 frame:0
TX packets:11766 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:586026 (586.0 KB) TX bytes:1298218 (1.2 MB)
输出 iwconfig:
lo no wireless extensions.
wlan0 IEEE 802.11abgn ESSID:"INFINITUM0368"
Mode:Managed Frequency:2.462 GHz Access Point: E4:3E:D7:3B:1B:42
Bit Rate=72.2 Mb/s Tx-Power=20 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:on
Link Quality=69/70 Signal level=-41 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:521 Missed beacon:0
eth0 no wireless extensions.
cat /etc/resolv.conf 的输出
luka@luka-Inspiron-3458:/etc/init.d$ 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
search rga.ip
输出路线-n
luka@luka-Inspiron-3458:~$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.254 0.0.0.0 UG 600 0 0 wlan0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 wlan0
172.16.180.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet0
172.16.191.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet8
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet1
192.168.1.0 0.0.0.0 255.255.255.0 U 600 0 0 wlan0
路线-6 -n 的输出
luka@luka-Inspiron-3458:~$ route -6 -n
Kernel IPv6 routing table
Destination Next Hop Flag Met Ref Use If
2806:10a6:5:177c::/64 :: Ue 256 0 0 wlan0
fe80::/64 :: U 256 0 0 vmnet0
fe80::/64 :: U 256 0 0 vmnet1
fe80::/64 :: U 256 0 0 vmnet8
fe80::/64 :: U 256 4 271 wlan0
::/0 fe80::1 UG 600 3 9 wlan0
::/0 :: !n -1 1 2291 lo
::1/128 :: Un 0 5 19 lo
2806:10a6:5:177c:8cb0:eddf:714e:872f/128 :: Un 0 2 179 lo
2806:10a6:5:177c:e3a2:3a53:f36d:2567/128 :: Un 0 1 0 lo
fe80::250:56ff:fec0:0/128 :: Un 0 1 0 lo
fe80::250:56ff:fec0:1/128 :: Un 0 1 0 lo
fe80::250:56ff:fec0:8/128 :: Un 0 1 0 lo
fe80::e97b:d589:3ece:1f53/128 :: Un 0 2 299 lo
ff00::/8 :: U 256 4 69 vmnet0
ff00::/8 :: U 256 4 61 vmnet1
ff00::/8 :: U 256 4 61 vmnet8
ff00::/8 :: U 256 4 221 wlan0
::/0 :: !n -1 1 2291 lo
ip neigh 的输出
luka@luka-Inspiron-3458:~$ ip neigh
192.168.1.254 dev wlan0 lladdr e4:3e:d7:3b:1b:42 STALE
fe80::1 dev wlan0 lladdr e4:3e:d7:3b:1b:42 router STALE
感谢大家的帮助。
答案1
根据提供的信息,我们可以看到您的 Ubuntu 16.04 计算机与路由器之间存在一些兼容性问题。这会以某种方式破坏 IPv4 连接。
但是,鉴于您似乎拥有有效的 IPv6 连接,您也可以使用它和 NAT64 来访问仅限 IPv4 的站点。
实现该设置的步骤如下:
- 点击WiFi图标。
- 点击
Edit Connections...
- 从列表中选择您的 SSID。
- 点击
Edit...
- 选择
IPv4 Settings
标签 - 更改
Method
为Automatic
Disabled
- 选择
IPv6 Settings
标签 - 更改
Method
为Automatic
Automatic, addresses only
- 在字段中填写
DNS servers
2-3 个 DNS64 地址
上述更改仅适用于所选的 SSID,这是所需的行为,因为您很可能只会在连接到特定路由器时才会遇到问题。
如果您找到自己的 ISP 提供的 DNS64 地址,您将获得最佳延迟。但除此之外,这两个网站特雷克斯和go6实验室有 6 个不同的公共 DNS64 地址可供使用。