hn.today

IPv6 delegation, an unusually subtle failure mode

savyasacheejha.com4 points0 comments
Screenshot of IPv6 delegation, an unusually subtle failure mode

A custom Linux router began breaking IPv6 connectivity whenever its PPP connection to the ISP restarted. DNS still returned Google’s IPv6 address, and IPv4 worked, but clients could not reach IPv6 destinations. The cause was prefix delegation: each reconnection gave the router a new IPv6 prefix, while devices kept using addresses from the old one. The router’s networkd-based router advertisements did not tell clients to deprecate that prefix. Restarting a client’s network manager temporarily fixed the issue, but reconnects caused it to recur. The relevant IPv6 guidance, RFC 9096, says routers should advertise the old prefix with preferred and valid lifetimes set to zero so clients stop using it.

The author replaced networkd’s router-advertisement function with OpenWrt’s odhcpd, which implements this behavior, while keeping Kea for DHCPv4. Tests showed that clients marked the old address deprecated and successfully routed traffic through the new prefix. The fix was not immediate for every device: a sleeping phone missed the first advertisement and took several minutes to update. odhcpd’s persistent state also lets it handle old prefixes correctly after a reboot, even when the router’s clock is wrong. The experience leads to a broader recommendation: general-purpose system services are convenient for client machines, but dedicated tools can handle server-side networking edge cases better. For home routers with dynamically delegated IPv6 prefixes, odhcpd is presented as a particularly suitable option.

Read on savyasacheejha.com0 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Web

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.