If nodes following the recommendations in this document are using the DAD mechanism defined in [
RFC 4862], 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
RFC 4429 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.
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 [
RFC 4429]. The analysis assumes that the host performs DAD, as
Section 5.4 of
RFC 4862 requires that DAD
MUST be performed on all unicast addresses prior to assigning them to an interface.
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
RFC 4861, 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.
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) [RFC 4861] before sending a unicast NS.
-
The rightful owner responds to the multicast NS sent at Step 2 with a solicited NA with the Override flag 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 Solicited flag 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.
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.
In this scenario, the following events are expected to happen:
-
The host configures the address and sets its state to Optimistic.
-
The host sends an unsolicited NA with the Override flag set to zero and starts sending traffic from the Optimistic Address.
-
The router creates a STALE entry 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 to DELAY, and waits up to DELAY_FIRST_PROBE_TIME seconds [RFC 4861].
-
The router changes the NC entry state to PROBE and sends up to MAX_UNICAST_SOLICIT unicast NSes [RFC 4861] separated by RetransTimer milliseconds [RFC 4861] 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_DELAY seconds) (Section 5.4 of RFC 4862).) The default value for the DAD process would be 1*1*1000 + 1 = 2 seconds [RFC 4861]. 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.
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 Override flag set to zero and starts sending traffic from the Optimistic Address.
-
The router creates a STALE entry 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 to DELAY, and waits up to DELAY_FIRST_PROBE_TIME seconds [RFC 4861].
-
The router changes the NC entry state to PROBE and sends up to MAX_UNICAST_SOLICIT unicast NSes [RFC 4861] separated by RetransTimer milliseconds [RFC 4861] 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
RFC 4861, 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).