我的服务器遇到了一个问题,IPv6 连接速度慢得令人难以忍受(经常完全超时)。
例如,最近wget
:
--2017-10-01 20:12:49-- https://ci.somesite.net/file
Resolving ci.somesite.net (ci.somesite.net)... 2400:abcd:1234:f::1234:1234, 2401:bcde:2345:f::2345:2345, 123.45.67.89, ...
Connecting to ci.somesite.net (ci.somesite.net)|2400:abcd:1234:f::1234:1234|:443... failed: Connection timed out.
Connecting to ci.somesite.net (ci.somesite.net)|2401:bcde:2345:f::2345:2345|:443... failed: Connection timed out.
Connecting to ci.somesite.net (ci.somesite.net)|123.45.67.89|:443... connected.
失败的原因不是解析失败(我通常认为是这种情况),而是 IPv6 连接失败。IPv4 没有问题。
这是怎么回事?我该怎么做才能解决这个问题?
该服务器正在运行最新的 Ubuntu 16.04。
相关ifconfig
输出:
eth0 Link encap:Ethernet HWaddr aa:bb:cc:dd:ee:ff
inet addr:123.98.76.54 Bcast:123.98.76.255 Mask:255.255.255.0
inet6 addr: 2607:abcd:ef1:2345::/64 Scope:Global
inet6 addr: fe80::ec4:aabb:ccdd:eeff/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:574132 errors:0 dropped:0 overruns:0 frame:0
TX packets:317319 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:659730231 (659.7 MB) TX bytes:23334546 (23.3 MB)