idnits 2.17.00 (12 Aug 2021) /tmp/idnits51834/draft-ietf-6man-grand-07.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year (Using the creation date from RFC4861, updated by this document, for RFC5378 checks: 2004-07-16) -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (July 5, 2021) is 313 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) No issues found here. Summary: 0 errors (**), 0 flaws (~~), 1 warning (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 IPv6 Maintenance J. Linkova 3 Internet-Draft Google 4 Updates: 4861 (if approved) July 5, 2021 5 Intended status: Standards Track 6 Expires: January 6, 2022 8 Gratuitous Neighbor Discovery: Creating Neighbor Cache Entries on First- 9 Hop Routers 10 draft-ietf-6man-grand-07 12 Abstract 14 Neighbor Discovery (RFC4861) is used by IPv6 nodes to determine the 15 link-layer addresses of neighboring nodes as well as to discover and 16 maintain reachability information. This document updates RFC4861 to 17 allow routers to proactively create a Neighbor Cache entry when a new 18 IPv6 address is assigned to a node. It also updates RFC4861 and 19 recommends nodes to send unsolicited Neighbor Advertisements upon 20 assigning a new IPv6 address. The proposed change will minimize the 21 delay and packet loss when a node initiates connections to an off- 22 link destination from a new IPv6 address. 24 Status of This Memo 26 This Internet-Draft is submitted in full conformance with the 27 provisions of BCP 78 and BCP 79. 29 Internet-Drafts are working documents of the Internet Engineering 30 Task Force (IETF). Note that other groups may also distribute 31 working documents as Internet-Drafts. The list of current Internet- 32 Drafts is at https://datatracker.ietf.org/drafts/current/. 34 Internet-Drafts are draft documents valid for a maximum of six months 35 and may be updated, replaced, or obsoleted by other documents at any 36 time. It is inappropriate to use Internet-Drafts as reference 37 material or to cite them other than as "work in progress." 39 This Internet-Draft will expire on January 6, 2022. 41 Copyright Notice 43 Copyright (c) 2021 IETF Trust and the persons identified as the 44 document authors. All rights reserved. 46 This document is subject to BCP 78 and the IETF Trust's Legal 47 Provisions Relating to IETF Documents 48 (https://trustee.ietf.org/license-info) in effect on the date of 49 publication of this document. Please review these documents 50 carefully, as they describe your rights and restrictions with respect 51 to this document. Code Components extracted from this document must 52 include Simplified BSD License text as described in Section 4.e of 53 the Trust Legal Provisions and are provided without warranty as 54 described in the Simplified BSD License. 56 Table of Contents 58 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 59 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3 60 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4 61 2. Problem Statement . . . . . . . . . . . . . . . . . . . . . . 4 62 3. Solution Requirements . . . . . . . . . . . . . . . . . . . . 6 63 4. Changes to Neighbor Discovery . . . . . . . . . . . . . . . . 6 64 4.1. Nodes Sending Gratuitous Neighbor Advertisements . . . . 7 65 4.2. Routers Creating Cache Entries Upon Receiving Unsolicited 66 Neighbor Advertisements . . . . . . . . . . . . . . . . . 7 67 5. Avoiding Disruption . . . . . . . . . . . . . . . . . . . . . 8 68 5.1. Neighbor Cache Entry Exists in Any State Other Than 69 INCOMPLETE . . . . . . . . . . . . . . . . . . . . . . . 9 70 5.2. Neighbor Cache Entry is in INCOMPLETE state . . . . . . . 9 71 5.3. Neighbor Cache Entry Does Not Exist . . . . . . . . . . . 10 72 5.3.1. The Rightful Owner Is Not Sending Packets From The 73 Address . . . . . . . . . . . . . . . . . . . . . . . 11 74 5.3.2. The Rightful Owner Has Started Sending Packets From 75 The Address . . . . . . . . . . . . . . . . . . . . . 12 76 6. Modifications to RFC-Mandated Behavior . . . . . . . . . . . 13 77 6.1. Modification to RFC4861 Neighbor Discovery for IP version 78 6 (IPv6) . . . . . . . . . . . . . . . . . . . . . . . . 13 79 6.1.1. Modification to the section 7.2.5 . . . . . . . . . . 13 80 6.1.2. Modification to the section 7.2.6 . . . . . . . . . . 14 81 7. Solution Limitations . . . . . . . . . . . . . . . . . . . . 15 82 8. Solutions Considered but Discarded . . . . . . . . . . . . . 16 83 8.1. Do Nothing . . . . . . . . . . . . . . . . . . . . . . . 16 84 8.2. Change to the Registration-Based Neighbor Discovery . . . 16 85 8.3. Host Sending NS to the Router Address from Its GUA . . . 17 86 8.4. Host Sending Router Solicitation from its GUA . . . . . . 17 87 8.5. Routers Populating Their Caches by Gleaning From Neighbor 88 Discovery Packets . . . . . . . . . . . . . . . . . . . . 18 89 8.6. Initiating Hosts-to-Routers Communication . . . . . . . . 18 90 8.7. Making the Probing Logic on Hosts More Robust . . . . . . 19 91 8.8. Increasing the Buffer Size on Routers . . . . . . . . . . 20 92 8.9. Transit Dataplane Traffic From a New Address Triggering 93 Address Resolution . . . . . . . . . . . . . . . . . . . 20 94 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 20 95 10. Security Considerations . . . . . . . . . . . . . . . . . . . 21 96 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 22 97 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 22 98 12.1. Normative References . . . . . . . . . . . . . . . . . . 22 99 12.2. Informative References . . . . . . . . . . . . . . . . . 23 100 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 24 102 1. Introduction 104 The Neighbor Discovery state machine defined in [RFC4861] assumes 105 that communications between IPv6 nodes are in most cases bi- 106 directional and if a node A is trying to communicate to its neighbor, 107 node B, the return traffic flows could be expected. So when the node 108 A starts the address resolution process, the target node B would also 109 create an entry containing A's IPv6 and link-layer addresses in its 110 neighbor cache. That entry will be used for sending the return 111 traffic to A. 113 In particular, section 7.2.5 of [RFC4861] states: "When a valid 114 Neighbor Advertisement is received (either solicited or unsolicited), 115 the Neighbor Cache is searched for the target's entry. If no entry 116 exists, the advertisement SHOULD be silently discarded. There is no 117 need to create an entry if none exists, since the recipient has 118 apparently not initiated any communication with the target." 120 While this approach is perfectly suitable for host-to-host on-link 121 communications, it does not work so well when a host sends traffic to 122 off-link destinations. After joining the network and receiving a 123 Router Advertisement the host populates its neighbor cache with the 124 default router IPv6 and link-layer addresses and is able to send 125 traffic to off-link destinations. At the same time the router does 126 not have any cache entries for the host global addresses yet and only 127 starts address resolution upon receiving the first packet of the 128 return traffic flow. While waiting for the resolution to complete 129 routers only keep a very small number of packets in the queue, as 130 recommended in Section 7.2.2 [RFC4861]. Any additional packets 131 arriving before the resolution > process finishes are likely to 132 result in dropped packets It can cause packet loss and performance 133 degradation that can be user-visible. 135 This document updates the Neighbor Discovery protocol [RFC4861] to 136 avoid packet loss in the scenario described above. Section 4 137 discusses the changes and analyses the potential impact, while 138 normative changes to [RFC4861] are specified in Section 6. 140 1.1. Requirements Language 142 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 143 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 144 "OPTIONAL" in this document are to be interpreted as described in BCP 145 14 [RFC2119] [RFC8174] when, and only when, they appear in all 146 capitals, as shown here. 148 1.2. Terminology 150 Node: a device that implements IP, [RFC4861]. 152 Host: any node that is not a router, [RFC4861]. 154 ND: Neighbor Discovery, [RFC4861]. 156 NC: Neighbor Cache, [RFC4861]. The Neighbor Cache entry can be in 157 one of five states, as described in section 7.3.2 of [RFC4861]: 158 INCOMPLETE, REACHABLE, STALE, DELAY, PROBE. 160 SLAAC: IPv6 Stateless Address Autoconfiguration, [RFC4862]. 162 NS: Neighbor Solicitation, [RFC4861]. 164 NA: Neighbor Advertisement, [RFC4861]. 166 RS: Router Solicitation, [RFC4861]. 168 RA: Router Advertisement, [RFC4861]. 170 SLLAO: Source link-layer Address Option, an option in the ND packets 171 containing the link-layer address of the sender of the packet 172 [RFC4861]. 174 TLLAO: Target link-layer Address Option, an option in the ND packets 175 containing the link-layer address of the target [RFC4861]. 177 GUA: Global Unicast Address [RFC4291]. 179 DAD: Duplicate Address Detection, [RFC4862]. 181 Preferred Address: an address assigned to an interface whose 182 uniqueness has been verified using DAD and whose use by upper-layer 183 protocols is unrestricted, [RFC4862]. Preferred addresses may be 184 used as the source address of packets sent from the interface. 186 Optimistic DAD: a modification of DAD, [RFC4429]. 188 2. Problem Statement 190 The most typical scenario when the problem may arise is a host 191 joining the network, forming a new address and using that address for 192 accessing the Internet: 194 1. A host joins the network and receives a Router Advertisement (RA) 195 packet from the first-hop router (either a periodic unsolicited 196 RA or a response to a Router Solicitation sent by the host). The 197 RA contains information the host needs to perform SLAAC and to 198 configure its network stack. The RA is sent from the router's 199 link-local address to a link-local destination address and may 200 contain the link-layer address of the router. As a result the 201 host can populate its Neighbor Cache with the router's link-local 202 and link-layer addresses. 204 2. The host starts opening connections to off-link destinations. A 205 very common use case is a mobile device sending probes to detect 206 the Internet connectivity and/or the presence of a captive portal 207 on the network. To speed up that process many implementations 208 use Optimistic DAD which allows them to send probes before the 209 DAD process is completed. At that moment the device neighbor 210 cache contains all information required to send those probes 211 (such as the default router link-local and link-layer addresses). 212 The router neighbor cache, however, might contain an entry for 213 the device link-local address (if the device has been performing 214 the address resolution for the router link-local address), but 215 there are no entries for any of the device's global addresses. 217 3. Return traffic is received by the first-hop router. As the 218 router does not have any cache entry for the host global address 219 yet, the router starts the neighbor discovery process by creating 220 an INCOMPLETE cache entry and then sending a Neighbor 221 Solicitation to the Solicited Node Multicast Address 222 (Section 7.3.2 of [RFC4861]). As per Section 7.2.2 of [RFC4861] 223 Routers MUST buffer at least one data packet and MAY buffer more, 224 while resolving the packet destination address. However, most 225 router implementations limit the buffer size to a few packets 226 only, and some implementations are known to buffer just one 227 packet. So any subsequent packets arriving before the address 228 resolution process is completed are causing packet loss by 229 replacing older packets in the buffer. 231 4. If the host sends multiple probes in parallel, in the worst case, 232 it would consider all but one of them failed. That leads to 233 user-visible delay in connecting to the network, especially if 234 the host implements some form of backoff mechanism and does not 235 retransmit the probes as soon as possible. 237 This scenario illustrates the problem occurring when the device 238 connects to the network for the first time or after an inactivity 239 period long enough for the device address to be removed from the 240 router's neighbor cache. However, the same sequence of events happen 241 when the host starts using a new global address previously unseen by 242 the router, such as a new privacy address [RFC8981] or if the 243 router's Neighbor Cache has been flushed. 245 While in dual-stack networks this problem might be hidden by Happy 246 Eyeballs [RFC8305] it manifests quite clearly in IPv6-only 247 environments, especially wireless ones, leading to poor user 248 experience and contributing to a negative perception of IPv6-only 249 solutions as unstable and non-deployable. 251 3. Solution Requirements 253 It would be highly desirable to improve the Neighbor Discovery 254 mechanics so routers have a usable cache entry for a host address by 255 the time the router receives the first packet for that address. In 256 particular: 258 o If the router does not have a Neighbor Cache entry for the 259 address, a STALE entry needs to be created proactively, prior to 260 arrival of the first packet intended for that address. 262 o The solution needs to work for Optimistic addresses as well. 263 Devices implementing the Optimistic DAD usually attempt to 264 minimize the delay in connecting to the network and therefore are 265 more likely to be affected by the problem described in this 266 document. 268 o In case of duplicate addresses present in the network, the 269 proposed solution should not override the existing entry. 271 o In topologies with multiple first-hop routers the cache needs to 272 be updated on all of them, as traffic might be asymmetric: 273 outgoing flows leaving the network via one router while the return 274 traffic enters the segment via another one. 276 In addition the solution must not exacerbate issues described in 277 [RFC6583] and needs to be compatible with the recommendations 278 provided in [RFC6583]. 280 4. Changes to Neighbor Discovery 282 The following changes are required to minimize the delay in creating 283 new entries in a router neighbor cache 285 o A node sends unsolicited NAs upon assigning a new IPv6 address to 286 its interface. 288 o A router creates a new cache entry upon receiving an unsolicited 289 NA from a host. 291 The following sections discuss these changes in more detail. 292 Normative changes are specified in Section 6. 294 4.1. Nodes Sending Gratuitous Neighbor Advertisements 296 The section 7.2.6 of [RFC4861] discusses using unsolicited Neighbor 297 Advertisements to inform node neighbors of the new link-layer address 298 quickly. The same mechanism could be used to notify the node 299 neighbors about the new network-layer address as well: the node can 300 send gratuitous unsolicited Neighbor Advertisements upon assigning a 301 new IPv6 address to its interface. 303 To minimize the potential disruption in case of duplicate addresses 304 the node should not set the Override flag for a preferred address and 305 must not set the Override flag if the address is in Optimistic 306 [RFC4429] state. 308 As the main purpose of sending unsolicited NAs upon configuring a new 309 address is to proactively create a Neighbor Cache entry on the first- 310 hop routers, the gratuitous NAs are sent to the all-routers multicast 311 address (ff02::2). Limiting the recipients to routers only would 312 help reduce the multicast noise level. If the link-layer devices are 313 performing MLD snooping [RFC4541], then those unsolicited NAs will be 314 only sent to routers on the given network segment/link, instead of 315 being flooded to all nodes. 317 It should be noted that the proposed mechanism does not cause any 318 significant increase in multicast traffic. The additional multicast 319 unsolicited NA would proactively create a STALE cache entry on 320 routers as discussed below. When the router receives the return 321 traffic flows it does not need to send multicast NSes to the 322 solicited node multicast address but would be sending unicast NSes 323 instead. Therefore this procedure would only produce an increase in 324 the overall amount of multicast traffic if no return traffic arrives 325 for the address that sent the unsolicited NA or if the router does 326 not create a STALE entry upon receiving such NA. The increase would 327 be negligible as that additional traffic is a few orders of magnitude 328 less than the usual level of Neighbor Discovery multicast traffic. 330 4.2. Routers Creating Cache Entries Upon Receiving Unsolicited Neighbor 331 Advertisements 333 The section 7.2.5 of [RFC4861] states: "When a valid Neighbor 334 Advertisement is received (either solicited or unsolicited), the 335 Neighbor Cache is searched for the target's entry. If no entry 336 exists, the advertisement SHOULD be silently discarded. There is no 337 need to create an entry if none exists, since the recipient has 338 apparently not initiated any communication with the target". 340 The reasoning behind dropping unsolicited Neighbor Advertisements 341 ("the recipient has apparently not initiated any communication with 342 the target") is valid for onlink host-to-host communication but, as 343 discussed above, it does not really apply for the scenario when the 344 host is announcing its address to routers. Therefore, it would be 345 beneficial to allow routers to create new entries upon receiving an 346 unsolicited Neighbor Advertisement. 348 This document updates [RFC4861] so that routers create a new Neighbor 349 Cache entry upon receiving an unsolicited Neighbor Advertisement for 350 an address that does not already have a Neighbor Cache entry. . The 351 proposed changes do not modify routers behaviour specified in 352 [RFC4861] for the scenario when the corresponding Neighbor Cache 353 entry already exists. 355 The next section analyses various scenarios of duplicated addresses 356 and discusses the potential impact of creating a STALE entry for a 357 duplicated IPv6 address. 359 5. Avoiding Disruption 361 If nodes following the recommendations in this document are using the 362 DAD mechanism defined in [RFC4862], they would send unsolicited NA as 363 soon as the address changes the state from tentative to preferred 364 (after its uniqueness has been verified). However, nodes willing to 365 minimize network stack configuration delays might be using optimistic 366 addresses, which means there is a possibility of the address not 367 being unique on the link. Section 2.2 of [RFC4429] discusses 368 measures to ensure that ND packets from the optimistic address do not 369 override any existing neighbor cache entries as it would cause 370 traffic interruption of the rightful address owner in case of address 371 conflict. As nodes willing to speed up their network stack 372 configuration are most likely to be affected by the problem outlined 373 in this document it seems reasonable for such hosts to advertise 374 their optimistic addresses by sending unsolicited NAs. The main 375 question to consider is the potential risk of overriding the cache 376 entry for the rightful address owner if the optimistic address 377 happens to be duplicated. 379 The following sections discuss the address collision scenario when a 380 node sends an unsolicited NA for an address in the Optimistic state, 381 while another node (the rightful owner) has the same address assigned 382 already. This document uses the term "the rightful owner" as the 383 same terminology is used in [RFC4429]. The analysis assumes that the 384 host performs Duplicate Address Detection, as section 5.4 of 385 [RFC4862] requires that DAD MUST be performed on all unicast 386 addresses prior to assigning them to an interface. 388 5.1. Neighbor Cache Entry Exists in Any State Other Than INCOMPLETE 390 If the router Neighbor Cache entry for the target address already 391 exists in any state other than INCOMPLETE, then as per section 7.2.5 392 of [RFC4861] an unsolicited NA with the Override flag cleared would 393 change the entry state from REACHABLE to STALE but would not update 394 the entry in any other way. Therefore, even if the host sends an 395 unsolicited NA from its Optimistic address the router cache entry 396 would not be updated with the new Link-Layer address and no impact to 397 the traffic for the rightful address owner is expected. 399 The return traffic intended for the host with the Optimistic address 400 would be sent to the rightful owner. However, this is unavoidable 401 with or without the unsolicited NA mechanism. 403 5.2. Neighbor Cache Entry is in INCOMPLETE state 405 Another corner case is the INCOMPLETE cache entry for the address. 407 1. The router receives a packet for the rightful owner of the 408 address. 410 2. The router starts the address resolution process by creating an 411 INCOMPLETE entry and sends the multicast NS. 413 3. More packets arrive at the router for the address in question. 415 4. The host configures an Optimistic address and sends an 416 unsolicited NA. 418 5. The router creates a STALE entry and sends the buffered packet(s) 419 to the host (while at least some of those packets are actually 420 intended for the rightful owner). 422 6. As the STALE entry was used to send packets, the router changes 423 the entry state to DELAY and waits up to DELAY_FIRST_PROBE_TIME 424 ([RFC4861], 5 secs) before sending unicast NS. 426 7. The rightful owner responds to the multicast NS sent at Step 2 427 with a solicited NA with the Override flag set. 429 8. The router updates the entry with the TLLAO supplied (the 430 rightful owner link-layer address) and sets the entry state to 431 REACHABLE (as the NA has the Solicited flag set). 433 As a result some packets (ones in the buffer at Step 6 and all 434 packets arriving between Step 6 and Step 8) are delivered to the host 435 with the Optimisitc address, while some of them, if not all, are 436 intended for the rightful owner. Without the unsolicited NA, packet 437 which are in the buffer at Step 8 (usually just one packet but some 438 routers may buffer a few) would have been delivered to the rightful 439 owner and the rest of the packets would have been dropped. However, 440 the probability of such scenario is rather low as it would require 441 the following things to happen almost simultaneously (within tens of 442 milliseconds in most cases): 444 o One host starts using a new IPv6 address and sending traffic 445 without sending an unsolicited NA first. 447 o Another host configures the same IPv6 address in Optimistic mode 448 before the router completes the address resolution for the 449 rightful owner. 451 It should be noted that in this scenario the rigthful owner does not 452 send any unsolicited NAs before sending packets. If the rightful 453 owner implements the functionality described in this document and 454 sends unsolicited NAs upon configuring its address, then the router 455 creates a STALE entry for the address, causing all packets are 456 delivered to the rightful owner (see Section 5.1). The rightful 457 owner would experience no disruption but might receive some packets 458 intended for the host with Optimistic address. 460 This section focuses on the scenario when the solicited NA from the 461 rightful owner arrives after the unsolicited one sent from the 462 Optimistic address (Step 7 and Step 4 respectively). If the 463 solicited NA arrives first it changes the NC entry state from 464 INCOMPLETE to REACHABLE. As discussed in Section 5.1, there will be 465 no disruption for the rightful owner if the router already has a 466 REACHABLE entry for the address when an unsolicited NA is received. 468 5.3. Neighbor Cache Entry Does Not Exist 470 There are two distinct scenarios which can lead to the situation when 471 the router does not have a NC entry for the IPv6 address: 473 1. The rightful owner of the address has not been using it for off- 474 link communication recently or has never used it at all. 476 2. The rightful owner just started sending packets from that address 477 but the router has not received any return traffic yet. 479 The impact on the rightful owner's traffic flows would be different 480 in those cases. 482 5.3.1. The Rightful Owner Is Not Sending Packets From The Address 484 In this scenario the following events are expected to happen: 486 1. The host configures the address and sets its state to Optimistic. 488 2. The host sends an unsolicited NA with the Override flag set to 489 zero and starts sending traffic from the Optimistic address. 491 3. The router creates a STALE entry for the address and the host 492 link-layer address. 494 4. The host starts DAD and detects the address duplication. 496 5. The router receives the return traffic for the duplicated 497 address. As the NC entry is STALE it sends traffic using that 498 entry, changes it to DELAY and waits up to DELAY_FIRST_PROBE_TIME 499 ([RFC4861]) seconds. 501 6. The router changes the NC entry state to PROBE and sends up to 502 MAX_UNICAST_SOLICIT ([RFC4861]) unicast NSes separated by 503 RetransTimer milliseconds ([RFC4861]) to the host link-layer 504 address. 506 7. As the host has detected the address conflict already it does not 507 respond to the unicast NSes. (It is unlikely that the host has 508 not completed the DAD process at this stage, as 509 DELAY_FIRST_PROBE_TIME (5 seconds) is much higher than the DAD 510 duration (DupAddrDetectTransmits*RetransTimer*1000 + 511 MAX_RTR_SOLICITATION_DELAY secs, section 5.4 of [RFC4862]). The 512 default value for the DAD process would be 1*1*1000 + 1 = 2 secs, 513 [RFC4861]. If the host has completed DAD but did not detect the 514 address conflict then there are two hosts with the same address 515 in the Preferred state and the disruption is inevitable anyway. 517 8. As the router receives no response for the unicast NSes, it 518 deletes the NC entry. 520 9. If return packets for communication initiated at step 2 are still 521 arriving, the router buffers a small number of those packets and 522 starts the address resolution again by sending a multicast NS to 523 the solicited node multicast address. The rightful owner 524 responds and the router NC entry is updated with the rightful 525 owner link-local address. The buffered packet(s) are sent to 526 that address. Any packets still arriving after the address 527 resolution still completed are sent to the rightful address owner 528 as well. 530 The rightful owner is not experiencing any disruption as it does not 531 send any traffic. It would only start receiving packets intended for 532 another host after Step 8 is completed and only if return packets for 533 the communication initiated at step 2 are still arriving. 535 However, the same behaviour would be observed if changes proposed in 536 this document are not implemented. If the host starts sending 537 packets from its Optimistic address but then changes the address 538 state to Duplicated, the first return packet would trigger the 539 address resolution process and would be buffered until the resolution 540 is completed. The buffered packet(s) and any packets still arriving 541 after the address is resolved would be forwarded to the rightful 542 owner of the address. So the rightful owner might still receive one 543 or more packets from the flows intended for another host. Therefore, 544 it's safe to conclude that the proposed changes do introduce any 545 disruption for the rightful owner of the duplicated address. 547 5.3.2. The Rightful Owner Has Started Sending Packets From The Address 549 In this scenario the following events are happening: 551 1. The rightful owner starts sending traffic from the address (e.g. 552 the address has just been configured or has not been recently 553 used). 555 2. The host configures the address and sets its state to 556 Optimistic. 558 3. The host sends an unsolicited NA with the Override flag set to 559 zero and starts sending traffic from the Optimistic address. 561 4. The router creates a STALE entry for the address and the host 562 link-layer address. 564 5. The host starts DAD and detects the address duplication. 566 6. The router receives the return traffic for the IPv6 address in 567 question. Some flows intended for the rightful owner of the 568 duplicated address, while some are for the new host. As the NC 569 entry is STALE it sends traffic using that entry, changes it to 570 DELAY and waits up to DELAY_FIRST_PROBE_TIME ([RFC4861]) 571 seconds. 573 7. The router changes the NC entry state to PROBE and sends up to 574 MAX_UNICAST_SOLICIT ([RFC4861]) unicast NSes separated by 575 RetransTimer milliseconds ([RFC4861]) to the host link-layer 576 address. 578 8. As the host has detected the address conflict already it does 579 not respond to the unicast NSes. 581 9. As the router receives no response for the unicast NSes, it 582 deletes the NC entry. 584 10. The next packet re-creates the entry and triggers the resolution 585 process. The router buffers the packet and sends a multicast NS 586 to the solicited node multicast address. The rightful owner 587 responds and the router NC entry is updated with the rightful 588 owner link-local address. 590 As a result the traffic for the address rightful owner would be sent 591 to the host with the duplicated address instead. The duration of the 592 disruption can be estimated as DELAY_FIRST_PROBE_TIME*1000 + 593 (MAX_UNICAST_SOLICIT - 1)*RetransTimer milliseconds. As per the 594 constants defined in Section 10 of [RFC4861] this interval is equal 595 to 5*1000 + (3 - 1)*1000 = 7000ms or 7 seconds. 597 However, it should be noted that the probability of such scenario is 598 rather low. Similary to the scenario discussed in Section 5.2, it 599 would require the following things to happen almost simultaneously 600 (within tens of milliseconds in most cases): 602 o One host starts using a new IPv6 address and sending traffic 603 without sending an unsolicited NA first. 605 o Another host configures the same IPv6 address in Optimistic mode 606 before the router receives the return traffic for the first host. 608 As discussed in Section 5.2, the disruption to the rightful owner can 609 easily be prevent if that node implements the mechanism described in 610 the document. Sending unsolicited NAs before initiatining off-link 611 communication would create a STALE entry in the router NC and prevent 612 any tarffic to that address to be sent to the host with the 613 Optimistic address (see Section 5.1). 615 6. Modifications to RFC-Mandated Behavior 617 All normative text in this memo is contained in this section. 619 6.1. Modification to RFC4861 Neighbor Discovery for IP version 6 (IPv6) 621 6.1.1. Modification to the section 7.2.5 623 This document makes the following changes to the section 7.2.5 of 624 [RFC4861]: 626 ------------------------------------------------------------------ 628 OLD TEXT: 630 ------------------------------------------------------------------ 632 When a valid Neighbor Advertisement is received (either solicited or 633 unsolicited), the Neighbor Cache is searched for the target's entry. 634 If no entry exists, the advertisement SHOULD be silently discarded. 635 There is no need to create an entry if none exists, since the 636 recipient has apparently not initiated any communication with the 637 target. 639 ------------------------------------------------------------------ 641 NEW TEXT: 643 ------------------------------------------------------------------ 645 When a valid Neighbor Advertisement is received (either solicited or 646 unsolicited), the Neighbor Cache is searched for the target's entry. 647 If no entry exists: 649 o Hosts SHOULD silently discard the advertisement. There is no need 650 to create an entry if none exists, since the recipient has 651 apparently not initiated any communication with the target. 653 o Routers SHOULD create a new entry for the target address with the 654 link-layer address set to the Target link-layer address option (if 655 supplied). The entry's reachability state MUST be set to STALE. 656 If the received Neighbor Advertisement does not contain the Target 657 link-layer address option the advertisement SHOULD be silently 658 discarded. 660 ------------------------------------------------------------------ 662 6.1.2. Modification to the section 7.2.6 664 This document proposes the following changes to the section 7.2.6 of 665 [RFC4861]: 667 OLD TEXT: 669 ------------------------------------------------------------------ 671 Also, a node belonging to an anycast address MAY multicast 672 unsolicited Neighbor Advertisements for the anycast address when the 673 node's link-layer address changes. 675 ------------------------------------------------------------------ 677 NEW TEXT: 679 ------------------------------------------------------------------ 681 Also, a node belonging to an anycast address MAY multicast 682 unsolicited Neighbor Advertisements for the anycast address when the 683 node's link-layer address changes. 685 A node may also wish to notify its first-hop routers when it 686 configures a new global IPv6 address so the routers can proactively 687 populate their neighbor caches with the corresponding entries. In 688 such cases a node SHOULD send up to MAX_NEIGHBOR_ADVERTISEMENT 689 Neighbor Advertisement messages. If the address is preferred then 690 the Override flag SHOULD NOT be set. If the address is in the 691 Optimistic state then the Override flag MUST NOT be set. The 692 destination address SHOULD be set to the all-routers multicast 693 address. These advertisements MUST be separated by at least 694 RetransTimer seconds. The first advertisement SHOULD be sent as soon 695 as one of the following events happens: 697 o if Optimistic DAD [RFC4429] is used: a new Optimistic address is 698 assigned to the node interface. 700 o if Optimistic DAD is not used: an address changes the state from 701 tentative to preferred. 703 ------------------------------------------------------------------ 705 7. Solution Limitations 707 The solution described in this document provides some improvement for 708 a node configuring a new IPv6 address and starting sending traffic 709 from it. However, that approach does not completely eliminate the 710 scenario when a router receives some transit traffic for an address 711 without the corresponding Neighbor Cache entry. For example: 713 o If the host starts using an already configured IPv6 address after 714 a long period of inactivity, the router might not have the NC 715 entry for that address anymore, as old/expired entries are 716 deleted. 718 o Clearing the router Neighbor Cache would trigger the packet loss 719 for all actively used addresses removed from the cache. 721 8. Solutions Considered but Discarded 723 There are other possible approaches to address the problem, for 724 example: 726 o Just do nothing. 728 o Migrating from the "reactive" Neighbor Discovery ([RFC4861]) to 729 the registration-based mechanisms ([RFC8505]). 731 o Creating new entries in routers Neighbor Cache by gleaning from 732 Neighbor Discovery DAD messages. 734 o Initiates bidirectional communication from the host to the router 735 using the host GUA. 737 o Making the probing logic on hosts more robust. 739 o Increasing the buffer size on routers. 741 o Transit dataplane traffic from an unknown address (an address w/o 742 the corresponding neighbor cache entry) triggers an address 743 resolution process on the router. 745 It should be noted that some of those options are already implemented 746 by some vendors. The following sections discuss those approaches and 747 the reasons they were discarded. 749 8.1. Do Nothing 751 One of the possible approaches might be to declare that everything is 752 working as intended and let the upper-layer protocols deal with 753 packet loss. The obvious drawbacks include: 755 o Unhappy users. 757 o Many support tickets. 759 o More resistance to deploy IPv6 and IPv6-Only networks. 761 8.2. Change to the Registration-Based Neighbor Discovery 763 The most radical approach would be to move away from the reactive ND 764 as defined in [RFC4861] and expand the registration-based ND 765 ([RFC6775], [RFC8505]) used in Low-Power Wireless Personal Area 766 Networks (6LoWPANs) to the rest of IPv6 deployments. This option 767 requires some investigation and discussion. However, significant 768 changes to the existing IPv6 implementations would be needed, so 769 unclear adoption timeline makes this approach less preferable than 770 one proposed in this document. 772 8.3. Host Sending NS to the Router Address from Its GUA 774 The host could force creating a STALE entry for its GUA in the router 775 ND cache by sending the following Neighbor Solicitation message: 777 o The NS source address is the host GUA. 779 o The destination address is the default router IPv6 address. 781 o The Source Link-Layer Address option contains the host link-layer 782 address. 784 o The target address is the host default router address (the default 785 router address the host received in the RA). 787 The main disadvantages of this approach are: 789 o Would not work for Optimistic addresses as section 2.2 of 790 [RFC4429] explicitly prohibits sending Neighbor Solicitations from 791 an Optimistic Address. 793 o If first-hop redundancy is deployed in the network, the NS would 794 reach the active router only, so all backup routers (or all active 795 routers except one) would not get their neighbor cache updated. 797 o Some wireless devices are known to alter ND packets and perform 798 various non-obvious forms of ND proxy actions. In some cases, 799 unsolicited NAs might not even reach the routers. 801 8.4. Host Sending Router Solicitation from its GUA 803 The host could send a router solicitation message to 'all routers' 804 multicast address, using its GUA as a source. If the host link-layer 805 address is included in the Source Link-Layer Address option, the 806 router would create a STALE entry for the host GUA as per the section 807 6.2.6 of [RFC4861]. However, this approach cannot be used if the GUA 808 is in optimistic state: section 2.2 of [RFC4429] explicitly prohibits 809 using an Optimistic Address as the source address of a Router 810 Solicitation with a SLLAO as it might disrupt the rightful owner of 811 the address in the case of a collision. So for the optimistic 812 addresses the host can send an RS without SLLAO included. In that 813 case the router may respond with either a multicast or a unicast RA 814 (only the latter would create a cache entry). 816 This approach has the following drawbacks: 818 o If the address is in the Optimistic state the RS cannot contain 819 SLLAO. As a result the router would only create a cache entry if 820 solicited RAs are sent as unicast. Routers sending solicited RAs 821 as multicast would not create a new cache entry as they do not 822 need to send a unicast packet back to the host. 824 o There might be a random delay between receiving an RS and sending 825 a unicast RA back (and creating a cache entry) which might 826 undermine the idea of creating the cache entry proactively. 828 o Some wireless devices are known to intercept ND packets and 829 perform various non-obvious forms of ND proxy actions. In some 830 cases the RS might not even reach the routers. 832 8.5. Routers Populating Their Caches by Gleaning From Neighbor 833 Discovery Packets 835 Routers may be able to learn about new addresses by gleaning from the 836 DAD Neighbor Solicitation messages. The router could listen to all 837 solicited node multicast address groups and upon receiving a Neighbor 838 Solicitation from the unspecified address search its Neighbor Cache 839 for the solicitation's Target Address. If no entry exists, the 840 router may create an entry, set its reachability state to 841 'INCOMPLETE' and start the address resolution for that entry. 843 The same solution was proposed in 844 [I-D.halpern-6man-nd-pre-resolve-addr]. Some routing vendors support 845 such optimization already. However, this approach has a number of 846 drawbacks and therefore should not be used as the only solution: 848 o Routers need to receive all multicast Neighbor Discovery packets 849 which might negatively impact the routers CPU. 851 o If the router starts the address resolution as soon as it receives 852 the DAD Neighbor Solicitation the host might be still performing 853 DAD and the target address might be tentative. In that case, the 854 host SHOULD silently ignore the received Neighbor Solicitation 855 from the router as per the Section 5.4.3 of [RFC4862]. As a 856 result the router might not be able to complete the address 857 resolution before the return traffic arrives. 859 8.6. Initiating Hosts-to-Routers Communication 861 The host may force the router to start address resolution by sending 862 a data packet such as ping or traceroute to its default router link- 863 local address, using the GUA as a source address. As the RTT to the 864 default router is lower than RTT to any off-link destinations it's 865 quite likely that the router would start the neighbor discovery 866 process for the host GUA before the first packet of the returning 867 traffic arrives. 869 This approach has the following drawbacks: 871 o Data packets to the router link-local address could be blocked by 872 security policy or control plane protection mechanism. 874 o It introduces an additional overhead for routers control plane (in 875 addition to processing ND packets, the data packet needs to be 876 processed as well). 878 o Unless the data packet is sent to 'all routers' ff02::2 multicast 879 address, if the network provides a first-hop redundancy then only 880 the active router would create a new cache entry. 882 8.7. Making the Probing Logic on Hosts More Robust 884 Theoretically the probing logic on hosts might be modified to deal 885 better with initial packet loss. For example, only one probe can be 886 sent or probes retransmit intervals can be reduced. However, this 887 approach has a number of drawbacks: 889 o It would require updating all possible applications performing 890 probing, while the proposed solution is implemented on operating 891 systems level. 893 o Some implementations need to send multiple probes. Examples 894 include but not limited to: 896 * Sending AAAA and A records DNS probes in parallel. 898 * Detecting captive portals often require sending multiple 899 packets. 901 o While it would increase the probability of the probing to complete 902 successfully, there are multiple cases when packet loss would 903 still occur: 905 * The probe response consists of multiple packets, so all but the 906 first one are dropped. 908 * There are multiple applications on the same host sending 909 traffic and return packets arrive simultaneously. 911 * There are multiple first-hop routers in the network. The first 912 probe packet creates the NC entry on one of them. The 913 subsequent return traffic flows might cross other routers and 914 still experience the issue. 916 o Reducing the probe retransmit interval unnecessary increases the 917 network utilization and might cause the network congestion. 919 8.8. Increasing the Buffer Size on Routers 921 Increasing the buffer size and buffering more packets would 922 exacerbate issues described in [RFC6583] and make the router more 923 vulnerable to ND-based denial of service attacks. 925 8.9. Transit Dataplane Traffic From a New Address Triggering Address 926 Resolution 928 When a router receives a transit packet sourced by a on-link neighbor 929 node, it might check the presence of the neighbor cache entry for the 930 packet source address and if the entry does not exist, start address 931 resolution process. This approach does ensure that a Neighbor Cache 932 entry is proactively created every time a new, previously unseen GUA 933 is used for sending offlink traffic. However, this approach has a 934 number of limitations, in particular: 936 o If traffic flows are asymmetrical the return traffic might not 937 transit the same router as the original traffic which triggered 938 the address resolution. So the neighbor cache entry is created on 939 the "wrong" router, not the one which actually needs the neighbor 940 cache entry for the host address. 942 o The functionality needs to be limited to explicitly configured 943 networks/interfaces, as the router needs to distinguish between 944 onlink addresses (ones the router needs to have Neighbor Cache 945 entries for) and the rest of the address space. The proactive 946 address resolution must only be triggered by packets from the 947 prefixes known to be on-link. Otherwise, traffic from spoofed 948 source addresses or any transit traffic could lead to neighbor 949 cache exhaustion. 951 o Implementing such functionality is much more complicated than all 952 other solutions as it would involve complex data-control planes 953 interaction. 955 9. IANA Considerations 957 This memo asks the IANA for no new parameters. 959 10. Security Considerations 961 One of the potential attack vectors to consider is a cache spoofing 962 when the attacker might try to install a cache entry for the victim's 963 IPv6 address and the attacker's Link-Layer address. However, it 964 should be noted that this document does not propose any changes for 965 the scenario when the ND cache for the given IPv6 address already 966 exists. Therefore, there are no new vectors for an attacker to 967 override an existing cache entry. 969 Section 5 describes some corner cases when a host with the duplicated 970 Optimistic address might get some packets intended for the rightful 971 owner of the address. However such scenarios do not introduce any 972 new attack vectors: even without the proposed changes, an attacker 973 can easily override the routers neighbor cache and redirect the 974 traffic by sending NAs with the Solicited flag set. As discussed in 975 Section 5.3.2 the worst case scenario might cause a disruption for up 976 to 7 seconds. This risk is considered acceptable due to very low 977 probability of that scenario. More importantly, for all cases 978 described in Section 5 the rightful owner can prevent disruption 979 caused by an accidental address duplication just by implementing the 980 mechanism described in this document. If the rightful owner sends 981 unsolicited NAs before using the address, the STALE entry would be 982 created on the router NC and any subsequent unsolicited NAs sent from 983 the host with an Optimistic address would not override the NC entry. 985 A malicious host could attempt to exhaust the neighbor cache on the 986 router by creating a large number of STALE entries. However, this 987 attack vector is not new and this document does not increase the risk 988 of such an attack: the attacker could do it, for example, by sending 989 a NS or RS packet with SLLAO included. All recommendations from 990 [RFC6583] still apply. 992 Announcing a new address to all-routers multicast address may inform 993 an on-link attacker about IPv6 addresses assigned to the host. 994 However, hiding information about the specific IPv6 address should 995 not be considered a security measure as such information is usually 996 disclosed via DAD to all nodes anyway if MLD snooping is not enabled. 997 Network administrators can also mitigate this issue by enabling MLD 998 snooping on the link-layer devices to prevent IPv6 link-local 999 multicast packets being flooded to all onlink nodes. If peer-to-peer 1000 onlink communications are not desirable for the given network segment 1001 they should be prevented by proper layer-2 security mechanisms. 1002 Therefore, the risk of allowing hosts to send unsolicited Neighbor 1003 Advertisements to all-routers multicast address is low. 1005 It should be noted that the proposed mechanism allows hosts to 1006 proactively inform their routers about global IPv6 addresses existing 1007 on-link. Routers could use that information to distinguish between 1008 used and unused addresses to mitigate ND cache exhaustion DoS attacks 1009 described in Section 4.3.2 [RFC3756] and [RFC6583]. 1011 11. Acknowledgements 1013 Thanks to the following people (in alphabetical order) for their 1014 comments, review and feedback: Mikael Abrahamsson, Stewart Bryant, 1015 Lorenzo Colitti, Roman Danyliw, Owen DeLong, Martin Duke, Igor 1016 Gashinsky, Carles Gomez, Fernando Gont, Tatuya Jinmei, Benjamin 1017 Kaduk, Scott Kelly, Erik Kline, Warren Kumari, Barry Leiba, Jordi 1018 Palet Martinez, Erik Nordmark, Michael Richardson, Dan Romascanu, 1019 Zaheduzzaman Sarker, Michael Scharf, John Scudder, Mark Smith, Dave 1020 Thaler, Pascal Thubert, Loganaden Velvindron, Eric Vyncke. 1022 12. References 1024 12.1. Normative References 1026 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1027 Requirement Levels", BCP 14, RFC 2119, 1028 DOI 10.17487/RFC2119, March 1997, 1029 . 1031 [RFC4291] Hinden, R. and S. Deering, "IP Version 6 Addressing 1032 Architecture", RFC 4291, DOI 10.17487/RFC4291, February 1033 2006, . 1035 [RFC4429] Moore, N., "Optimistic Duplicate Address Detection (DAD) 1036 for IPv6", RFC 4429, DOI 10.17487/RFC4429, April 2006, 1037 . 1039 [RFC4861] Narten, T., Nordmark, E., Simpson, W., and H. Soliman, 1040 "Neighbor Discovery for IP version 6 (IPv6)", RFC 4861, 1041 DOI 10.17487/RFC4861, September 2007, 1042 . 1044 [RFC4862] Thomson, S., Narten, T., and T. Jinmei, "IPv6 Stateless 1045 Address Autoconfiguration", RFC 4862, 1046 DOI 10.17487/RFC4862, September 2007, 1047 . 1049 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 1050 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 1051 May 2017, . 1053 12.2. Informative References 1055 [I-D.halpern-6man-nd-pre-resolve-addr] 1056 Chen, I. and J. Halpern, "Triggering ND Address Resolution 1057 on Receiving DAD-NS", draft-halpern-6man-nd-pre-resolve- 1058 addr-00 (work in progress), January 2014. 1060 [RFC3756] Nikander, P., Ed., Kempf, J., and E. Nordmark, "IPv6 1061 Neighbor Discovery (ND) Trust Models and Threats", 1062 RFC 3756, DOI 10.17487/RFC3756, May 2004, 1063 . 1065 [RFC4541] Christensen, M., Kimball, K., and F. Solensky, 1066 "Considerations for Internet Group Management Protocol 1067 (IGMP) and Multicast Listener Discovery (MLD) Snooping 1068 Switches", RFC 4541, DOI 10.17487/RFC4541, May 2006, 1069 . 1071 [RFC6583] Gashinsky, I., Jaeggli, J., and W. Kumari, "Operational 1072 Neighbor Discovery Problems", RFC 6583, 1073 DOI 10.17487/RFC6583, March 2012, 1074 . 1076 [RFC6775] Shelby, Z., Ed., Chakrabarti, S., Nordmark, E., and C. 1077 Bormann, "Neighbor Discovery Optimization for IPv6 over 1078 Low-Power Wireless Personal Area Networks (6LoWPANs)", 1079 RFC 6775, DOI 10.17487/RFC6775, November 2012, 1080 . 1082 [RFC8305] Schinazi, D. and T. Pauly, "Happy Eyeballs Version 2: 1083 Better Connectivity Using Concurrency", RFC 8305, 1084 DOI 10.17487/RFC8305, December 2017, 1085 . 1087 [RFC8505] Thubert, P., Ed., Nordmark, E., Chakrabarti, S., and C. 1088 Perkins, "Registration Extensions for IPv6 over Low-Power 1089 Wireless Personal Area Network (6LoWPAN) Neighbor 1090 Discovery", RFC 8505, DOI 10.17487/RFC8505, November 2018, 1091 . 1093 [RFC8981] Gont, F., Krishnan, S., Narten, T., and R. Draves, 1094 "Temporary Address Extensions for Stateless Address 1095 Autoconfiguration in IPv6", RFC 8981, 1096 DOI 10.17487/RFC8981, February 2021, 1097 . 1099 Author's Address 1101 Jen Linkova 1102 Google 1103 1 Darling Island Rd 1104 Pyrmont, NSW 2009 1105 AU 1107 Email: furry@google.com