鉴于您的其他评论,您不是在询问具有特定地址的机器是否可以通信,而是在询问两个地址是否在同一个子网中。在第一种情况下,路由和防火墙之类的东西是相关的,第二种只是数学。
IPv4 和 IPv6 中的子网计算之间没有真正的区别,只是更多的位数。您可以使用此问题中详细说明的常规技术,也可以使用类似sipcalc
计算的工具:
% sipcalc 2001:db8:a0b:12f0::1/48
-[ipv6 : 2001:db8:a0b:12f0::1/48] - 0
[IPV6 INFO]
Expanded Address - 2001:0db8:0a0b:12f0:0000:0000:0000:0001
Compressed address - 2001:db8:a0b:12f0::1
Subnet prefix (masked) - 2001:db8:a0b:0:0:0:0:0/48
Address ID (masked) - 0:0:0:12f0:0:0:0:1/48
Prefix address - ffff:ffff:ffff:0:0:0:0:0
Prefix length - 48
Address type - Aggregatable Global Unicast Addresses
Network range - 2001:0db8:0a0b:0000:0000:0000:0000:0000 -
2001:0db8:0a0b:ffff:ffff:ffff:ffff:ffff
% sipcalc 2001:2AC:CAD:0000::/64
-[ipv6 : 2001:2AC:CAD:0000::/64] - 0
[IPV6 INFO]
Expanded Address - 2001:02ac:0cad:0000:0000:0000:0000:0000
Compressed address - 2001:2ac:cad::
Subnet prefix (masked) - 2001:2ac:cad:0:0:0:0:0/64
Address ID (masked) - 0:0:0:0:0:0:0:0/64
Prefix address - ffff:ffff:ffff:ffff:0:0:0:0
Prefix length - 64
Address type - Aggregatable Global Unicast Addresses
Network range - 2001:02ac:0cad:0000:0000:0000:0000:0000 -
2001:02ac:0cad:0000:ffff:ffff:ffff:ffff
正如您从范围中看到的那样,这两个网络没有重叠。