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 Neighbour Discovery that can cause added latency or dropped packets for the very first return packets in a connection, an issue GRAND aims to solve by having the host proactively announce itself to the router. Because this affects nearly all IPv6 networking, a FreeBSD implementation of GRAND could meaningfully improve real-world connection reliability and speed, especially in mobile or high-churn network environments.

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