Skip to content
Tech News
← Back to articles

Closing the IPv6 first-packet gap with GRAND

read original more articles
Why This Matters

This story highlights a subtle but real inefficiency in IPv6's Neighbour Discovery protocol that can cause added latency or dropped packets for the very first data exchanged after a device joins a network—an issue that matters for network reliability and performance at scale, especially in IoT and mobile scenarios where fast, dependable connectivity is expected. The proposed GRAND mechanism and its FreeBSD implementation show how a small protocol tweak can eliminate a long-standing asymmetry, potentially influencing future OS and router networking stacks.

Key Takeaways

There is a subtle asymmetry in IPv6 Neighbour Discovery: a host knows how to reach its router before the router necessarily knows how to reach the host. GRAND fixes that asymmetry by making the host proactively advertise its address, and I implemented that mechanism in FreeBSD.

A device joins an IPv6 network, receives a Router Advertisement, configures a new IPv6 address, and immediately starts communicating with the Internet.

From the host's perspective, everything is ready. It knows the link-layer address of its default router, so it can immediately send packets towards the Internet.

However, from the router's perspective, things may look different. The router may not yet know how to reach the host's newly configured global IPv6 address.

This creates a subtle asymmetry in IPv6 Neighbour Discovery: the host can already reach the router, while the router may have to perform Neighbour Discovery before it can forward traffic back to the host.

The first IPv6 packet has a problem

Consider a host that has just configured a new IPv6 address.

The host sends a packet towards an off-link destination. The first-hop router receives the packet and forwards it normally. When the remote destination responds, however, the return packet arrives at the router with the host as its destination.

The router may not have a Neighbour Cache entry for that IPv6 address, so it has to resolve the host's link-layer address before it can forward the packet. This puts Neighbour Discovery directly in the critical path of the first return packet.

For a mechanism that is normally invisible to applications, this can have a visible effect: the first packets of a connection may experience additional latency, or potentially be dropped while address resolution is in progress.

... continue reading