IPv6 在大多数情况下都运行良好,但每天半夜,学校都会切断我们的网络,迫使我们上床睡觉,第二天早上 6 点才恢复。我猜这是通过关闭宿舍的开关来实现的。
第二天早上切分后,IPv4 仍然可以正常工作,但我的 IPv6 无法连接到除室友以外的任何主机。如果我通过 重新启动接口/etc/init.d/net.enp4s0 restart
,则一切恢复正常。
拓扑结构如下:
My machine \
room's switch - dorm's switch - dorm's gateway
Roommate 's machine /
这是重启之前的样子:
Riaqn-Laptop ~ # ip -6 route
2001:da8:8000:e0b1::/64 dev enp4s0 proto kernel metric 256 expires 3584sec
fe80::/64 dev enp0s29f7u2u4 proto kernel metric 256
fe80::/64 dev enp4s0 proto kernel metric 256
default via fe80::212:cfff:fe5f:c0c0 dev enp4s0 proto ra metric 1024 expires 1784sec
Riaqn-Laptop ~ # ip -6 neigh
2001:da8:8000:e0b1::15f7 dev enp4s0 FAILED
2001:da8:8000:e0b1::3b4e:1660 dev enp4s0 FAILED
fe80::f928:6537:a988:7b80 dev enp4s0 FAILED
2001:da8:8000:e0b1::fe71 dev enp4s0 FAILED
2001:da8:8000:e0b1::a113 dev enp4s0 FAILED
2001:da8:8000:e0b1::58aa dev enp4s0 lladdr b8:88:e3:8f:30:7e STALE
fe80::212:cfff:fe5f:c0c0 dev enp4s0 lladdr 00:12:cf:5f:c0:c0 router STALE
2001:da8:8000:e0b1::15f8 dev enp4s0 FAILED
2001:da8:8000:e0b1::569e dev enp4s0 lladdr dc:0e:a1:72:9e:8b STALE
fe80::c9fe:6d0e:9295:75a dev enp4s0 lladdr dc:0e:a1:72:9e:8b STALE
Riaqn-Laptop ~ # ping6 -I enp4s0 fe80::212:cfff:fe5f:c0c0
PING fe80::212:cfff:fe5f:c0c0(fe80::212:cfff:fe5f:c0c0) from fe80::21b:24ff:fed5:f438 enp4s0: 56 data bytes
^C
--- fe80::212:cfff:fe5f:c0c0 ping statistics ---
6 packets transmitted, 0 received, 100% packet loss, time 5001ms
Riaqn-Laptop ~ # ip -6 addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
inet6 2001:da8:8000:e0b1::cdf4/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::21b:24ff:fed5:f438/64 scope link
valid_lft forever preferred_lft forever
4: enp0s29f7u2u4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
inet6 fe80::8eae:4bff:fe00:4e82/64 scope link
valid_lft forever preferred_lft forever
Riaqn-Laptop ~ # rdisc6 enp4s0
Soliciting ff02::2 (ff02::2) on enp4s0...
Timed out.
Timed out.
Timed out.
No response.
重启后界面如下
Riaqn-Laptop ~ # ip -6 addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
inet6 2001:da8:8000:e0b1::9b59/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::21b:24ff:fed5:f438/64 scope link
valid_lft forever preferred_lft forever
4: enp0s29f7u2u4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
inet6 fe80::8eae:4bff:fe00:4e82/64 scope link
valid_lft forever preferred_lft forever
Riaqn-Laptop ~ # ip -6 route
2001:da8:8000:e0b1::/64 dev enp4s0 proto kernel metric 256 expires 3599sec
fe80::/64 dev enp0s29f7u2u4 proto kernel metric 256
fe80::/64 dev enp4s0 proto kernel metric 256
default via fe80::212:cfff:fe5f:c0c0 dev enp4s0 proto ra metric 1024 expires 1799sec
Riaqn-Laptop ~ # ip -6 neigh
fe80::212:cfff:fe5f:c0c0 dev enp4s0 lladdr 00:12:cf:5f:c0:c0 router REACHABLE
Riaqn-Laptop ~ # rdisc6 enp4s0
Soliciting ff02::2 (ff02::2) on enp4s0...
Hop limit : 64 ( 0x40)
Stateful address conf. : Yes
Stateful other conf. : Yes
Mobile home agent : No
Router preference : medium
Neighbor discovery proxy : No
Router lifetime : 1800 (0x00000708) seconds
Reachable time : unspecified (0x00000000)
Retransmit time : unspecified (0x00000000)
Source link-layer address: 00:12:CF:5F:C0:C0
Prefix : 2001:da8:8000:e0b1::/64
On-link : Yes
Autonomous address conf.: No
Valid time : 3600 (0x00000e10) seconds
Pref. time : 1800 (0x00000708) seconds
from fe80::212:cfff:fe5f:c0c0
^C
IPv6 地址由 DHCPv6 分配,dhclient 的工作方式如下:
Riaqn-Laptop ~ # dhclient -6 -v -e IF_METRIC=2 -1 -pf /var/run/dhclient-enp4s0.pid enp4s0
Internet Systems Consortium DHCP Client 4.3.1 Gentoo-r0
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Waiting 5 seconds for IPv6 to really come ready
Listening on Socket/enp4s0
Sending on Socket/enp4s0
Created duid \000\001\000\001\0343\234\205\000\033$\325\3648.
PRC: Soliciting for leases (INIT).
XMT: Forming Solicit, 0 ms elapsed.
XMT: X-- IA_NA 24:d5:f4:38
XMT: | X-- Request renew in +3600
XMT: | X-- Request rebind in +5400
XMT: Solicit on enp4s0, interval 1050ms.
RCV: Advertise message on enp4s0 from fe80::212:cfff:fe5f:c0c0.
RCV: X-- Preference 10.
RCV: X-- IA_NA 24:d5:f4:38
RCV: | X-- starts 1419829253
RCV: | X-- t1 - renew +345600
RCV: | X-- t2 - rebind +552960
RCV: | X-- [Options]
RCV: | | X-- IAADDR 2001:da8:8000:e0b1::b5b0
RCV: | | | X-- Preferred lifetime 691200.
RCV: | | | X-- Max lifetime 1036800.
RCV: X-- Server ID: 00:01:00:00:53:7c:9e:c4:00:15:5d:7f:03:00
RCV: Advertisement recorded.
PRC: Selecting best advertised lease.
PRC: Considering best lease.
PRC: X-- Initial candidate 00:01:00:00:53:7c:9e:c4:00:15:5d:7f:03:00 (s: 154, p: 10).
XMT: Forming Request, 0 ms elapsed.
XMT: X-- IA_NA 24:d5:f4:38
XMT: | X-- Requested renew +3600
XMT: | X-- Requested rebind +5400
XMT: | | X-- IAADDR 2001:da8:8000:e0b1::b5b0
XMT: | | | X-- Preferred lifetime +7200
XMT: | | | X-- Max lifetime +7500
XMT: V IA_NA appended.
XMT: Request on enp4s0, interval 1000ms.
RCV: Reply message on enp4s0 from fe80::212:cfff:fe5f:c0c0.
RCV: X-- IA_NA 24:d5:f4:38
RCV: | X-- starts 1419829254
RCV: | X-- t1 - renew +345600
RCV: | X-- t2 - rebind +552960
RCV: | X-- [Options]
RCV: | | X-- IAADDR 2001:da8:8000:e0b1::b5b0
RCV: | | | X-- Preferred lifetime 691200.
RCV: | | | X-- Max lifetime 1036800.
RCV: X-- Server ID: 00:01:00:00:53:7c:9e:c4:00:15:5d:7f:03:00
PRC: Bound to lease 00:01:00:00:53:7c:9e:c4:00:15:5d:7f:03:00.
[更新]
我刚刚发现问题可能与网络中断无关。今天早上我重新启动了接口以提供上述信息,现在,经过 9 小时,它已经无法访问,没有被切断,而且更有趣的是:我可以 ping 通ipv6.google.com
,但无法 ping 通路由器。
Riaqn-Laptop ~ # ping6 ipv6.google.com
PING ipv6.google.com(hkg03s16-in-x08.1e100.net) 56 data bytes
64 bytes from hkg03s16-in-x08.1e100.net: icmp_seq=1 ttl=43 time=340 ms
64 bytes from hkg03s16-in-x08.1e100.net: icmp_seq=2 ttl=43 time=340 ms
64 bytes from hkg03s16-in-x08.1e100.net: icmp_seq=3 ttl=43 time=339 ms
^C
--- ipv6.google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 339.998/340.070/340.141/0.675 ms
Riaqn-Laptop ~ # ping6 -I enp4s0 fe80::212:cfff:fe5f:c0c0
PING fe80::212:cfff:fe5f:c0c0(fe80::212:cfff:fe5f:c0c0) from fe80::21b:24ff:fed5:f438 enp4s0: 56 data bytes
^C
--- fe80::212:cfff:fe5f:c0c0 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3007ms
Riaqn-Laptop ~ # ndisc6 fe80::212:cfff:fe5f:c0c0 enp4s0
Soliciting fe80::212:cfff:fe5f:c0c0 (fe80::212:cfff:fe5f:c0c0) on enp4s0...
Timed out.
Timed out.
Timed out.
No response.
Riaqn-Laptop ~ # ip -6 neigh
fe80::212:cfff:fe5f:c0c0 dev enp4s0 lladdr 00:12:cf:5f:c0:c0 router REACHABLE
fe80::c9fe:6d0e:9295:75a dev enp4s0 FAILED
Riaqn-Laptop ~ # ping6 -I enp4s0 fe80::212:cfff:fe5f:c0c0
PING fe80::212:cfff:fe5f:c0c0(fe80::212:cfff:fe5f:c0c0) from fe80::21b:24ff:fed5:f438 enp4s0: 56 data bytes
^C
--- fe80::212:cfff:fe5f:c0c0 ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 4000ms
Riaqn-Laptop ~ # ip -6 route
2001:da8:8000:e0b1::/64 dev enp4s0 proto kernel metric 256
fe80::/64 dev enp0s29f7u2u4 proto kernel metric 256
fe80::/64 dev enp4s0 proto kernel metric 256
default via fe80::212:cfff:fe5f:c0c0 dev enp4s0 proto ra metric 1024 expires 1764sec
答案1
好的,我让一位在计算机上使用 Windows 7 的朋友从午夜到早上一直开着他的机器,是的,他的 IPv6 也坏了。
所以我猜这是上游的问题,我自己无法修复。幸运的是,他们提供了一个isatap
隧道,让我可以通过 IPv4 隧道连接到 IPv6,即使过了几个小时,它也能正常工作。
我认为我的问题解决了,感谢您的帮助!