FreeBSD Fixes IPv6's First-Packet Latency with GRAND

Closing the IPv6 First-Packet Gap with Grand

FreeBSD Fixes IPv6's First-Packet Latency with GRAND

IPv6 Neighbour Discovery has a subtle flaw: a host can reach its router, but the router may not know how to reach the host until the first return packet arrives, causing latency or drops. GRAND (RFC 9131) flips this by having the host proactively send an unsolicited Neighbour Advertisement when a new address becomes usable. I implemented GRAND in FreeBSD, adding queueing and delayed advertisement machinery from RFC 4861 to avoid multicast bursts while eliminating the first-packet gap.

The problem is particularly interesting because the host already has all the information the router needs. The host knows that it owns the IPv6 address and knows the corresponding link-layer address, but the router simply hasn't learned it yet.
  1. mort96

    Wait I don't get this.

    If I understand correctly, traditional IPv6 flow is:

    * A host configures its own IP address via SLAAC

    * The host sends a packet to its gateway with some destination address

    * The gateway forwards the packet to the Internet

    * Eventually, a response packet arrives to the gateway

    * At this point, the gateway does neighbour discovery to try to figure out how to send the packet to the host

    * The gateway might drop the packet or delay forwarding it until neighbour discovery completes

    Why couldn't we change the flow to:

    * A host configures its own IP address via SLAAC

    * The host sends a packet to its gateway with some destination address

    * The gateway forward the packet, and at the same time starts neighbour discovery because almost all computers which send outgoing packets will eventually receive some incoming packet

    * When the response packet arrives, neighbour discovery is likely already done, or if not it got a good head start

    Isn't this the obvious solution which wouldn't require changes to hosts or new protocols, just a small tweak to the router? Usually, when there's a seemingly obvious simple solution to a real problem and that solution hasn't been implemented by any of the clever people working in networking standards, there's a good reason and the solution isn't as simple as it seems. So what am I missing?

  2. happyPersonR

    it's interesting to watch all of this having dealt recently with behvaior in an environment that expected

    1) SLAAC/static ip

    2) multiple default gateways, and then you import routes(including multiple default gateway's) over bgp and start BFD to figure out which one is active

    3) and then you start broadcasting your own address over bgp

    i wish there were a daemon in systemd, that i could configure to do this. It seems absurd to people that aren't aware of how it works, but it's quite the interesting flow in a datacenter.

    wish there were an equivalent in the kubernetes/normal linux world, but i can understand the scalability concerns :)

    I know BIRD exists, but i wish this was kind of built in ... lemme see if systemd supports extensions... it would be cool to add :)

    i'm sure more people might want it.

More from this day

2026-09-15