开始以为光猫有问题,但尝试过用 WIFI 连接路由器,同样是手机正常用 IPv6 ,但是树莓派不行。
在此请教各位大佬,看看有没有解决办法。
Windows
Windows 电脑能正常获取到 IPv6 ,也能正常访问:
以太网适配器 以太网:
连接特定的 DNS 后缀 . . . . . . . :
IPv6 地址 . . . . . . . . . . . . : 240e:1b1:18b1:4020:3fdf:b377:98ca:a6c0
临时 IPv6 地址. . . . . . . . . . : 240e:1b1:18b1:4020:2c01:2dbb:7438:2b7
本地链接 IPv6 地址. . . . . . . . : fe80::104f:45c6:f783:f13d%9
IPv4 地址 . . . . . . . . . . . . : 192.168.1.5
子网掩码 . . . . . . . . . . . . : 255.255.255.0
默认网关. . . . . . . . . . . . . : fe80::1%9
192.168.1.1
请求外网
# curl --ipv6 --max-time 30 -v ip.sb
* Host ip.sb:80 was resolved.
* IPv6: 2606:4700:20::ac43:4bac, 2606:4700:20::681a:d1f, 2606:4700:20::681a:c1f
* IPv4: (none)
* Trying [2606:4700:20::ac43:4bac]:80...
* Connected to ip.sb (2606:4700:20::ac43:4bac) port 80
> GET / HTTP/1.1
> Host: ip.sb
> User-Agent: curl/8.9.1
> Accept: */*
>
* Request completely sent off
树莓派
有获取到公网 IPv6 ,局域网内能通,就是访问不了外网。
$ nmcli device show
GENERAL.DEVICE: eth0
GENERAL.TYPE: ethernet
GENERAL.HWADDR: DC:A6:32:87:E2:A7
GENERAL.MTU: 1500
GENERAL.STATE: 100 (connected)
GENERAL.CONNECTION: Wired connection 1
GENERAL.CON-PATH: /org/freedesktop/NetworkManager/ActiveConnection/2
WIRED-PROPERTIES.CARRIER: on
IP4.ADDRESS[1]: 192.168.1.2/24
IP4.GATEWAY: 192.168.1.1
IP4.ROUTE[1]: dst = 192.168.1.0/24, nh = 0.0.0.0, mt = 100
IP4.ROUTE[2]: dst = 0.0.0.0/0, nh = 192.168.1.1, mt = 100
IP4.DNS[1]: 192.168.1.1
IP4.WINS[1]: 192.168.1.1
IP6.ADDRESS[1]: 240e:1b1:18b1:4020:a8f9:a6e4:338a:c432/64
IP6.ADDRESS[2]: fe80::5b26:3a6e:e716:e310/64
IP6.GATEWAY: fe80::1
IP6.ROUTE[1]: dst = fe80::/64, nh = ::, mt = 1024
IP6.ROUTE[2]: dst = 240e:1b1:18b1:4020::/64, nh = ::, mt = 100
IP6.ROUTE[3]: dst = ::/0, nh = fe80::1, mt = 100
IP6.DNS[1]: fe80::1
GENERAL.DEVICE: lo
GENERAL.TYPE: loopback
GENERAL.HWADDR: 00:00:00:00:00:00
GENERAL.MTU: 65536
GENERAL.STATE: 100 (connected (externally))
GENERAL.CONNECTION: lo
GENERAL.CON-PATH: /org/freedesktop/NetworkManager/ActiveConnection/1
IP4.ADDRESS[1]: 127.0.0.1/8
IP4.GATEWAY: --
IP6.ADDRESS[1]: ::1/128
IP6.GATEWAY: --
GENERAL.DEVICE: wlan0
GENERAL.TYPE: wifi
GENERAL.HWADDR: DC:A6:32:87:E1:A7
GENERAL.MTU: 1500
GENERAL.STATE: 30 (disconnected)
GENERAL.CONNECTION: --
GENERAL.CON-PATH: --
IP4.GATEWAY: --
IP6.GATEWAY: --
GENERAL.DEVICE: p2p-dev-wlan0
GENERAL.TYPE: wifi-p2p
GENERAL.HWADDR: (unknown)
GENERAL.MTU: 0
GENERAL.STATE: 30 (disconnected)
GENERAL.CONNECTION: --
GENERAL.CON-PATH: --
访问外网:
$ curl --ipv6 --max-time 30 -v ip.sb
* Trying [2606:4700:20::681a:c1f]:80...
* ipv6 connect timeout after 14918ms, move on!
* Trying [2606:4700:20::681a:d1f]:80...
* ipv6 connect timeout after 7459ms, move on!
* Trying [2606:4700:20::ac43:4bac]:80...
* Connection timed out after 30000 milliseconds
* Closing connection 0
curl: (28) Connection timed out after 30000 milliseconds
路由设置:
$ ip -6 route
240e:1b1:18b1:4020::/64 dev eth0 proto ra metric 100 pref medium
fe80::/64 dev eth0 proto kernel metric 1024 pref medium
default via fe80::1 dev eth0 proto ra metric 100 pref medium
Ping Windows 设备:
$ ping 240e:1b1:18b1:4020:a8f9:a6e4:338a:c432
PING 240e:1b1:18b1:4020:a8f9:a6e4:338a:c432(240e:1b1:18b1:4020:a8f9:a6e4:338a:c432) 56 data bytes
64 bytes from 240e:1b1:18b1:4020:a8f9:a6e4:338a:c432: icmp_seq=1 ttl=64 time=0.137 ms
64 bytes from 240e:1b1:18b1:4020:a8f9:a6e4:338a:c432: icmp_seq=2 ttl=64 time=0.059 ms
64 bytes from 240e:1b1:18b1:4020:a8f9:a6e4:338a:c432: icmp_seq=3 ttl=64 time=0.062 ms
64 bytes from 240e:1b1:18b1:4020:a8f9:a6e4:338a:c432: icmp_seq=4 ttl=64 time=0.057 ms
64 bytes from 240e:1b1:18b1:4020:a8f9:a6e4:338a:c432: icmp_seq=5 ttl=64 time=0.064 ms
64 bytes from 240e:1b1:18b1:4020:a8f9:a6e4:338a:c432: icmp_seq=6 ttl=64 time=0.074 ms