静态 IPv6 地址的延迟比动态略高

静态 IPv6 地址的延迟比动态略高

我的公寓/64为每个客户分配公共 IPv6 地址。

我偶然发现,如果我将 IPv6 地址设置为静态(2xxx:xxxx:xxxx:xxxx::2/64),其延迟更高:

root@router ~# ip a show eth4
7: eth4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 60:xx:xx:xx:xx:13 brd ff:ff:ff:ff:ff:ff
    inet 172.31.xx.xx/22 brd 172.31.215.255 scope global eth4
       valid_lft forever preferred_lft forever
    inet6 2xxx:xxxx:xxxx:xxxx::2/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::62xx:xxff:fexx:xx13/64 scope link
       valid_lft forever preferred_lft forever
root@router ~#
root@router ~# ping dns.google -c 5
PING dns.google (2001:4860:4860::8844): 56 data bytes
64 bytes from 2001:4860:4860::8844: seq=0 ttl=107 time=71.147 ms
64 bytes from 2001:4860:4860::8844: seq=1 ttl=107 time=71.129 ms
64 bytes from 2001:4860:4860::8844: seq=2 ttl=107 time=71.633 ms
64 bytes from 2001:4860:4860::8844: seq=3 ttl=107 time=71.112 ms
64 bytes from 2001:4860:4860::8844: seq=4 ttl=107 time=71.283 ms

--- dns.google ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 71.112/71.260/71.633 ms

当我将其更改为动态时(2xxx:xxxx:xxxx:xxxx:62xx:xxff:fexx:xx13/64):

7: eth4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 60:xx:xx:xx:xx:13 brd ff:ff:ff:ff:ff:ff
    inet 172.31.xx.xx/22 brd 172.31.215.255 scope global eth4
       valid_lft forever preferred_lft forever
    inet6 2xxx:xxxx:xxxx:xxxx:62xx:xxff:fexx:xx13/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::62xx:xxff:fexx:xx13/64 scope link
       valid_lft forever preferred_lft forever
root@router ~#
root@router ~# ping dns.google -c 5
PING dns.google (2001:4860:4860::8844): 56 data bytes
64 bytes from 2001:4860:4860::8844: seq=0 ttl=107 time=70.537 ms
64 bytes from 2001:4860:4860::8844: seq=1 ttl=107 time=70.457 ms
64 bytes from 2001:4860:4860::8844: seq=2 ttl=107 time=70.468 ms
64 bytes from 2001:4860:4860::8844: seq=3 ttl=107 time=70.481 ms
64 bytes from 2001:4860:4860::8844: seq=4 ttl=107 time=70.602 ms

--- dns.google ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 70.457/70.509/70.602 ms

它可以减少约1ms的延迟。

对于其他地址(如240c::6666),差异可能为 3 - 8 毫秒。

这根本不重要,但我只是好奇为什么会发生这种情况。

相关内容