我已经设置了一个带有 OpenThread RadioCoprocessor 的 Raspberry Pi,以作为 OpenThread Border 路由器运行。这可行,但我无法从 Thread 网络访问 NAT64 接口。
在家里,我有一个创建本地 IPv6 网络的路由器。Pi 被分配了两个 IPv6 ip 地址,并且到这些地址的路由传播到 RadioCoprocessor。在这里,我可以将路由添加到 well-known-prefix 和 NAT64 接口,并使用 NAT64 接口作为 DNS 服务器将主机名解析为 well-known-prefix 地址并 ping 这些地址。
但是在工作中,本地网络没有 IPv6。Pi 没有分配 IPv6 地址。在工作中,我无法从 OpenThread 网络 ping 任何众所周知的前缀地址,但我可以从 Pi ping。
我错过了一条路线吗?
家中的路由表
pi@raspberrypi:~ $ route -6 -n
Kernel IPv6 routing table
Destination Next Hop Flag Met Ref Use If
::1/128 :: U 256 3 0 lo
64:ff9b::/96 :: U 1024 1 0 nat64
2002:1111:1111:1111::/64 :: UAe 256 1 0 eth0 <<< Router ipv6 network
fd11:db8:1::/64 :: U 256 1 0 otbr0
fd35:ad25:a99f:8c75::/64 :: U 256 2 0 wpan0
fdaa:bb:1::2/128 :: U 256 3 0 nat64
fdb5:d386:5ef5::/64 :: UAe 256 1 0 eth0 <<< Router ipv6 network
fdbb:9fbb:e58b:f471::/64 :: U 256 2 0 wpan0
fe80::/64 :: U 256 2 0 eth0
fe80::/64 :: U 256 1 0 nat64
fe80::/64 :: U 256 1 0 wpan0
fe80::/64 :: U 256 1 0 otbr0
fe80::/64 :: U 256 1 0 vethdbec410
fe80::/64 :: U 256 1 0 docker0
::/0 fe80::ee3e:b3ff:fe63:1320 UGDAe 1024 1 0 eth0
::1/128 :: Un 0 7 0 lo
2002:1111:1111:1111::/128 :: Un 0 3 0 eth0 <<< Router ipv6 network
2002:1111:1111:1111:ba27:ebff:fe6f:9215/128 :: <<< Router ipv6 network
Un 0 3 0 eth0
fd35:ad25:a99f:8c75::/128 :: Un 0 3 0 wpan0
fd35:ad25:a99f:8c75:a9c8:521f:d197:eca5/128 ::
Un 0 3 0 wpan0
fdaa:bb:1::2/128 :: Un 0 4 0 nat64
fdb5:d386:5ef5::/128 :: Un 0 3 0 eth0 <<< Router ipv6 network
fdb5:d386:5ef5:0:ba27:ebff:fe6f:9215/128 :: Un 0 3 0 eth0 <<< Router ipv6 network
fdbb:9fbb:e58b:f471::/128 :: Un 0 6 0 wpan0
fdbb:9fbb:e58b:f471:0:ff:fe00:e800/128 :: Un 0 3 0 wpan0
fdbb:9fbb:e58b:f471:0:ff:fe00:fc00/128 :: Un 0 4 0 wpan0
fdbb:9fbb:e58b:f471:0:ff:fe00:fc10/128 :: Un 0 3 0 wpan0
fdbb:9fbb:e58b:f471:0:ff:fe00:fc11/128 :: Un 0 2 0 wpan0
fdbb:9fbb:e58b:f471:0:ff:fe00:fc38/128 :: Un 0 2 0 wpan0
fdbb:9fbb:e58b:f471:f21d:c077:3438:5937/128 ::
Un 0 2 0 wpan0
fe80::/128 :: Un 0 6 0 eth0
fe80::/128 :: Un 0 3 0 nat64
fe80::/128 :: Un 0 3 0 wpan0
fe80::/128 :: Un 0 3 0 vethdbec410
fe80::/128 :: Un 0 3 0 docker0
fe80::42:23ff:fee8:b3c/128 :: Un 0 2 0 docker0
fe80::858:1860:afaa:fde9/128 :: Un 0 2 0 wpan0
fe80::3024:2fff:fe63:1c/128 :: Un 0 2 0 vethdbec410
fe80::3cd7:afb4:fc53:bc71/128 :: Un 0 3 0 nat64
fe80::ba27:ebff:fe6f:9215/128 :: Un 0 4 0 eth0
ff00::/8 :: U 256 7 0 eth0
ff00::/8 :: U 256 1 0 nat64
ff00::/8 :: U 256 1 0 wpan0
ff00::/8 :: U 256 5 0 vethdbec410
ff00::/8 :: U 256 5 0 docker0
::/0 :: !n -1 1 0 lo
工作中的路由表
pi@raspberrypi:~ $ route -6 -n
Kernel IPv6 routing table
Destination Next Hop Flag Met Ref Use If
::1/128 :: U 256 2 0 lo
64:ff9b::/96 :: U 1024 1 0 nat64
fd11:db8:1::/64 :: U 256 1 0 otbr0
fdaa:bb:1::2/128 :: U 256 3 0 nat64
fdbb:9fbb:e58b:f471::/64 :: U 256 2 0 wpan0
fe80::/64 :: U 256 2 0 wlan0
fe80::/64 :: U 256 1 0 nat64
fe80::/64 :: U 256 1 0 wpan0
fe80::/64 :: U 256 1 0 otbr0
fe80::/64 :: U 256 1 0 veth89bb918
fe80::/64 :: U 256 1 0 docker0
::/0 :: !n -1 1 0 lo
::1/128 :: Un 0 5 0 lo
fdaa:bb:1::2/128 :: Un 0 5 0 nat64
fdbb:9fbb:e58b:f471::/128 :: Un 0 5 0 wpan0
fdbb:9fbb:e58b:f471:0:ff:fe00:e800/128 :: Un 0 3 0 wpan0
fdbb:9fbb:e58b:f471:0:ff:fe00:fc00/128 :: Un 0 4 0 wpan0
fdbb:9fbb:e58b:f471:0:ff:fe00:fc10/128 :: Un 0 3 0 wpan0
fdbb:9fbb:e58b:f471:0:ff:fe00:fc11/128 :: Un 0 3 0 wpan0
fdbb:9fbb:e58b:f471:0:ff:fe00:fc38/128 :: Un 0 2 0 wpan0
fdbb:9fbb:e58b:f471:f21d:c077:3438:5937/128 :: Un 0 2 0 wpan0
fe80::/128 :: Un 0 8 0 wlan0
fe80::/128 :: Un 0 3 0 nat64
fe80::/128 :: Un 0 3 0 wpan0
fe80::/128 :: Un 0 3 0 docker0
fe80::/128 :: Un 0 3 0 veth89bb918
fe80::42:7dff:fece:4ad4/128 :: Un 0 2 0 docker0
fe80::858:1860:afaa:fde9/128 :: Un 0 2 0 wpan0
fe80::1450:5aff:feb6:879f/128 :: Un 0 2 0 veth89bb918
fe80::5227:2e50:3570:ab37/128 :: Un 0 2 0 nat64
fe80::ba27:ebff:fe3a:c740/128 :: Un 0 2 0 wlan0
ff00::/8 :: U 256 7 0 wlan0
ff00::/8 :: U 256 1 0 nat64
ff00::/8 :: U 256 1 0 wpan0
ff00::/8 :: U 256 5 0 veth89bb918
ff00::/8 :: U 256 5 0 docker0
::/0 :: !n -1 1 0 lo
更新
我错过了从 OT-RCP 到 Pi 上的 eth/wlan 接口的默认路由。
我手动添加了 IPv6 地址并添加了默认路由:“prefix add 2001:470:6c92:1::/64 paros med”
现在我可以在 FDAA:BB:1::2 ping NAT64 但解析 DNS 给我一个错误 8 并带有安全描述。
更新 2 个 tcpdump 日志:
tcpdump: listening on wpan0, link-type LINUX_SLL (Linux cooked v1), snapshot length 262144 bytes
***DNS request from ot-cli thread device "ot dns resolve ing.nl fdaa:bb:1::2 53 1000 2 1"***
19:54:30.284814 IP6 (hlim 64, next-header UDP (17) payload length: 32) 2001:470:6c92:1:8196:1c3f:41ed:fed.49153 > fdaa:bb:1::2.53: [udp sum ok] 11238+ AAAA? ing.nl. (24)
19:54:30.285478 IP6 (flowlabel 0x3bd7d, hlim 64, next-header UDP (17) payload length: 32) fdaa:bb:1::2.53 > 2001:470:6c92:1:8196:1c3f:41ed:fed.49153: [udp sum ok] 11238 Refused- 0/0/0 (24)
19:54:30.302290 IP6 (hlim 64, next-header UDP (17) payload length: 32) 2001:470:6c92:1:8196:1c3f:41ed:fed.49153 > fdaa:bb:1::2.53: [udp sum ok] 34254+ A? ing.nl. (24)
19:54:30.303347 IP6 (flowlabel 0x3bd7d, hlim 64, next-header UDP (17) payload length: 32) fdaa:bb:1::2.53 > 2001:470:6c92:1:8196:1c3f:41ed:fed.49153: [udp sum ok] 34254 Refused- 0/0/0 (24)
***Successful Ping from ot-cli thread device "ot ping 64:ff9b::9765:818c"***
20:51:46.076737 IP6 (hlim 64, next-header ICMPv6 (58) payload length: 16) 2001:470:6c92:1:8196:1c3f:41ed:fed > 64:ff9b::9765:818c: [icmp6 sum ok] ICMP6, echo request, id 6, seq 6
20:51:46.088699 IP6 (hlim 56, next-header ICMPv6 (58) payload length: 16) 64:ff9b::9765:818c > 2001:470:6c92:1:8196:1c3f:41ed:fed: [icmp6 sum ok] ICMP6, echo reply, id 6, seq 6
***Successful Ping from ot-cli thread device "ot ping fdaa:bb:1::2"***
20:53:27.162740 IP6 (hlim 64, next-header ICMPv6 (58) payload length: 16) 2001:470:6c92:1:8196:1c3f:41ed:fed > fdaa:bb:1::2: [icmp6 sum ok] ICMP6, echo request, id 7, seq 7
20:53:27.162871 IP6 (flowlabel 0x9a0cc, hlim 64, next-header ICMPv6 (58) payload length: 16) fdaa:bb:1::2 > 2001:470:6c92:1:8196:1c3f:41ed:fed: [icmp6 sum ok] ICMP6, echo reply, id 7, seq 7