Why didn’t IPv6 work in my home network?

Why didn’t IPv6 work in my home network?

为什么我的家庭网络无法使用 IPv6?

TLDR (click to expand) It was a setting on my Adguard Home DNS which disabled all IPv6 DNS queries. TLDR(点击展开):原因是我在 Adguard Home DNS 中的一个设置禁用了所有 IPv6 DNS 查询。

I’ve been a long time ACT broadband customer for my home network and they did not support IPv6 for quite some time. A few years back I contacted their support, they confirmed they are slowly rolling it out for users in Chennai. I was one of those users and I enabled IPv6 in my router and it worked without any issues. I just did a quick test and just forgot about it. 我长期以来一直是 ACT 宽带的家庭用户,他们很长一段时间都不支持 IPv6。几年前我联系了他们的客服,他们确认正在向金奈(Chennai)的用户缓慢推广。我正好是其中之一,于是在路由器中启用了 IPv6,一切运行正常。我当时做了一个简单的测试,之后就没再管它了。

I was testing my network connectivity due to a recent desk upgrade and noticed that ping google.com succeeded, but ping6 google.com failed. Weird, I thought my ISP might have disabled IPv6 again. I confirmed ISP connectivity via IPv6 into my router’s admin portal. Then I shouldn’t have a problem connecting to IPv6? Maybe an issue with the device? I checked my macOS network settings and I have IPv6 allowed there as well. I logged into the raspberry pi connected over LAN to my router and noticed the same issue there. 最近因为升级了桌面设备,我在测试网络连接时发现 ping google.com 可以成功,但 ping6 google.com 却失败了。这很奇怪,我以为是 ISP 又禁用了 IPv6。我通过路由器的管理后台确认了 ISP 的 IPv6 连接是正常的。既然如此,连接 IPv6 应该没问题才对?难道是设备的问题?我检查了 macOS 的网络设置,发现 IPv6 也是允许的。我又登录到通过局域网连接到路由器的树莓派(Raspberry Pi),发现同样存在这个问题。

Since I’m running my own DNS server, I checked my router’s DNS settings for IPv6 DNS server address and cross-verified the ip address with my pi’s ethernet interface. Maybe a DHCP issue with IPV6 DNS? To rule it out, I wanted to try pinging an IPv6 address directly - maybe google - and when I tried running dig AAAA google.com, no results from the DNS. Obviously, google will support IPv6 so I knew something was wrong with my DNS server. 由于我运行着自己的 DNS 服务器,我检查了路由器中 IPv6 DNS 服务器地址的设置,并与树莓派的以太网接口 IP 地址进行了交叉验证。难道是 IPv6 DNS 的 DHCP 问题?为了排除故障,我尝试直接 ping 一个 IPv6 地址(比如 Google 的),当我尝试运行 dig AAAA google.com 时,DNS 没有返回任何结果。显然,Google 是支持 IPv6 的,所以我意识到我的 DNS 服务器出了问题。

I then realized moving to Adguard Home DNS last year. When I checked Adguard Home’s DNS server settings, I found this small toggle that I overlooked. I unchecked that setting, saved and now I’m rocking IPv6 again. 这时我才想起去年切换到了 Adguard Home DNS。当我检查 Adguard Home 的 DNS 服务器设置时,发现了这个我之前忽略的小开关。我取消勾选了该设置并保存,现在 IPv6 又恢复正常了。

$ ping -4 google.com -c 5
PING google.com (172.217.24.110) 56(84) bytes of data.
64 bytes from lcmaaa-ap-in-f14.1e100.net (172.217.24.110): icmp_seq=1 ttl=118 time=1.58 ms
...
--- google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 10ms
rtt min/avg/max/mdev = 1.519/1.565/1.637/0.065 ms

$ ping -6 google.com -c 5
PING google.com(maa05s16-in-x0e.1e100.net (2404:6800:4007:817::200e)) 56 data bytes
64 bytes from maa05s16-in-x0e.1e100.net (2404:6800:4007:817::200e): icmp_seq=1 ttl=118 time=1.61 ms
...
--- google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 12ms
rtt min/avg/max/mdev = 1.557/1.597/1.661/0.063 ms

There are lot of benefits in enabling IPv6 in your network like reduced latencies, better P2P connections due to the lack of NAT traversals, SLAAC, etc. 在网络中启用 IPv6 有很多好处,例如降低延迟、由于无需 NAT 穿透而获得更好的 P2P 连接体验、支持 SLAAC 等。