idnits 2.17.1 draft-ietf-ipv6-2461bis-06.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** It looks like you're using RFC 3978 boilerplate. You should update this to the boilerplate described in the IETF Trust License Policy document (see https://trustee.ietf.org/license-info), which is required now. -- Found old boilerplate from RFC 3978, Section 5.1 on line 20. -- Found old boilerplate from RFC 3978, Section 5.5 on line 4428. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 4406. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 4412. ** This document has an original RFC 3978 Section 5.4 Copyright Line, instead of the newer IETF Trust Copyright according to RFC 4748. ** This document has an original RFC 3978 Section 5.5 Disclaimer, instead of the newer disclaimer which includes the IETF Trust according to RFC 4748. ** The document seems to lack an RFC 3979 Section 5, para. 1 IPR Disclosure Acknowledgement -- however, there's a paragraph with a matching beginning. Boilerplate error? Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** The document seems to lack a 1id_guidelines paragraph about 6 months document validity -- however, there's a paragraph with a matching beginning. Boilerplate error? ** The document seems to lack a 1id_guidelines paragraph about the list of current Internet-Drafts -- however, there's a paragraph with a matching beginning. Boilerplate error? == No 'Intended status' indicated for this document; assuming Proposed Standard Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- == There are 1 instance of lines with non-RFC3849-compliant IPv6 addresses in the document. If these are example addresses, they should be changed. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the RFC 3978 Section 5.4 Copyright Line does not match the current year == Line 4137 has weird spacing: '...tent of unc...' == Line 4149 has weird spacing: '...tent of unc...' == Line 4215 has weird spacing: '...k-layer add...' == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'MUST not' in this paragraph: It is possible that a host may receive a solicitation, a router advertisement, or a Redirect message without a link-layer address option included. These messages MUST not create or update neighbor cache entries, except with respect to the IsRouter flag as specified in sections 6.3.4 and 7.2.5. If a neighbor cache entry does not exist for the source of such a message, Address Resolution will be required before unicast communications with that address to begin. This is particularly relevant for unicast responses to solicitations where an additional packet exchange is required for advertisement delivery. -- 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.) -- Couldn't find a document date in the document -- date freshness check skipped. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'IPv6-CELLULAR' is mentioned on line 170, but not defined == Missing Reference: 'LD-SHRE' is mentioned on line 2586, but not defined == Missing Reference: 'PSREQ' is mentioned on line 3653, but not defined == Missing Reference: 'IPv6-AH' is mentioned on line 3743, but not defined == Missing Reference: 'RFC 3667' is mentioned on line 3984, but not defined ** Obsolete undefined reference: RFC 3667 (Obsoleted by RFC 3978) == Unused Reference: 'ANYCST' is defined on line 3842, but no explicit reference was found in the text == Unused Reference: 'IPv6-CELL' is defined on line 3871, but no explicit reference was found in the text == Unused Reference: 'IPv6-NBMA' is defined on line 3879, but no explicit reference was found in the text == Unused Reference: 'IPv6-SA' is defined on line 3883, but no explicit reference was found in the text == Unused Reference: 'IPv6-AUTH' is defined on line 3886, but no explicit reference was found in the text == Unused Reference: 'NDMAN' is defined on line 3901, but no explicit reference was found in the text == Unused Reference: 'RFC3667' is defined on line 3908, but no explicit reference was found in the text ** Obsolete normative reference: RFC 3513 (ref. 'ADDR-ARCH') (Obsoleted by RFC 4291) ** Obsolete normative reference: RFC 2463 (ref. 'ICMPv6') (Obsoleted by RFC 4443) ** Obsolete normative reference: RFC 2460 (ref. 'IPv6') (Obsoleted by RFC 8200) -- Obsolete informational reference (is this intentional?): RFC 3484 (ref. 'ADDR-SEL') (Obsoleted by RFC 6724) -- Obsolete informational reference (is this intentional?): RFC 3315 (ref. 'DHCPv6') (Obsoleted by RFC 8415) -- Obsolete informational reference (is this intentional?): RFC 3736 (ref. 'DHCPv6lite') (Obsoleted by RFC 8415) -- Obsolete informational reference (is this intentional?): RFC 3316 (ref. 'IPv6-CELL') (Obsoleted by RFC 7066) -- Obsolete informational reference (is this intentional?): RFC 2401 (ref. 'IPv6-SA') (Obsoleted by RFC 4301) -- Obsolete informational reference (is this intentional?): RFC 2402 (ref. 'IPv6-AUTH') (Obsoleted by RFC 4302, RFC 4305) -- Obsolete informational reference (is this intentional?): RFC 2406 (ref. 'IPv6-ESP') (Obsoleted by RFC 4303, RFC 4305) -- Obsolete informational reference (is this intentional?): RFC 3775 (ref. 'MIPv6') (Obsoleted by RFC 6275) -- Obsolete informational reference (is this intentional?): RFC 3667 (Obsoleted by RFC 3978) == Outdated reference: A later version (-06) exists of draft-ietf-send-ndopt-04 Summary: 10 errors (**), 0 flaws (~~), 21 warnings (==), 15 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 INTERNET-DRAFT T. Narten, 3 Expires: September 2006 IBM 4 E. Nordmark, 5 Sun Microsystems 6 W. Simpson, 7 Daydreamer 8 H. Soliman, 9 Flarion 10 March, 2006 12 Neighbor Discovery for IP version 6 (IPv6) 13 15 Status of this memo 17 By submitting this Internet-Draft, each author represents that any 18 applicable patent or other IPR claims of which he or she is aware 19 have been or will be disclosed, and any of which he or she becomes 20 aware will be disclosed, in accordance with Section 6 of BCP 79. 22 Internet-Drafts are working documents of the Internet Engineering 23 Task Force (IETF), its areas, and its working groups. Note that other 24 groups may also distribute working documents as Internet-Drafts. 26 Internet-Drafts are draft documents valid for a maximum of six months 27 and may be updated, replaced, or obsoleted by other documents at any 28 time. It is inappropriate to use Internet-Drafts as reference 29 material or cite them other than as "work in progress". 31 The list of current Internet-Drafts can be accessed at 32 http://www.ietf.org/ietf/lid-abstracts.txt 34 The list of Internet-Draft Shadow Directories can be accessed at 35 http://www.ietf.org/shadow.html 37 This document is a submission of the IETF IPv6 WG. Comments should be 38 directed to the IPv6 WG mailing list, ipv6@ietf.org. 40 Abstract 42 This document specifies the Neighbor Discovery protocol for IP 43 Version 6. IPv6 nodes on the same link use Neighbor Discovery to 44 discover each other's presence, to determine each other's link-layer 45 addresses, to find routers and to maintain reachability information 46 about the paths to active neighbors. 48 Table of Contents 50 1. INTRODUCTION....................................................4 52 2. TERMINOLOGY.....................................................4 53 2.1. General...................................................4 54 2.2. Link Types................................................8 55 2.3. Addresses.................................................9 56 2.4. Requirements..............................................9 58 3. PROTOCOL OVERVIEW..............................................10 59 3.1. Comparison with IPv4.....................................13 60 3.2. Supported Link Types.....................................15 61 3.3. Securing Neighbor Discovery messages......................17 63 4. MESSAGE FORMATS................................................17 64 4.1. Router Solicitation Message Format.......................17 65 4.2. Router Advertisement Message Format......................18 66 4.3. Neighbor Solicitation Message Format.....................20 67 4.4. Neighbor Advertisement Message Format....................22 68 4.5. Redirect Message Format..................................24 69 4.6. Option Formats...........................................26 70 4.6.2. Prefix Information.................................27 71 4.6.3. Redirected Header..................................29 72 4.6.4. MTU................................................30 74 5. CONCEPTUAL MODEL OF A HOST.....................................31 75 5.1. Conceptual Data Structures...............................31 76 5.2. Conceptual Sending Algorithm.............................33 77 5.3. Garbage Collection and Timeout Requirements..............35 79 6. ROUTER AND PREFIX DISCOVERY....................................35 80 6.1. Message Validation.......................................36 81 6.1.1. Validation of Router Solicitation Messages.........36 82 6.1.2. Validation of Router Advertisement Messages........36 83 6.2. Router Specification.....................................37 84 6.2.1. Router Configuration Variables....................37 85 6.2.2. Becoming An Advertising Interface.................41 86 6.2.3. Router Advertisement Message Content..............42 87 6.2.4. Sending Unsolicited Router Advertisements.........43 88 6.2.5. Ceasing To Be An Advertising Interface............44 89 6.2.6. Processing Router Solicitations...................44 90 6.2.7. Router Advertisement Consistency..................45 91 6.2.8. Link-local Address Change.........................46 92 6.3. Host Specification.......................................47 93 6.3.1. Host Configuration Variables......................47 94 6.3.2. Host Variables....................................47 95 6.3.3. Interface Initialization..........................48 96 6.3.4. Processing Received Router Advertisements.........48 97 6.3.5. Timing out Prefixes and Default Routers...........51 98 6.3.6. Default Router Selection..........................51 99 6.3.7. Sending Router Solicitations......................52 101 7. ADDRESS RESOLUTION AND NEIGHBOR UNREACHABILITY DETECTION.......54 102 7.1. Message Validation.......................................54 103 7.1.1. Validation of Neighbor Solicitations..............54 104 7.1.2. Validation of Neighbor Advertisements.............55 105 7.2. Address Resolution.......................................55 106 7.2.1. Interface Initialization..........................56 107 7.2.2. Sending Neighbor Solicitations....................56 108 7.2.3. Receipt of Neighbor Solicitations.................57 109 7.2.4. Sending Solicited Neighbor Advertisements.........58 110 7.2.5. Receipt of Neighbor Advertisements................59 111 7.2.6. Sending Unsolicited Neighbor Advertisements.......61 112 7.2.7. Anycast Neighbor Advertisements...................62 113 7.2.8. Proxy Neighbor Advertisements.....................62 114 7.3. Neighbor Unreachability Detection........................63 115 7.3.1. Reachability Confirmation.........................63 116 7.3.2. Neighbor Cache Entry States.......................64 117 7.3.3. Node Behavior.....................................65 119 8. REDIRECT FUNCTION..............................................67 120 8.1. Validation of Redirect Messages..........................67 121 8.2. Router Specification.....................................68 122 8.3. Host Specification.......................................69 124 9. EXTENSIBILITY - OPTION PROCESSING..............................70 126 10. PROTOCOL CONSTANTS............................................72 128 11. SECURITY CONSIDERATIONS.......................................73 129 11.1 Threat analysis...........................................73 130 11.2 Securing Neighbor Discovery messages......................74 132 12. RENUMBERING CONSIDERATIONS....................................75 134 REFERENCES.........................................................76 136 Authors' Addresses.................................................79 138 APPENDIX A: MULTIHOMED HOSTS.......................................80 139 APPENDIX B: FUTURE EXTENSIONS......................................81 140 APPENDIX C: STATE MACHINE FOR THE REACHABILITY STATE...............82 141 APPENDIX D: SUMMARY OF ISROUTER RULES..............................84 142 APPENDIX E: IMPLEMENTATION ISSUES..................................85 143 Appendix E.1: Reachability confirmations...........................85 144 APPENDIX F: CHANGES FROM RFC 2461..................................86 146 1. INTRODUCTION 148 This specification defines the Neighbor Discovery (ND) protocol for 149 Internet Protocol Version 6 (IPv6). Nodes (hosts and routers) use 150 Neighbor Discovery to determine the link-layer addresses for 151 neighbors known to reside on attached links and to quickly purge 152 cached values that become invalid. Hosts also use Neighbor Discovery 153 to find neighboring routers that are willing to forward packets on 154 their behalf. Finally, nodes use the protocol to actively keep track 155 of which neighbors are reachable and which are not, and to detect 156 changed link-layer addresses. When a router or the path to a router 157 fails, a host actively searches for functioning alternates. 159 Unless specified otherwise (in a document that covers operating IP 160 over a particular link type) this document applies to all link types. 161 However, because ND uses link-layer multicast for some of its 162 services, it is possible that on some link types (e.g., NBMA links) 163 alternative protocols or mechanisms to implement those services will 164 be specified (in the appropriate document covering the operation of 165 IP over a particular link type). The services described in this 166 document that are not directly dependent on multicast, such as 167 Redirects, Next-hop determination, Neighbor Unreachability Detection, 168 etc., are expected to be provided as specified in this document. The 169 details of how one uses ND on NBMA links are addressed in [IPv6- 170 NBMA]. In addition, [IPv6-3GPP] and [IPv6-CELLULAR] discuss the use 171 of this protocol over some cellular links, which are examples of NBMA 172 links. 174 The authors would like to acknowledge the contributions of the IPv6 175 working group and, in particular, (in alphabetical order) Ran 176 Atkinson, Jim Bound, Scott Bradner, Alex Conta, Elwyn Davies, Stephen 177 Deering Richard Draves, Francis Dupont, Robert Elz, Robert Gilligan, 178 Robert Hinden, Tatuya Jinmei, Allison Mankin, Dan McDonald, Charles 179 Perkins, Matt Thomas, and Susan Thomson. 181 2. TERMINOLOGY 183 2.1. General 185 IP - Internet Protocol Version 6. The terms IPv4 and 186 IPv6 are used only in contexts where necessary to avoid 187 ambiguity. 189 ICMP - Internet Message Control Protocol for the Internet 190 Protocol Version 6. The terms ICMPv4 and ICMPv6 are 191 used only in contexts where necessary to avoid 192 ambiguity. 194 node - a device that implements IP. 196 router - a node that forwards IP packets not explicitly 197 addressed to itself. 199 host - any node that is not a router. 201 upper layer - a protocol layer immediately above IP. Examples are 202 transport protocols such as TCP and UDP, control 203 protocols such as ICMP, routing protocols such as OSPF, 204 and internet or lower-layer protocols being "tunneled" 205 over (i.e., encapsulated in) IP such as IPX, AppleTalk, 206 or IP itself. 208 link - a communication facility or medium over which nodes can 209 communicate at the link layer, i.e., the layer 210 immediately below IP. Examples are Ethernets (simple 211 or bridged), PPP links, X.25, Frame Relay, or ATM 212 networks as well as internet (or higher) layer 213 "tunnels", such as tunnels over IPv4 or IPv6 itself. 215 interface - a node's attachment to a link. 217 neighbors - nodes attached to the same link. 219 address - an IP-layer identifier for an interface or a set of 220 interfaces. 222 anycast address 223 - an identifier for a set of interfaces (typically 224 belonging to different nodes). A packet sent to an 225 anycast address is delivered to one of the interfaces 226 identified by that address (the "nearest" one, 227 according to the routing protocol's measure of 228 distance). See [ADDR-ARCH]. 230 Note that an anycast address is syntactically 231 indistinguishable from a unicast address. Thus, nodes 232 sending packets to anycast addresses don't generally 233 know that an anycast address is being used. Throughout 234 the rest of this document, references to unicast 235 addresses also apply to anycast addresses in those 236 cases where the node is unaware that a unicast address 237 is actually an anycast address. 239 prefix - a bit string that consists of some number of initial 240 bits of an address. 242 link-layer address 243 - a link-layer identifier for an interface. Examples 244 include IEEE 802 addresses for Ethernet links. 246 on-link - an address that is assigned to an interface on a 247 specified link. A node considers an address to be on- 248 link if: 250 - it is covered by one of the link's prefixes, or 252 - a neighboring router specifies the address as 253 the target of a Redirect message, or 255 - a Neighbor Advertisement message is received for 256 the (target) address, or 258 - any Neighbor Discovery message is received from 259 the address. 261 off-link - the opposite of "on-link"; an address that is not 262 assigned to any interfaces on the specified link. 264 longest prefix match 265 - The process of determining which prefix (if any) in 266 a set of prefixes covers a target address. A target 267 address is covered by a prefix if all of the bits in 268 the prefix match the left-most bits of the target 269 address. When multiple prefixes cover an address, 270 the longest prefix is the one that matches. 272 reachability 273 - whether or not the one-way "forward" path to a 274 neighbor is functioning properly. In particular, 275 whether packets sent to a neighbor are reaching the 276 IP layer on the neighboring machine and are being 277 processed properly by the receiving IP layer. For 278 neighboring routers, reachability means that packets 279 sent by a node's IP layer are delivered to the 280 router's IP layer, and the router is indeed 281 forwarding packets (i.e., it is configured as a 282 router, not a host). For hosts, reachability means 283 that packets sent by a node's IP layer are delivered 284 to the neighbor host's IP layer. 286 packet - an IP header plus payload. 288 link MTU - the maximum transmission unit, i.e., maximum packet 289 size in octets, that can be conveyed in one piece 290 over a link. 292 target - an address about which address resolution 293 information is sought, or an address which is the 294 new first-hop when being redirected. 296 proxy - a router that responds to Neighbor Discovery query 297 messages on behalf of another node. A router acting 298 on behalf of a mobile node that has moved off-link 299 could potentially act as a proxy for the mobile 300 node. 302 ICMP destination unreachable indication 303 - an error indication returned to the original sender 304 of a packet that cannot be delivered for the reasons 305 outlined in [ICMPv6]. If the error occurs on a node 306 other than the node originating the packet, an ICMP 307 error message is generated. If the error occurs on 308 the originating node, an implementation is not 309 required to actually create and send an ICMP error 310 packet to the source, as long as the upper-layer 311 sender is notified through an appropriate mechanism 312 (e.g., return value from a procedure call). Note, 313 however, that an implementation may find it 314 convenient in some cases to return errors to the 315 sender by taking the offending packet, generating an 316 ICMP error message, and then delivering it (locally) 317 through the generic error handling routines. 319 random delay 320 - when sending out messages, it is sometimes necessary to 321 delay a transmission for a random amount of time in 322 order to prevent multiple nodes from transmitting at 323 exactly the same time, or to prevent long-range 324 periodic transmissions from synchronizing with each 325 other [SYNC]. When a random component is required, a 326 node calculates the actual delay in such a way that the 327 computed delay forms a uniformly-distributed random 328 value that falls between the specified minimum and 329 maximum delay times. The implementor must take care to 330 insure that the granularity of the calculated random 331 component and the resolution of the timer used are both 332 high enough to insure that the probability of multiple 333 nodes delaying the same amount of time is small. 335 random delay seed 336 - If a pseudo-random number generator is used in 337 calculating a random delay component, the generator 338 should be initialized with a unique seed prior to being 339 used. Note that it is not sufficient to use the 340 interface token alone as the seed, since interface 341 tokens will not always be unique. To reduce the 342 probability that duplicate interface tokens cause the 343 same seed to be used, the seed should be calculated 344 from a variety of input sources (e.g., machine 345 components) that are likely to be different even on 346 identical "boxes". For example, the seed could be 347 formed by combining the CPU's serial number with an 348 interface token. 350 2.2. Link Types 352 Different link layers have different properties. The ones of concern 353 to Neighbor Discovery are: 355 multicast capable 356 - a link that supports a native mechanism at the 357 link layer for sending packets to all (i.e., 358 broadcast) or a subset of all neighbors. 360 point-to-point - a link that connects exactly two interfaces. A 361 point-to-point link is assumed to have multicast 362 capability and have a link-local address. 364 non-broadcast multi-access (NBMA) 365 - a link to which more than two interfaces can attach, 366 but that does not support a native form of multicast 367 or broadcast (e.g., X.25, ATM, frame relay, etc.). 368 Note that all link types (including NBMA) are 369 expected to provide multicast service for 370 applications that need it(e.g., using multicast 371 servers). However, it is an issue for further study 372 whether ND should use such facilities or an 373 alternate mechanism that provides the equivalent 374 multicast capability for ND. 376 shared media - a link that allows direct communication among a 377 number of nodes, but attached nodes are configured 378 in such a way that they do not have complete prefix 379 information for all on-link destinations. That is, 380 at the IP level, nodes on the same link may not know 381 that they are neighbors; by default, they 382 communicate through a router. Examples are large 383 (switched) public data networks such as SMDS and B- 384 ISDN. Also known as "large clouds". See [SH- 385 MEDIA]. 387 variable MTU - a link that does not have a well-defined MTU (e.g., 388 IEEE 802.5 token rings). Many links (e.g., 389 Ethernet) have a standard MTU defined by the link- 390 layer protocol or by the specific document 391 describing how to run IP over the link layer. 393 asymmetric reachability 394 - a link where non-reflexive and/or non-transitive 395 reachability is part of normal operation. (Non- 396 reflexive reachability means packets from A reach B 397 but packets from B don't reach A. Non-transitive 398 reachability means packets from A reach B, and 399 packets from B reach C, but packets from A don't 400 reach C.) Many radio links exhibit these 401 properties. 403 2.3. Addresses 405 Neighbor Discovery makes use of a number of different addresses 406 defined in [ADDR-ARCH], including: 408 all-nodes multicast address 409 - the link-local scope address to reach all nodes, 410 FF02::1. 412 all-routers multicast address 413 - the link-local scope address to reach all routers, 414 FF02::2. 416 solicited-node multicast address 417 - a link-local scope multicast address that is computed 418 as a function of the solicited target's address. The 419 function is described in [ADDR-ARCH]. The function is 420 chosen so that IP addresses which differ only in the 421 least significant bits, e.g., due to multiple 422 high-order prefixes associated with different 423 providers, will map to the same solicited-node address 424 thereby reducing the number of multicast addresses a 425 node must join. 427 link-local address 428 - a unicast address having link-only scope that can be 429 used to reach neighbors. All interfaces on routers 430 MUST have a link-local address. Also, [ADDRCONF] 431 requires that interfaces on hosts have a link-local 432 address. 434 unspecified address 435 - a reserved address value that indicates the lack of an 436 address (e.g., the address is unknown). It is never 437 used as a destination address, but may be used as a 438 source address if the sender does not (yet) know its 439 own address (e.g., while verifying an address is unused 440 during address autoconfiguration [ADDRCONF]). The 441 unspecified address has a value of 0:0:0:0:0:0:0:0. 443 Note that this specification does not strictly comply with the 444 consistency requirements in [ADDR-SEL] for the scopes of source and 445 destination addresses. It is possible in some cases for hosts to use 446 a source address of a larger scope than the destination address in 447 the IPv6 header. 449 2.4. Requirements 450 The keywords MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, 451 SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL, when they appear in this 452 document, are to be interpreted as described in [KEYWORDS]. 454 This document also makes use of internal conceptual variables to 455 describe protocol behavior and external variables that an 456 implementation must allow system administrators to change. The 457 specific variable names, how their values change, and how their 458 settings influence protocol behavior are provided to demonstrate 459 protocol behavior. An implementation is not required to have them in 460 the exact form described here, so long as its external behavior is 461 consistent with that described in this document. 463 3. PROTOCOL OVERVIEW 465 This protocol solves a set of problems related to the interaction 466 between nodes attached to the same link. It defines mechanisms for 467 solving each of the following problems: 469 Router Discovery: How hosts locate routers that reside on an 470 attached link. 472 Prefix Discovery: How hosts discover the set of address prefixes 473 that define which destinations are on-link for an 474 attached link. (Nodes use prefixes to distinguish 475 destinations that reside on-link from those only 476 reachable through a router.) 478 Parameter Discovery: How a node learns such link parameters as the 479 link MTU or such Internet parameters as the hop limit 480 value to place in outgoing packets. 482 Address Autoconfiguration: Introduces the mechanisms needed in 483 order to allow nodes to automatically configure an 484 address for an interface. 486 Address resolution: How nodes determine the link-layer address of 487 an on-link destination (e.g., a neighbor) given only the 488 destination's IP address. 490 Next-hop determination: The algorithm for mapping an IP destination 491 address into the IP address of the neighbor to which 492 traffic for the destination should be sent. The next- 493 hop can be a router or the destination itself. 495 Neighbor Unreachability Detection: How nodes determine that a 496 neighbor is no longer reachable. For neighbors used as 497 routers, alternate default routers can be tried. For 498 both routers and hosts, address resolution can be 499 performed again. 501 Duplicate Address Detection: How a node determines that an address 502 it wishes to use is not already in use by another node. 504 Redirect: How a router informs a host of a better first-hop node 505 to reach a particular destination. 507 Neighbor Discovery defines five different ICMP packet types: A pair 508 of Router Solicitation and Router Advertisement messages, a pair of 509 Neighbor Solicitation and Neighbor Advertisements messages, and a 510 Redirect message. The messages serve the following purpose: 512 Router Solicitation: When an interface becomes enabled, hosts may 513 send out Router Solicitations that request routers to 514 generate Router Advertisements immediately rather than 515 at their next scheduled time. 517 Router Advertisement: Routers advertise their presence together 518 with various link and Internet parameters either 519 periodically, or in response to a Router Solicitation 520 message. Router Advertisements contain prefixes that 521 are used for on-link determination and/or address 522 configuration, a suggested hop limit value, etc. 524 Neighbor Solicitation: Sent by a node to determine the link-layer 525 address of a neighbor, or to verify that a neighbor is 526 still reachable via a cached link-layer address. 527 Neighbor Solicitations are also used for Duplicate 528 Address Detection. 530 Neighbor Advertisement: A response to a Neighbor Solicitation 531 message. A node may also send unsolicited Neighbor 532 Advertisements to announce a link-layer address change. 534 Redirect: Used by routers to inform hosts of a better first hop 535 for a destination. 537 On multicast-capable links, each router periodically multicasts a 538 Router Advertisement packet announcing its availability. A host 539 receives Router Advertisements from all routers, building a list of 540 default routers. Routers generate Router Advertisements frequently 541 enough that hosts will learn of their presence within a few minutes, 542 but not frequently enough to rely on an absence of advertisements to 543 detect router failure; a separate Neighbor Unreachability Detection 544 algorithm provides failure detection. 546 Router Advertisements contain a list of prefixes used for on-link 547 determination and/or autonomous address configuration; flags 548 associated with the prefixes specify the intended uses of a 549 particular prefix. Hosts use the advertised on-link prefixes to 550 build and maintain a list that is used in deciding when a packet's 551 destination is on-link or beyond a router. Note that a destination 552 can be on-link even though it is not covered by any advertised on- 553 link prefix. In such cases a router can send a Redirect informing 554 the sender that the destination is a neighbor. 556 Router Advertisements (and per-prefix flags) allow routers to inform 557 hosts how to perform Address Autoconfiguration. For example, routers 558 can specify whether hosts should use DHCPv6 and/or 559 autonomous (stateless) address configuration. 561 Router Advertisement messages also contain Internet parameters such 562 as the hop limit that hosts should use in outgoing packets and, 563 optionally, link parameters such as the link MTU. This facilitates 564 centralized administration of critical parameters that can be set on 565 routers and automatically propagated to all attached hosts. 567 Nodes accomplish address resolution by multicasting a Neighbor 568 Solicitation that asks the target node to return its link-layer 569 address. Neighbor Solicitation messages are multicast to the 570 solicited-node multicast address of the target address. The target 571 returns its link-layer address in a unicast Neighbor Advertisement 572 message. A single request-response pair of packets is sufficient for 573 both the initiator and the target to resolve each other's link-layer 574 addresses; the initiator includes its link-layer address in the 575 Neighbor Solicitation. 577 Neighbor Solicitation messages can also be used to determine if more 578 than one node has been assigned the same unicast address. The use of 579 Neighbor Solicitation messages for Duplicate Address Detection is 580 specified in [ADDRCONF]. 582 Neighbor Unreachability Detection detects the failure of a neighbor 583 or the failure of the forward path to the neighbor. Doing so 584 requires positive confirmation that packets sent to a neighbor are 585 actually reaching that neighbor and being processed properly by its 586 IP layer. Neighbor Unreachability Detection uses confirmation from 587 two sources. When possible, upper-layer protocols provide a positive 588 confirmation that a connection is making "forward progress", that is, 589 previously sent data is known to have been delivered correctly (e.g., 590 new acknowledgments were received recently). When positive 591 confirmation is not forthcoming through such "hints", a node sends 592 unicast Neighbor Solicitation messages that solicit Neighbor 593 Advertisements as reachability confirmation from the next hop. To 594 reduce unnecessary network traffic, probe messages are only sent to 595 neighbors to which the node is actively sending packets. 597 In addition to addressing the above general problems, Neighbor 598 Discovery also handles the following situations: 600 Link-layer address change - A node that knows its link-layer 601 address has changed can multicast a few (unsolicited) 602 Neighbor Advertisement packets to all nodes to quickly update 603 cached link-layer addresses that have become invalid. Note 604 that the sending of unsolicited advertisements is a 605 performance enhancement only (e.g., unreliable). The 606 Neighbor Unreachability Detection algorithm ensures that all 607 nodes will reliably discover the new address, though the 608 delay may be somewhat longer. 610 Inbound load balancing - Nodes with replicated interfaces may want 611 to load balance the reception of incoming packets across 612 multiple network interfaces on the same link. Such nodes 613 have multiple link-layer addresses assigned to the same 614 interface. For example, a single network driver could 615 represent multiple network interface cards as a single 616 logical interface having multiple link-layer addresses. 618 Neighbor Discovery allows a router to perform Load balancing 619 for traffic addressed to itself by allowing routers to omit 620 the source link-layer address from Router Advertisement 621 packets, thereby forcing neighbors to use Neighbor 622 Solicitation messages to learn link-layer addresses of 623 routers. Returned Neighbor Advertisement messages can then 624 contain link-layer addresses that differ depending on who 625 issued the solicitation. This specification does not support 626 a mechanism that allows host to Load balance incoming 627 packets. 629 Anycast addresses - Anycast addresses identify one of a set of 630 nodes providing an equivalent service, and multiple nodes on 631 the same link may be configured to recognize the same Anycast 632 address. Neighbor Discovery handles anycasts by having nodes 633 expect to receive multiple Neighbor Advertisements for the 634 same target. All advertisements for anycast addresses are 635 tagged as being non-Override advertisements. This invokes 636 specific rules to determine which of potentially multiple 637 advertisements should be used. 639 Proxy advertisements - A router willing to accept packets on behalf 640 of a target address that is unable to respond to Neighbor 641 Solicitations can issue non-Override Neighbor Advertisements. 642 Proxy advertisements are used by Mobile IPv6 home Agents to 643 defend mobile nodes' addresses when they move off-link. 644 However, it is not intended as a general mechanism to handle 645 nodes that, e.g., do not implement this protocol. 647 3.1. Comparison with IPv4 649 The IPv6 Neighbor Discovery protocol corresponds to a combination of 650 the IPv4 protocols ARP [ARP], ICMP Router Discovery [RDISC], and ICMP 651 Redirect [ICMPv4]. In IPv4 there is no generally agreed upon 652 protocol or mechanism for Neighbor Unreachability Detection, although 653 Hosts Requirements [HR-CL] does specify some possible algorithms for 654 Dead Gateway Detection (a subset of the problems Neighbor 655 Unreachability Detection tackles). 657 The Neighbor Discovery protocol provides a multitude of improvements 658 over the IPv4 set of protocols: 660 Router Discovery is part of the base protocol set; there is no 661 need for hosts to "snoop" the routing protocols. 663 Router advertisements carry link-layer addresses; no additional 664 packet exchange is needed to resolve the router's link-layer 665 address. 667 Router advertisements carry prefixes for a link; there is no need 668 to have a separate mechanism to configure the "netmask". 670 Router advertisements enable Address Autoconfiguration. 672 Routers can advertise an MTU for hosts to use on the link, 673 ensuring that all nodes use the same MTU value on links lacking a 674 well-defined MTU. 676 Address resolution multicasts are "spread" over 16 million (2^24) 677 multicast addresses greatly reducing address resolution related 678 interrupts on nodes other than the target. Moreover, non-IPv6 679 machines should not be interrupted at all. 681 Redirects contain the link-layer address of the new first hop; 682 separate address resolution is not needed upon receiving a 683 redirect. 685 Multiple prefixes can be associated with the same link. By 686 default, hosts learn all on-link prefixes from Router 687 Advertisements. However, routers may be configured to omit some 688 or all prefixes from Router Advertisements. In such cases hosts 689 assume that destinations are off-link and send traffic to routers. 690 A router can then issue redirects as appropriate. 692 Unlike IPv4, the recipient of an IPv6 redirect assumes that the 693 new next-hop is on-link. In IPv4, a host ignores redirects 694 specifying a next-hop that is not on-link according to the link's 695 network mask. The IPv6 redirect mechanism is analogous to the 696 XRedirect facility specified in [SH-MEDIA]. It is expected to be 697 useful on non-broadcast and shared media links in which it is 698 undesirable or not possible for nodes to know all prefixes for 699 on-link destinations. 701 Neighbor Unreachability Detection is part of the base 702 significantly improving the robustness of packet delivery in the 703 presence of failing routers, partially failing or partitioned 704 links and nodes that change their link-layer addresses. For 705 instance, mobile nodes can move off-link without losing any 706 connectivity due to stale ARP caches. 708 Unlike ARP, Neighbor Discovery detects half-link failures (using 709 Neighbor Unreachability Detection) and avoids sending traffic to 710 neighbors with which two-way connectivity is absent. 712 Unlike in IPv4 Router Discovery the Router Advertisement messages 713 do not contain a preference field. The preference field is not 714 needed to handle routers of different "stability"; the Neighbor 715 Unreachability Detection will detect dead routers and switch to a 716 working one. 718 The use of link-local addresses to uniquely identify routers (for 719 Router Advertisement and Redirect messages) makes it possible for 720 hosts to maintain the router associations in the event of the site 721 renumbering to use new global prefixes. 723 By setting the Hop Limit to 255, Neighbor Discovery is immune to 724 off-link senders that accidentally or intentionally send ND 725 messages. In IPv4 off-link senders can send both ICMP Redirects 726 and Router Advertisement messages. 728 Placing address resolution at the ICMP layer makes the protocol 729 more media-independent than ARP and makes it possible to use 730 generic IP layer authentication and security mechanisms as 731 appropriate. 733 3.2. Supported Link Types 735 Neighbor Discovery supports links with different properties. In the 736 presence of certain properties only a subset of the ND protocol 737 mechanisms are fully specified in this document: 739 point-to-point - Neighbor Discovery handles such links just like 740 multicast links. (Multicast can be trivially 741 provided on point to point links, and interfaces 742 can be assigned link-local addresses.) Neighbor 743 Discovery should be implemented as described in 744 this document. 746 multicast - Neighbor Discovery should be implemented as 747 described in this document. 749 non-broadcast multiple access (NBMA) 750 - Redirect, Neighbor Unreachability Detection and 751 next-hop determination should be implemented as 752 described in this document. Address resolution, 753 and the mechanism for delivering Router 754 Solicitations and Advertisements on NBMA links is 755 not specified in this document. Note that if 757 hosts support manual configuration of a list of 758 default routers, hosts can dynamically acquire the 759 link-layer addresses for their neighbors from 760 Redirect messages. 762 shared media - The Redirect message is modeled after the 763 XRedirect message in [SH-MEDIA] in order to 764 simplify use of the protocol on shared media 765 links. 767 This specification does not address shared media 768 issues that only relate to routers, such as: 770 - How routers exchange reachability information 771 on a shared media link. 773 - How a router determines the link-layer address 774 of a host, which it needs to send redirect 775 messages to the host. 777 - How a router determines that it is the first- 778 hop router for a received packet. 780 The protocol is extensible (through the definition 781 of new options) so that other solutions might be 782 possible in the future. 784 variable MTU - Neighbor Discovery allows routers to specify a MTU 785 for the link, which all nodes then use. All nodes 786 on a link must use the same MTU (or Maximum 787 Receive Unit) in order for multicast to work 788 properly. Otherwise when multicasting, a sender, 789 which can not know which nodes will receive the 790 packet, could not determine a minimum packet size 791 that all receivers can process (or Maximum Receive 792 Unit). 794 asymmetric reachability 795 - Neighbor Discovery detects the absence of 796 symmetric reachability; a node avoids paths to a 797 neighbor with which it does not have symmetric 798 connectivity. 800 The Neighbor Unreachability Detection will 801 typically identify such half-links and the node 802 will refrain from using them. 804 The protocol can presumably be extended in the 805 future to find viable paths in environments that 806 lack reflexive and transitive connectivity. 808 3.3. Securing Neighbor Discovery messages 810 Neighbor Discovery messages are needed for various functions. Several 811 functions are designed to allow hosts to ascertain the ownership of 812 an address or the mapping between link layer and IP layer addresses. 813 Having Neighbor Discovery functions on the ICMP layer allows for the 814 use of IP layer security mechanisms, which are available 815 independently of the availability of security on the link layer. 817 Vulnerabilities related to Neighbor Discovery are discussed in 818 section 11.1. A general solution for securing Neighbor Discovery is 819 outside the scope of this specification and is discussed in [SEND]. 820 However, Section 11.2 explains how and under which constraints IPsec 821 AH or ESP can be used to secure Neighbor Discovery. 823 4. MESSAGE FORMATS 825 4.1. Router Solicitation Message Format 827 Hosts send Router Solicitations in order to prompt routers to 828 generate Router Advertisements quickly. 830 0 1 2 3 831 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 832 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 833 | Type | Code | Checksum | 834 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 835 | Reserved | 836 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 837 | Options ... 838 +-+-+-+-+-+-+-+-+-+-+-+- 840 IP Fields: 842 Source Address 843 An IP address assigned to the sending interface, or 844 the unspecified address if no address is assigned 845 to the sending interface. 847 Destination Address 848 Typically the all-routers multicast address. 850 Hop Limit 255 852 ICMP Fields: 854 Type 133 855 Code 0 857 Checksum The ICMP checksum. See [ICMPv6]. 859 Reserved This field is unused. It MUST be initialized to 860 zero by the sender and MUST be ignored by the 861 receiver. 862 Valid Options: 864 Source link-layer address 865 The link-layer address of the sender, if known. 866 MUST NOT be included if the Source Address is the 867 unspecified address. Otherwise it SHOULD be 868 included on link layers that have addresses. 870 Future versions of this protocol may define new option types. 871 Receivers MUST silently ignore any options they do not recognize 872 and continue processing the message. 874 4.2. Router Advertisement Message Format 876 Routers send out Router Advertisement message periodically, or in 877 response to a Router Solicitation. 879 0 1 2 3 880 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 881 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 882 | Type | Code | Checksum | 883 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 884 | Cur Hop Limit |M|O| Reserved | Router Lifetime | 885 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 886 | Reachable Time | 887 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 888 | Retrans Timer | 889 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 890 | Options ... 891 +-+-+-+-+-+-+-+-+-+-+-+- 893 IP Fields: 895 Source Address 896 MUST be the link-local address assigned to the 897 interface from which this message is sent. 899 Destination Address 900 Typically the Source Address of an invoking Router 901 Solicitation or the all-nodes multicast address. 903 Hop Limit 255 905 ICMP Fields: 907 Type 134 909 Code 0 911 Checksum The ICMP checksum. See [ICMPv6]. 913 Cur Hop Limit 8-bit unsigned integer. The default value that 914 should be placed in the Hop Count field of the IP 915 header for outgoing IP packets. A value of zero 916 means unspecified (by this router). 918 M 1-bit "Managed address configuration" flag. When 919 set, it indicates that Dynamic Host Configuration 920 Protocol [DHCPv6] is available for address 921 configuration in addition to any addresses 922 autoconfigured using stateless address 923 autoconfiguration. 925 O 1-bit "Other configuration" flag. When 926 set, it indicates that [DHCPv6lite] is available 927 for autoconfiguration of other (non-address) 928 information. Examples of such information are DNS- 929 related information or information on other servers 930 within the network. 932 Reserved A 6-bit unused field. It MUST be initialized to 933 zero by the sender and MUST be ignored by the 934 receiver. 936 Router Lifetime 937 16-bit unsigned integer. The lifetime associated 938 with the default router in units of seconds. 939 The field can contain values up to 65535 and 940 receivers should handle any value, while the 941 sending rules in section 6 limit the lifetime to 942 9000 seconds. A Lifetime of 0 indicates that the 943 router is not a default router and SHOULD NOT 944 appear on the default router list. The Router 945 Lifetime applies only to the router's usefulness as 946 a default router; it does not apply to information 947 contained in other message fields or options. 948 Options that need time limits for their information 949 include their own lifetime fields. 951 Reachable Time 32-bit unsigned integer. The time, in 952 milliseconds, that a node assumes a neighbor is 953 reachable after having received a reachability 954 confirmation. Used by the Neighbor Unreachability 955 Detection algorithm (see Section 7.3). A value of 956 zero means unspecified (by this router). 958 Retrans Timer 32-bit unsigned integer. The time, in 959 milliseconds, between retransmitted Neighbor 960 Solicitation messages. Used by address resolution 961 and the Neighbor Unreachability Detection algorithm 962 (see Sections 7.2 and 7.3). A value of zero means 963 unspecified (by this router). 965 Possible options: 967 Source link-layer address 968 The link-layer address of the interface from which 969 the Router Advertisement is sent. Only used on 970 link layers that have addresses. A router MAY omit 971 this option in order to enable inbound load sharing 972 across multiple link-layer addresses. 974 MTU SHOULD be sent on links that have a variable MTU 975 (as specified in the document that describes how to 976 run IP over the particular link type). MAY be sent 977 on other links. 979 Prefix Information 980 These options specify the prefixes that are on-link 981 and/or are used for address autoconfiguration. A 982 router SHOULD include all its on-link prefixes 983 (except the link-local prefix) so that multihomed 984 hosts have complete prefix information about on- 985 link destinations for the links to which they 986 attach. If complete information is lacking, a 987 multihomed host may not be able to choose the 988 correct outgoing interface when sending traffic to 989 its neighbors. 991 Future versions of this protocol may define new option types. 992 Receivers MUST silently ignore any options they do not recognize 993 and continue processing the message. 995 4.3. Neighbor Solicitation Message Format 997 Nodes send Neighbor Solicitations to request the link-layer address 998 of a target node while also providing their own link-layer address to 999 the target. Neighbor Solicitations are multicast when the node needs 1000 to resolve an address and unicast when the node seeks to verify the 1001 reachability of a neighbor. 1003 0 1 2 3 1004 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1005 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1006 | Type | Code | Checksum | 1007 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1008 | Reserved | 1009 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1010 | | 1011 + + 1012 | | 1013 + Target Address + 1014 | | 1015 + + 1016 | | 1017 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1018 | Options ... 1019 +-+-+-+-+-+-+-+-+-+-+-+- 1021 IP Fields: 1023 Source Address 1024 Either an address assigned to the interface from 1025 which this message is sent or (if Duplicate Address 1026 Detection is in progress [ADDRCONF]) the 1027 unspecified address. 1028 Destination Address 1029 Either the solicited-node multicast address 1030 corresponding to the target address, or the target 1031 address. 1032 Hop Limit 255 1034 ICMP Fields: 1036 Type 135 1038 Code 0 1040 Checksum The ICMP checksum. See [ICMPv6]. 1042 Reserved This field is unused. It MUST be initialized to 1043 zero by the sender and MUST be ignored by the 1044 receiver. 1046 Target Address 1047 The IP address of the target of the solicitation. 1048 It MUST NOT be a multicast address. 1050 Possible options: 1052 Source link-layer address 1053 The link-layer address for the sender. MUST NOT be 1054 included when the source IP address is the 1055 unspecified address. Otherwise, on link layers 1056 that have addresses this option MUST be included in 1057 multicast solicitations and SHOULD be included in 1058 unicast solicitations. 1060 Future versions of this protocol may define new option types. 1061 Receivers MUST silently ignore any options they do not recognize 1062 and continue processing the message. 1064 4.4. Neighbor Advertisement Message Format 1066 A node sends Neighbor Advertisements in response to Neighbor 1067 Solicitations and sends unsolicited Neighbor Advertisements in order 1068 to (unreliably) propagate new information quickly. 1070 0 1 2 3 1071 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1072 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1073 | Type | Code | Checksum | 1074 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1075 |R|S|O| Reserved | 1076 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1077 | | 1078 + + 1079 | | 1080 + Target Address + 1081 | | 1082 + + 1083 | | 1084 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1085 | Options ... 1086 +-+-+-+-+-+-+-+-+-+-+-+- 1088 IP Fields: 1090 Source Address 1091 An address assigned to the interface from which the 1092 advertisement is sent. 1093 Destination Address 1094 For solicited advertisements, the Source Address of 1095 an invoking Neighbor Solicitation or, if the 1096 solicitation's Source Address is the unspecified 1097 address, the all-nodes multicast address. 1099 For unsolicited advertisements typically the all- 1100 nodes multicast address. 1102 Hop Limit 255 1104 ICMP Fields: 1106 Type 136 1108 Code 0 1110 Checksum The ICMP checksum. See [ICMPv6]. 1112 R Router flag. When set, the R-bit indicates that 1113 the sender is a router. The R-bit is used by 1114 Neighbor Unreachability Detection to detect a 1115 router that changes to a host. 1117 S Solicited flag. When set, the S-bit indicates that 1118 the advertisement was sent in response to a 1119 Neighbor Solicitation from the Destination address. 1120 The S-bit is used as a reachability confirmation 1121 for Neighbor Unreachability Detection. It MUST NOT 1122 be set in multicast advertisements or in 1123 unsolicited unicast advertisements. 1125 O Override flag. When set, the O-bit indicates that 1126 the advertisement should override an existing cache 1127 entry and update the cached link-layer address. 1128 When it is not set the advertisement will not 1129 update a cached link-layer address though it will 1130 update an existing Neighbor Cache entry for which 1131 no link-layer address is known. It SHOULD NOT be 1132 set in solicited advertisements for anycast 1133 addresses and in solicited proxy advertisements. 1134 It SHOULD be set in other solicited advertisements 1135 and in unsolicited advertisements. 1137 Reserved 29-bit unused field. It MUST be initialized to 1138 zero by the sender and MUST be ignored by the 1139 receiver. 1141 Target Address 1142 For solicited advertisements, the Target Address 1143 field in the Neighbor Solicitation message that 1144 prompted this advertisement. For an unsolicited 1145 advertisement, the address whose link-layer address 1146 has changed. The Target Address MUST NOT be a 1147 multicast address. 1149 Possible options: 1151 Target link-layer address 1152 The link-layer address for the target, i.e., the 1153 sender of the advertisement. This option MUST be 1154 included on link layers that have addresses when 1155 responding to multicast solicitations. When 1156 responding to a unicast Neighbor Solicitation this 1157 option SHOULD be included. 1159 The option MUST be included for multicast 1160 solicitations in order to avoid infinite Neighbor 1161 Solicitation "recursion" when the peer node does 1162 not have a cache entry to return a Neighbor 1163 Advertisements message. When responding to unicast 1164 solicitations, the option can be omitted since the 1165 sender of the solicitation has the correct link- 1166 layer address; otherwise it would not be able 1167 to send the unicast solicitation in the first 1168 place. However, including the link-layer address in 1169 this case adds little overhead and eliminates a 1170 potential race condition where the sender deletes 1171 the cached link-layer address prior to receiving a 1172 response to a previous solicitation. 1174 Future versions of this protocol may define new option types. 1175 Receivers MUST silently ignore any options they do not recognize 1176 and continue processing the message. 1178 4.5. Redirect Message Format 1180 Routers send Redirect packets to inform a host of a better first-hop 1181 node on the path to a destination. Hosts can be redirected to a 1182 better first-hop router but can also be informed by a redirect that 1183 the destination is in fact a neighbor. The latter is accomplished by 1184 setting the ICMP Target Address equal to the ICMP Destination 1185 Address. 1187 0 1 2 3 1188 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1189 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1190 | Type | Code | Checksum | 1191 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1192 | Reserved | 1193 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1194 | | 1195 + + 1196 | | 1197 + Target Address + 1198 | | 1199 + + 1200 | | 1201 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1202 | | 1203 + + 1204 | | 1205 + Destination Address + 1206 | | 1207 + + 1208 | | 1209 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1210 | Options ... 1211 +-+-+-+-+-+-+-+-+-+-+-+- 1213 IP Fields: 1215 Source Address 1216 MUST be the link-local address assigned to the 1217 interface from which this message is sent. 1219 Destination Address 1220 The Source Address of the packet that triggered the 1221 redirect. 1223 Hop Limit 255 1225 ICMP Fields: 1227 Type 137 1229 Code 0 1231 Checksum The ICMP checksum. See [ICMPv6]. 1233 Reserved This field is unused. It MUST be initialized to 1234 zero by the sender and MUST be ignored by the 1235 receiver. 1237 Target Address An IP address that is a better first hop to use for 1238 the ICMP Destination Address. When the target is 1239 the actual endpoint of communication, i.e., the 1240 destination is a neighbor, the Target Address field 1241 MUST contain the same value as the ICMP Destination 1242 Address field. Otherwise the target is a better 1243 first-hop router and the Target Address MUST be the 1244 router's link-local address so that hosts can 1245 uniquely identify routers. 1247 Destination Address 1248 The IP address of the destination which is 1249 redirected to the target. 1251 Possible options: 1253 Target link-layer address 1254 The link-layer address for the target. It SHOULD 1255 be included (if known). Note that on NBMA links, 1256 hosts may rely on the presence of the Target Link- 1257 Layer Address option in Redirect messages as the 1258 means for determining the link-layer addresses of 1259 neighbors. In such cases, the option MUST be 1260 included in Redirect messages. 1262 Redirected Header 1263 As much as possible of the IP packet that triggered 1264 the sending of the Redirect without making the 1265 redirect packet exceed the minimum MTU specified in 1266 [IPv6]. 1268 4.6. Option Formats 1270 Neighbor Discovery messages include zero or more options, some of 1271 which may appear multiple times in the same message. Options should 1272 be padded when necessary to ensure that they end on their natural 64- 1273 bit boundaries. All options are of the form: 1275 0 1 2 3 1276 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1277 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1278 | Type | Length | ... | 1279 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1280 ~ ... ~ 1281 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1283 Fields: 1285 Type 8-bit identifier of the type of option. The 1286 options defined in this document are: 1288 Option Name Type 1290 Source Link-Layer Address 1 1291 Target Link-Layer Address 2 1292 Prefix Information 3 1293 Redirected Header 4 1294 MTU 5 1296 Length 8-bit unsigned integer. The length of the option 1297 (including the type and length fields) in units of 1298 8 octets. The value 0 is invalid. Nodes MUST 1299 silently discard an ND packet that contains an 1300 option with length zero. 1302 4.6.1. Source/Target Link-layer Address 1303 0 1 2 3 1304 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1305 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1306 | Type | Length | Link-Layer Address ... 1307 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1309 Fields: 1311 Type 1312 1 for Source Link-layer Address 1313 2 for Target Link-layer Address 1315 Length The length of the option (including the type and 1316 length fields) in units of 8 octets. For example, 1317 the length for IEEE 802 addresses is 1 [IPv6- 1318 ETHER]. 1320 Link-Layer Address 1321 The variable length link-layer address. 1323 The content and format of this field (including 1324 byte and bit ordering) is expected to be specified 1325 in specific documents that describe how IPv6 1326 operates over different link layers. For instance, 1327 [IPv6-ETHER]. 1329 Description 1330 The Source Link-Layer Address option contains the 1331 link-layer address of the sender of the packet. It 1332 is used in the Neighbor Solicitation, Router 1333 Solicitation, and Router Advertisement packets. 1335 The Target Link-Layer Address option contains the 1336 link-layer address of the target. It is used in 1337 Neighbor Advertisement and Redirect packets. 1339 These options MUST be silently ignored for other 1340 Neighbor Discovery messages. 1342 4.6.2. Prefix Information 1344 0 1 2 3 1345 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1346 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1347 | Type | Length | Prefix Length |L|A| Reserved1 | 1348 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1349 | Valid Lifetime | 1350 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1351 | Preferred Lifetime | 1352 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1353 | Reserved2 | 1354 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1355 | | 1356 + + 1357 | | 1358 + Prefix + 1359 | | 1360 + + 1361 | | 1362 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1364 Fields: 1366 Type 3 1368 Length 4 1370 Prefix Length 8-bit unsigned integer. The number of leading bits 1371 in the Prefix that are valid. The value ranges 1372 from 0 to 128. The prefix length field provides 1373 necessary information for on-link determination 1374 (when combined with the L flag in the prefix 1375 information option). It also assists with address 1376 autoconfiguration as specified in [ADDRCONF], for 1377 which there may be more restrictions on the prefix 1378 length. 1380 L 1-bit on-link flag. When set, indicates that this 1381 prefix can be used for on-link determination. When 1382 not set the advertisement makes no statement about 1383 on-link or off-link properties of the prefix. For 1384 instance, the prefix might be used for address 1385 configuration with some of the addresses belonging 1386 to the prefix being on-link and others being off- 1387 link. 1389 A 1-bit autonomous address-configuration flag. When 1390 set indicates that this prefix can be used for 1391 stateless address configuration as specified in 1392 [ADDRCONF]. 1394 Reserved1 6-bit unused field. It MUST be initialized to zero 1395 by the sender and MUST be ignored by the receiver. 1397 Valid Lifetime 1398 32-bit unsigned integer. The length of time in 1399 seconds (relative to the time the packet is sent) 1400 that the prefix is valid for the purpose of on-link 1401 determination. A value of all one bits 1402 (0xffffffff) represents infinity. The Valid 1403 Lifetime is also used by [ADDRCONF]. 1405 Preferred Lifetime 1406 32-bit unsigned integer. The length of time in 1407 seconds (relative to the time the packet is sent) 1408 that addresses generated from the prefix via 1409 stateless address autoconfiguration remain 1410 preferred [ADDRCONF]. A value of all one bits 1411 (0xffffffff) represents infinity. See [ADDRCONF]. 1412 Note that the value of this field MUST NOT exceed 1413 the Valid Lifetime field to avoid preferring 1414 addresses that are no longer valid. 1416 Reserved2 This field is unused. It MUST be initialized to 1417 zero by the sender and MUST be ignored by the 1418 receiver. 1420 Prefix An IP address or a prefix of an IP address. The 1421 Prefix Length field contains the number of valid 1422 leading bits in the prefix. The bits in the prefix 1423 after the prefix length are reserved and MUST be 1424 initialized to zero by the sender and ignored by 1425 the receiver. A router SHOULD NOT send a prefix 1426 option for the link-local prefix and a host SHOULD 1427 ignore such a prefix option. 1429 Description 1430 The Prefix Information option provide hosts with 1431 on-link prefixes and prefixes for Address 1432 Autoconfiguration. 1434 The Prefix Information option appears in Router 1435 Advertisement packets and MUST be silently ignored 1436 for other messages. 1438 4.6.3. Redirected Header 1440 0 1 2 3 1441 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1442 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1443 | Type | Length | Reserved | 1444 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1445 | Reserved | 1446 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1447 | | 1448 ~ IP header + data ~ 1449 | | 1450 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1452 Fields: 1454 Type 4 1455 Length The length of the option in units of 8 octets. 1457 Reserved These fields are unused. They MUST be initialized 1458 to zero by the sender and MUST be ignored by the 1459 receiver. 1461 IP header + data 1462 The original packet truncated to ensure that the 1463 size of the redirect message does not exceed the 1464 minimum MTU required to support IPv6 as specified 1465 in [IPv6]. 1467 Description 1468 The Redirected Header option is used in Redirect 1469 messages and contains all or part of the packet 1470 that is being redirected. 1472 This option MUST be silently ignored for other 1473 Neighbor Discovery messages. 1475 4.6.4. MTU 1477 0 1 2 3 1478 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1479 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1480 | Type | Length | Reserved | 1481 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1482 | MTU | 1483 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1485 Fields: 1487 Type 5 1489 Length 1 1491 Reserved This field is unused. It MUST be initialized to 1492 zero by the sender and MUST be ignored by the 1493 receiver. 1495 MTU 32-bit unsigned integer. The recommended MTU for 1496 the link. 1498 Description 1499 The MTU option is used in Router Advertisement 1500 messages to insure that all nodes on a link use the 1501 same MTU value in those cases where the link MTU is 1502 not well known. 1504 This option MUST be silently ignored for other 1505 Neighbor Discovery messages. 1507 In configurations in which heterogeneous 1508 technologies are bridged together, the maximum 1509 supported MTU may differ from one segment to 1510 another. If the bridges do not generate ICMP 1511 Packet Too Big messages, communicating nodes will 1512 be unable to use Path MTU to dynamically determine 1513 the appropriate MTU on a per-neighbor basis. In 1514 such cases, routers can be configured to use the 1515 MTU option to specify the maximum MTU value that is 1516 supported by all segments. 1518 5. CONCEPTUAL MODEL OF A HOST 1520 This section describes a conceptual model of one possible data 1521 structure organization that hosts (and to some extent routers) will 1522 maintain in interacting with neighboring nodes. The described 1523 organization is provided to facilitate the explanation of how the 1524 Neighbor Discovery protocol should behave. This document does not 1525 mandate that implementations adhere to this model as long as their 1526 external behavior is consistent with that described in this document. 1528 This model is only concerned with the aspects of host behavior 1529 directly related to Neighbor Discovery. In particular, it does not 1530 concern itself with such issues as source address selection or the 1531 selecting of an outgoing interface on a multihomed host. 1533 5.1. Conceptual Data Structures 1535 Hosts will need to maintain the following pieces of information for 1536 each interface: 1538 Neighbor Cache 1539 - A set of entries about individual neighbors to 1540 which traffic has been sent recently. Entries are 1541 keyed on the neighbor's on-link unicast IP address 1542 and contain such information as its link-layer 1543 address, a flag indicating whether the neighbor is 1544 a router or a host (called IsRouter in this 1545 document), a pointer to any queued packets waiting 1546 for address resolution to complete, etc. 1547 A Neighbor Cache entry also contains information 1548 used by the Neighbor Unreachability Detection 1549 algorithm, including the reachability state, the 1550 number of unanswered probes, and the time the next 1551 Neighbor Unreachability Detection event is 1552 scheduled to take place. 1554 Destination Cache 1555 - A set of entries about destinations to which 1556 traffic has been sent recently. The Destination 1557 Cache includes both on-link and off-link 1558 destinations and provides a level of indirection 1559 into the Neighbor Cache; the Destination Cache maps 1560 a destination IP address to the IP address of the 1561 next-hop neighbor. This cache is updated with 1562 information learned from Redirect messages. 1563 Implementations may find it convenient to store 1564 additional information not directly related to 1565 Neighbor Discovery in Destination Cache entries, 1566 such as the Path MTU (PMTU) and round trip timers 1567 maintained by transport protocols. 1569 Prefix List - A list of the prefixes that define a set of 1570 addresses that are on-link. Prefix List entries 1571 are created from information received in Router 1572 Advertisements. Each entry has an associated 1573 invalidation timer value (extracted from the 1574 advertisement) used to expire prefixes when they 1575 become invalid. A special "infinity" timer value 1576 specifies that a prefix remains valid forever, 1577 unless a new (finite) value is received in a 1578 subsequent advertisement. 1580 The link-local prefix is considered to be on the 1581 prefix list with an infinite invalidation timer 1582 regardless of whether routers are advertising a 1583 prefix for it. Received Router Advertisements 1584 SHOULD NOT modify the invalidation timer for the 1585 link-local prefix. 1587 Default Router List 1588 - A list of routers to which packets may be sent. 1589 Router list entries point to entries in the 1590 Neighbor Cache; the algorithm for selecting a 1591 default router favors routers known to be reachable 1592 over those whose reachability is suspect. Each 1593 entry also has an associated invalidation timer 1594 value (extracted from Router Advertisements) used 1595 to delete entries that are no longer advertised. 1597 Note that the above conceptual data structures can be implemented 1598 using a variety of techniques. One possible implementation is to use 1599 a single longest-match routing table for all of the above data 1600 structures. Regardless of the specific implementation, it is 1601 critical that the Neighbor Cache entry for a router is shared by all 1602 Destination Cache entries using that router in order to prevent 1603 redundant Neighbor Unreachability Detection probes. 1605 Note also that other protocols (e.g., Mobile IPv6) might add 1606 additional conceptual data structures. An implementation is at 1607 liberty to implement such data structures in any way it pleases. For 1608 example, an implementation could merge all conceptual data structures 1609 into a single routing table. 1611 The Neighbor Cache contains information maintained by the Neighbor 1612 Unreachability Detection algorithm. A key piece of information is a 1613 neighbor's reachability state, which is one of five possible values. 1614 The following definitions are informal; precise definitions can be 1615 found in Section 7.3.2. 1617 INCOMPLETE Address resolution is in progress and the link-layer 1618 address of the neighbor has not yet been determined. 1620 REACHABLE Roughly speaking, the neighbor is known to have been 1621 reachable recently (within tens of seconds ago). 1623 STALE The neighbor is no longer known to be reachable but 1624 until traffic is sent to the neighbor, no attempt 1625 should be made to verify its reachability. 1627 DELAY The neighbor is no longer known to be reachable, and 1628 traffic has recently been sent to the neighbor. 1629 Rather than probe the neighbor immediately, however, 1630 delay sending probes for a short while in order to 1631 give upper layer protocols a chance to provide 1632 reachability confirmation. 1634 PROBE The neighbor is no longer known to be reachable, and 1635 unicast Neighbor Solicitation probes are being sent to 1636 verify reachability. 1638 5.2. Conceptual Sending Algorithm 1640 When sending a packet to a destination, a node uses a combination of 1641 the Destination Cache, the Prefix List, and the Default Router List 1642 to determine the IP address of the appropriate next hop, an operation 1643 known as "next-hop determination". Once the IP address of the next 1644 hop is known, the Neighbor Cache is consulted for link-layer 1645 information about that neighbor. 1647 Next-hop determination for a given unicast destination operates as 1648 follows. The sender performs a longest prefix match against the 1649 Prefix List to determine whether the packet's destination is on- or 1650 off-link. If the destination is on-link, the next-hop address is the 1651 same as the packet's destination address. Otherwise, the sender 1652 selects a router from the Default Router List (following the rules 1653 described in Section 6.3.6). 1655 For efficiency reasons, next-hop determination is not performed on 1656 every packet that is sent. Instead, the results of next-hop 1657 determination computations are saved in the Destination Cache (which 1658 also contains updates learned from Redirect messages). When the 1659 sending node has a packet to send, it first examines the Destination 1660 Cache. If no entry exists for the destination, next-hop 1661 determination is invoked to create a Destination Cache entry. 1663 Once the IP address of the next-hop node is known, the sender 1664 examines the Neighbor Cache for link-layer information about that 1665 neighbor. If no entry exists, the sender creates one, sets its state 1666 to INCOMPLETE, initiates Address Resolution, and then queues the data 1667 packet pending completion of address resolution. For multicast- 1668 capable interfaces Address Resolution consists of sending a Neighbor 1669 Solicitation message and waiting for a Neighbor Advertisement. When 1670 a Neighbor Advertisement response is received, the link-layer 1671 addresses is entered in the Neighbor Cache entry and the queued 1672 packet is transmitted. The address resolution mechanism is described 1673 in detail in Section 7.2. 1675 For multicast packets the next-hop is always the (multicast) 1676 destination address and is considered to be on-link. The procedure 1677 for determining the link-layer address corresponding to a given IP 1678 multicast address can be found in a separate document that covers 1679 operating IP over a particular link type (e.g., [IPv6-ETHER]). 1681 Each time a Neighbor Cache entry is accessed while transmitting a 1682 unicast packet, the sender checks Neighbor Unreachability Detection 1683 related information according to the Neighbor Unreachability 1684 Detection algorithm (Section 7.3). This unreachability check might 1685 result in the sender transmitting a unicast Neighbor Solicitation to 1686 verify that the neighbor is still reachable. 1688 Next-hop determination is done the first time traffic is sent to a 1689 destination. As long as subsequent communication to that destination 1690 proceeds successfully, the Destination Cache entry continues to be 1691 used. If at some point communication ceases to proceed, as 1692 determined by the Neighbor Unreachability Detection algorithm, next- 1693 hop determination may need to be performed again. For example, 1694 traffic through a failed router should be switched to a working 1695 router. Likewise, it may be possible to reroute traffic destined for 1696 a mobile node to a "mobility agent". 1698 Note that when a node redoes next-hop determination there is no need 1699 to discard the complete Destination Cache entry. In fact, it is 1700 generally beneficial to retain such cached information as the PMTU 1701 and round trip timer values that may also be kept in the Destination 1702 Cache entry. 1704 Routers and multihomed hosts have multiple interfaces. The remainder 1705 of this document assumes that all sent and received Neighbor 1706 Discovery messages refer to the interface of appropriate context. 1707 For example, when responding to a Router Solicitation, the 1708 corresponding Router Advertisement is sent out the interface on which 1709 the solicitation was received. 1711 5.3. Garbage Collection and Timeout Requirements 1713 The conceptual data structures described above use different 1714 mechanisms for discarding potentially stale or unused information. 1716 From the perspective of correctness there is no need to periodically 1717 purge Destination and Neighbor Cache entries. Although stale 1718 information can potentially remain in the cache indefinitely, the 1719 Neighbor Unreachability Detection algorithm ensures that stale 1720 information is purged quickly if it is actually being used. 1722 To limit the storage needed for the Destination and Neighbor Caches, 1723 a node may need to garbage-collect old entries. However, care must 1724 be taken to insure that sufficient space is always present to hold 1725 the working set of active entries. A small cache may result in an 1726 excessive number of Neighbor Discovery messages if entries are 1727 discarded and rebuilt in quick succession. Any LRU-based policy that 1728 only reclaims entries that have not been used in some time (e.g., ten 1729 minutes or more) should be adequate for garbage-collecting unused 1730 entries. 1732 A node should retain entries in the Default Router List and the 1733 Prefix List until their lifetimes expire. However, a node may 1734 garbage collect entries prematurely if it is low on memory. If not 1735 all routers are kept on the Default Router list, a node should retain 1736 at least two entries in the Default Router List (and preferably more) 1737 in order to maintain robust connectivity for off-link destinations. 1739 When removing an entry from the Prefix List there is no need to purge 1740 any entries from the Destination or Neighbor Caches. Neighbor 1741 Unreachability Detection will efficiently purge any entries in these 1742 caches that have become invalid. When removing an entry from the 1743 Default Router List, however, any entries in the Destination Cache 1744 that go through that router must perform next-hop determination again 1745 to select a new default router. 1747 6. ROUTER AND PREFIX DISCOVERY 1749 This section describes router and host behavior related to the Router 1750 Discovery portion of Neighbor Discovery. Router Discovery is used to 1751 locate neighboring routers as well as learn prefixes and 1752 configuration parameters related to address autoconfiguration. 1754 Prefix Discovery is the process through which hosts learn the ranges 1755 of IP addresses that reside on-link and can be reached directly 1756 without going through a router. Routers send Router Advertisements 1757 that indicate whether the sender is willing to be a default router. 1758 Router Advertisements also contain Prefix Information options that 1759 list the set of prefixes that identify on-link IP addresses. 1761 Stateless Address Autoconfiguration must also obtain subnet prefixes 1762 as part of configuring addresses. Although the prefixes used for 1763 address autoconfiguration are logically distinct from those used for 1764 on-link determination, autoconfiguration information is piggybacked 1765 on Router Discovery messages to reduce network traffic. Indeed, the 1766 same prefixes can be advertised for on-link determination and address 1767 autoconfiguration by specifying the appropriate flags in the Prefix 1768 Information options. See [ADDRCONF] for details on how 1769 autoconfiguration information is processed. 1771 6.1. Message Validation 1773 6.1.1. Validation of Router Solicitation Messages 1775 Hosts MUST silently discard any received Router Solicitation 1776 Messages. 1778 A router MUST silently discard any received Router Solicitation 1779 messages that do not satisfy all of the following validity checks: 1781 - The IP Hop Limit field has a value of 255, i.e., the packet 1782 could not possibly have been forwarded by a router. 1784 - ICMP Checksum is valid. 1786 - ICMP Code is 0. 1788 - ICMP length (derived from the IP length) is 8 or more octets. 1790 - All included options have a length that is greater than zero. 1792 - If the IP source address is the unspecified address, there is no 1793 source link-layer address option in the message. 1795 The contents of the Reserved field, and of any unrecognized options, 1796 MUST be ignored. Future, backward-compatible changes to the protocol 1797 may specify the contents of the Reserved field or add new options; 1798 backward-incompatible changes may use different Code values. 1800 The contents of any defined options that are not specified to be used 1801 with Router Solicitation messages MUST be ignored and the packet 1802 processed as normal. The only defined option that may appear is the 1803 Source Link-Layer Address option. 1805 A solicitation that passes the validity checks is called a "valid 1806 solicitation". 1808 6.1.2. Validation of Router Advertisement Messages 1809 A node MUST silently discard any received Router Advertisement 1810 messages that do not satisfy all of the following validity checks: 1812 - IP Source Address is a link-local address. Routers must use 1813 their link-local address as the source for Router Advertisement 1814 and Redirect messages so that hosts can uniquely identify 1815 routers. 1817 - The IP Hop Limit field has a value of 255, i.e., the packet 1818 could not possibly have been forwarded by a router. 1820 - ICMP Checksum is valid. 1822 - ICMP Code is 0. 1824 - ICMP length (derived from the IP length) is 16 or more octets. 1826 - All included options have a length that is greater than zero. 1828 The contents of the Reserved field, and of any unrecognized options, 1829 MUST be ignored. Future, backward-compatible changes to the protocol 1830 may specify the contents of the Reserved field or add new options; 1831 backward-incompatible changes may use different Code values. 1833 The contents of any defined options that are not specified to be used 1834 with Router Advertisement messages MUST be ignored and the packet 1835 processed as normal. The only defined options that may appear are 1836 the Source Link-Layer Address, Prefix Information and MTU options. 1838 An advertisement that passes the validity checks is called a "valid 1839 advertisement". 1841 6.2. Router Specification 1843 6.2.1. Router Configuration Variables 1845 A router MUST allow for the following conceptual variables to be 1846 configured by system management. The specific variable names are 1847 used for demonstration purposes only, and an implementation is not 1848 required to have them, so long as its external behavior is consistent 1849 with that described in this document. Default values are specified 1850 to simplify configuration in common cases. 1852 The default values for some of the variables listed below may be 1853 overridden by specific documents that describe how IPv6 operates over 1854 different link layers. This rule simplifies the configuration of 1855 Neighbor Discovery over link types with widely differing performance 1856 characteristics. 1858 For each interface: 1860 IsRouter A flag indicating whether routing is enabled on 1861 this interface. Enabling routing on the interface 1862 would imply that a router can forward packets 1863 to or from the interface. 1865 Default: FALSE 1867 AdvSendAdvertisements 1868 A flag indicating whether or not the router sends 1869 periodic Router Advertisements and responds to 1870 Router Solicitations. 1872 Default: FALSE 1874 Note that AdvSendAdvertisements MUST be FALSE by 1875 default so that a node will not accidentally start 1876 acting as a router unless it is explicitly 1877 configured by system management to send Router 1878 Advertisements. 1880 MaxRtrAdvInterval 1881 The maximum time allowed between sending 1882 unsolicited multicast Router Advertisements from 1883 the interface, in seconds. MUST be no less than 4 1884 seconds and no greater than 1800 seconds. 1886 Default: 600 seconds 1888 MinRtrAdvInterval 1889 The minimum time allowed between sending 1890 unsolicited multicast Router Advertisements from 1891 the interface, in seconds. MUST be no less than 3 1892 seconds and no greater than .75 *MaxRtrAdvInterval. 1894 Default: 0.33 * MaxRtrAdvInterval 1896 AdvManagedFlag 1897 The TRUE/FALSE value to be placed in the "Managed 1898 address configuration" flag field in the Router 1899 Advertisement. See [ADDRCONF]. 1901 Default: FALSE 1903 AdvOtherConfigFlag 1904 The TRUE/FALSE value to be placed in the "Other 1905 configuration" flag field in the Router 1906 Advertisement. See [ADDRCONF]. 1908 Default: FALSE 1910 AdvLinkMTU The value to be placed in MTU options sent by the 1911 router. A value of zero indicates that no MTU 1912 options are sent. 1914 Default: 0 1916 AdvReachableTime 1917 The value to be placed in the Reachable Time field 1918 in the Router Advertisement messages sent by the 1919 router. The value zero means unspecified (by this 1920 router). MUST be no greater than 3,600,000 1921 milliseconds (1 hour). 1923 Default: 0 1925 AdvRetransTimer The value to be placed in the Retrans Timer field 1926 in the Router Advertisement messages sent by the 1927 router. The value zero means unspecified (by this 1928 router). 1930 Default: 0 1932 AdvCurHopLimit 1933 The default value to be placed in the Cur Hop Limit 1934 field in the Router Advertisement messages sent by 1935 the router. The value should be set to that 1936 current diameter of the Internet. The value zero 1937 means unspecified (by this router). 1939 Default: The value specified in the "Assigned 1940 Numbers" RFC [ASSIGNED] that was in effect at the 1941 time of implementation. 1943 AdvDefaultLifetime 1944 The value to be placed in the Router Lifetime field 1945 of Router Advertisements sent from the interface, 1946 in seconds. MUST be either zero or between 1947 MaxRtrAdvInterval and 9000 seconds. A value of 1948 zero indicates that the router is not to be used as 1949 a default router. 1951 Default: 3 * MaxRtrAdvInterval 1953 AdvPrefixList 1954 A list of prefixes to be placed in Prefix 1955 Information options in Router Advertisement 1956 messages sent from the interface. 1958 Default: all prefixes that the router advertises 1959 via routing protocols as being on-link for the 1960 interface from which the advertisement is sent. 1961 The link-local prefix SHOULD NOT be included in the 1962 list of advertised prefixes. 1964 Each prefix has an associated: 1966 AdvValidLifetime 1967 The value to be placed in the Valid 1968 Lifetime in the Prefix Information 1969 option, in seconds. The designated value 1970 of all 1's (0xffffffff) represents 1971 infinity. Implementations MAY allow 1972 AdvValidLifetime to be specified in two 1973 ways: 1975 - a time that decrements in real time, 1976 that is, one that will result in a 1977 Lifetime of zero at the specified 1978 time in the future, or 1980 - a fixed time that stays the same in 1981 consecutive advertisements. 1983 Default: 2592000 seconds (30 days), fixed 1984 (i.e., stays the same in consecutive 1985 advertisements). 1987 AdvOnLinkFlag 1988 The value to be placed in the on-link 1989 flag ("L-bit") field in the Prefix 1990 Information option. 1992 Default: TRUE 1994 Automatic address configuration [ADDRCONF] 1995 defines additional information associated with 1996 each the prefixes: 1998 AdvPreferredLifetime 1999 The value to be placed in the Preferred 2000 Lifetime in the Prefix Information 2001 option, in seconds. The designated value 2002 of all 1's (0xffffffff) represents 2003 infinity. See [ADDRCONF] for details on 2004 how this value is used. Implementations 2005 MAY allow AdvPreferredLifetime to be 2006 specified in two ways: 2008 - a time that decrements in real time, 2009 that is, one that will result in a 2010 Lifetime of zero at a specified time 2011 in the future, or 2013 - a fixed time that stays the same in 2014 consecutive advertisements. 2016 Default: 604800 seconds (7 days), fixed 2017 (i.e., stays the same in consecutive 2018 advertisements). This value MUST NOT be 2019 larger than AdvValidLifetime. 2021 AdvAutonomousFlag 2022 The value to be placed in the Autonomous 2023 Flag field in the Prefix Information 2024 option. See [ADDRCONF]. 2026 Default: TRUE 2028 The above variables contain information that is placed in outgoing 2029 Router Advertisement messages. Hosts use the received information to 2030 initialize a set of analogous variables that control their external 2031 behavior (see Section 6.3.2). Some of these host variables (e.g., 2032 CurHopLimit, RetransTimer, and ReachableTime) apply to all nodes 2033 including routers. In practice, these variables may not actually be 2034 present on routers, since their contents can be derived from the 2035 variables described above. However, external router behavior MUST be 2036 the same as host behavior with respect to these variables. In 2037 particular, this includes the occasional randomization of the 2038 ReachableTime value as described in Section 6.3.2. 2040 Protocol constants are defined in Section 10. 2042 6.2.2. Becoming An Advertising Interface 2044 The term "advertising interface" refers to any functioning and 2045 enabled interface that has at least one unicast IP address 2046 assigned to it and whose corresponding AdvSendAdvertisements flag is 2047 TRUE. A router MUST NOT send Router Advertisements out any interface 2048 that is not an advertising interface. 2050 An interface may become an advertising interface at times other than 2051 system startup. For example: 2053 - changing the AdvSendAdvertisements flag on an enabled interface 2054 from FALSE to TRUE, or 2056 - administratively enabling the interface, if it had been 2057 administratively disabled, and its AdvSendAdvertisements flag is 2058 TRUE, or 2060 - enabling IP forwarding capability (i.e., changing the system 2061 from being a host to being a router), when the interface's 2062 AdvSendAdvertisements flag is TRUE. 2064 A router MUST join the all-routers multicast address on an 2065 advertising interface. Routers respond to Router Solicitations sent 2066 to the all-routers address and verify the consistency of Router 2067 Advertisements sent by neighboring routers. 2069 6.2.3. Router Advertisement Message Content 2071 A router sends periodic as well as solicited Router Advertisements 2072 out its advertising interfaces. Outgoing Router Advertisements are 2073 filled with the following values consistent with the message format 2074 given in Section 4.2: 2076 - In the Router Lifetime field: the interface's configured 2077 AdvDefaultLifetime. 2079 - In the M and O flags: the interface's configured AdvManagedFlag 2080 and AdvOtherConfigFlag, respectively. 2082 - In the Cur Hop Limit field: the interface's configured 2083 CurHopLimit. 2085 - In the Reachable Time field: the interface's configured 2086 AdvReachableTime. 2088 - In the Retrans Timer field: the interface's configured 2089 AdvRetransTimer. 2091 - In the options: 2093 o Source Link-Layer Address option: link-layer address of the 2094 sending interface. This option MAY be omitted to 2095 facilitate in-bound load balancing over replicated 2096 interfaces. 2098 o MTU option: the interface's configured AdvLinkMTU value if 2099 the value is non-zero. If AdvLinkMTU is zero the MTU 2100 option is not sent. 2102 o Prefix Information options: one Prefix Information option 2103 for each prefix listed in AdvPrefixList with the option 2104 fields set from the information in the AdvPrefixList entry 2105 as follows: 2107 - In the "on-link" flag: the entry's AdvOnLinkFlag. 2109 - In the Valid Lifetime field: the entry's 2110 AdvValidLifetime. 2112 - In the "Autonomous address configuration" flag: the 2113 entry's AdvAutonomousFlag. 2115 - In the Preferred Lifetime field: the entry's 2116 AdvPreferredLifetime. 2118 A router might want to send Router Advertisements without advertising 2119 itself as a default router. For instance, a router might advertise 2120 prefixes for address autoconfiguration while not wishing to forward 2121 packets. Such a router sets the Router Lifetime field in outgoing 2122 advertisements to zero. 2124 A router MAY choose not to include some or all options when sending 2125 unsolicited Router Advertisements. For example, if prefix lifetimes 2126 are much longer than AdvDefaultLifetime, including them every few 2127 advertisements may be sufficient. However, when responding to a 2128 Router Solicitation or while sending the first few initial 2129 unsolicited advertisements, a router SHOULD include all options so 2130 that all information (e.g., prefixes) is propagated quickly during 2131 system initialization. 2133 If including all options causes the size of an advertisement to 2134 exceed the link MTU, multiple advertisements can be sent, each 2135 containing a subset of the options. 2137 6.2.4. Sending Unsolicited Router Advertisements 2139 A host MUST NOT send Router Advertisement messages at any time. 2141 Unsolicited Router Advertisements are not strictly periodic: the 2142 interval between subsequent transmissions is randomized to reduce the 2143 probability of synchronization with the advertisements from other 2144 routers on the same link [SYNC]. Each advertising interface has its 2145 own timer. Whenever a multicast advertisement is sent from an 2146 interface, the timer is reset to a uniformly-distributed random value 2147 between the interface's configured MinRtrAdvInterval and 2148 MaxRtrAdvInterval; expiration of the timer causes the next 2149 advertisement to be sent and a new random value to be chosen. 2151 For the first few advertisements (up to 2152 MAX_INITIAL_RTR_ADVERTISEMENTS) sent from an interface when it 2153 becomes an advertising interface, if the randomly chosen interval is 2154 greater than MAX_INITIAL_RTR_ADVERT_INTERVAL, the timer SHOULD be set 2155 to MAX_INITIAL_RTR_ADVERT_INTERVAL instead. Using a smaller interval 2156 for the initial advertisements increases the likelihood of a router 2157 being discovered quickly when it first becomes available, in the 2158 presence of possible packet loss. 2160 The information contained in Router Advertisements may change through 2161 actions of system management. For instance, the lifetime of 2162 advertised prefixes may change, new prefixes could be added, a router 2163 could cease to be a router (i.e., switch from being a router to being 2164 a host), etc. In such cases, the router MAY transmit up to 2165 MAX_INITIAL_RTR_ADVERTISEMENTS unsolicited advertisements, using the 2166 same rules as when an interface becomes an advertising interface. 2168 6.2.5. Ceasing To Be An Advertising Interface 2170 An interface may cease to be an advertising interface, through 2171 actions of system management such as: 2173 - changing the AdvSendAdvertisements flag of an enabled interface 2174 from TRUE to FALSE, or 2176 - administratively disabling the interface, or 2178 - shutting down the system. 2180 In such cases the router SHOULD transmit one or more (but not more 2181 than MAX_FINAL_RTR_ADVERTISEMENTS) final multicast Router 2182 Advertisements on the interface with a Router Lifetime field of zero. 2183 In the case of a router becoming a host, the system SHOULD also 2184 depart from the all-routers IP multicast group on all interfaces on 2185 which the router supports IP multicast (whether or not they had been 2186 advertising interfaces). In addition, the host MUST insure that 2187 subsequent Neighbor Advertisement messages sent from the interface 2188 have the Router flag set to zero. 2190 Note that system management may disable a router's IP forwarding 2191 capability (i.e., changing the system from being a router to being a 2192 host), a step that does not necessarily imply that the router's 2193 interfaces stop being advertising interfaces. In such cases, 2194 subsequent Router Advertisements MUST set the Router Lifetime field 2195 to zero. 2197 6.2.6. Processing Router Solicitations 2199 A host MUST silently discard any received Router Solicitation 2200 messages. 2202 In addition to sending periodic, unsolicited advertisements, a router 2203 sends advertisements in response to valid solicitations received on 2204 an advertising interface. A router MAY choose to unicast the 2205 response directly to the soliciting host's address (if the 2206 solicitation's source address is not the unspecified address), but 2207 the usual case is to multicast the response to the all-nodes group. 2208 In the latter case, the interface's interval timer is reset to a new 2209 random value, as if an unsolicited advertisement had just been sent 2210 (see Section 6.2.4). 2212 In all cases, Router Advertisements sent in response to a Router 2213 Solicitation MUST be delayed by a random time between 0 and 2214 MAX_RA_DELAY_TIME seconds. (If a single advertisement is sent in 2215 response to multiple solicitations, the delay is relative to the 2216 first solicitation.) In addition, consecutive Router Advertisements 2217 sent to the all-nodes multicast address MUST be rate limited to no 2218 more than one advertisement every MIN_DELAY_BETWEEN_RAS seconds. 2220 A router might process Router Solicitations as follows: 2222 - Upon receipt of a Router Solicitation, compute a random delay 2223 within the range 0 through MAX_RA_DELAY_TIME. If the computed 2224 value corresponds to a time later than the time the next multicast 2225 Router Advertisement is scheduled to be sent, ignore the random 2226 delay and send the advertisement at the already-scheduled time. 2228 - If the router sent a multicast Router Advertisement (solicited or 2229 unsolicited) within the last MIN_DELAY_BETWEEN_RAS seconds, 2230 schedule the advertisement to be sent at a time corresponding to 2231 MIN_DELAY_BETWEEN_RAS plus the random value after the previous 2232 advertisement was sent. This ensures that the multicast Router 2233 Advertisements are rate limited. 2235 - Otherwise, schedule the sending of a Router Advertisement at the 2236 time given by the random value. 2238 Note that a router is permitted to send multicast Router 2239 Advertisements more frequently than indicated by the 2240 MinRtrAdvInterval configuration variable so long as the more frequent 2241 advertisements are responses to Router Solicitations. In all cases, 2242 however, unsolicited multicast advertisements MUST NOT be sent more 2243 frequently than indicated by MinRtrAdvInterval. 2245 Router Solicitations in which the Source Address is the unspecified 2246 address MUST NOT update the router's Neighbor Cache; solicitations 2247 with a proper source address update the Neighbor Cache as follows. If 2248 the router already has a Neighbor Cache entry for the solicitation's 2249 sender, the solicitation contains a Source Link-Layer Address option, 2250 and the received link-layer address differs from that already in the 2251 cache, the link-layer address SHOULD be updated in the appropriate 2252 Neighbor Cache entry, and its reachability state MUST also be set to 2253 STALE. If there is no existing Neighbor Cache entry for the 2254 solicitation's sender, the router creates one, installs the link- 2255 layer address and sets its reachability state to STALE as specified 2256 in Section 7.3.3. If there is no existing Neighbor Cache entry and no 2257 Source Link-Layer Address option was present in the solicitation, the 2258 router may respond with either a multicast or a unicast router 2259 advertisement. Whether or not a Source Link-Layer Address option 2260 is provided, if a Neighbor Cache entry for the solicitation's sender 2261 exists (or is created) the entry's IsRouter flag MUST be set to 2262 FALSE. 2264 6.2.7. Router Advertisement Consistency 2265 Routers SHOULD inspect valid Router Advertisements sent by other 2266 routers and verify that the routers are advertising consistent 2267 information on a link. Detected inconsistencies indicate that one or 2268 more routers might be misconfigured and SHOULD be logged to system or 2269 network management. The minimum set of information to check 2270 includes: 2272 - Cur Hop Limit values (except for the unspecified value of zero 2273 other inconsistencies SHOULD be logged to system network 2274 management). 2275 - Values of the M or O flags. 2277 - Reachable Time values (except for the unspecified value of zero). 2279 - Retrans Timer values (except for the unspecified value of zero). 2281 - Values in the MTU options. 2283 - Preferred and Valid Lifetimes for the same prefix. If 2284 AdvPreferredLifetime and/or AdvValidLifetime decrement in real 2285 time as specified in section 6.2.1 then the comparison of the 2286 lifetimes can not compare the content of the fields in the Router 2287 Advertisement but must instead compare the time at which the 2288 prefix will become deprecated and invalidated, respectively. Due 2289 to link propagation delays and potentially poorly synchronized 2290 clocks between the routers such comparison SHOULD allow some time 2291 skew. 2293 Note that it is not an error for different routers to advertise 2294 different sets of prefixes. Also, some routers might leave some 2295 fields as unspecified, i.e., with the value zero, while other routers 2296 specify values. The logging of errors SHOULD be restricted to 2297 conflicting information that causes hosts to switch from one value to 2298 another with each received advertisement. 2300 Any other action on reception of Router Advertisement messages by a 2301 router is beyond the scope of this document. 2303 6.2.8. Link-local Address Change 2305 The link-local address on a router should rarely change, if ever. 2306 Nodes receiving Neighbor Discovery messages use the source address to 2307 identify the sender. If multiple packets from the same router 2308 contain different source addresses, nodes will assume they come from 2309 different routers, leading to undesirable behavior. For example, a 2310 node will ignore Redirect messages that are believed to have been 2311 sent by a router other than the current first-hop router. Thus the 2312 source address used in Router Advertisements sent by a particular 2313 router must be identical to the target address in a Redirect message 2314 when redirecting to that router. 2316 Using the link-local address to uniquely identify routers on the link 2317 has the benefit that the address a router is known by should not 2318 change when a site renumbers. 2320 If a router changes the link-local address for one of its interfaces, 2321 it SHOULD inform hosts of this change. The router SHOULD multicast a 2322 few Router Advertisements from the old link-local address with the 2323 Router Lifetime field set to zero and also multicast a few Router 2324 Advertisements from the new link-local address. The overall effect 2325 should be the same as if one interface ceases being an advertising 2326 interface, and a different one starts being an advertising interface. 2328 6.3. Host Specification 2330 6.3.1. Host Configuration Variables 2332 None. 2334 6.3.2. Host Variables 2336 A host maintains certain Neighbor Discovery related variables in 2337 addition to the data structures defined in Section 5.1. The specific 2338 variable names are used for demonstration purposes only, and an 2339 implementation is not required to have them, so long as its external 2340 behavior is consistent with that described in this document. 2342 These variables have default values that are overridden by 2343 information received in Router Advertisement messages. The default 2344 values are used when there is no router on the link or when all 2345 received Router Advertisements have left a particular value 2346 unspecified. 2348 The default values in this specification may be overridden by 2349 specific documents that describe how IP operates over different link 2350 layers. This rule allows Neighbor Discovery to operate over links 2351 with widely varying performance characteristics. 2353 For each interface: 2355 LinkMTU The MTU of the link. 2356 Default: The valued defined in the specific 2357 document that describes how IPv6 operates over 2358 the particular link layer (e.g., [IPv6-ETHER]). 2360 CurHopLimit The default hop limit to be used when sending 2361 (unicast) IP packets. 2363 Default: The value specified in the "Assigned 2364 Numbers" RFC [ASSIGNED] that was in effect at the 2365 time of implementation. 2367 BaseReachableTime 2368 A base value used for computing the random 2369 ReachableTime value. 2371 Default: REACHABLE_TIME milliseconds. 2373 ReachableTime The time a neighbor is considered reachable after 2374 receiving a reachability confirmation. 2376 This value should be a uniformly-distributed 2377 random value between MIN_RANDOM_FACTOR and 2378 MAX_RANDOM_FACTOR times BaseReachableTime 2379 milliseconds. A new random value should be 2380 calculated when BaseReachableTime changes (due to 2381 Router Advertisements) or at least every few 2382 hours even if no Router Advertisements are 2383 received. 2385 RetransTimer The time between retransmissions of Neighbor 2386 Solicitation messages to a neighbor when 2387 resolving the address or when probing the 2388 reachability of a neighbor. 2390 Default: RETRANS_TIMER milliseconds 2392 6.3.3. Interface Initialization 2394 The host joins the all-nodes multicast address on all multicast- 2395 capable interfaces. 2397 6.3.4. Processing Received Router Advertisements 2399 When multiple routers are present, the information advertised 2400 collectively by all routers may be a superset of the information 2401 contained in a single Router Advertisement. Moreover, information 2402 may also be obtained through other dynamic means like DHCPv6. Hosts 2403 accept the union of all received information; the receipt of a Router 2404 Advertisement MUST NOT invalidate all information received in a 2405 previous advertisement or from another source. However, when 2406 received information for a specific parameter (e.g., Link MTU) or 2407 option (e.g., Lifetime on a specific Prefix) differs from information 2408 received earlier, and the parameter/option can only have one value, 2409 the most recently-received information is considered authoritative. 2411 Some Router Advertisement fields (e.g., Cur Hop Limit, Reachable Time 2412 and Retrans Timer) may contain a value denoting unspecified. In such 2413 cases, the parameter should be ignored and the host should continue 2414 using whatever value it is already using. In particular, a host MUST 2415 NOT interpret the unspecified value as meaning change back to the 2416 default value that was in use before the first Router Advertisement 2417 was received. This rule prevents hosts from continually changing an 2418 internal variable when one router advertises a specific value, but 2419 other routers advertise the unspecified value. 2421 On receipt of a valid Router Advertisement, a host extracts the 2422 source address of the packet and does the following: 2424 - If the address is not already present in the host's Default 2425 Router List, and the advertisement's Router Lifetime is non- 2426 zero, create a new entry in the list, and initialize its 2427 invalidation timer value from the advertisement's Router 2428 Lifetime field. 2430 - If the address is already present in the host's Default Router 2431 List as a result of a previously-received advertisement, reset 2432 its invalidation timer to the Router Lifetime value in the 2433 newly-received advertisement. 2435 - If the address is already present in the host's Default Router 2436 List and the received Router Lifetime value is zero, immediately 2437 time-out the entry as specified in Section 6.3.5. 2439 To limit the storage needed for the Default Router List, a host MAY 2440 choose not to store all of the router addresses discovered via 2441 advertisements. However, a host MUST retain at least two router 2442 addresses and SHOULD retain more. Default router selections are made 2443 whenever communication to a destination appears to be failing. Thus, 2444 the more routers on the list, the more likely an alternative working 2445 router can be found quickly (e.g., without having to wait for the 2446 next advertisement to arrive). 2448 If the received Cur Hop Limit value is non-zero the host SHOULD set 2449 its CurHopLimit variable to the received value. 2451 If the received Reachable Time value is non-zero the host SHOULD set 2452 its BaseReachableTime variable to the received value. If the new 2453 value differs from the previous value, the host SHOULD recompute a 2454 new random ReachableTime value. ReachableTime is computed as a 2455 uniformly-distributed random value between MIN_RANDOM_FACTOR and 2456 MAX_RANDOM_FACTOR times the BaseReachableTime. Using a random 2457 component eliminates the possibility Neighbor Unreachability 2458 Detection messages synchronize with each other. 2460 In most cases, the advertised Reachable Time value will be the same 2461 in consecutive Router Advertisements and a host's BaseReachableTime 2462 rarely changes. In such cases, an implementation SHOULD insure that 2463 a new random value gets recomputed at least once every few hours. 2465 The RetransTimer variable SHOULD be copied from the Retrans Timer 2466 field, if the received value is non-zero. 2468 After extracting information from the fixed part of the Router 2469 Advertisement message, the advertisement is scanned for valid 2470 options. If the advertisement contains a Source Link-Layer Address 2471 option the link-layer address SHOULD be recorded in the Neighbor 2472 Cache entry for the router (creating an entry if necessary) and the 2473 IsRouter flag in the Neighbor Cache entry MUST be set to TRUE. If no 2474 Source Link-Layer Address is included, but a corresponding Neighbor 2475 Cache entry exists, its IsRouter flag MUST be set to TRUE. The 2476 IsRouter flag is used by Neighbor Unreachability Detection to 2477 determine when a router changes to being a host (i.e., no longer 2478 capable of forwarding packets). If a Neighbor Cache entry is created 2479 for the router its reachability state MUST be set to STALE as 2480 specified in Section 7.3.3. If a cache entry already exists and is 2481 updated with a different link-layer address the reachability state 2482 MUST also be set to STALE. 2484 If the MTU option is present, hosts SHOULD copy the option's value 2485 into LinkMTU so long as the value is greater than or equal to the 2486 minimum link MTU [IPv6] and does not exceed the maximum LinkMTU value 2487 specified in the link type specific document (e.g., [IPv6-ETHER]). 2489 Prefix Information options that have the "on-link" (L) flag set 2490 indicate a prefix identifying a range of addresses that should be 2491 considered on-link. Note, however, that a Prefix Information option 2492 with the on-link flag set to zero conveys no information concerning 2493 on-link determination and MUST NOT be interpreted to mean that 2494 addresses covered by the prefix are off-link. The only way to cancel 2495 a previous on-link indication is to advertise that prefix with the 2496 L-bit set and the Lifetime set to zero. The default behavior (see 2497 Section 5.2) when sending a packet to an address for which no 2498 information is known about the on-link status of the address is to 2499 forward the packet to a default router; the reception of a Prefix 2500 Information option with the "on-link " (L) flag set to zero does not 2501 change this behavior. The reasons for an address being treated as 2502 on-link is specified in the definition of "on-link" in Section 2.1. 2503 Prefixes with the on-link flag set to zero would normally have the 2504 autonomous flag set and be used by [ADDRCONF]. 2506 For each Prefix Information option with the on-link flag set, a host 2507 does the following: 2509 - If the prefix is the link-local prefix, silently ignore the 2510 Prefix Information option. 2512 - If the prefix is not already present in the Prefix List, and the 2513 Prefix Information option's Valid Lifetime field is non-zero, 2514 create a new entry for the prefix and initialize its 2515 invalidation timer to the Valid Lifetime value in the Prefix 2516 Information option. 2518 - If the prefix is already present in the host's Prefix List as 2519 the result of a previously-received advertisement, reset its 2520 invalidation timer to the Valid Lifetime value in the Prefix 2521 Information option. If the new Lifetime value is zero, time-out 2522 the prefix immediately (see Section 6.3.5). 2524 - If the Prefix Information option's Valid Lifetime field is zero, 2525 and the prefix is not present in the host's Prefix List, 2526 silently ignore the option. 2528 Stateless address autoconfiguration [ADDRCONF] may in some 2529 circumstances use a larger Valid Lifetime of a prefix or ignore it 2530 completely in order to prevent a particular denial of service attack. 2531 However, since the effect of the same denial of service targeted at 2532 the on-link prefix list is not catastrophic (hosts would send packets 2533 to a default router and receive a redirect rather than sending 2534 packets directly to a neighbor) the Neighbor Discovery protocol does 2535 not impose such a check on the prefix lifetime values. Similarly, 2536 [ADDRCONF] may impose certain restrictions on the prefix length for 2537 address configuration purposes. Therefore, the prefix might be 2538 rejected by [ADDRCONF] implementation in the host. However, the 2539 prefix length is still valid for on-link determination when combined 2540 with other flags in the prefix option. 2542 Note: Implementations can choose to process the on-link aspects of 2543 the prefixes separately from the address autoconfiguration aspects 2544 of the prefixes by, e.g., passing a copy of each valid Router 2545 Advertisement message to both an "on-link" and an "addrconf" 2546 function. Each function can then operate independently on the 2547 prefixes that have the appropriate flag set. 2549 6.3.5. Timing out Prefixes and Default Routers 2551 Whenever the invalidation timer expires for a Prefix List entry, that 2552 entry is discarded. No existing Destination Cache entries need be 2553 updated, however. Should a reachability problem arise with an 2554 existing Neighbor Cache entry, Neighbor Unreachability Detection will 2555 perform any needed recovery. 2557 Whenever the Lifetime of an entry in the Default Router List expires, 2558 that entry is discarded. When removing a router from the Default 2559 Router list, the node MUST update the Destination Cache in such a way 2560 that all entries using the router perform next-hop determination 2561 again rather than continue sending traffic to the (deleted) router. 2563 6.3.6. Default Router Selection 2565 The algorithm for selecting a router depends in part on whether or 2566 not a router is known to be reachable. The exact details of how a 2567 node keeps track of a neighbor's reachability state are covered in 2568 Section 7.3. The algorithm for selecting a default router is invoked 2569 during next-hop determination when no Destination Cache entry exists 2570 for an off-link destination or when communication through an existing 2571 router appears to be failing. Under normal conditions, a router 2572 would be selected the first time traffic is sent to a destination, 2573 with subsequent traffic for that destination using the same router as 2574 indicated in the Destination Cache modulo any changes to the 2575 Destination Cache caused by Redirect messages. 2577 The policy for selecting routers from the Default Router List is as 2578 follows: 2580 1) Routers that are reachable or probably reachable (i.e., in any 2581 state other than INCOMPLETE) SHOULD be preferred over routers 2582 whose reachability is unknown or suspect (i.e., in the 2583 INCOMPLETE state, or for which no Neighbor Cache entry exists). 2584 Further implementation hints on default router selection when 2585 multiple equivalent routers are available are discussed in 2586 [LD-SHRE]. 2588 2) When no routers on the list are known to be reachable or 2589 probably reachable, routers SHOULD be selected in a round-robin 2590 fashion, so that subsequent requests for a default router do not 2591 return the same router until all other routers have been 2592 selected. 2594 Cycling through the router list in this case ensures that all 2595 available routers are actively probed by the Neighbor 2596 Unreachability Detection algorithm. A request for a default 2597 router is made in conjunction with the sending of a packet to a 2598 router, and the selected router will be probed for reachability 2599 as a side effect. 2601 6.3.7. Sending Router Solicitations 2603 When an interface becomes enabled, a host may be unwilling to wait 2604 for the next unsolicited Router Advertisement to locate default 2605 routers or learn prefixes. To obtain Router Advertisements quickly, 2606 a host SHOULD transmit up to MAX_RTR_SOLICITATIONS Router 2607 Solicitation messages each separated by at least 2608 RTR_SOLICITATION_INTERVAL seconds. Router Solicitations may be sent 2609 after any of the following events: 2611 - The interface is initialized at system startup time. 2613 - The interface is reinitialized after a temporary interface 2614 failure or after being temporarily disabled by system 2615 management. 2617 - The system changes from being a router to being a host, by 2618 having its IP forwarding capability turned off by system 2619 management. 2621 - The host attaches to a link for the first time. 2623 - The host re-attaches to a link after being detached for some 2624 time. 2626 A host sends Router Solicitations to the All-Routers multicast 2627 address. The IP source address is set to either one of the 2628 interface's unicast addresses or the unspecified address. The Source 2629 Link-Layer Address option SHOULD be set to the host's link-layer 2630 address, if the IP source address is not the unspecified address. 2632 Before a host sends an initial solicitation, it SHOULD delay the 2633 transmission for a random amount of time between 0 and 2634 MAX_RTR_SOLICITATION_DELAY. This serves to alleviate congestion when 2635 many hosts start up on a link at the same time, such as might happen 2636 after recovery from a power failure. If a host has already performed 2637 a random delay since the interface became (re)enabled (e.g., as part 2638 of Duplicate Address Detection [ADDRCONF]) there is no need to delay 2639 again before sending the first Router Solicitation message. 2641 In some cases, the random delay MAY be omitted if necessary. For 2642 instance, a mobile node, using [MIPv6], moving to a new link would 2643 need to discover such movement as soon as possible to minimize the 2644 amount of packet losses resulting from the change in its topological 2645 movement. Router Solicitations provide a useful tool for movement 2646 detection in Mobile IPv6 as they allow mobile nodes to determine 2647 movement to new links. Hence, if a mobile node received link layer 2648 information indicating that movement might have taken place, it MAY 2649 send a Router Solicitation immediately, without random delays. The 2650 strength of such indications should be assessed by the mobile node's 2651 implementation depending on the level of certainty of the link layer 2652 hints and is outside the scope of this specification. Note that using 2653 this mechanism inappropriately (e.g. based on weak or transient 2654 indications) may result in Router Solicitation storms. Furthermore, 2655 simultaneous mobility of a large number of mobile nodes that use this 2656 mechanism can result in a large number of solicitations sent 2657 simultaneously. 2659 Once the host sends a Router Solicitation, and receives a valid 2660 Router Advertisement with a non-zero Router Lifetime, the host MUST 2661 desist from sending additional solicitations on that interface, until 2662 the next time one of the above events occurs. Moreover, a host 2663 SHOULD send at least one solicitation in the case where an 2664 advertisement is received prior to having sent a solicitation. 2665 Unsolicited Router Advertisements may be incomplete (see Section 2666 6.2.3); solicited advertisements are expected to contain complete 2667 information. 2669 If a host sends MAX_RTR_SOLICITATIONS solicitations, and receives no 2670 Router Advertisements after having waited MAX_RTR_SOLICITATION_DELAY 2671 seconds after sending the last solicitation, the host concludes that 2672 there are no routers on the link for the purpose of [ADDRCONF]. 2673 However, the host continues to receive and process Router 2674 Advertisements messages in the event that routers appear on the link. 2676 7. ADDRESS RESOLUTION AND NEIGHBOR UNREACHABILITY DETECTION 2678 This section describes the functions related to Neighbor Solicitation 2679 and Neighbor Advertisement messages and includes descriptions of 2680 address resolution and the Neighbor Unreachability Detection 2681 algorithm. 2683 Neighbor Solicitation and Advertisement messages are also used for 2684 Duplicate Address Detection as specified by [ADDRCONF]. In 2685 particular, Duplicate Address Detection sends Neighbor Solicitation 2686 messages with an unspecified source address targeting its own 2687 "tentative" address. Such messages trigger nodes already using the 2688 address to respond with a multicast Neighbor Advertisement indicating 2689 that the address is in use. 2691 7.1. Message Validation 2693 7.1.1. Validation of Neighbor Solicitations 2695 A node MUST silently discard any received Neighbor Solicitation 2696 messages that do not satisfy all of the following validity checks: 2698 - The IP Hop Limit field has a value of 255, i.e., the packet 2699 could not possibly have been forwarded by a router. 2701 - ICMP Checksum is valid. 2703 - ICMP Code is 0. 2705 - ICMP length (derived from the IP length) is 24 or more octets. 2707 - Target Address is not a multicast address. 2709 - All included options have a length that is greater than zero. 2711 - If the IP source address is the unspecified address, the IP 2712 destination address is a solicited-node multicast address. 2714 - If the IP source address is the unspecified address, there is no 2715 source link-layer address option in the message. 2717 The contents of the Reserved field, and of any unrecognized options, 2718 MUST be ignored. Future, backward-compatible changes to the protocol 2719 may specify the contents of the Reserved field or add new options; 2720 backward-incompatible changes may use different Code values. 2722 The contents of any defined options that are not specified to be used 2723 with Neighbor Solicitation messages MUST be ignored and the packet 2724 processed as normal. The only defined option that may appear is the 2725 Source Link-Layer Address option. 2727 A Neighbor Solicitation that passes the validity checks is called a 2728 "valid solicitation". 2730 7.1.2. Validation of Neighbor Advertisements 2732 A node MUST silently discard any received Neighbor Advertisement 2733 messages that do not satisfy all of the following validity checks: 2735 - The IP Hop Limit field has a value of 255, i.e., the packet 2736 could not possibly have been forwarded by a router. 2738 - ICMP Checksum is valid. 2740 - ICMP Code is 0. 2742 - ICMP length (derived from the IP length) is 24 or more octets. 2744 - Target Address is not a multicast address. 2746 - If the IP Destination Address is a multicast address the 2747 Solicited flag is zero. 2749 - All included options have a length that is greater than zero. 2751 The contents of the Reserved field, and of any unrecognized options, 2752 MUST be ignored. Future, backward-compatible changes to the protocol 2753 may specify the contents of the Reserved field or add new options; 2754 backward-incompatible changes may use different Code values. 2756 The contents of any defined options that are not specified to be used 2757 with Neighbor Advertisement messages MUST be ignored and the packet 2758 processed as normal. The only defined option that may appear is the 2759 Target Link-Layer Address option. 2761 A Neighbor Advertisements that passes the validity checks is called a 2762 "valid advertisement". 2764 7.2. Address Resolution 2766 Address resolution is the process through which a node determines the 2767 link-layer address of a neighbor given only its IP address. Address 2768 resolution is performed only on addresses that are determined to be 2769 on-link and for which the sender does not know the corresponding 2770 link-layer address (see section 5.2). Address resolution is never 2771 performed on multicast addresses. 2773 It is possible that a host may receive a solicitation, a router 2774 advertisement, or a Redirect message without a link-layer address 2775 option included. These messages MUST not create or update neighbor 2776 cache entries, except with respect to the IsRouter flag as specified 2777 in sections 6.3.4 and 7.2.5. If a neighbor cache entry does not exist 2778 for the source of such a message, Address Resolution will be required 2779 before unicast communications with that address to begin. This is 2780 particularly relevant for unicast responses to solicitations where an 2781 additional packet exchange is required for advertisement delivery. 2783 7.2.1. Interface Initialization 2785 When a multicast-capable interface becomes enabled the node MUST join 2786 the all-nodes multicast address on that interface, as well as the 2787 solicited-node multicast address corresponding to each of the IP 2788 addresses assigned to the interface. 2790 The set of addresses assigned to an interface may change over time. 2791 New addresses might be added and old addresses might be removed 2792 [ADDRCONF]. In such cases the node MUST join and leave the 2793 solicited-node multicast address corresponding to the new and old 2794 addresses, respectively. Joining the solicited-node multicast address 2795 SHOULD be done using the Multicast Listener Discovery [MLD] or 2796 [MLDv2] protocols. Note that multiple unicast addresses may map into 2797 the same solicited-node multicast address; a node MUST NOT leave the 2798 solicited-node multicast group until all assigned addresses 2799 corresponding to that multicast address have been removed. 2801 7.2.2. Sending Neighbor Solicitations 2803 When a node has a unicast packet to send to a neighbor, but does not 2804 know the neighbor's link-layer address, it performs address 2805 resolution. For multicast-capable interfaces this entails creating a 2806 Neighbor Cache entry in the INCOMPLETE state and transmitting a 2807 Neighbor Solicitation message targeted at the neighbor. The 2808 solicitation is sent to the solicited-node multicast address 2809 corresponding to the target address. 2811 If the source address of the packet prompting the solicitation is the 2812 same as one of the addresses assigned to the outgoing interface, that 2813 address SHOULD be placed in the IP Source Address of the outgoing 2814 solicitation. Otherwise, any one of the addresses assigned to the 2815 interface should be used. Using the prompting packet's source 2816 address when possible ensures that the recipient of the Neighbor 2817 Solicitation installs in its Neighbor Cache the IP address that is 2818 highly likely to be used in subsequent return traffic belonging to 2819 the prompting packet's "connection". 2821 If the solicitation is being sent to a solicited-node multicast 2822 address, the sender MUST include its link-layer address (if it has 2823 one) as a Source Link-Layer Address option. Otherwise, the sender 2824 SHOULD include its link-layer address (if it has one) as a Source 2825 Link-Layer Address option. Including the source link-layer address 2826 in a multicast solicitation is required to give the target an address 2827 to which it can send the Neighbor Advertisement. On unicast 2828 solicitations, an implementation MAY omit the Source Link-Layer 2829 Address option. The assumption here is that if the sender has a 2830 peer's link-layer address in its cache, there is a high probability 2831 that the peer will also have an entry in its cache for the sender. 2832 Consequently, it need not be sent. 2834 While waiting for address resolution to complete, the sender MUST, 2835 for each neighbor, retain a small queue of packets waiting for 2836 address resolution to complete. The queue MUST hold at least one 2837 packet, and MAY contain more. However, the number of queued packets 2838 per neighbor SHOULD be limited to some small value. When a queue 2839 overflows, the new arrival SHOULD replace the oldest entry. Once 2840 address resolution completes, the node transmits any queued packets. 2842 While awaiting a response, the sender SHOULD retransmit Neighbor 2843 Solicitation messages approximately every RetransTimer milliseconds, 2844 even in the absence of additional traffic to the neighbor. 2845 Retransmissions MUST be rate-limited to at most one solicitation per 2846 neighbor every RetransTimer milliseconds. 2848 If no Neighbor Advertisement is received after MAX_MULTICAST_SOLICIT 2849 solicitations, address resolution has failed. The sender MUST return 2850 ICMP destination unreachable indications with code 3 (Address 2851 Unreachable) for each packet queued awaiting address resolution. 2853 7.2.3. Receipt of Neighbor Solicitations 2855 A valid Neighbor Solicitation that does not meet any of the following 2856 requirements MUST be silently discarded: 2858 - The Target Address is a "valid" unicast or anycast address 2859 assigned to the receiving interface [ADDRCONF], 2861 - The Target Address is a unicast or anycast address for which the 2862 node is offering proxy service, or 2864 - The Target Address is a "tentative" address on which Duplicate 2865 Address Detection is being performed [ADDRCONF]. 2867 If the Target Address is tentative, the Neighbor Solicitation should 2868 be processed as described in [ADDRCONF]. Otherwise, the following 2869 description applies. If the Source Address is not the unspecified 2870 address and, on link layers that have addresses, the solicitation 2871 includes a Source Link-Layer Address option, then the recipient 2872 SHOULD create or update the Neighbor Cache entry for the IP Source 2873 Address of the solicitation. If an entry does not already exist, the 2874 node SHOULD create a new one and set its reachability state to STALE 2875 as specified in Section 7.3.3. If an entry already exists, and the 2876 cached link-layer address differs from the one in the received Source 2877 Link-Layer option, the cached address should be replaced by the 2878 received address and the entry's reachability state MUST be set to 2879 STALE. 2881 If a Neighbor Cache entry is created the IsRouter flag SHOULD be set 2882 to FALSE. This will be the case even if the Neighbor Solicitation is 2883 sent by a router since the Neighbor Solicitation messages do not 2884 contain an indication of whether or not the sender is a router. In 2885 the event that the sender is a router, subsequent Neighbor 2886 Advertisement or Router Advertisement messages will set the correct 2887 IsRouter value. If a Neighbor Cache entry already exists its 2888 IsRouter flag MUST NOT be modified. 2890 If the Source Address is the unspecified address the node MUST NOT 2891 create or update the Neighbor Cache entry. 2893 After any updates to the Neighbor Cache, the node sends a Neighbor 2894 Advertisement response as described in the next section. 2896 7.2.4. Sending Solicited Neighbor Advertisements 2898 A node sends a Neighbor Advertisement in response to a valid Neighbor 2899 Solicitation targeting one of the node's assigned addresses. The 2900 Target Address of the advertisement is copied from the Target Address 2901 of the solicitation. If the solicitation's IP Destination Address is 2902 not a multicast address, the Target Link-Layer Address option MAY be 2903 omitted; the neighboring node's cached value must already be current 2904 in order for the solicitation to have been received. If the 2905 solicitation's IP Destination Address is a multicast address, the 2906 Target Link-Layer option MUST be included in the advertisement. 2907 Furthermore, if the node is a router, it MUST set the Router flag to 2908 one; otherwise it MUST set the flag to zero. 2910 If the Target Address is either an anycast address or a unicast 2911 address for which the node is providing proxy service, or the Target 2912 Link-Layer Address option is not included, the Override flag SHOULD 2913 be set to zero. Otherwise, the Override flag SHOULD be set to one. 2914 Proper setting of the Override flag ensures that nodes give 2915 preference to non-proxy advertisements, even when received after 2916 proxy advertisements, and also ensures that the first advertisement 2917 for an anycast address "wins". 2919 If the source of the solicitation is the unspecified address, the 2920 node MUST set the Solicited flag to zero and multicast the 2921 advertisement to the all-nodes address. Otherwise, the node MUST set 2922 the Solicited flag to one and unicast the advertisement to the Source 2923 Address of the solicitation. 2925 If the Target Address is an anycast address the sender SHOULD delay 2926 sending a response for a random time between 0 and 2927 MAX_ANYCAST_DELAY_TIME seconds. 2929 Because unicast Neighbor Solicitations are not required to include a 2930 Source Link-Layer Address, it is possible that a node sending a 2931 solicited Neighbor Advertisement does not have a corresponding link- 2932 layer address for its neighbor in its Neighbor Cache. In such 2933 situations, a node will first have to use Neighbor Discovery to 2934 determine the link-layer address of its neighbor (i.e., send out a 2935 multicast Neighbor Solicitation). 2937 7.2.5. Receipt of Neighbor Advertisements 2939 When a valid Neighbor Advertisement is received (either solicited or 2940 unsolicited), the Neighbor Cache is searched for the target's entry. 2941 If no entry exists, the advertisement SHOULD be silently discarded. 2942 There is no need to create an entry if none exists, since the 2943 recipient has apparently not initiated any communication with the 2944 target. 2946 Once the appropriate Neighbor Cache entry has been located, the 2947 specific actions taken depend on the state of the Neighbor Cache 2948 entry, the flags in the advertisement and the actual link-layer 2949 address supplied. 2951 If the target's Neighbor Cache entry is in the INCOMPLETE state when 2952 the advertisement is received, one of two things happens. If the 2953 link layer has addresses and no Target Link-Layer address option is 2954 included, the receiving node SHOULD silently discard the received 2955 advertisement. Otherwise, the receiving node performs the following 2956 steps: 2958 - It records the link-layer address in the Neighbor Cache entry. 2960 - If the advertisement's Solicited flag is set, the state of the 2961 entry is set to REACHABLE, otherwise it is set to STALE. 2963 - It sets the IsRouter flag in the cache entry based on the Router 2964 flag in the received advertisement. 2966 - It sends any packets queued for the neighbor awaiting address 2967 resolution. 2969 Note that the Override flag is ignored if the entry is in the 2970 INCOMPLETE state. 2972 If the target's Neighbor Cache entry is in any state other than 2973 INCOMPLETE when the advertisement is received, the following actions 2974 take place: 2976 I. If the Override flag is clear and the supplied link-layer address 2977 differs from that in the cache, then one of two actions takes 2978 place: 2979 a. If the state of the entry is REACHABLE, set it to STALE, but 2980 do not update the entry in any other way. 2981 b. Otherwise, the received advertisement should be ignored and 2982 MUST NOT update the cache. 2984 II. If the Override flag is set, or the supplied link-layer address 2985 is the same as that in the cache, or no Target Link-layer address 2986 option was supplied, the received advertisement MUST update the 2987 Neighbor Cache entry as follows: 2989 - The link-layer address in the Target Link-Layer Address option 2990 MUST be inserted in the cache (if one is supplied and is 2991 Different than the already recorded address). 2993 - If the Solicited flag is set, the state of the entry MUST be 2994 set to REACHABLE. If the Solicited flag is zero and the link 2995 layer address was updated with a different address the state 2996 MUST be set to STALE. Otherwise, the entry's state remains 2997 unchanged. 2999 An advertisement's Solicited flag should only be set if the 3000 advertisement is a response to a Neighbor Solicitation. 3001 Because Neighbor Unreachability Detection Solicitations are 3002 sent to the cached link-layer address, receipt of a solicited 3003 advertisement indicates that the forward path is working. 3004 Receipt of an unsolicited advertisement, however, suggests that 3005 a neighbor has urgent information to announce (e.g., a changed 3006 link-layer address). If the urgent information indicates a 3007 change from what a node is currently using, the node should 3008 verify the reachability of the (new) path when it sends the 3009 next packet. There is no need to update the state for 3010 unsolicited advertisements that do not change the contents of 3011 the cache. 3013 - The IsRouter flag in the cache entry MUST be set based on the 3014 Router flag in the received advertisement. In those cases 3015 where the IsRouter flag changes from TRUE to FALSE as a result 3016 of this update, the node MUST remove that router from the 3017 Default Router List and update the Destination Cache entries 3018 for all destinations using that neighbor as a router as 3019 specified in Section 7.3.3. This is needed to detect when a 3020 node that is used as a router stops forwarding packets due to 3021 being configured as a host. 3023 The above rules ensure that the cache is updated either when the 3024 Neighbor Advertisement takes precedence (i.e., the Override flag is 3025 set) or when the Neighbor Advertisement refers to the same link-layer 3026 address that is currently recorded in the cache. If none of the 3027 above apply, the advertisement prompts future Neighbor Unreachability 3028 Detection (if it is not already in progress) by changing the state in 3029 the cache entry. 3031 7.2.6. Sending Unsolicited Neighbor Advertisements 3033 In some cases a node may be able to determine that its link-layer 3034 address has changed (e.g., hot-swap of an interface card) and may 3035 wish to inform its neighbors of the new link-layer address quickly. 3036 In such cases a node MAY send up to MAX_NEIGHBOR_ADVERTISEMENT 3037 unsolicited Neighbor Advertisement messages to the all-nodes 3038 multicast address. These advertisements MUST be separated by at 3039 least RetransTimer seconds. 3041 The Target Address field in the unsolicited advertisement is set to 3042 an IP address of the interface, and the Target Link-Layer Address 3043 option is filled with the new link-layer address. The Solicited flag 3044 MUST be set to zero, in order to avoid confusing the Neighbor 3045 Unreachability Detection algorithm. If the node is a router, it MUST 3046 set the Router flag to one; otherwise it MUST set it to zero. The 3047 Override flag MAY be set to either zero or one. In either case, 3048 neighboring nodes will immediately change the state of their Neighbor 3049 Cache entries for the Target Address to STALE, prompting them to 3050 verify the path for reachability. If the Override flag is set to 3051 one, neighboring nodes will install the new link-layer address in 3052 their caches. Otherwise, they will ignore the new link-layer 3053 address, choosing instead to probe the cached address. 3055 A node that has multiple IP addresses assigned to an interface MAY 3056 multicast a separate Neighbor Advertisement for each address. In 3057 such a case the node SHOULD introduce a small delay between the 3058 sending of each advertisement to reduce the probability of the 3059 advertisements being lost due to congestion. 3061 A proxy MAY multicast Neighbor Advertisements when its link-layer 3062 address changes or when it is configured (by system management or 3063 other mechanisms) to proxy for an address. If there are multiple 3064 nodes that are providing proxy services for the same set of addresses 3065 the proxies SHOULD provide a mechanism that prevents multiple proxies 3066 from multicasting advertisements for any one address, in order to 3067 reduce the risk of excessive multicast traffic. This is a requirement 3068 on other protocols that need to use proxies for Neighbor 3069 Advertisements. An example of a node that performs proxy 3070 advertisements is the Home Agent specified in [MIPv6]. 3072 Also, a node belonging to an anycast address MAY multicast 3073 unsolicited Neighbor Advertisements for the anycast address when the 3074 node's link-layer address changes. 3076 Note that because unsolicited Neighbor Advertisements do not reliably 3077 update caches in all nodes (the advertisements might not be received 3078 by all nodes), they should only be viewed as a performance 3079 optimization to quickly update the caches in most neighbors. The 3080 Neighbor Unreachability Detection algorithm ensures that all nodes 3081 obtain a reachable link-layer address, though the delay may be 3082 slightly longer. 3084 7.2.7. Anycast Neighbor Advertisements 3086 From the perspective of Neighbor Discovery, anycast addresses are 3087 treated just like unicast addresses in most cases. Because an 3088 anycast address is syntactically the same as a unicast address, nodes 3089 performing address resolution or Neighbor Unreachability Detection on 3090 an anycast address treat it as if it were a unicast address. No 3091 special processing takes place. 3093 Nodes that have an anycast address assigned to an interface treat 3094 them exactly the same as if they were unicast addresses with two 3095 exceptions. First, Neighbor Advertisements sent in response to a 3096 Neighbor Solicitation SHOULD be delayed by a random time between 0 3097 and MAX_ANYCAST_DELAY_TIME to reduce the probability of network 3098 congestion. Second, the Override flag in Neighbor Advertisements 3099 SHOULD be set to 0, so that when multiple advertisements are 3100 received, the first received advertisement is used rather than the 3101 most recently received advertisement. 3103 As with unicast addresses, Neighbor Unreachability Detection ensures 3104 that a node quickly detects when the current binding for an anycast 3105 address becomes invalid. 3107 7.2.8. Proxy Neighbor Advertisements 3109 Under limited circumstances, a router MAY proxy for one or more other 3110 nodes, that is, through Neighbor Advertisements indicate that it is 3111 willing to accept packets not explicitly addressed to itself. For 3112 example, a router might accept packets on behalf of a mobile node 3113 that has moved off-link. The mechanisms used by proxy are identical 3114 to the mechanisms used with anycast addresses. 3116 A proxy MUST join the solicited-node multicast address(es) that 3117 correspond to the IP address(es) assigned to the node for which it is 3118 proxying. This SHOULD be done using [MLD] or [MLDv2]. 3120 All solicited proxy Neighbor Advertisement messages MUST have the 3121 Override flag set to zero. This ensures that if the node itself is 3122 present on the link its Neighbor Advertisement (with the Override 3123 flag set to one) will take precedence of any advertisement received 3124 from a proxy. A proxy MAY send unsolicited advertisements with the 3125 Override flag set to one as specified in Section 7.2.6, but doing so 3126 may cause the proxy advertisement to override a valid entry created 3127 by the node itself. 3129 Finally, when sending a proxy advertisement in response to a Neighbor 3130 Solicitation, the sender should delay its response by a random time 3131 between 0 and MAX_ANYCAST_DELAY_TIME seconds. 3133 7.3. Neighbor Unreachability Detection 3135 Communication to or through a neighbor may fail for numerous reasons 3136 at any time, including hardware failure, hot-swap of an interface 3137 card, etc. If the destination has failed, no recovery is possible 3138 and communication fails. On the other hand, if it is the path that 3139 has failed, recovery may be possible. Thus, a node actively tracks 3140 the reachability "state" for the neighbors to which it is sending 3141 packets. 3143 Neighbor Unreachability Detection is used for all paths between hosts 3144 and neighboring nodes, including host-to-host, host-to-router, and 3145 router-to-host communication. Neighbor Unreachability Detection may 3146 also be used between routers, but is not required if an equivalent 3147 mechanism is available, for example, as part of the routing 3148 protocols. 3150 When a path to a neighbor appears to be failing, the specific 3151 recovery procedure depends on how the neighbor is being used. If the 3152 neighbor is the ultimate destination, for example, address resolution 3153 should be performed again. If the neighbor is a router, however, 3154 attempting to switch to another router would be appropriate. The 3155 specific recovery that takes place is covered under next-hop 3156 determination; Neighbor Unreachability Detection signals the need for 3157 next-hop determination by deleting a Neighbor Cache entry. 3159 Neighbor Unreachability Detection is performed only for neighbors to 3160 which unicast packets are sent; it is not used when sending to 3161 multicast addresses. 3163 7.3.1. Reachability Confirmation 3165 A neighbor is considered reachable if the node has recently received 3166 a confirmation that packets sent recently to the neighbor were 3167 received by its IP layer. Positive confirmation can be gathered in 3168 two ways: hints from upper layer protocols that indicate a connection 3169 is making "forward progress", or receipt of a Neighbor Advertisement 3170 message that is a response to a Neighbor Solicitation message. 3172 A connection makes "forward progress" if the packets received from a 3173 remote peer can only be arriving if recent packets sent to that peer 3174 are actually reaching it. In TCP, for example, receipt of a (new) 3175 acknowledgement indicates that previously sent data reached the peer. 3176 Likewise, the arrival of new (non-duplicate) data indicates that 3177 earlier acknowledgements are being delivered to the remote peer. If 3178 packets are reaching the peer, they must also be reaching the 3179 sender's next-hop neighbor; thus "forward progress" is a confirmation 3180 that the next-hop neighbor is reachable. For off-link destinations, 3181 forward progress implies that the first-hop router is reachable. 3182 When available, this upper-layer information SHOULD be used. 3184 In some cases (e.g., UDP-based protocols and routers forwarding 3185 packets to hosts) such reachability information may not be readily 3186 available from upper-layer protocols. When no hints are available 3187 and a node is sending packets to a neighbor, the node actively probes 3188 the neighbor using unicast Neighbor Solicitation messages to verify 3189 that the forward path is still working. 3191 The receipt of a solicited Neighbor Advertisement serves as 3192 reachability confirmation, since advertisements with the Solicited 3193 flag set to one are sent only in response to a Neighbor Solicitation. 3194 Receipt of other Neighbor Discovery messages such as Router 3195 Advertisements and Neighbor Advertisement with the Solicited flag set 3196 to zero MUST NOT be treated as a reachability confirmation. Receipt 3197 of unsolicited messages only confirms the one-way path from the 3198 sender to the recipient node. In contrast, Neighbor Unreachability 3199 Detection requires that a node keep track of the reachability of the 3200 forward path to a neighbor from the its perspective, not the 3201 neighbor's perspective. Note that receipt of a solicited 3202 advertisement indicates that a path is working in both directions. 3203 The solicitation must have reached the neighbor, prompting it to 3204 generate an advertisement. Likewise, receipt of an advertisement 3205 indicates that the path from the sender to the recipient is working. 3206 However, the latter fact is known only to the recipient; the 3207 advertisement's sender has no direct way of knowing that the 3208 advertisement it sent actually reached a neighbor. From the 3209 perspective of Neighbor Unreachability Detection, only the 3210 reachability of the forward path is of interest. 3212 7.3.2. Neighbor Cache Entry States 3214 A Neighbor Cache entry can be in one of five states: 3216 INCOMPLETE Address resolution is being performed on the entry. 3217 Specifically, a Neighbor Solicitation has been sent to 3218 the solicited-node multicast address of the target, 3219 but the corresponding Neighbor Advertisement has not 3220 yet been received. 3222 REACHABLE Positive confirmation was received within the last 3223 ReachableTime milliseconds that the forward path to 3224 the neighbor was functioning properly. While 3225 REACHABLE, no special action takes place as packets 3226 are sent. 3228 STALE More than ReachableTime milliseconds have elapsed 3229 since the last positive confirmation was received that 3230 the forward path was functioning properly. While 3231 stale, no action takes place until a packet is sent. 3233 The STALE state is entered upon receiving an 3234 unsolicited Neighbor Discovery message that updates 3235 the cached link-layer address. Receipt of such a 3236 message does not confirm reachability, and entering 3237 the STALE state insures reachability is verified 3238 quickly if the entry is actually being used. However, 3239 reachability is not actually verified until the entry 3240 is actually used. 3242 DELAY More than ReachableTime milliseconds have elapsed 3243 since the last positive confirmation was received that 3244 the forward path was functioning properly, and a 3245 packet was sent within the last DELAY_FIRST_PROBE_TIME 3246 seconds. If no reachability confirmation is received 3247 within DELAY_FIRST_PROBE_TIME seconds of entering the 3248 DELAY state, send a Neighbor Solicitation and change 3249 the state to PROBE. 3251 The DELAY state is an optimization that gives upper- 3252 layer protocols additional time to provide 3253 reachability confirmation in those cases where 3254 ReachableTime milliseconds have passed since the last 3255 confirmation due to lack of recent traffic. Without 3256 this optimization the opening of a TCP connection 3257 after a traffic lull would initiate probes even though 3258 the subsequent three-way handshake would provide a 3259 reachability confirmation almost immediately. 3261 PROBE A reachability confirmation is actively sought by 3262 retransmitting Neighbor Solicitations every 3263 RetransTimer milliseconds until a reachability 3264 confirmation is received. 3266 7.3.3. Node Behavior 3268 Neighbor Unreachability Detection operates in parallel with the 3269 sending of packets to a neighbor. While reasserting a neighbor's 3270 reachability, a node continues sending packets to that neighbor using 3271 the cached link-layer address. If no traffic is sent to a neighbor, 3272 no probes are sent. 3274 When a node needs to perform address resolution on a neighboring 3275 address, it creates an entry in the INCOMPLETE state and initiates 3276 address resolution as specified in Section 7.2. If address 3277 resolution fails, the entry SHOULD be deleted, so that subsequent 3278 traffic to that neighbor invokes the next-hop determination procedure 3279 again. Invoking next-hop determination at this point insures that 3280 alternate default routers are tried. 3282 When a reachability confirmation is received (either through upper- 3283 layer advice or a solicited Neighbor Advertisement) an entry's state 3284 changes to REACHABLE. The one exception is that upper-layer advice 3285 has no effect on entries in the INCOMPLETE state (e.g., for which no 3286 link-layer address is cached). 3288 When ReachableTime milliseconds have passed since receipt of the last 3289 reachability confirmation for a neighbor, the Neighbor Cache entry's 3290 state changes from REACHABLE to STALE. 3292 Note: An implementation may actually defer changing the state from 3293 REACHABLE to STALE until a packet is sent to the neighbor, i.e., 3294 there need not be an explicit timeout event associated with the 3295 expiration of ReachableTime. 3297 The first time a node sends a packet to a neighbor whose entry is 3298 STALE, the sender changes the state to DELAY and a sets a timer to 3299 expire in DELAY_FIRST_PROBE_TIME seconds. If the entry is still in 3300 the DELAY state when the timer expires, the entry's state changes to 3301 PROBE. If reachability confirmation is received, the entry's state 3302 changes to REACHABLE. 3304 Upon entering the PROBE state, a node sends a unicast Neighbor 3305 Solicitation message to the neighbor using the cached link-layer 3306 address. While in the PROBE state, a node retransmits Neighbor 3307 Solicitation messages every RetransTimer milliseconds until 3308 reachability confirmation is obtained. Probes are retransmitted even 3309 if no additional packets are sent to the neighbor. If no response is 3310 received after waiting RetransTimer milliseconds after sending the 3311 MAX_UNICAST_SOLICIT solicitations, retransmissions cease and the 3312 entry SHOULD be deleted. Subsequent traffic to that neighbor will 3313 recreate the entry and performs address resolution again. 3315 Note that all Neighbor Solicitations are rate-limited on a per- 3316 neighbor basis. A node MUST NOT send Neighbor Solicitations to the 3317 same neighbor more frequently than once every RetransTimer 3318 milliseconds. 3320 A Neighbor Cache entry enters the STALE state when created as a 3321 result of receiving packets other than solicited Neighbor 3322 Advertisements (i.e., Router Solicitations, Router Advertisements, 3323 Redirects, and Neighbor Solicitations). These packets contain the 3324 link-layer address of either the sender or, in the case of Redirect, 3325 the redirection target. However, receipt of these link-layer 3326 addresses does not confirm reachability of the forward-direction path 3327 to that node. Placing a newly created Neighbor Cache entry for which 3328 the link-layer address is known in the STALE state provides assurance 3329 that path failures are detected quickly. In addition, should a 3330 cached link-layer address be modified due to receiving one of the 3331 above messages the state SHOULD also be set to STALE to provide 3332 prompt verification that the path to the new link-layer address is 3333 working. 3335 To properly detect the case where a router switches from being a 3336 router to being a host (e.g., if its IP forwarding capability is 3337 turned off by system management), a node MUST compare the Router flag 3338 field in all received Neighbor Advertisement messages with the 3339 IsRouter flag recorded in the Neighbor Cache entry. When a node 3340 detects that a neighbor has changed from being a router to being a 3341 host, the node MUST remove that router from the Default Router List 3342 and update the Destination Cache as described in Section 6.3.5. Note 3343 that a router may not be listed in the Default Router List, even 3344 though a Destination Cache entry is using it (e.g., a host was 3345 redirected to it). In such cases, all Destination Cache entries that 3346 reference the (former) router must perform next-hop determination 3347 again before using the entry. 3349 In some cases, link-specific information may indicate that a path to 3350 a neighbor has failed (e.g., the resetting of a virtual circuit). In 3351 such cases, link-specific information may be used to purge Neighbor 3352 Cache entries before the Neighbor Unreachability Detection would do 3353 so. However, link-specific information MUST NOT be used to confirm 3354 the reachability of a neighbor; such information does not provide 3355 end-to-end confirmation between neighboring IP layers. 3357 8. REDIRECT FUNCTION 3359 This section describes the functions related to the sending and 3360 processing of Redirect messages. 3362 Redirect messages are sent by routers to redirect a host to a better 3363 first-hop router for a specific destination or to inform hosts that a 3364 destination is in fact a neighbor (i.e., on-link). The latter is 3365 accomplished by having the ICMP Target Address be equal to the ICMP 3366 Destination Address. 3368 A router MUST be able to determine the link-local address for each of 3369 its neighboring routers in order to ensure that the target address in 3370 a Redirect message identifies the neighbor router by its link-local 3371 address. For static routing this requirement implies that the next- 3372 hop router's address should be specified using the link-local address 3373 of the router. For dynamic routing this requirement implies that all 3374 IPv6 routing protocols must somehow exchange the link-local addresses 3375 of neighboring routers. 3377 8.1. Validation of Redirect Messages 3379 A host MUST silently discard any received Redirect message that does 3380 not satisfy all of the following validity checks: 3382 - IP Source Address is a link-local address. Routers must use 3383 their link-local address as the source for Router Advertisement 3384 and Redirect messages so that hosts can uniquely identify 3385 routers. 3387 - The IP Hop Limit field has a value of 255, i.e., the packet 3388 could not possibly have been forwarded by a router. 3390 - ICMP Checksum is valid. 3392 - ICMP Code is 0. 3394 - ICMP length (derived from the IP length) is 40 or more octets. 3396 - The IP source address of the Redirect is the same as the current 3397 first-hop router for the specified ICMP Destination Address. 3399 - The ICMP Destination Address field in the redirect message does 3400 not contain a multicast address. 3402 - The ICMP Target Address is either a link-local address (when 3403 redirected to a router) or the same as the ICMP Destination 3404 Address (when redirected to the on-link destination). 3406 - All included options have a length that is greater than zero. 3408 The contents of the Reserved field, and of any unrecognized options 3409 MUST be ignored. Future, backward-compatible changes to the protocol 3410 may specify the contents of the Reserved field or add new options; 3411 backward-incompatible changes may use different Code values. 3413 The contents of any defined options that are not specified to be used 3414 with Redirect messages MUST be ignored and the packet processed as 3415 normal. The only defined options that may appear are the Target 3416 Link-Layer Address option and the Redirected Header option. 3418 A host MUST NOT consider a redirect invalid just because the Target 3419 Address of the redirect is not covered under one of the link's 3420 prefixes. Part of the semantics of the Redirect message is that the 3421 Target Address is on-link. 3423 A redirect that passes the validity checks is called a "valid 3424 redirect". 3426 8.2. Router Specification 3428 A router SHOULD send a redirect message, subject to rate limiting, 3429 whenever it forwards a packet that is not explicitly addressed to 3430 itself (i.e. a packet that is not source routed through the router) 3431 in which: 3433 - the Source Address field of the packet identifies a neighbor, 3434 and 3436 - the router determines (by means outside the scope of this 3437 specification) that a better first-hop node resides on 3438 the same link as the sending node for the Destination Address of 3439 the packet being forwarded, and 3441 - the Destination Address of the packet is not a multicast 3442 address 3444 The transmitted redirect packet contains, consistent with the message 3445 format given in Section 4.5: 3447 - In the Target Address field: the address to which subsequent 3448 packets for the destination SHOULD be sent. If the target is a 3449 router, that router's link-local address MUST be used. If the 3450 target is a host the target address field MUST be set to the 3451 same value as the Destination Address field. 3453 - In the Destination Address field: the destination address of the 3454 invoking IP packet. 3456 - In the options: 3458 o Target Link-Layer Address option: link-layer address of the 3459 target, if known. 3461 o Redirected Header: as much of the forwarded packet as can 3462 fit without the redirect packet exceeding the minimum MTU 3463 required to support IPv6 as specified in [IPv6]. 3465 A router MUST limit the rate at which Redirect messages are sent, in 3466 order to limit the bandwidth and processing costs incurred by the 3467 Redirect messages when the source does not correctly respond to the 3468 Redirects, or the source chooses to ignore unauthenticated Redirect 3469 messages. More details on the rate-limiting of ICMP error messages 3470 can be found in [ICMPv6]. 3472 A router MUST NOT update its routing tables upon receipt of a 3473 Redirect. 3475 8.3. Host Specification 3477 A host receiving a valid redirect SHOULD update its Destination Cache 3478 accordingly so that subsequent traffic goes to the specified target. 3479 If no Destination Cache entry exists for the destination, an 3480 implementation SHOULD create such an entry. 3482 If the redirect contains a Target Link-Layer Address option the host 3483 either creates or updates the Neighbor Cache entry for the target. 3484 In both cases the cached link-layer address is copied from the Target 3485 Link-Layer Address option. If a Neighbor Cache entry is created for 3486 the target its reachability state MUST be set to STALE as specified 3487 in Section 7.3.3. If a cache entry already existed and it is updated 3488 with a different link-layer address, its reachability state MUST also 3489 be set to STALE. If the link-layer address is the same as that 3490 already in the cache, the cache entry's state remains unchanged. 3492 If the Target and Destination Addresses are the same, the host MUST 3493 treat the Target as on-link. If the Target Address is not the same 3494 as the Destination Address, the host MUST set IsRouter to TRUE for 3495 the target. If the Target and Destination Addresses are the same, 3496 however, one cannot reliably determine whether the Target Address is 3497 a router. Consequently, newly created Neighbor Cache entries should 3498 set the IsRouter flag to FALSE, while existing cache entries should 3499 leave the flag unchanged. If the Target is a router, subsequent 3500 Neighbor Advertisement or Router Advertisement messages will update 3501 IsRouter accordingly. 3503 Redirect messages apply to all flows that are being sent to a given 3504 destination. That is, upon receipt of a Redirect for a Destination 3505 Address, all Destination Cache entries to that address should be 3506 updated to use the specified next-hop, regardless of the contents of 3507 the Flow Label field that appears in the Redirected Header option. 3509 A host MUST NOT send Redirect messages. 3511 9. EXTENSIBILITY - OPTION PROCESSING 3513 Options provide a mechanism for encoding variable length fields, 3514 fields that may appear multiple times in the same packet, or 3515 information that may not appear in all packets. Options can also be 3516 used to add additional functionality to future versions of ND. 3518 In order to ensure that future extensions properly coexist with 3519 current implementations, all nodes MUST silently ignore any options 3520 they do not recognize in received ND packets and continue processing 3521 the packet. All options specified in this document MUST be 3522 recognized. A node MUST NOT ignore valid options just because the ND 3523 message contains unrecognized ones. 3525 The current set of options is defined in such a way that receivers 3526 can process multiple options in the same packet independently of each 3527 other. In order to maintain these properties future options SHOULD 3528 follow the simple rule: 3530 The option MUST NOT depend on the presence or absence of any 3531 other options. The semantics of an option should depend only on 3532 the information in the fixed part of the ND packet and on the 3533 information contained in the option itself. 3535 Adhering to the above rule has the following benefits: 3537 1) Receivers can process options independently of one another. For 3538 example, an implementation can choose to process the Prefix 3539 Information option contained in a Router Advertisement message 3540 in a user-space process while the link-layer address option in 3541 the same message is processed by routines in the kernel. 3543 2) Should the number of options cause a packet to exceed a link's 3544 MTU, multiple packets can carry subsets of the options without 3545 any change in semantics. 3547 3) Senders MAY send a subset of options in different packets. For 3548 instance, if a prefix's Valid and Preferred Lifetime are high 3549 enough, it might not be necessary to include the Prefix 3550 Information option in every Router Advertisement. In addition, 3551 different routers might send different sets of options. Thus, a 3552 receiver MUST NOT associate any action with the absence of an 3553 option in a particular packet. This protocol specifies that 3554 receivers should only act on the expiration of timers and on the 3555 information that is received in the packets. 3557 Options in Neighbor Discovery packets can appear in any order; 3558 receivers MUST be prepared to process them independently of their 3559 order. There can also be multiple instances of the same option in a 3560 message (e.g., Prefix Information options). 3562 If the number of included options in a Router Advertisement causes 3563 the advertisement's size to exceed the link MTU, the router can send 3564 multiple separate advertisements each containing a subset of the 3565 options. 3567 The amount of data to include in the Redirected Header option MUST be 3568 limited so that the entire redirect packet does not exceed the 3569 minimum MTU required to support IPv6 as specified in [IPv6]. 3571 All options are a multiple of 8 octets of length, ensuring 3572 appropriate alignment without any "pad" options. The fields in the 3573 options (as well as the fields in ND packets) are defined to align on 3574 their natural boundaries (e.g., a 16-bit field is aligned on a 16-bit 3575 boundary) with the exception of the 128-bit IP addresses/prefixes, 3576 which are aligned on a 64-bit boundary. The link-layer address field 3577 contains an uninterpreted octet string; it is aligned on an 8-bit 3578 boundary. 3580 The size of an ND packet including the IP header is limited to the 3581 link MTU. When adding options to an ND packet a node MUST NOT exceed 3582 the link MTU. 3584 Future versions of this protocol may define new option types. 3585 Receivers MUST silently ignore any options they do not recognize and 3586 continue processing the message. 3588 10. PROTOCOL CONSTANTS 3590 Router constants: 3592 MAX_INITIAL_RTR_ADVERT_INTERVAL 16 seconds 3594 MAX_INITIAL_RTR_ADVERTISEMENTS 3 transmissions 3596 MAX_FINAL_RTR_ADVERTISEMENTS 3 transmissions 3598 MIN_DELAY_BETWEEN_RAS 3 seconds 3600 MAX_RA_DELAY_TIME .5 seconds 3602 Host constants: 3604 MAX_RTR_SOLICITATION_DELAY 1 second 3606 RTR_SOLICITATION_INTERVAL 4 seconds 3608 MAX_RTR_SOLICITATIONS 3 transmissions 3610 Node constants: 3612 MAX_MULTICAST_SOLICIT 3 transmissions 3614 MAX_UNICAST_SOLICIT 3 transmissions 3616 MAX_ANYCAST_DELAY_TIME 1 second 3618 MAX_NEIGHBOR_ADVERTISEMENT 3 transmissions 3620 REACHABLE_TIME 30,000 milliseconds 3622 RETRANS_TIMER 1,000 milliseconds 3624 DELAY_FIRST_PROBE_TIME 5 seconds 3626 MIN_RANDOM_FACTOR .5 3628 MAX_RANDOM_FACTOR 1.5 3630 Additional protocol constants are defined with the message formats in 3631 Section 4. 3633 All protocol constants are subject to change in future revisions of 3634 the protocol. 3636 The constants in this specification may be overridden by specific 3637 documents that describe how IPv6 operates over different link layers. 3638 This rule allows Neighbor Discovery to operate over links with widely 3639 varying performance characteristics. 3641 11. SECURITY CONSIDERATIONS 3643 Neighbor Discovery is subject to attacks that cause IP packets to 3644 flow to unexpected places. Such attacks can be used to cause denial 3645 of service but also allow nodes to intercept and optionally modify 3646 packets destined for other nodes. This section deals with the main 3647 threats related to Neighbor Discovery messages and possible security 3648 mechanisms that can mitigate these threats. 3650 11.1 Threat analysis 3652 This section discusses the main threats associated with Neighbor 3653 Discovery. A more detailed analysis can be found in [PSREQ]. The main 3654 vulnerabilities of the protocol fall under three categories: 3656 - Denial of Service (DoS) attacks. 3657 - Address spoofing attacks. 3658 - Router spoofing attacks. 3660 An example of denial of service attacks is that a node on the link 3661 that can send packets with an arbitrary IP source address can both 3662 advertise itself as a default router and also send "forged" Router 3663 Advertisement messages that immediately time out all other default 3664 routers as well as all on-link prefixes. An intruder can achieve 3665 this by sending out multiple Router Advertisements, one for each 3666 legitimate router, with the source address set to the address of 3667 another router, the Router Lifetime field set to zero, and the 3668 Preferred and Valid lifetimes set to zero for all the prefixes. Such 3669 an attack would cause all packets, for both on-link and off-link 3670 destinations, to go to the rogue router. That router can then 3671 selectively examine, modify or drop all packets sent on the link. The 3672 Neighbor Unreachability Detection (NUD) will not detect such a black 3673 hole as long as the rogue router politely answers the NUD probes with 3674 a Neighbor Advertisement with the R-bit set. 3676 It is also possible for any host to launch a DoS attack on another 3677 host by preventing it from configuring an address using [ADDRCONF]. 3678 The protocol does not allow hosts to verify whether the sender of a 3679 Neighbor Advertisement is the true owner of the IP address included 3680 in the message. 3682 Redirect attacks can also be achieved by any host in order to flood a 3683 victim or steal its traffic. A host can send a Neighbor advertisement 3684 (in response to a solicitation) that contains its IP address and a 3685 victim's link layer address in order to flood the victim with 3686 unwanted traffic. Alternatively, the host can send a Neighbor 3687 Advertisement that includes a victim's IP address and its own link 3688 layer address to overwrite an existing entry in the sender's 3689 destination cache, thereby forcing the sender to forward all of the 3690 victim's traffic to itself. 3692 The trust model for redirects is the same as in IPv4. A redirect is 3693 accepted only if received from the same router that is currently 3694 being used for that destination. If a host has been redirected to 3695 another node (i.e., the destination is on-link) there is no way to 3696 prevent the target from issuing another redirect to some other 3697 destination. However, this exposure is no worse than it was before 3698 being redirected; the target host, once subverted, could always act 3699 as a hidden router to forward traffic elsewhere. 3701 The protocol contains no mechanism to determine which neighbors are 3702 authorized to send a particular type of message (e.g., Router 3703 Advertisements); any neighbor, presumably even in the presence of 3704 authentication, can send Router Advertisement messages thereby being 3705 able to cause denial of service. Furthermore, any neighbor can send 3706 proxy Neighbor Advertisements as well as unsolicited Neighbor 3707 Advertisements as a potential denial of service attack. 3709 Many link layers are also subject to different denial of service 3710 attacks such as continuously occupying the link in CSMA/CD networks 3711 (e.g., by sending packets closely back-to-back or asserting the 3712 collision signal on the link), or originating packets with somebody 3713 else's source MAC address to confuse, e.g., Ethernet switches. On the 3714 other hand, many of the threats discussed in this section are less 3715 effective, or non-existent, on point-to-point links, or cellular 3716 links where a host shares a link with only one neighbor, i.e. the 3717 default router. 3719 11.2 Securing Neighbor Discovery messages 3721 The protocol reduces the exposure to the above threats in the absence 3722 of authentication by ignoring ND packets received from off-link 3723 senders. The Hop Limit field of all received packets is verified to 3724 contain 255, the maximum legal value. Because routers decrement the 3725 Hop Limit on all packets they forward, received packets containing a 3726 Hop Limit of 255 must have originated from a neighbor. 3728 In order to allow for IP layer authentication, a mechanism is 3729 required to allow for dynamic keying between neighbors. The use of 3730 the Internet Key Exchange [ICMPIKE] is not suited for creating 3731 dynamic security associations that can be used to secure address 3732 resolution or neighbor solicitation messages as documented in 3733 [ICMPIKE]. The security of Neighbor Discovery messages through 3734 dynamic keying is outside the scope of this document and is addressed 3735 in [SEND]. 3737 In some cases, it may be acceptable to use statically configured 3738 security associations with either [IPv6-AH] or [IPv6-ESP] to secure 3739 Neighbor Discovery messages. However, it is important to note that 3740 statically configured security associations are not scalable 3741 (especially when considering multicast links) and are therefore 3742 limited to small networks with known hosts. In any case, if either 3743 [IPv6-AH] or [IPv6-ESP] is used, ND packets MUST be verified for the 3744 purpose of authentication. Packets that fail authentication checks 3745 MUST be silently discarded. 3747 12. RENUMBERING CONSIDERATIONS 3749 The Neighbor Discovery protocol together with IPv6 Address 3750 Autoconfiguration [ADDRCONF] provides mechanisms to aid in 3751 renumbering - new prefixes and addresses can be introduced and old 3752 ones can be deprecated and removed. 3754 The robustness of these mechanisms is based on all the nodes on the 3755 link receiving the Router Advertisement messages in a timely manner. 3756 However, a host might be turned off or be unreachable for an extended 3757 period of time (i.e., a machine is powered down for months after a 3758 project terminates). It is possible to preserve robust renumbering 3759 in such cases but it does place some constraints on how long prefixes 3760 must be advertised. 3762 Consider the following example in which a prefix is initially 3763 advertised with a lifetime of 2 months, but on August 1st it is 3764 determined that the prefix needs to be deprecated and removed due to 3765 renumbering by September 1st. This can be done by reducing the 3766 advertised lifetime to 1 week starting on August 1st and as the 3767 cutoff gets closer the lifetimes can be made shorter until by 3768 September 1st the prefix is advertised with a zero lifetime. The 3769 point is that, if one or more nodes were unplugged from the link 3770 prior to September 1st they might still think that the prefix is 3771 valid since the last lifetime they received was 2 months. Thus if a 3772 node was unplugged on July 31st it thinks the prefix is valid until 3773 September 30th. If that node is plugged back in prior to September 3774 30th it may continue to use the old prefix. The only way to force a 3775 node to stop using a prefix that was previously advertised with a 3776 long Lifetime is to have that node receive an advertisement for that 3777 prefix that changes the lifetime downward. The solution in this 3778 example is simple: continue advertising the prefix with a lifetime of 3779 0 from September 1st until October 1st. 3781 In general, in order to be robust against nodes that might be 3782 unplugged from the link it is important to track the furthest into 3783 the future a particular prefix can be viewed valid by any node on the 3784 link. The prefix must then be advertised with a 0 Lifetime until 3785 that point in future. This "furthest into the future" time is simply 3786 the maximum, over all Router Advertisements, of the time the 3787 advertisement was sent plus the prefix's Lifetime contained in the 3788 advertisement. 3790 The above has an important implication on using infinite lifetimes. 3792 If a prefix is advertised with an infinite lifetime, and that prefix 3793 later needs to be renumbered, it is undesirable to continue 3794 advertising that prefix with a zero lifetime forever. Thus either 3795 infinite lifetimes should be avoided or there must be a limit on how 3796 long time a node can be unplugged from the link before it is plugged 3797 back in again. However, it is unclear how the network administrator 3798 can enforce a limit on how long time hosts such as laptops can be 3799 unplugged from the link. 3801 Network administrators should give serious consideration to using 3802 relatively short lifetimes (i.e., no more than a few weeks). While 3803 it might appear that using long lifetimes would help insure 3804 robustness, in reality a host will be unable to communicate in the 3805 absence of properly functioning routers. Such routers will be 3806 sending Router Advertisements that contain appropriate (and current) 3807 prefixes. A host connected to a network that has no functioning 3808 routers is likely to have more serious problems than just a lack of a 3809 valid prefix and address. 3811 The above discussion does not distinguish between the preferred and 3812 valid lifetimes. For all practical purposes it is probably 3813 sufficient to track the valid lifetime since the preferred lifetime 3814 will not exceed the valid lifetime. 3816 REFERENCES 3818 NORMATIVE 3820 [ADDR-ARCH] Hinden, R. and S. Deering, "IP Version 6 Addressing 3821 Architecture", RFC 3513, April 2003. 3823 [ICMPv6] Conta, A. and S. Deering, "Internet Control Message 3824 Protocol (ICMPv6) for the Internet Protocol Version 6 3825 (IPv6) Specification", RFC 2463, December 1998. 3827 [IPv6] Deering, S. and R. Hinden, "Internet Protocol, Version 6 3828 (IPv6) Specification", RFC 2460, December 1998. 3830 [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate 3831 Requirement Levels", BCP 14, RFC 2119, March 1997. 3833 INFORMATIVE 3835 [ADDRCONF] Thomson, S. Narten, T, and T. Jinmei, "IPv6 Address 3836 Autoconfiguration", draft-ietf-ipv6-rfc2462bis-08, May 3837 2005. 3839 [ADDR-SEL] Draves, R., "Default Address Selection for Internet 3840 Protocol version 6 (IPv6)", RFC 3484, February 2003. 3842 [ANYCST] Partridge, C., Mendez, T. and W. Milliken, "Host 3843 Anycasting Service", RFC 1546, November 1993. 3845 [ARP] Plummer, D., "An Ethernet Address Resolution Protocol", 3846 STD 37, RFC 826, November 1982. 3848 [ASSIGNED] Reynolds, J., "Assigned Numbers: RFC 1700 is Replaced by 3849 an On-line Database", RFC 3232, January 2002. 3851 [DHCPv6] Droms, R., Ed, "Dynamic Host Configuration Protocol for 3852 IPv6 (DHCPv6)", RFC 3315, July 2003. 3854 [DHCPv6lite] Droms, R., "Stateless Dynamic Host Configuration 3855 Protocol (DHCP)for IPv6", RFC 3736, April 2004. 3857 [HR-CL] Braden, R., Editor, "Requirements for Internet Hosts -- 3858 Communication Layers", STD 3, RFC 1122, October 1989. 3860 [ICMPIKE] Arkko, J., "Effects of ICMPv6 on IKE", 3861 draft-arkko-icmpv6-ike-effects-02 (work in progress), 3862 March 2003. 3864 [ICMPv4] Postel, J., "Internet Control Message Protocol", STD 5, 3865 RFC 792, September 1981. 3867 [IPv6-3GPP] Wasserman, M., Ed, "Recommendations for IPv6 in Third 3868 Generation Partnership Project (3GPP) standards", RFC 3869 3314, September 2002. 3871 [IPv6-CELL] Arkko, J., Kuipers, G., Soliman, H., Loughney, J. and J. 3872 Wiljakka, " Internet Protocol version 6 (IPv6) for Some 3873 Second and Third Generation Cellular Hosts", RFC 3316, 3874 April 2003. 3876 [IPv6-ETHER] Crawford, M., "Transmission of IPv6 Packets over 3877 Ethernet Networks", RFC 2464, December 1998. 3879 [IPv6-NBMA] Armitage, G., Schulter, P., Jork, M. and G. Harter, " 3880 IPv6 over Non-broadcast Multiple Access (NBMA) 3881 networks", RFC 2491, January 1999. 3883 [IPv6-SA] Kent, S. and R. Atkinson, "Security Architecture for the 3884 Internet Protocol", RFC 2401, November 1998. 3886 [IPv6-AUTH] Kent, S. and R. Atkinson, "IP Authentication Header", 3887 RFC 2402, November 1998. 3889 [IPv6-ESP] Kent, S. and R. Atkinson, "IP Encapsulating Security 3890 Payload (ESP)", RFC 2406, November 1998. 3892 [MIPv6] D. Johnson, C. Perkins and J. Arkko, "Mobility Support 3893 in IPv6", RFC 3775, June 2004. 3895 [MLD] Deering, S., Fenner, W, and B. Haberman, "Multicast 3896 Listener Discovery for IPv6", RFC 2710, October 1999. 3898 [MLDv2] Vida, R. and L. Costa, "Multicast Listener Discovery 3899 Version 2 (MLDv2) for IPv6", RFC 3810, June 2004. 3901 [NDMAN] Arkko, J., "Manual Configuration of Security 3902 Associations for IPv6 Neighbor Discovery", draft-arkko- 3903 manual-icmpv6-sas-02 (work in progress), March 2003. 3905 [RDISC] Deering, S., "ICMP Router Discovery Messages", RFC 1256, 3906 September 1991. 3908 [RFC3667] Bradner, S., "IETF Rights in Contributions", RFC 3667, 3909 February 2004. 3911 [RTSEL] Draves, R. and D. Thaler, "Default Router Preferences 3912 and more Specific Routes", draft-ietf-ipv6-router- 3913 selection-07, (work in progress), January 2005. 3915 [SH-MEDIA] Braden, R., Postel, J. and Y. Rekhter, "Internet 3916 Architecture Extensions for Shared Media", RFC 1620, May 3917 1994. 3919 [SEND] Arkko, J., Kempf, J., Sommerfeld, B., Zill, B. and P. 3920 Nikander, "SEcure Neighbor Discovery (SEND)", 3921 draft-ietf-send-ndopt-04 (work in progress), 3922 February 2004. 3924 [SYNC] S. Floyd, V. Jacobson, "The Synchronization of Periodic 3925 Routing Messages", IEEE/ACM Transactions on Networking, 3926 April 1994. ftp://ftp.ee.lbl.gov/papers/sync_94.ps.Z 3928 IANA CONSIDERATIONS 3930 This document does not require any new ICMPv6 types or codes to be 3931 allocated. However, existing ICMPv6 types should be updated to point 3932 to the document instead of RFC 2461. The procedure for the assignment 3933 of ICMPv6 types/codes is described in Section 6 of [ICMPv6]. 3935 This document continues to use the following ICMPv6 message types 3936 introduced in RFC 2461 and already assigned by IANA: 3938 Message name ICMPv6 Type 3940 Router Solicitation 133 3941 Router Advertisement 134 3942 Neighbor Solicitation 135 3943 Neighbor Advertisement 136 3944 Redirect 137 3946 This document continues to use the following Neighbor Discovery 3947 option types introduced in RFC 2461 and already assigned by IANA: 3949 Option Name Type 3951 Source Link-Layer Address 1 3952 Target Link-Layer Address 2 3953 Prefix Information 3 3954 Redirected Header 4 3955 MTU 5 3957 Neighbor Discovery option types are allocated using following 3958 procedure: 3960 1. The IANA should allocate and permanently register new option types 3961 from IETF RFC publication. This is for all RFC types 3962 including standards track, informational, and experimental status 3963 that originate from the IETF and have been approved by the IESG 3964 for publication. 3966 2. IETF working groups with working group consensus and area director 3967 approval can request reclaimable Neighbor Discovery option type 3968 assignments from the IANA. The IANA will tag the values as 3969 "reclaimable in future". 3971 The "reclaimable in the future" tag will be removed when an RFC is 3972 published documenting the protocol as defined in 1). This will 3973 make the assignment permanent and update the reference on the IANA 3974 web pages. 3976 At the point where the option type values are 85% assigned, the 3977 IETF will review the assignments tagged "reclaimable in the 3978 future" and inform the IANA which ones should be reclaimed and 3979 reassigned. 3981 3. Requests for new option type value assignments from outside the 3982 IETF are only made through the publication of an IETF document, 3983 per 1) above. Note also that documents published as "RFC Editor 3984 contributions" [RFC 3667] are not considered to be IETF documents. 3986 Authors' Addresses 3988 Thomas Narten 3989 IBM Corporation 3990 P.O. Box 12195 3991 Research Triangle Park, NC 27709-2195 3992 USA 3994 Phone: +1 919 254 7798 3995 EMail: narten@raleigh.ibm.com 3997 Erik Nordmark 3998 Sun Microsystems, Inc. 3999 901 San Antonio Road 4000 Palo Alto, CA 94303 4001 USA 4003 Phone: +1 650 786 5166 4004 Fax: +1 650 786 5896 4005 EMail: nordmark@sun.com 4007 William Allen Simpson 4008 Daydreamer 4009 Computer Systems Consulting Services 4010 1384 Fontaine 4011 Madison Heights, Michigan 48071 4012 USA 4014 EMail: Bill.Simpson@um.cc.umich.edu 4015 bsimpson@MorningStar.com 4017 Hesham Soliman 4018 Flarion Technologies 4019 Phone: +1 908 997 9775 4020 Email: H.Soliman@flarion.com 4022 APPENDIX A: MULTIHOMED HOSTS 4024 There are a number of complicating issues that arise when Neighbor 4025 Discovery is used by hosts that have multiple interfaces. This 4026 section does not attempt to define the proper operation of multihomed 4027 hosts with regard to Neighbor Discovery. Rather, it identifies 4028 issues that require further study. Implementors are encouraged to 4029 experiment with various approaches to making Neighbor Discovery work 4030 on multihomed hosts and to report their experiences. Further work 4031 related to this problem can be found in [RTSEL]. 4033 If a multihomed host receives Router Advertisements on all of its 4034 interfaces, it will (probably) have learned on-link prefixes for the 4035 addresses residing on each link. When a packet must be sent through 4036 a router, however, selecting the "wrong" router can result in a 4037 suboptimal or non-functioning path. There are number of issues to 4038 consider: 4040 1) In order for a router to send a redirect, it must determine that 4041 the packet it is forwarding originates from a neighbor. The 4042 standard test for this case is to compare the source address of 4043 the packet to the list of on-link prefixes associated with the 4044 interface on which the packet was received. If the originating 4045 host is multihomed, however, the source address it uses may 4046 belong to an interface other than the interface from which it 4047 was sent. In such cases, a router will not send redirects, and 4048 suboptimal routing is likely. In order to be redirected, the 4049 sending host must always send packets out the interface 4050 corresponding to the outgoing packet's source address. Note 4051 that this issue never arises with non-multihomed hosts; they 4052 only have one interface. 4054 2) If the selected first-hop router does not have a route at all 4055 for the destination, it will be unable to deliver the packet. 4056 However, the destination may be reachable through a router on 4057 one of the other interfaces. Neighbor Discovery does not 4058 address this scenario; it does not arise in the non-multihomed 4059 case. 4061 3) Even if the first-hop router does have a route for a 4062 destination, there may be a better route via another interface. 4063 No mechanism exists for the multihomed host to detect this 4064 situation. 4066 If a multihomed host fails to receive Router Advertisements on one or 4067 more of its interfaces, it will not know (in the absence of 4068 configured information) which destinations are on-link on the 4069 affected interface(s). This leads to the following problem: If Router 4070 Advertisements are received on some, but not all interfaces, a 4071 multihomed host could choose to only send packets out on the 4072 interfaces on which it has received Router Advertisements. A key 4073 assumption made here, however, is that routers on those other 4074 interfaces will be able to route packets to the ultimate destination, 4075 even when those destinations reside on the subnet to which the sender 4076 connects, but has no on-link prefix information. Should the 4077 assumption be FALSE, communication would fail. Even if the assumption 4078 holds, packets will traverse a sub-optimal path. 4080 APPENDIX B: FUTURE EXTENSIONS 4082 Possible extensions for future study are: 4084 o Using dynamic timers to be able to adapt to links with widely 4085 varying delay. Measuring round trip times, however, requires 4086 acknowledgments and sequence numbers in order to match received 4087 Neighbor Advertisements with the actual Neighbor Solicitation that 4088 triggered the advertisement. Implementors wishing to experiment 4089 with such a facility could do so in a backwards-compatible way by 4090 defining a new option carrying the necessary information. Nodes 4091 not understanding the option would simply ignore it. 4093 o Adding capabilities to facilitate the operation over links that 4094 currently require hosts to register with an address resolution 4095 server. This could for instance enable routers to ask hosts to 4096 send them periodic unsolicited advertisements. Once again this 4097 can be added using a new option sent in the Router Advertisements. 4099 o Adding additional procedures for links where asymmetric and non- 4100 transitive reachability is part of normal operations. Such 4101 procedures might allow hosts and routers to find usable paths on, 4102 e.g., radio links. 4104 APPENDIX C: STATE MACHINE FOR THE REACHABILITY STATE 4106 This appendix contains a summary of the rules specified in Sections 4107 7.2 and 7.3. This document does not mandate that implementations 4108 adhere to this model as long as their external behavior is consistent 4109 with that described in this document. 4111 When performing address resolution and Neighbor Unreachability 4112 Detection the following state transitions apply using the conceptual 4113 model: 4115 State Event Action New state 4117 - Packet to send. Create entry. INCOMPLETE 4118 Send multicast NS. 4119 Start retransmit timer 4121 INCOMPLETE Retransmit timeout, Retransmit NS INCOMPLETE 4122 less than N Start retransmit 4123 retransmissions. timer 4125 INCOMPLETE Retransmit timeout, Discard entry - 4126 N or more Send ICMP error 4127 retransmissions. 4129 INCOMPLETE NA, Solicited=0, Record link-layer STALE 4130 Override=any address. Send queued 4131 packets. 4133 INCOMPLETE NA, Solicited=1, Record link-layer REACHABLE 4134 Override=any address. Send queued 4135 packets. 4137 INCOMPLETE NA, Solicited=any, Update content of unchanged 4138 Override=any, No IsRouter flag 4139 Link-layer address 4141 - NS, RS, Redirect - - 4142 No link layer address 4144 !INCOMPLETE NA, Solicited=1, - REACHABLE 4145 Override=0 4146 Same link-layer 4147 address as cached. 4149 !INCOMPLETE NA, Solicited=any, Update content of unchanged 4150 Override=any, No IsRouter flag. 4151 link-layer address 4153 REACHABLE NA, Solicited=1, - STALE 4154 Override=0 4155 Different link-layer 4156 address than cached. 4158 STALE, PROBE NA, Solicited=1, - unchanged 4159 Or DELAY Override=0 4160 Different link-layer 4161 address than cached. 4163 !INCOMPLETE NA, Solicited=1, Record link-layer REACHABLE 4164 Override=1 address (if 4165 different). 4167 !INCOMPLETE NA, Solicited=0, - unchanged 4168 Override=0 4170 !INCOMPLETE NA, Solicited=0, - unchanged 4171 Override=1 4172 Same link-layer 4173 address as cached. 4175 !INCOMPLETE NA, Solicited=0, Record link-layer STALE 4176 Override=1 address. 4177 Different link-layer 4178 address than cached. 4180 !INCOMPLETE upper-layer reachability - REACHABLE 4181 confirmation 4183 REACHABLE timeout, more than - STALE 4184 N seconds since 4185 reachability confirm. 4187 STALE Sending packet Start delay timer DELAY 4189 DELAY Delay timeout Send unicast NS probe PROBE 4190 Start retransmit timer 4192 PROBE Retransmit timeout, Retransmit NS PROBE 4193 less than N 4194 retransmissions. 4196 PROBE Retransmit timeout, Discard entry - 4197 N or more 4198 retransmissions. 4200 The state transitions for receiving unsolicited information other 4201 than Neighbor Advertisement messages apply to either the source of 4202 the packet (for Neighbor Solicitation, Router Solicitation, and 4203 Router Advertisement messages) or the target address (for Redirect 4204 messages) as follows: 4206 State Event Action New state 4208 - NS, RS, RA, Redirect Create entry. STALE 4210 INCOMPLETE NS, RS, RA, Redirect Record link-layer STALE 4211 address. Send queued 4212 packets. 4214 !INCOMPLETE NS, RS, RA, Redirect Update link-layer STALE 4215 Different link-layer address 4216 address than cached. 4218 INCOMPLETE NS, RS No link-layer - unchanged 4219 address 4221 !INCOMPLETE NS, RS, RA, Redirect - unchanged 4222 Same link-layer 4223 address as cached. 4225 APPENDIX D: SUMMARY OF ISROUTER RULES 4227 This appendix presents a summary of the rules for maintaining the 4228 IsRouter flag as specified in this document. 4230 The background for these rules is that the ND messages contain, 4231 either implicitly or explicitly, information that indicates whether 4232 or not the sender (or Target Address) is a host or a router. The 4233 following assumptions are used: 4235 - The sender of a Router Solicitation is implicitly assumed to be a 4236 host since there is no need for routers to send such messages. 4238 - The sender of a Router Advertisement is implicitly assumed to be a 4239 router. 4241 - Neighbor Solicitation messages do not contain either an implicit 4242 or explicit indication about the sender. Both hosts and routers 4243 send such messages. 4245 - Neighbor Advertisement messages contain an explicit "IsRouter 4246 flag", the R-bit. 4248 - The target of the redirect, when the target differs from the 4249 destination address in the packet being redirected, is implicitly 4250 assumed to be a router. This is a natural assumption since that 4251 node is expected to be able to forward the packets towards the 4252 destination. 4254 - The target of the redirect, when the target is the same as the 4255 destination, does not carry any host vs. router information. All 4256 that is known is that the destination (i.e. target) is on-link but 4257 it could be either a host or a router. 4259 The rules for setting the IsRouter flag are based on the information 4260 content above. If an ND message contains explicit or implicit 4261 information the receipt of the message will cause the IsRouter flag 4262 to be updated. But when there is no host vs. router information in 4263 the ND message the receipt of the message MUST NOT cause a change to 4264 the IsRouter state. When the receipt of such a message causes a 4265 Neighbor Cache entry to be created this document specifies that the 4266 IsRouter flag be set to FALSE. There is greater potential for 4267 mischief when a node incorrectly thinks a host is a router, than the 4268 other way around. In these cases a subsequent Neighbor Advertisement 4269 or Router Advertisement message will set the correct IsRouter value. 4271 APPENDIX E: IMPLEMENTATION ISSUES 4273 Appendix E.1: Reachability confirmations 4275 Neighbor Unreachability Detection requires explicit confirmation that 4276 a forward-path is functioning properly. To avoid the need for 4277 Neighbor Solicitation probe messages, upper layer protocols should 4278 provide such an indication when the cost of doing so is small. 4279 Reliable connection-oriented protocols such as TCP are generally 4280 aware when the forward-path is working. When TCP sends (or receives) 4281 data, for instance, it updates its window sequence numbers, sets and 4282 cancels retransmit timers, etc. Specific scenarios that usually 4283 indicate a properly functioning forward-path include: 4285 - Receipt of an acknowledgement that covers a sequence number (e.g., 4286 data) not previously acknowledged indicates that the forward path 4287 was working at the time the data was sent. 4289 - Completion of the initial three-way handshake is a special case of 4290 the previous rule; although no data is sent during the handshake, 4291 the SYN flags are counted as data from the sequence number 4292 perspective. This applies to both the SYN+ACK for the active open 4293 the ACK of that packet on the passively opening peer. 4295 - Receipt of new data (i.e., data not previously received) indicates 4296 that the forward-path was working at the time an acknowledgement 4297 was sent that advanced the peer's send window that allowed the new 4298 data to be sent. 4300 To minimize the cost of communicating reachability information 4301 between the TCP and IP layers, an implementation may wish to rate- 4302 limit the reachability confirmations its sends IP. One possibility 4303 is to process reachability only every few packets. For example, one 4304 might update reachability information once per round trip time, if an 4305 implementation only has one round trip timer per connection. For 4306 those implementations that cache Destination Cache entries within 4307 control blocks, it may be possible to update the Neighbor Cache entry 4308 directly (i.e., without an expensive lookup) once the TCP packet has 4309 been demultiplexed to its corresponding control block. For other 4310 implementation it may be possible to piggyback the reachability 4311 confirmation on the next packet submitted to IP assuming that the 4312 implementation guards against the piggybacked confirmation becoming 4313 stale when no packets are sent to IP for an extended period of time. 4315 TCP must also guard against thinking "stale" information indicates 4316 current reachability. For example, new data received 30 minutes 4317 after a window has opened up does not constitute a confirmation that 4318 the path is currently working. It merely indicates that 30 minutes 4319 ago the window update reached the peer i.e. the path was working at 4320 that point in time. An implementation must also take into account 4321 TCP zero-window probes that are sent even if the path is broken and 4322 the window update did not reach the peer. 4324 For UDP based applications (RPC, DNS) it is relatively simple to make 4325 the client send reachability confirmations when the response packet 4326 is received. It is more difficult and in some cases impossible for 4327 the server to generate such confirmations since there is no flow 4328 control, i.e., the server can not determine whether a received 4329 request indicates that a previous response reached the client. 4331 Note that an implementation can not use negative upper-layer advise 4332 as a replacement for the Neighbor Unreachability Detection algorithm. 4333 Negative advise (e.g. from TCP when there are excessive 4334 retransmissions) could serve as a hint that the forward path from the 4335 sender of the data might not be working. But it would fail to detect 4336 when the path from the receiver of the data is not functioning 4337 causing, none of the acknowledgement packets to reach the sender. 4339 APPENDIX F: CHANGES FROM RFC 2461 4341 o Removed all references to IPsec AH and ESP for securing messages 4342 or as part of validating the received message. 4344 o Added section 3.3. 4346 o Updated section 11 to include more detailed discussion on threats, 4347 IPsec limitations, and use of SeND. 4349 o Removed the on-link assumption in section 5.2 based on 4350 draft-ietf-v6ops-onlinkassumption 4352 o Clarified the definition of the Router Lifetime field in section 4353 4.2. 4355 o Updated the text in section 4.6.2 and 6.2.1 to indicate that the 4356 preferred lifetime must not be larger than valid lifetime. 4358 o Removed the reference to stateful configuration and added 4359 reference for DHCPv6 instead. 4361 o Added the IsRouter flag definition to section 6.2.1 to allow for 4362 mixed host/router behavior. 4364 o Allowed mobile nodes to be exempt from adding random delays before 4365 sending an RS during a handover. 4367 o Updated the definition of the prefix length in the prefix option 4369 o Updated the applicability to NBMA links in the introduction and 4370 added references to 3GPP RFCs. 4372 o Clarified support for Load balancing is limited to routers. 4374 o Clarified router behaviour when receiving a Router Solicitation 4375 without SLLAO. 4377 o Clarified that inconsistency checks for CurHopLimit are done for 4378 none zero values only. 4380 o Rearranged section 7.2.5 for clarity and described the processing 4381 when receiving the NA in INCOMPLETE state. 4383 o Added clarifications in section 7.2 on how a node should react 4384 upon receiving a message without SLLAO. 4386 O Added New IANA section. 4388 o Miscellaneous editorials. 4390 Intellectual Property Statement 4392 The IETF takes no position regarding the validity or scope of any 4393 Intellectual Property Rights or other rights that might be claimed to 4394 pertain to the implementation or use of the technology described in 4395 this document or the extent to which any license under such rights 4396 might or might not be available; nor does it represent that it has 4397 made any independent effort to identify any such rights. Information 4398 on the IETF's procedures with respect to rights in IETF Documents can 4399 be found in RFC 3667 (BCP 78) and RFC 3668 (BCP 79). 4401 Copies of IPR disclosures made to the IETF Secretariat and any 4402 assurances of licenses to be made available, or the result of an 4403 attempt made to obtain a general license or permission for the use of 4404 such proprietary rights by implementers or users of this 4405 specification can be obtained from the IETF on-line IPR repository at 4406 http://www.ietf.org/ipr. 4408 The IETF invites any interested party to bring to its attention any 4409 copyrights, patents or patent applications, or other proprietary 4410 rights that may cover technology that may be required to implement 4411 this standard. Please address the information to the IETF at ietf- 4412 ipr@ietf.org. 4414 Full Copyright Statement 4416 Copyright (C) The Internet Society (2006). This document is subject 4417 to the rights, licenses and restrictions contained in BCP 78, and 4418 except as set forth therein, the authors retain all their rights. 4420 Disclaimer of Validity 4422 This document and the information contained herein are provided on an 4423 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 4424 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET 4425 ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, 4426 INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE 4427 INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 4428 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 4430 This Internet-Draft expires January, 2006.