RFC 9131
Gratuitous Neighbor Discovery: Creating Neighbor Cache Entries on First-Hop Routers
RFC 9131 π
Gratuitous Neighbor Discovery: Creating Neighbor Cache Entries on First-Hop Routers
Okay bestie, this one is from the Internet Engineering Task Force (IETF) π It's RFC 9131, written by J. Linkova at Google, dated October 2021. It's a Standards Track doc, so it's an official spec, not just a vibe. It updates RFC 4861 (Neighbor Discovery for IPv6) and has ISSN 2070-1721 π§
Abstract β¨
Okay so, Neighbor Discovery ([RFC4861]) is how IPv6 nodes figure out the link-layer addresses of their neighbors and keep track of who's reachable π This doc updates RFC 4861 so routers can proactively create a Neighbor Cache entry when a node gets a new IPv6 address. It also updates RFC 4861 and recommends that nodes send unsolicited Neighbor Advertisements when they assign a new IPv6 address. The goal is to cut down on the delay and packet loss when a node starts connecting to an off-link destination from a brand-new address. Main character energy π
Status of This Memo πΈ
This is an Internet Standards Track document.
It's a product of the Internet Engineering Task Force (IETF), so it represents the consensus of the IETF community. It got public review and was approved for publication by the Internet Engineering Steering Group (IESG). For more on Internet Standards, check Section 2 of RFC 7841 π
For the current status, any errata, and how to send feedback, go to https://www.rfc-editor.org/info/rfc9131 π
Copyright Notice π¦
Copyright (c) 2021 IETF Trust and the persons identified as the document authors. All rights reserved.
This doc is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) as in effect on the date of publication. Please read these carefully, because they spell out your rights and restrictions for this document π«Ά Code Components pulled from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions, and they come without warranty, as described in the Simplified BSD License.
Table of Contents πΊοΈ
1. Introduction
1.1. Requirements Language
1.2. Terminology
2. Problem Statement
3. Solution Requirements
4. Changes to Neighbor Discovery
4.1. Nodes Sending Gratuitous Neighbor Advertisements
4.2. Routers Creating Cache Entries upon Receiving Unsolicited
Neighbor Advertisements
5. Avoiding Disruption
5.1. Neighbor Cache Entry Exists in Any State Other Than
INCOMPLETE
5.2. Neighbor Cache Entry Is in INCOMPLETE State
5.3. Neighbor Cache Entry Does Not Exist
5.3.1. The Rightful Owner Is Not Sending Packets from the
Address
5.3.2. The Rightful Owner Has Started Sending Packets from the
Address
6. Modifications to RFC-Mandated Behavior
6.1. Modification to RFC 4861 (Neighbor Discovery for IP version
6 (IPv6))
6.1.1. Modification to Section 7.2.5 of RFC 4861
6.1.2. Modification to Section 7.2.6 of RFC 4861
7. Solution Limitations
8. Solutions Considered but Discarded
8.1. Do Nothing
8.2. Change to the Registration-Based Neighbor Discovery
8.3. Host Sending NS to the Router Address from Its GUA
8.4. Host Sending Router Solicitation from Its GUA
8.5. Routers Populating Their Caches by Gleaning from Neighbor
Discovery Packets
8.6. Initiating Host-to-Router Communication
8.7. Making the Probing Logic on Hosts More Robust
8.8. Increasing the Buffer Size on Routers
8.9. Transit Data Plane Traffic from a New Address to Trigger
Address Resolution
9. IANA Considerations
10. Security Considerations
11. References
11.1. Normative References
11.2. Informative References
Acknowledgements
Author's Address
1. Introduction π
The Neighbor Discovery state machine defined in [RFC4861] assumes that communication between IPv6 nodes is, in most cases, bidirectional. If node A is trying to talk to its neighbor, node B, return traffic can be expected. So when node A starts address resolution, the target node B also creates an entry with A's IPv6 and link-layer addresses in its Neighbor Cache. That entry is what gets used to send return traffic back to A π
Section 7.2.5 of [RFC4861] says:
When a valid Neighbor Advertisement is received (either solicited or unsolicited), the Neighbor Cache is searched for the target's entry. If no entry exists, the advertisement SHOULD be silently discarded. There is no need to create an entry if none exists, since the recipient has apparently not initiated any communication with the target.
This works perfectly for host-to-host on-link communication, but it's not so great when a host sends traffic to off-link destinations π After a host joins the network and gets a Router Advertisement, it fills its Neighbor Cache with the default router's IPv6 and link-layer addresses, so it can send traffic off-link. Meanwhile the router has no cache entries for the host's global addresses yet, and it only starts address resolution when the first packet of the return traffic flow shows up. While it waits for that resolution to finish, the router only holds a very small number of queued packets, as recommended in Section 7.2.2 of [RFC4861]. Any extra packets that arrive before resolution finishes are likely to get dropped π That can cause packet loss and performance problems users can actually feel.
This document updates the Neighbor Discovery protocol [RFC4861] to avoid packet loss in the scenario above. Section 4 covers the changes and their potential impact, while the normative changes to [RFC4861] are specified in Section 6 π
1.1. Requirements Language β¨
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.
1.2. Terminology π
Node: A device that implements IP [RFC4861].
Host: Any node that is not a router [RFC4861].
ND: Neighbor Discovery [RFC4861].
NC: Neighbor Cache [RFC4861]. The Neighbor Cache entry can be in one of five states, as described in Section 7.3.2 of [RFC4861]: INCOMPLETE, REACHABLE, STALE, DELAY, or PROBE.
SLAAC: IPv6 Stateless Address Autoconfiguration [RFC4862].
NS: Neighbor Solicitation [RFC4861].
NA: Neighbor Advertisement [RFC4861].
RS: Router Solicitation [RFC4861].
RA: Router Advertisement [RFC4861].
SLLAO: Source Link-Layer Address Option. An option in the ND packets containing the link-layer address of the sender of the packet [RFC4861].
TLLAO: Target Link-Layer Address Option. An option in the ND packets containing the link-layer address of the target [RFC4861].
GUA: Global Unicast Address [RFC4291].
DAD: Duplicate Address Detection [RFC4862].
Preferred Address: An address assigned to an interface whose uniqueness has been verified using DAD and whose use by upper-layer protocols is unrestricted [RFC4862]. Preferred addresses may be used as the source address of packets sent from the interface.
Optimistic DAD: A modification of DAD [RFC4429].
2. Problem Statement π§
The most typical scenario where the problem in this document shows up is a host joining the network, forming a new address, and using that address to get onto the Internet:
- A host joins the network and gets a Router Advertisement (RA) packet from the first-hop router. That's either a periodic unsolicited RA or a response to a Router Solicitation the host sent. The RA has the info the host needs to do SLAAC and set up its network stack. It's sent from the router's link-local address to a link-local destination address, and it may include the router's link-layer address. So the host can fill its Neighbor Cache with the router's link-local and link-layer addresses π
- The host starts opening connections to off-link destinations. A super common case is a mobile device sending probes to check Internet connectivity and/or whether there's a captive portal on the network. To speed that up, lots of implementations use Optimistic DAD, which lets them send probes before DAD finishes. At that point the device's Neighbor Cache has everything it needs to send those probes (like the default router's link-local and link-layer addresses). The router's Neighbor Cache might have an entry for the device's link-local address (if the device has been doing address resolution for the router's link-local address), but there are no entries for any of the device's global addresses π
- Return traffic reaches the first-hop router. Since the router doesn't have a cache entry for the host's global address yet, it starts Neighbor Discovery by creating an INCOMPLETE cache entry and sending a Neighbor Solicitation to the solicited-node multicast address (Section 7.3.2 of [RFC4861]). Per Section 7.2.2 of [RFC4861], routers MUST buffer at least one data packet and MAY buffer more while resolving the packet's destination address. But most router implementations only buffer a few packets, and some are known to buffer just one. So any packets that arrive before address resolution finishes cause packet loss by replacing older packets in the buffer π
- If the host sends multiple probes in parallel, then in the worst case it treats all but one of them as failed. That leads to user-visible delay in connecting to the network, especially if the host uses some form of backoff and doesn't retransmit probes as soon as possible.
This scenario is what happens when a device connects to the network for the first time, or after being inactive long enough for its address to be removed from the router's Neighbor Cache. But the same sequence of events also happens when a host starts using a new global address the router hasn't seen before, like a new privacy address [RFC8981], or when the router's Neighbor Cache has been flushed π
In dual-stack networks, Happy Eyeballs [RFC8305] might hide this problem. But it shows up pretty clearly in IPv6-only environments, especially wireless ones. That leads to a poor user experience and makes IPv6-only solutions look unstable and not deployable, which is a bad rep we really don't want π€
3. Solution Requirements π
okay so it would be SO desirable to make Neighbor Discovery work better, so routers already have a usable cache entry for a host address by the time the first packet for that address shows up π«Ά like, the router should be ready before the packet even arrives. specifically:
- If the router does not have a Neighbor Cache entry for the address, a STALE entry needs to be created proactively, prior to arrival of the first packet intended for that address. π
- The solution needs to work for Optimistic Addresses as well. Devices implementing Optimistic DAD usually attempt to minimize the delay in connecting to the network and therefore are more likely to be affected by the problem described in this document. π
- In the case of duplicate addresses present in the network, the solution should not override the existing entry. π
- In topologies with multiple first-hop routers, the cache needs to be updated on all of them, as traffic might be asymmetric: outgoing flows leaving the network via one router while the return traffic enters the segment via another one. π¦
In addition, the solution must not exacerbate issues described in [RFC6583] and needs to be compatible with the recommendations provided in [RFC6583]. β¨
4. Changes to Neighbor Discovery πΈ
the following changes are required to minimize the delay in creating new entries in a router's Neighbor Cache, and honestly it's giving efficiency π
- A node sends unsolicited NAs upon assigning a new IPv6 address to its interface. π
- A router creates a new cache entry upon receiving an unsolicited NA from a host. π§
the following sections discuss these changes in more detail. normative changes are specified in Section 6. π
4.1. Nodes Sending Gratuitous Neighbor Advertisements
Section 7.2.6 of [RFC4861] discusses using unsolicited Neighbor Advertisements to inform node neighbors of the new link-layer address quickly. the same mechanism could be used to notify the node neighbors about the new network-layer address as well: the node can send unsolicited Neighbor Advertisements upon assigning a new IPv6 address to its interface. main character energy, literally β¨
to minimize potential disruption in the case of duplicate addresses, the node should not set the Override flag for a preferred address and must not set the Override flag if the address is in the Optimistic state [RFC4429]. π«Ά
as the main purpose of sending unsolicited NAs upon configuring a new address is to proactively create a Neighbor Cache entry on the first-hop routers, the gratuitous NAs are sent to the all-routers multicast address (ff02::2). limiting the recipients to routers only would help reduce the multicast noise level. if the link-layer devices are performing Multicast Listener Discovery (MLD) snooping [RFC4541], then those unsolicited NAs will only be sent to routers on the given network segment/link, instead of being flooded to all nodes. π
it should be noted that the mechanism discussed here does not cause any significant increase in multicast traffic. the additional multicast unsolicited NAs would proactively create a STALE cache entry on the router, as discussed below. when the router receives the return traffic flows, it does not need to send multicast NSes to the solicited-node multicast address but would send unicast NSes instead. therefore, this procedure would only produce an increase in the overall amount of multicast traffic if no return traffic arrives for the address that sent the unsolicited NA or if the router does not create a STALE entry upon receiving such an NA. the increase would be negligible, as that additional traffic is a few orders of magnitude less than the usual level of Neighbor Discovery multicast traffic. π¦
4.2. Routers Creating Cache Entries upon Receiving Unsolicited Neighbor Advertisements
Section 7.2.5 of [RFC4861] states:
When a valid Neighbor Advertisement is received (either solicited or unsolicited), the Neighbor Cache is searched for the target's entry. If no entry exists, the advertisement SHOULD be silently discarded. There is no need to create an entry if none exists, since the recipient has apparently not initiated any communication with the target.
the reasoning behind dropping unsolicited Neighbor Advertisements ("the recipient has apparently not initiated any communication with the target") is valid for on-link host-to-host communication but, as discussed in Section 1, it does not really apply to the scenario when the host is announcing its address to routers. therefore, it would be beneficial to allow routers to create new entries upon receiving an unsolicited Neighbor Advertisement. π
this document updates [RFC4861] so that routers create a new Neighbor Cache entry upon receiving an unsolicited Neighbor Advertisement for an address that does not already have a Neighbor Cache entry. these changes do not modify the router behavior specified in [RFC4861] for the scenario when the corresponding Neighbor Cache entry already exists. πΈ
the next section analyzes various scenarios of duplicate addresses and discusses the potential impact of creating a STALE entry for a duplicate IPv6 address. π§
5. Avoiding Disruption π
if nodes following the recommendations in this document are using the DAD mechanism defined in [RFC4862], they would send unsolicited NAs as soon as the address changes state from tentative to preferred (after its uniqueness has been verified). however, nodes willing to minimize network stack configuration delays might be using Optimistic Addresses, which means there is a possibility of the address not being unique on the link. Section 2.2 of [RFC4429] discusses measures to ensure that ND packets from the Optimistic Address do not override any existing Neighbor Cache entries, as it would cause interruption of the rightful address owner's traffic in the case of an address conflict. nodes that are willing to speed up their network stack configuration are most likely to be affected by the problem outlined in this document; therefore, it seems reasonable for such hosts to advertise their Optimistic Addresses by sending unsolicited NAs. the main question to consider is the potential risk of overriding the cache entry for the rightful address owner if the Optimistic Address happens to be a duplicate. β οΈ
this is the part where we have to be careful, bestie. overriding the rightful owner's cache entry is exactly the kind of drama we're trying to avoid π
the following sections discuss the address collision scenario when a node sends an unsolicited NA for an address in the Optimistic state, while another node (the rightful owner) already has the same address assigned. this document uses the term "the rightful owner", as the same terminology is used in [RFC4429]. the analysis assumes that the host performs DAD, as Section 5.4 of [RFC4862] requires that DAD MUST be performed on all unicast addresses prior to assigning them to an interface. π«Ά
5.1. Neighbor Cache Entry Exists in Any State Other Than INCOMPLETE
if the router's Neighbor Cache entry for the target address already exists in any state other than INCOMPLETE, then as per Section 7.2.5 of [RFC4861], an unsolicited NA with the Override flag cleared would change the entry state from REACHABLE to STALE but would not update the entry in any other way. therefore, even if the host sends an unsolicited NA from its Optimistic Address, the router's cache entry would not be updated with the new link-layer address, and no impact on the traffic for the rightful address owner is expected. π
the return traffic intended for the host with the Optimistic Address would be sent to the rightful owner. however, this is unavoidable with or without the unsolicited NA mechanism. π
5.2. Neighbor Cache Entry Is in INCOMPLETE State
another corner case is the INCOMPLETE cache entry for the address. π₯
- The router receives a packet for the rightful owner of the address.
- The router starts the address resolution process by creating an INCOMPLETE entry and sends the multicast NS.
- More packets arrive at the router for the address in question.
- The host configures an Optimistic Address and sends an unsolicited NA.
- The router creates a STALE entry and sends the buffered packet(s) to the host (while at least some of those packets are actually intended for the rightful owner).
- As the STALE entry was used to send packets, the router changes the entry state to DELAY and waits up to DELAY_FIRST_PROBE_TIME (5 seconds) [RFC4861] before sending a unicast NS.
- The rightful owner responds to the multicast NS sent at Step 2 with a solicited NA with the
Overrideflag set. - The router updates the entry with the TLLAO supplied (the rightful owner's link-layer address) and sets the entry state to REACHABLE (as the NA has the
Solicitedflag set).
as a result, some packets (packets in the buffer at Step 6 and all packets arriving between Step 6 and Step 8) are delivered to the host with the Optimistic Address, while some of them, if not all, are intended for the rightful owner. without the unsolicited NA, one or more packets that are in the buffer at Step 8 (usually just one packet, but some routers may buffer a few) would have been delivered to the rightful owner and the rest of the packets would have been dropped. however, the probability of such a scenario is rather low, as it would require the following things to happen almost simultaneously (within tens of milliseconds in most cases):
- One host starts using a new IPv6 address and sending traffic without sending an unsolicited NA first.
- Another host configures the same IPv6 address in Optimistic mode before the router completes the address resolution process for the rightful owner.
it should be noted that in this scenario the rightful owner does not send any unsolicited NAs before sending packets. if the rightful owner implements the functionality described in this document and sends unsolicited NAs upon configuring its address, then the router creates a STALE entry for the address, causing all packets to be delivered to the rightful owner (see Section 5.1). the rightful owner would experience no disruption but might receive some packets intended for the host with an Optimistic Address. π¦
this section focuses on the scenario when the solicited NA from the rightful owner arrives after the unsolicited one sent from the Optimistic Address (Step 7 and Step 4, respectively). if the solicited NA arrives first, it changes the NC entry state from INCOMPLETE to REACHABLE. as discussed in Section 5.1, there will be no disruption for the rightful owner if the router already has a REACHABLE entry for the address when an unsolicited NA is received. β¨
5.3. Neighbor Cache Entry Does Not Exist
there are two distinct scenarios that can lead to the situation when the router does not have an NC entry for the IPv6 address: π§
- The rightful owner of the address has not been using it for off-link communication recently or has never used it at all.
- The rightful owner just started sending packets from that address, but the router has not received any return traffic yet.
the impact on the rightful owner's traffic flows would be different in those cases. π
5.3.1. The Rightful Owner Is Not Sending Packets from the Address πΈ
okay so in this scenario, these events are expected to happen:
- The host configures the address and sets its state to Optimistic.
- The host sends an unsolicited NA with the
Overrideflag set to zero and starts sending traffic from the Optimistic Address. - The router creates a
STALEentry for the address and the host link-layer address. - The host starts DAD and detects the address duplication.
- The router receives the return traffic for the duplicate address. As the NC entry is
STALE, it sends traffic using that entry, changes it toDELAY, and waits up toDELAY_FIRST_PROBE_TIMEseconds [RFC4861]. - The router changes the NC entry state to
PROBEand sends up toMAX_UNICAST_SOLICITunicast NSes [RFC4861] separated byRetransTimermilliseconds [RFC4861] to the host link-layer address. - As the host has already detected the address conflict, it does not respond to the unicast NSes. (It is unlikely that the host has not completed the DAD process at this stage, as
DELAY_FIRST_PROBE_TIME(5 seconds) is much higher than the DAD duration (DupAddrDetectTransmits*RetransTimer*1000 + MAX_RTR_SOLICITATION_DELAYseconds) (Section 5.4 of [RFC4862].) The default value for the DAD process would be1*1*1000 + 1 = 2seconds [RFC4861]. If the host has completed DAD but did not detect the address conflict, then there are two hosts with the same address in the preferred state and disruption is inevitable anyway. π - As the router receives no response for the unicast NSes, it deletes the NC entry.
- If return packets for communication initiated at Step 2 are still arriving, the router buffers a small number of those packets and starts the address resolution process again by sending a multicast NS to the solicited-node multicast address. The rightful owner responds, and the router's NC entry is updated with the rightful owner's link-local address. The buffered packet or packets are sent to that address. Any packets still arriving after the address resolution process has completed are sent to the rightful address owner as well.
The rightful owner is not experiencing any disruption, as it does not send any traffic. β¨ It would only start receiving packets intended for another host after Step 8 is completed and only if return packets for the communication initiated at Step 2 are still arriving.
However, the same behavior would be observed if the changes specified in this document are not implemented. If the host starts sending packets from its Optimistic Address but then detects that the address is a duplicate, the first return packet would trigger the address resolution process and would be buffered until the resolution is completed. The buffered packet(s) and any packets still arriving after the address is resolved would be forwarded to the rightful owner of the address. So, the rightful owner might still receive one or more packets from the flows intended for another host. Therefore, it's safe to conclude that the changes specified in this document do not introduce any disruption for the rightful owner of the duplicated address. π«Ά
5.3.2. The Rightful Owner Has Started Sending Packets from the Address π
In this scenario, the following events are happening:
- The rightful owner starts sending traffic from the address (e.g., the address has just been configured or has not been recently used).
- The host configures the address and sets its state to Optimistic.
- The host sends an unsolicited NA with the
Overrideflag set to zero and starts sending traffic from the Optimistic Address. - The router creates a
STALEentry for the address and the host link-layer address. - The host starts DAD and detects the address duplication.
- The router receives the return traffic for the IPv6 address in question. Some flows are intended for the rightful owner of the duplicate address, while some are for the new host. As the NC entry is
STALE, it sends traffic using that entry, changes it toDELAY, and waits up toDELAY_FIRST_PROBE_TIMEseconds [RFC4861]. - The router changes the NC entry state to
PROBEand sends up toMAX_UNICAST_SOLICITunicast NSes [RFC4861] separated byRetransTimermilliseconds [RFC4861] to the host link-layer address. - As the host has already detected the address conflict, it does not respond to the unicast NSes.
- As the router receives no response for the unicast NSes, it deletes the NC entry.
- The next packet recreates the entry and triggers the resolution process. The router buffers the packet and sends a multicast NS to the solicited-node multicast address. The rightful owner responds, and the router's NC entry is updated with the rightful owner's link-local address.
As a result, the traffic for the address of the rightful owner would be sent to the host with the duplicate address instead. π The duration of the disruption can be estimated as DELAY_FIRST_PROBE_TIME*1000 + (MAX_UNICAST_SOLICIT - 1)*RetransTimer milliseconds. As per the constants defined in Section 10 of [RFC4861], this interval is equal to 5*1000 + (3 - 1)*1000 = 7000 milliseconds, or 7 seconds.
However, it should be noted that the probability of such a scenario is rather low. Similar to the scenario discussed in Section 5.2, it would require the following things to happen almost simultaneously (within tens of milliseconds in most cases):
- One host starts using a new IPv6 address and sending traffic without sending an unsolicited NA first.
- Another host configures the same IPv6 address in Optimistic mode before the router receives the return traffic for the first host.
As discussed in Section 5.2, the disruption for the rightful owner can easily be prevented if that node implements the mechanism described in this document. Sending unsolicited NAs before initiating off-link communication would create a STALE entry in the router's NC and prevent any traffic to that address from being sent to the host with the Optimistic Address (see Section 5.1). π§
6. Modifications to RFC-Mandated Behavior π
All normative text in this memo is contained in this section. π
6.1. Modification to RFC 4861 (Neighbor Discovery for IP version 6 (IPv6))
6.1.1. Modification to Section 7.2.5 of RFC 4861
This document makes the following changes to Section 7.2.5 of [RFC4861]:
The text in RFC 4861 is as follows:
When a valid Neighbor Advertisement is received (either solicited or unsolicited), the Neighbor Cache is searched for the target's entry. If no entry exists, the advertisement SHOULD be silently discarded. There is no need to create an entry if none exists, since the recipient has apparently not initiated any communication with the target.
This document updates the text as follows:
When a valid Neighbor Advertisement is received (either solicited or unsolicited), the Neighbor Cache is searched for the target's entry. If no entry exists: - Hosts SHOULD silently discard the advertisement. There is no need to create an entry if none exists, since the recipient has apparently not initiated any communication with the target. - Routers SHOULD create a new entry for the target address with the link-layer address set to the Target Link-Layer Address Option (if supplied). The entry's reachability state MUST be set to STALE. If the received Neighbor Advertisement does not contain the Target Link-Layer Address Option, the advertisement SHOULD be silently discarded.
6.1.2. Modification to Section 7.2.6 of RFC 4861
This document makes the following changes to Section 7.2.6 of [RFC4861]:
The text in RFC 4861 is as follows:
Also, a node belonging to an anycast address MAY multicast unsolicited Neighbor Advertisements for the anycast address when the node's link-layer address changes.
This document updates the text as follows:
Also, a node belonging to an anycast address MAY multicast unsolicited Neighbor Advertisements for the anycast address when the node's link-layer address changes. A node may also wish to notify its first-hop routers when it configures a new global IPv6 address so the routers can proactively populate their Neighbor Caches with the corresponding entries. In such cases, a node SHOULD send up to MAX_NEIGHBOR_ADVERTISEMENT Neighbor Advertisement messages. If the address is preferred, then the Override flag SHOULD NOT be set. If the address is in the Optimistic state, then the Override flag MUST NOT be set. The destination address SHOULD be set to the all-routers multicast address. These advertisements MUST be separated by at least RetransTimer seconds. The first advertisement SHOULD be sent as soon as one of the following events happens: - If Optimistic DAD [RFC4429] is used: A new Optimistic Address is assigned to the node interface. - If Optimistic DAD is not used: An address changes the state from tentative to preferred.
7. Solution Limitations π
The solution described in this document provides some improvement for a node configuring a new IPv6 address and starting to send traffic from it. However, that approach does not completely eliminate the scenario when a router receives some transit traffic for an address without the corresponding Neighbor Cache entry. For example:
- If the host starts using an already-configured IPv6 address after a long period of inactivity, the router might not have the NC entry for that address anymore, as old/expired entries are deleted.
- Clearing the router's Neighbor Cache would trigger packet loss for all actively used addresses removed from the cache.
8. Solutions Considered but Discarded π
There are other possible approaches to address the problem. For example:
- Just do nothing.
- Migrate from the "reactive" Neighbor Discovery [RFC4861] to the registration-based mechanisms [RFC8505].
- Create new entries in the router's Neighbor Cache by gleaning from Neighbor Discovery DAD messages.
- Initiate bidirectional communication from the host to the router using the host GUA.
- Make the probing logic on hosts more robust.
- Increase the buffer size on routers.
- Transit data plane traffic from an unknown address (an address without the corresponding Neighbor Cache entry) to trigger an address resolution process on the router.
It should be noted that some of those options are already implemented by some vendors. The following sections discuss those approaches and the reasons they were discarded. π
8.1. Do Nothing
One of the possible approaches might be to declare that everything is working as intended and let the upper-layer protocols deal with packet loss. The obvious drawbacks include:
- Unhappy users.
- Many support tickets.
- More resistance to deploying IPv6 and IPv6-only networks.
8.2. Change to the Registration-Based Neighbor Discovery π¦
okay so the most radical option is to ditch reactive ND as defined in [RFC4861] and expand the registration-based ND from [RFC6775] and [RFC8505], the stuff already running in IPv6 over Low-Power Wireless Personal Area Networks (6LoWPANs), to every other IPv6 deployment π. It's a big idea that needs more investigation and discussion. But existing IPv6 implementations would need significant changes, and with no clear adoption timeline, it's less preferable than the approach specified in this document π .
8.3. Host Sending NS to the Router Address from Its GUA πΈ
the host could force a STALE entry for its GUA into the router's Neighbor Cache by sending this Neighbor Solicitation message π§:
- The NS source address is the host GUA.
- The destination address is the default router IPv6 address.
- The Source Link-Layer Address Option contains the host link-layer address.
- The target address is the host's default router address (the default router address the host received in the RA).
the downsides though π:
- It would not work for Optimistic Addresses, because Section 2.2 of [RFC4429] explicitly prohibits sending Neighbor Solicitations from an Optimistic Address. not it π.
- If first-hop redundancy is deployed in the network, the NS would only reach the active router. So all backup routers (or all active routers except one) would not get their Neighbor Cache updated π.
- Some wireless devices are known to alter ND packets and perform various nonobvious forms of ND proxy actions. In some cases, unsolicited NAs might not even reach the routers π« .
8.4. Host Sending Router Solicitation from Its GUA π
the host could send a Router Solicitation message to the all-routers multicast address, using its GUA as the source β¨. If the host link-layer address is included in the Source Link-Layer Address Option, the router would create a STALE entry for the host GUA as per Section 6.2.6 of [RFC4861]. BUT this doesn't work if the GUA is in the Optimistic state. Section 2.2 of [RFC4429] explicitly prohibits using an Optimistic Address as the source address of a Router Solicitation with a SLLAO, because it might cause disruption for the rightful owner of the address in the case of a collision π¬. So for Optimistic Addresses, the host can send an RS without a SLLAO included. In that case, the router may respond with either a multicast or unicast RA, and only the unicast one would create a cache entry π.
this approach has some drawbacks, bestie π₯Ί:
- If the address is in the Optimistic state, the RS cannot contain a SLLAO. So the router would only create a cache entry if solicited RAs are sent as unicast. Routers sending solicited RAs as multicast would not create a new cache entry, since they don't need to send a unicast packet back to the host π.
- There might be a random delay between receiving an RS and sending a unicast RA back (which is when the cache entry gets created). That might undermine the whole idea of creating the cache entry proactively β³.
- Some wireless devices are known to intercept ND packets and perform various nonobvious forms of ND proxy actions. In some cases, the RS might not even reach the routers π.
8.5. Routers Populating Their Caches by Gleaning from Neighbor Discovery Packets π
routers may be able to learn about new addresses by gleaning from the DAD Neighbor Solicitation messages π. The router could listen to all solicited-node multicast address groups and, when it receives a Neighbor Solicitation from the unspecified address, search its Neighbor Cache for the solicitation's target address. If no entry exists, the router may create one, set its reachability state to INCOMPLETE, and start the address resolution process for that entry.
the same solution was proposed in [ND-ADDR-RES], and some routing vendors already support this optimization π. However, it has a bunch of drawbacks, so it should not be used as the only solution π«:
- Routers need to receive all multicast Neighbor Discovery packets, which might negatively impact a router's CPU π₯.
- If the router starts the address resolution process as soon as it receives the DAD Neighbor Solicitation, the host might still be performing DAD, and the target address might be tentative. In that case, the host SHOULD silently ignore the received Neighbor Solicitation from the router as per Section 5.4.3 of [RFC4862]. As a result, the router might not be able to finish the address resolution process before the return traffic arrives π.
8.6. Initiating Host-to-Router Communication π‘
the host may force the router to start address resolution by sending a data packet, like ping or traceroute, to its default router link-local address, using the GUA as the source address π«. The RTT to the default router is lower than the RTT to any off-link destination, so it's pretty likely the router would start the Neighbor Discovery process for the host GUA before the first packet of the returning traffic arrives πββοΈ.
this approach has drawbacks too:
- Data packets to the router's link-local address could be blocked by a security policy or control plane protection mechanism π‘οΈ.
- It adds extra overhead to the router's control plane, since the data packet has to be processed on top of the ND packets π¦.
- Unless the data packet is sent to the all-routers
ff02::2multicast address, if the network has first-hop redundancy, only the active router would create a new cache entry π.
8.7. Making the Probing Logic on Hosts More Robust π§Έ
in theory, the probing logic on hosts could be changed to handle initial packet loss better. For example, only one probe could be sent, or the probe retransmit intervals could be reduced. BUT this approach has several drawbacks π ββοΈ:
- It would require updating every application that performs probing, while the solution described in this document is implemented at the operating-system level π₯οΈ.
- Some implementations need to send multiple probes. Examples include, but are not limited to:
- Sending AAAA and A record DNS probes in parallel.
- Detecting captive portals, which often requires sending multiple packets.
- While it would increase the odds that probing completes successfully, there are multiple cases where packet loss would still happen:
- The probe response consists of multiple packets, so all but the first one are dropped.
- Multiple applications on the same host are sending traffic, and return packets arrive at the same time.
- There are multiple first-hop routers in the network. The first probe packet creates the NC entry on one of them. The subsequent return traffic flows might cross other routers and still hit the issue π.
- Reducing the probe retransmit interval unnecessarily increases network utilization and might cause network congestion ππ₯.
8.8. Increasing the Buffer Size on Routers πͺ£
increasing the buffer size and buffering more packets would make the issues described in [RFC6583] worse, and it would make the router more vulnerable to ND-based denial-of-service attacks π¨. Not a good look π.
8.9. Transit Data Plane Traffic from a New Address to Trigger Address Resolution π¦
when a router receives a transit packet sourced by an on-link neighbor node, it might check for a Neighbor Cache entry for the packet source address. If the entry doesn't exist, it starts the address resolution process π. This does ensure that a Neighbor Cache entry is proactively created every time a new, previously unseen GUA is used to send off-link traffic. However, it has a number of limitations, especially:
- If traffic flows are asymmetrical, the return traffic might not transit the same router as the original traffic that triggered address resolution. So the Neighbor Cache entry gets created on the "wrong" router, not the one that actually needs it for the host address π.
- The functionality needs to be limited to explicitly configured networks/interfaces, because the router needs to tell apart on-link addresses (the ones it needs Neighbor Cache entries for) from the rest of the address space πΊοΈ. The proactive address resolution process must only be triggered by packets from prefixes known to be on-link. Otherwise, traffic from spoofed source addresses or any transit traffic could lead to Neighbor Cache exhaustion π«£.
- Implementing this is way more complicated than all the other solutions, since it would involve complex interactions between the data plane and the control plane π€―.
9. IANA Considerations π
this document has no IANA actions β¨. Nothing to register, nothing to update, all done π .
10. Security Considerations π
Okay bestie, the security section is where things get serious π₯Ί One attack to think about is cache spoofing π. That's when an attacker tries to plant a cache entry linking the victim's IPv6 address to the attacker's own link-layer address. The good news is that this document doesn't change anything when the Neighbor Cache for that IPv6 address already exists, so there are no new ways for an attacker to overwrite an existing entry. Safe-ish! β¨
Next up, Section 5 covers some corner cases where a host with a duplicate Optimistic Address might end up getting packets meant for the rightful owner of the address. But these don't open any new attack vectors π Even without the changes in this document, an attacker can easily override the router's Neighbor Cache and redirect traffic by sending NAs with the Solicited flag set. As discussed in Section 5.3.2, the worst case might cause a disruption for up to 7 seconds. Because this scenario is highly unlikely, that risk of disruption is considered acceptable. π
More importantly, for all the cases in Section 5, the rightful owner can stop disruption caused by an accidental address duplication just by implementing the mechanism described in this document π«Ά If the rightful owner sends unsolicited NAs before using the address, a STALE entry would be created on the router's NC. After that, any unsolicited NAs sent from the host with an Optimistic Address wouldn't override that NC entry. Main character energy for the rightful owner π
A malicious host could try to exhaust the Neighbor Cache on the router by creating a large number of STALE entries π But this attack vector isn't new, and the mechanism in this document doesn't increase the risk of it. The attacker could do it, for example, by sending an NS or RS packet with a SLLAO included. All recommendations from [RFC6583] still apply. π
Announcing a new address to the all-routers multicast address may tell an on-link attacker about the IPv6 addresses assigned to the host π However, hiding information about a specific IPv6 address shouldn't be treated as a security measure, because that information is usually disclosed via DAD to all nodes anyway if MLD snooping isn't enabled. Network admins can also help with this by enabling MLD snooping on the link-layer devices, which stops IPv6 link-local multicast packets from being flooded to every on-link node. π¦ If peer-to-peer on-link communications aren't wanted on a given network segment, they should be prevented with proper Layer 2 security mechanisms. So overall, the risk of letting hosts send unsolicited Neighbor Advertisements to the all-routers multicast address is low. Low risk, not no risk! πΈ
It's also worth noting that the mechanism discussed here lets hosts proactively tell their routers about global IPv6 addresses that exist on the link π§ Routers could use that info to tell used addresses apart from unused ones, which helps mitigate Neighbor Cache exhaustion DoS attacks as described in Section 4.3.2 of [RFC3756] and in [RFC6583]. Big brain move π§ β¨
11. References π
11.1. Normative References
- [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997,
https://www.rfc-editor.org/info/rfc2119. - [RFC4291] Hinden, R. and S. Deering, "IP Version 6 Addressing Architecture", RFC 4291, DOI 10.17487/RFC4291, February 2006,
https://www.rfc-editor.org/info/rfc4291. - [RFC4429] Moore, N., "Optimistic Duplicate Address Detection (DAD) for IPv6", RFC 4429, DOI 10.17487/RFC4429, April 2006,
https://www.rfc-editor.org/info/rfc4429. - [RFC4861] Narten, T., Nordmark, E., Simpson, W., and H. Soliman, "Neighbor Discovery for IP version 6 (IPv6)", RFC 4861, DOI 10.17487/RFC4861, September 2007,
https://www.rfc-editor.org/info/rfc4861. - [RFC4862] Thomson, S., Narten, T., and T. Jinmei, "IPv6 Stateless Address Autoconfiguration", RFC 4862, DOI 10.17487/RFC4862, September 2007,
https://www.rfc-editor.org/info/rfc4862. - [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017,
https://www.rfc-editor.org/info/rfc8174.
11.2. Informative References
- [ND-ADDR-RES] Chen, I. and J. Halpern, "Triggering ND Address Resolution on Receiving DAD-NS", Work in Progress, Internet-Draft, draft-halpern-6man-nd-pre-resolve-addr-00, 10 January 2014,
https://datatracker.ietf.org/doc/html/draft-halpern-6man-nd-pre-resolve-addr-00. - [RFC3756] Nikander, P., Ed., Kempf, J., and E. Nordmark, "IPv6 Neighbor Discovery (ND) Trust Models and Threats", RFC 3756, DOI 10.17487/RFC3756, May 2004,
https://www.rfc-editor.org/info/rfc3756. - [RFC4541] Christensen, M., Kimball, K., and F. Solensky, "Considerations for Internet Group Management Protocol (IGMP) and Multicast Listener Discovery (MLD) Snooping Switches", RFC 4541, DOI 10.17487/RFC4541, May 2006,
https://www.rfc-editor.org/info/rfc4541. - [RFC6583] Gashinsky, I., Jaeggli, J., and W. Kumari, "Operational Neighbor Discovery Problems", RFC 6583, DOI 10.17487/RFC6583, March 2012,
https://www.rfc-editor.org/info/rfc6583. - [RFC6775] Shelby, Z., Ed., Chakrabarti, S., Nordmark, E., and C. Bormann, "Neighbor Discovery Optimization for IPv6 over Low-Power Wireless Personal Area Networks (6LoWPANs)", RFC 6775, DOI 10.17487/RFC6775, November 2012,
https://www.rfc-editor.org/info/rfc6775. - [RFC8305] Schinazi, D. and T. Pauly, "Happy Eyeballs Version 2: Better Connectivity Using Concurrency", RFC 8305, DOI 10.17487/RFC8305, December 2017,
https://www.rfc-editor.org/info/rfc8305. - [RFC8505] Thubert, P., Ed., Nordmark, E., Chakrabarti, S., and C. Perkins, "Registration Extensions for IPv6 over Low-Power Wireless Personal Area Network (6LoWPAN) Neighbor Discovery", RFC 8505, DOI 10.17487/RFC8505, November 2018,
https://www.rfc-editor.org/info/rfc8505. - [RFC8981] Gont, F., Krishnan, S., Narten, T., and R. Draves, "Temporary Address Extensions for Stateless Address Autoconfiguration in IPv6", RFC 8981, DOI 10.17487/RFC8981, February 2021,
https://www.rfc-editor.org/info/rfc8981.
Acknowledgements π
Huge thanks to the following people (in alphabetical order) for their comments, review, and feedback π«Ά Mikael Abrahamsson, Stewart Bryant, Lorenzo Colitti, Roman Danyliw, Owen DeLong, Martin Duke, Igor Gashinsky, Carles Gomez, Fernando Gont, Tatuya Jinmei, Benjamin Kaduk, Scott Kelly, Erik Kline, Warren Kumari, Barry Leiba, Jordi Palet Martinez, Erik Nordmark, Michael Richardson, Dan Romascanu, Zaheduzzaman Sarker, Michael Scharf, John Scudder, Mark Smith, Dave Thaler, Pascal Thubert, Loganaden Velvindron, and Γric Vyncke. You all are literally iconic ππ
Author's Address π
Jen Linkova
Google
1 Darling Island Rd
Pyrmont NSW 2009
Australia
Email: furry@google.com
π¦ where this page comes from
- ietf: rfc9131 2021-10
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms