idnits 2.17.1 draft-ietf-ipv6-2461bis-02.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.5 on line 4354. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 4332. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 4338. ** The document seems to lack an RFC 3978 Section 5.1 IPR Disclosure Acknowledgement -- however, there's a paragraph with a matching beginning. Boilerplate error? ** 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 4149 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). -- 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 173, but not defined == Missing Reference: 'PSREQ' is mentioned on line 3653, but not defined == Missing Reference: 'IPv6-AH' is mentioned on line 3739, but not defined == Unused Reference: 'ANYCST' is defined on line 3836, but no explicit reference was found in the text == Unused Reference: 'IPv6-CELL' is defined on line 3865, but no explicit reference was found in the text == Unused Reference: 'IPv6-NBMA' is defined on line 3873, but no explicit reference was found in the text == Unused Reference: 'IPv6-SA' is defined on line 3877, but no explicit reference was found in the text == Unused Reference: 'IPv6-AUTH' is defined on line 3880, but no explicit reference was found in the text == Unused Reference: 'NDMAN' is defined on line 3892, 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) == Outdated reference: A later version (-08) exists of draft-ietf-ipv6-rfc2462bis-07 -- 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) == Outdated reference: A later version (-06) exists of draft-ietf-send-ndopt-04 Summary: 10 errors (**), 0 flaws (~~), 16 warnings (==), 12 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 INTERNET-DRAFT T. Narten, 3 Expires: August 2005 IBM 4 E. Nordmark, 5 Sun Microsystems 6 W. Simpson, 7 Daydreamer 8 H. Soliman, 9 Flarion 10 February, 2005 12 Neighbor Discovery for IP version 6 (IPv6) 13 15 Status of this memo 17 By submitting this Internet-Draft, we certify that any applicable 18 patent or other IPR claims of which we are aware have been disclosed, 19 and any of which we become aware will be disclosed, in accordance 20 with RFC 3668 (BCP 79). 22 By submitting this Internet-Draft, we accept the provisions of 23 Section 4 of RFC 3667 (BCP 78). 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF), its areas, and its working groups. Note that other 27 groups may also distribute working documents as Internet-Drafts. 29 Internet-Drafts are draft documents valid for a maximum of six months 30 and may be updated, replaced, or obsoleted by other documents at any 31 time. It is inappropriate to use Internet-Drafts as reference 32 material or cite them other than as "work in progress". 34 The list of current Internet-Drafts can be accessed at 35 http://www.ietf.org/ietf/lid-abstracts.txt 37 The list of Internet-Draft Shadow Directories can be accessed at 38 http://www.ietf.org/shadow.html 40 This document is a submission of the IETF IPv6 WG. Comments should be 41 directed to the IPv6 WG mailing list, ipv6@ietf.org. 43 Abstract 45 This document specifies the Neighbor Discovery protocol for IP 46 Version 6. IPv6 nodes on the same link use Neighbor Discovery to 47 discover each other's presence, to determine each other's link-layer 48 addresses, to find routers and to maintain reachability information 49 about the paths to active neighbors. 51 Table of Contents 53 1. INTRODUCTION....................................................4 55 2. TERMINOLOGY.....................................................4 56 2.1. General...................................................4 57 2.2. Link Types................................................8 58 2.3. Addresses.................................................9 59 2.4. Requirements..............................................9 61 3. PROTOCOL OVERVIEW..............................................10 62 3.1. Comparison with IPv4.....................................13 63 3.2. Supported Link Types.....................................15 64 3.3. Securing Neighbor Discovery messages......................17 66 4. MESSAGE FORMATS................................................17 67 4.1. Router Solicitation Message Format.......................17 68 4.2. Router Advertisement Message Format......................18 69 4.3. Neighbor Solicitation Message Format.....................20 70 4.4. Neighbor Advertisement Message Format....................22 71 4.5. Redirect Message Format..................................24 72 4.6. Option Formats...........................................26 73 4.6.2. Prefix Information.................................27 74 4.6.3. Redirected Header..................................29 75 4.6.4. MTU................................................30 77 5. CONCEPTUAL MODEL OF A HOST.....................................31 78 5.1. Conceptual Data Structures...............................31 79 5.2. Conceptual Sending Algorithm.............................33 80 5.3. Garbage Collection and Timeout Requirements..............34 82 6. ROUTER AND PREFIX DISCOVERY....................................35 83 6.1. Message Validation.......................................36 84 6.1.1. Validation of Router Solicitation Messages.........36 85 6.1.2. Validation of Router Advertisement Messages........36 86 6.2. Router Specification.....................................37 87 6.2.1. Router Configuration Variables....................37 88 6.2.2. Becoming An Advertising Interface.................41 89 6.2.3. Router Advertisement Message Content..............41 90 6.2.4. Sending Unsolicited Router Advertisements.........43 91 6.2.5. Ceasing To Be An Advertising Interface............43 92 6.2.6. Processing Router Solicitations...................44 93 6.2.7. Router Advertisement Consistency..................45 94 6.2.8. Link-local Address Change.........................46 95 6.3. Host Specification.......................................47 96 6.3.1. Host Configuration Variables......................47 97 6.3.2. Host Variables....................................47 98 6.3.3. Interface Initialization..........................48 99 6.3.4. Processing Received Router Advertisements.........48 100 6.3.5. Timing out Prefixes and Default Routers...........51 101 6.3.6. Default Router Selection..........................51 102 6.3.7. Sending Router Solicitations......................52 104 7. ADDRESS RESOLUTION AND NEIGHBOR UNREACHABILITY DETECTION.......53 105 7.1. Message Validation.......................................54 106 7.1.1. Validation of Neighbor Solicitations..............54 107 7.1.2. Validation of Neighbor Advertisements.............54 108 7.2. Address Resolution.......................................55 109 7.2.1. Interface Initialization..........................55 110 7.2.2. Sending Neighbor Solicitations....................56 111 7.2.3. Receipt of Neighbor Solicitations.................57 112 7.2.4. Sending Solicited Neighbor Advertisements.........58 113 7.2.5. Receipt of Neighbor Advertisements................58 114 7.2.6. Sending Unsolicited Neighbor Advertisements.......60 115 7.2.7. Anycast Neighbor Advertisements...................61 116 7.2.8. Proxy Neighbor Advertisements.....................62 117 7.3. Neighbor Unreachability Detection........................62 118 7.3.1. Reachability Confirmation.........................63 119 7.3.2. Neighbor Cache Entry States.......................64 120 7.3.3. Node Behavior.....................................65 122 8. REDIRECT FUNCTION..............................................67 123 8.1. Validation of Redirect Messages..........................67 124 8.2. Router Specification.....................................68 125 8.3. Host Specification.......................................69 127 9. EXTENSIBILITY - OPTION PROCESSING..............................70 129 10. PROTOCOL CONSTANTS............................................71 131 11. SECURITY CONSIDERATIONS.......................................72 132 11.1 Threat analysis...........................................72 133 11.2 Securing Neighbor Discovery messages......................74 135 12. RENUMBERING CONSIDERATIONS....................................74 137 REFERENCES.........................................................76 139 Authors' Addresses.................................................78 141 APPENDIX A: MULTIHOMED HOSTS.......................................78 142 APPENDIX B: FUTURE EXTENSIONS......................................80 143 APPENDIX C: STATE MACHINE FOR THE REACHABILITY STATE...............80 144 APPENDIX D: SUMMARY OF ISROUTER RULES..............................82 145 APPENDIX E: IMPLEMENTATION ISSUES..................................83 146 Appendix E.1: Reachability confirmations...........................83 147 APPENDIX F: CHANGES FROM RFC 2461..................................85 149 1. INTRODUCTION 151 This specification defines the Neighbor Discovery (ND) protocol for 152 Internet Protocol Version 6 (IPv6). Nodes (hosts and routers) use 153 Neighbor Discovery to determine the link-layer addresses for 154 neighbors known to reside on attached links and to quickly purge 155 cached values that become invalid. Hosts also use Neighbor Discovery 156 to find neighboring routers that are willing to forward packets on 157 their behalf. Finally, nodes use the protocol to actively keep track 158 of which neighbors are reachable and which are not, and to detect 159 changed link-layer addresses. When a router or the path to a router 160 fails, a host actively searches for functioning alternates. 162 Unless specified otherwise (in a document that covers operating IP 163 over a particular link type) this document applies to all link types. 164 However, because ND uses link-layer multicast for some of its 165 services, it is possible that on some link types (e.g., NBMA links) 166 alternative protocols or mechanisms to implement those services will 167 be specified (in the appropriate document covering the operation of 168 IP over a particular link type). The services described in this 169 document that are not directly dependent on multicast, such as 170 Redirects, Next-hop determination, Neighbor Unreachability Detection, 171 etc., are expected to be provided as specified in this document. The 172 details of how one uses ND on NBMA links are addressed in [IPv6- 173 NBMA]. In addition, [IPv6-3GPP] and [IPv6-CELLULAR] discuss the use 174 of this protocol over some cellular links, which are examples of NBMA 175 links. 177 The authors would like to acknowledge the contributions of the IPv6 178 working group and, in particular, (in alphabetical order) Ran 179 Atkinson, Jim Bound, Scott Bradner, Alex Conta, Elwyn Davies, Stephen 180 Deering Richard Draves, Francis Dupont, Robert Elz, Robert Gilligan, 181 Robert Hinden, Allison Mankin, Dan McDonald, Charles Perkins, Matt 182 Thomas, and Susan Thomson. 184 2. TERMINOLOGY 186 2.1. General 188 IP - Internet Protocol Version 6. The terms IPv4 and 189 IPv6 are used only in contexts where necessary to avoid 190 ambiguity. 192 ICMP - Internet Message Control Protocol for the Internet 193 Protocol Version 6. The terms ICMPv4 and ICMPv6 are 194 used only in contexts where necessary to avoid 195 ambiguity. 197 node - a device that implements IP. 199 router - a node that forwards IP packets not explicitly 200 addressed to itself. 202 host - any node that is not a router. 204 upper layer - a protocol layer immediately above IP. Examples are 205 transport protocols such as TCP and UDP, control 206 protocols such as ICMP, routing protocols such as OSPF, 207 and internet or lower-layer protocols being "tunneled" 208 over (i.e., encapsulated in) IP such as IPX, AppleTalk, 209 or IP itself. 211 link - a communication facility or medium over which nodes can 212 communicate at the link layer, i.e., the layer 213 immediately below IP. Examples are Ethernets (simple 214 or bridged), PPP links, X.25, Frame Relay, or ATM 215 networks as well as internet (or higher) layer 216 "tunnels", such as tunnels over IPv4 or IPv6 itself. 218 interface - a node's attachment to a link. 220 neighbors - nodes attached to the same link. 222 address - an IP-layer identifier for an interface or a set of 223 interfaces. 225 anycast address 226 - an identifier for a set of interfaces (typically 227 belonging to different nodes). A packet sent to an 228 anycast address is delivered to one of the interfaces 229 identified by that address (the "nearest" one, 230 according to the routing protocol's measure of 231 distance). See [ADDR-ARCH]. 233 Note that an anycast address is syntactically 234 indistinguishable from a unicast address. Thus, nodes 235 sending packets to anycast addresses don't generally 236 know that an anycast address is being used. Throughout 237 the rest of this document, references to unicast 238 addresses also apply to anycast addresses in those 239 cases where the node is unaware that a unicast address 240 is actually an anycast address. 242 prefix - a bit string that consists of some number of initial 243 bits of an address. 245 link-layer address 246 - a link-layer identifier for an interface. Examples 247 include IEEE 802 addresses for Ethernet links. 249 on-link - an address that is assigned to an interface on a 250 specified link. A node considers an address to be on- 251 link if: 253 - it is covered by one of the link's prefixes, or 255 - a neighboring router specifies the address as 256 the target of a Redirect message, or 258 - a Neighbor Advertisement message is received for 259 the (target) address, or 261 - any Neighbor Discovery message is received from 262 the address. 264 off-link - the opposite of "on-link"; an address that is not 265 assigned to any interfaces on the specified link. 267 longest prefix match 268 - The process of determining which prefix (if any) in 269 a set of prefixes covers a target address. A target 270 address is covered by a prefix if all of the bits in 271 the prefix match the left-most bits of the target 272 address. When multiple prefixes cover an address, 273 the longest prefix is the one that matches. 275 reachability 276 - whether or not the one-way "forward" path to a 277 neighbor is functioning properly. In particular, 278 whether packets sent to a neighbor are reaching the 279 IP layer on the neighboring machine and are being 280 processed properly by the receiving IP layer. For 281 neighboring routers, reachability means that packets 282 sent by a node's IP layer are delivered to the 283 router's IP layer, and the router is indeed 284 forwarding packets (i.e., it is configured as a 285 router, not a host). For hosts, reachability means 286 that packets sent by a node's IP layer are delivered 287 to the neighbor host's IP layer. 289 packet - an IP header plus payload. 291 link MTU - the maximum transmission unit, i.e., maximum packet 292 size in octets, that can be conveyed in one piece 293 over a link. 295 target - an address about which address resolution 296 information is sought, or an address which is the 297 new first-hop when being redirected. 299 proxy - a router that responds to Neighbor Discovery query 300 messages on behalf of another node. A router acting 301 on behalf of a mobile node that has moved off-link 302 could potentially act as a proxy for the mobile 303 node. 305 ICMP destination unreachable indication 306 - an error indication returned to the original sender 307 of a packet that cannot be delivered for the reasons 308 outlined in [ICMPv6]. If the error occurs on a node 309 other than the node originating the packet, an ICMP 310 error message is generated. If the error occurs on 311 the originating node, an implementation is not 312 required to actually create and send an ICMP error 313 packet to the source, as long as the upper-layer 314 sender is notified through an appropriate mechanism 315 (e.g., return value from a procedure call). Note, 316 however, that an implementation may find it 317 convenient in some cases to return errors to the 318 sender by taking the offending packet, generating an 319 ICMP error message, and then delivering it (locally) 320 through the generic error handling routines. 322 random delay 323 - when sending out messages, it is sometimes necessary to 324 delay a transmission for a random amount of time in 325 order to prevent multiple nodes from transmitting at 326 exactly the same time, or to prevent long-range 327 periodic transmissions from synchronizing with each 328 other [SYNC]. When a random component is required, a 329 node calculates the actual delay in such a way that the 330 computed delay forms a uniformly-distributed random 331 value that falls between the specified minimum and 332 maximum delay times. The implementor must take care to 333 insure that the granularity of the calculated random 334 component and the resolution of the timer used are both 335 high enough to insure that the probability of multiple 336 nodes delaying the same amount of time is small. 338 random delay seed 339 - If a pseudo-random number generator is used in 340 calculating a random delay component, the generator 341 should be initialized with a unique seed prior to being 342 used. Note that it is not sufficient to use the 343 interface token alone as the seed, since interface 344 tokens will not always be unique. To reduce the 345 probability that duplicate interface tokens cause the 346 same seed to be used, the seed should be calculated 347 from a variety of input sources (e.g., machine 348 components) that are likely to be different even on 349 identical "boxes". For example, the seed could be 350 formed by combining the CPU's serial number with an 351 interface token. 353 2.2. Link Types 355 Different link layers have different properties. The ones of concern 356 to Neighbor Discovery are: 358 multicast capable 359 - a link that supports a native mechanism at the 360 link layer for sending packets to all (i.e., 361 broadcast) or a subset of all neighbors. 363 point-to-point - a link that connects exactly two interfaces. A 364 point-to-point link is assumed to have multicast 365 capability and have a link-local address. 367 non-broadcast multi-access (NBMA) 368 - a link to which more than two interfaces can attach, 369 but that does not support a native form of multicast 370 or broadcast (e.g., X.25, ATM, frame relay, etc.). 372 Note that all link types (including NBMA) are 373 expected to provide multicast service for IP (e.g., 374 using multicast servers), but it is an issue for 375 further study whether ND should use such facilities 376 or an alternate mechanism that provides the 377 equivalent ND services. 379 shared media - a link that allows direct communication among a 380 number of nodes, but attached nodes are configured 381 in such a way that they do not have complete prefix 382 information for all on-link destinations. That is, 383 at the IP level, nodes on the same link may not know 384 that they are neighbors; by default, they 385 communicate through a router. Examples are large 386 (switched) public data networks such as SMDS and B- 387 ISDN. Also known as "large clouds". See [SH- 388 MEDIA]. 390 variable MTU - a link that does not have a well-defined MTU (e.g., 391 IEEE 802.5 token rings). Many links (e.g., 392 Ethernet) have a standard MTU defined by the link- 393 layer protocol or by the specific document 394 describing how to run IP over the link layer. 396 asymmetric reachability 397 - a link where non-reflexive and/or non-transitive 398 reachability is part of normal operation. (Non- 399 reflexive reachability means packets from A reach B 400 but packets from B don't reach A. Non-transitive 401 reachability means packets from A reach B, and 402 packets from B reach C, but packets from A don't 403 reach C.) Many radio links exhibit these 404 properties. 406 2.3. Addresses 408 Neighbor Discovery makes use of a number of different addresses 409 defined in [ADDR-ARCH], including: 411 all-nodes multicast address 412 - the link-local scope address to reach all nodes, 413 FF02::1. 415 all-routers multicast address 416 - the link-local scope address to reach all routers, 417 FF02::2. 419 solicited-node multicast address 420 - a link-local scope multicast address that is computed 421 as a function of the solicited target's address. The 422 function is described in [ADDR-ARCH]. The function is 423 chosen so that IP addresses which differ only in the 424 high-order bits, e.g., due to multiple high-order 425 prefixes associated with different providers, will map 426 to the same solicited-node address thereby reducing the 427 number of multicast addresses a node must join. 429 link-local address 430 - a unicast address having link-only scope that can be 431 used to reach neighbors. All interfaces on routers 432 MUST have a link-local address. Also, [ADDRCONF] 433 requires that interfaces on hosts have a link-local 434 address. 436 unspecified address 437 - a reserved address value that indicates the lack of an 438 address (e.g., the address is unknown). It is never 439 used as a destination address, but may be used as a 440 source address if the sender does not (yet) know its 441 own address (e.g., while verifying an address is unused 442 during address autoconfiguration [ADDRCONF]). The 443 unspecified address has a value of 0:0:0:0:0:0:0:0. 445 Note that this specification does not strictly comply with the 446 consistency requirements for the scopes of source and destination 447 addresses. It is possible in some cases for hosts to use a source 448 address of a larger scope than the destination address in the IPv6 449 header. 451 2.4. Requirements 453 The keywords MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, 454 SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL, when they appear in this 455 document, are to be interpreted as described in [KEYWORDS]. 457 This document also makes use of internal conceptual variables to 458 describe protocol behavior and external variables that an 459 implementation must allow system administrators to change. The 460 specific variable names, how their values change, and how their 461 settings influence protocol behavior are provided to demonstrate 462 protocol behavior. An implementation is not required to have them in 463 the exact form described here, so long as its external behavior is 464 consistent with that described in this document. 466 3. PROTOCOL OVERVIEW 468 This protocol solves a set of problems related to the interaction 469 between nodes attached to the same link. It defines mechanisms for 470 solving each of the following problems: 472 Router Discovery: How hosts locate routers that reside on an 473 attached link. 475 Prefix Discovery: How hosts discover the set of address prefixes 476 that define which destinations are on-link for an 477 attached link. (Nodes use prefixes to distinguish 478 destinations that reside on-link from those only 479 reachable through a router.) 481 Parameter Discovery: How a node learns such link parameters as the 482 link MTU or such Internet parameters as the hop limit 483 value to place in outgoing packets. 485 Address Autoconfiguration: Introduces the mechanisms needed in 486 order to allow nodes to automatically configure an 487 address for an interface. 489 Address resolution: How nodes determine the link-layer address of 490 an on-link destination (e.g., a neighbor) given only the 491 destination's IP address. 493 Next-hop determination: The algorithm for mapping an IP destination 494 address into the IP address of the neighbor to which 495 traffic for the destination should be sent. The next- 496 hop can be a router or the destination itself. 498 Neighbor Unreachability Detection: How nodes determine that a 499 neighbor is no longer reachable. For neighbors used as 500 routers, alternate default routers can be tried. For 501 both routers and hosts, address resolution can be 502 performed again. 504 Duplicate Address Detection: How a node determines that an address 505 it wishes to use is not already in use by another node. 507 Redirect: How a router informs a host of a better first-hop node 508 to reach a particular destination. 510 Neighbor Discovery defines five different ICMP packet types: A pair 511 of Router Solicitation and Router Advertisement messages, a pair of 512 Neighbor Solicitation and Neighbor Advertisements messages, and a 513 Redirect message. The messages serve the following purpose: 515 Router Solicitation: When an interface becomes enabled, hosts may 516 send out Router Solicitations that request routers to 517 generate Router Advertisements immediately rather than 518 at their next scheduled time. 520 Router Advertisement: Routers advertise their presence together 521 with various link and Internet parameters either 522 periodically, or in response to a Router Solicitation 523 message. Router Advertisements contain prefixes that 524 are used for on-link determination and/or address 525 configuration, a suggested hop limit value, etc. 527 Neighbor Solicitation: Sent by a node to determine the link-layer 528 address of a neighbor, or to verify that a neighbor is 529 still reachable via a cached link-layer address. 530 Neighbor Solicitations are also used for Duplicate 531 Address Detection. 533 Neighbor Advertisement: A response to a Neighbor Solicitation 534 message. A node may also send unsolicited Neighbor 535 Advertisements to announce a link-layer address change. 537 Redirect: Used by routers to inform hosts of a better first hop 538 for a destination. 540 On multicast-capable links, each router periodically multicasts a 541 Router Advertisement packet announcing its availability. A host 542 receives Router Advertisements from all routers, building a list of 543 default routers. Routers generate Router Advertisements frequently 544 enough that hosts will learn of their presence within a few minutes, 545 but not frequently enough to rely on an absence of advertisements to 546 detect router failure; a separate Neighbor Unreachability Detection 547 algorithm provides failure detection. 549 Router Advertisements contain a list of prefixes used for on-link 550 determination and/or autonomous address configuration; flags 551 associated with the prefixes specify the intended uses of a 552 particular prefix. Hosts use the advertised on-link prefixes to 553 build and maintain a list that is used in deciding when a packet's 554 destination is on-link or beyond a router. Note that a destination 555 can be on-link even though it is not covered by any advertised on- 556 link prefix. In such cases a router can send a Redirect informing 557 the sender that the destination is a neighbor. 559 Router Advertisements (and per-prefix flags) allow routers to inform 560 hosts how to perform Address Autoconfiguration. For example, routers 561 can specify whether hosts should use DHCPv6 and/or 562 autonomous (stateless) address configuration. 564 Router Advertisement messages also contain Internet parameters such 565 as the hop limit that hosts should use in outgoing packets and, 566 optionally, link parameters such as the link MTU. This facilitates 567 centralized administration of critical parameters that can be set on 568 routers and automatically propagated to all attached hosts. 570 Nodes accomplish address resolution by multicasting a Neighbor 571 Solicitation that asks the target node to return its link-layer 572 address. Neighbor Solicitation messages are multicast to the 573 solicited-node multicast address of the target address. The target 574 returns its link-layer address in a unicast Neighbor Advertisement 575 message. A single request-response pair of packets is sufficient for 576 both the initiator and the target to resolve each other's link-layer 577 addresses; the initiator includes its link-layer address in the 578 Neighbor Solicitation. 580 Neighbor Solicitation messages can also be used to determine if more 581 than one node has been assigned the same unicast address. The use of 582 Neighbor Solicitation messages for Duplicate Address Detection is 583 specified in [ADDRCONF]. 585 Neighbor Unreachability Detection detects the failure of a neighbor 586 or the failure of the forward path to the neighbor. Doing so 587 requires positive confirmation that packets sent to a neighbor are 588 actually reaching that neighbor and being processed properly by its 589 IP layer. Neighbor Unreachability Detection uses confirmation from 590 two sources. When possible, upper-layer protocols provide a positive 591 confirmation that a connection is making "forward progress", that is, 592 previously sent data is known to have been delivered correctly (e.g., 593 new acknowledgments were received recently). When positive 594 confirmation is not forthcoming through such "hints", a node sends 595 unicast Neighbor Solicitation messages that solicit Neighbor 596 Advertisements as reachability confirmation from the next hop. To 597 reduce unnecessary network traffic, probe messages are only sent to 598 neighbors to which the node is actively sending packets. 600 In addition to addressing the above general problems, Neighbor 601 Discovery also handles the following situations: 603 Link-layer address change - A node that knows its link-layer 604 address has changed can multicast a few (unsolicited) 605 Neighbor Advertisement packets to all nodes to quickly update 606 cached link-layer addresses that have become invalid. Note 607 that the sending of unsolicited advertisements is a 608 performance enhancement only (e.g., unreliable). The 609 Neighbor Unreachability Detection algorithm ensures that all 610 nodes will reliably discover the new address, though the 611 delay may be somewhat longer. 613 Inbound load balancing - Nodes with replicated interfaces may want 614 to load balance the reception of incoming packets across 615 multiple network interfaces on the same link. Such nodes 616 have multiple link-layer addresses assigned to the same 617 interface. For example, a single network driver could 618 represent multiple network interface cards as a single 619 logical interface having multiple link-layer addresses. 621 Neighbor Discovery allows a router to perform Load balancing 622 for traffic addressed to itself by allowing routers to omit 623 the source link-layer address from Router Advertisement 624 packets, thereby forcing neighbors to use Neighbor 625 Solicitation messages to learn link-layer addresses of 626 routers. Returned Neighbor Advertisement messages can then 627 contain link-layer addresses that differ depending on who 628 issued the solicitation. This specification does not support 629 a mechanism that allows host to Load balance incoming 630 packets. 632 Anycast addresses - Anycast addresses identify one of a set of 633 nodes providing an equivalent service, and multiple nodes on 634 the same link may be configured to recognize the same Anycast 635 address. Neighbor Discovery handles anycasts by having nodes 636 expect to receive multiple Neighbor Advertisements for the 637 same target. All advertisements for anycast addresses are 638 tagged as being non-Override advertisements. This invokes 639 specific rules to determine which of potentially multiple 640 advertisements should be used. 642 Proxy advertisements - A router willing to accept packets on behalf 643 of a target address that is unable to respond to Neighbor 644 Solicitations can issue non-Override Neighbor Advertisements. 645 Proxy advertisements are used by Mobile IPv6 home Agents to 646 defend mobile nodes' addresses when they move off-link. 647 However, it is not intended as a general mechanism to handle 648 nodes that, e.g., do not implement this protocol. 650 3.1. Comparison with IPv4 652 The IPv6 Neighbor Discovery protocol corresponds to a combination of 653 the IPv4 protocols ARP [ARP], ICMP Router Discovery [RDISC], and ICMP 654 Redirect [ICMPv4]. In IPv4 there is no generally agreed upon 655 protocol or mechanism for Neighbor Unreachability Detection, although 656 Hosts Requirements [HR-CL] does specify some possible algorithms for 657 Dead Gateway Detection (a subset of the problems Neighbor 658 Unreachability Detection tackles). 660 The Neighbor Discovery protocol provides a multitude of improvements 661 over the IPv4 set of protocols: 663 Router Discovery is part of the base protocol set; there is no 664 need for hosts to "snoop" the routing protocols. 666 Router advertisements carry link-layer addresses; no additional 667 packet exchange is needed to resolve the router's link-layer 668 address. 670 Router advertisements carry prefixes for a link; there is no need 671 to have a separate mechanism to configure the "netmask". 673 Router advertisements enable Address Autoconfiguration. 675 Routers can advertise an MTU for hosts to use on the link, 676 ensuring that all nodes use the same MTU value on links lacking a 677 well-defined MTU. 679 Address resolution multicasts are "spread" over 16 million (2^24) 680 multicast addresses greatly reducing address resolution related 681 interrupts on nodes other than the target. Moreover, non-IPv6 682 machines should not be interrupted at all. 684 Redirects contain the link-layer address of the new first hop; 685 separate address resolution is not needed upon receiving a 686 redirect. 688 Multiple prefixes can be associated with the same link. By 689 default, hosts learn all on-link prefixes from Router 690 Advertisements. However, routers may be configured to omit some 691 or all prefixes from Router Advertisements. In such cases hosts 692 assume that destinations are off-link and send traffic to routers. 693 A router can then issue redirects as appropriate. 695 Unlike IPv4, the recipient of an IPv6 redirect assumes that the 696 new next-hop is on-link. In IPv4, a host ignores redirects 697 specifying a next-hop that is not on-link according to the link's 698 network mask. The IPv6 redirect mechanism is analogous to the 699 XRedirect facility specified in [SH-MEDIA]. It is expected to be 700 useful on non-broadcast and shared media links in which it is 701 undesirable or not possible for nodes to know all prefixes for 702 on-link destinations. 704 Neighbor Unreachability Detection is part of the base 705 significantly improving the robustness of packet delivery in the 706 presence of failing routers, partially failing or partitioned 707 links and nodes that change their link-layer addresses. For 708 instance, mobile nodes can move off-link without losing any 709 connectivity due to stale ARP caches. 711 Unlike ARP, Neighbor Discovery detects half-link failures (using 712 Neighbor Unreachability Detection) and avoids sending traffic to 713 neighbors with which two-way connectivity is absent. 715 Unlike in IPv4 Router Discovery the Router Advertisement messages 716 do not contain a preference field. The preference field is not 717 needed to handle routers of different "stability"; the Neighbor 718 Unreachability Detection will detect dead routers and switch to a 719 working one. 721 The use of link-local addresses to uniquely identify routers (for 722 Router Advertisement and Redirect messages) makes it possible for 723 hosts to maintain the router associations in the event of the site 724 renumbering to use new global prefixes. 726 By setting the Hop Limit to 255, Neighbor Discovery is immune to 727 off-link senders that accidentally or intentionally send ND 728 messages. In IPv4 off-link senders can send both ICMP Redirects 729 and Router Advertisement messages. 731 Placing address resolution at the ICMP layer makes the protocol 732 more media-independent than ARP and makes it possible to use 733 generic IP layer authentication and security mechanisms as 734 appropriate. 736 3.2. Supported Link Types 738 Neighbor Discovery supports links with different properties. In the 739 presence of certain properties only a subset of the ND protocol 740 mechanisms are fully specified in this document: 742 point-to-point - Neighbor Discovery handles such links just like 743 multicast links. (Multicast can be trivially 744 provided on point to point links, and interfaces 745 can be assigned link-local addresses.) Neighbor 746 Discovery should be implemented as described in 747 this document. 749 multicast - Neighbor Discovery should be implemented as 750 described in this document. 752 non-broadcast multiple access (NBMA) 753 - Redirect, Neighbor Unreachability Detection and 754 next-hop determination should be implemented as 755 described in this document. Address resolution, 756 and the mechanism for delivering Router 757 Solicitations and Advertisements on NBMA links is 758 not specified in this document. Note that if 760 hosts support manual configuration of a list of 761 default routers, hosts can dynamically acquire the 762 link-layer addresses for their neighbors from 763 Redirect messages. 765 shared media - The Redirect message is modeled after the 766 XRedirect message in [SH-MEDIA] in order to 767 simplify use of the protocol on shared media 768 links. 770 This specification does not address shared media 771 issues that only relate to routers, such as: 773 - How routers exchange reachability information 774 on a shared media link. 776 - How a router determines the link-layer address 777 of a host, which it needs to send redirect 778 messages to the host. 780 - How a router determines that it is the first- 781 hop router for a received packet. 783 The protocol is extensible (through the definition 784 of new options) so that other solutions might be 785 possible in the future. 787 variable MTU - Neighbor Discovery allows routers to specify a MTU 788 for the link, which all nodes then use. All nodes 789 on a link must use the same MTU (or Maximum 790 Receive Unit) in order for multicast to work 791 properly. Otherwise when multicasting, a sender, 792 which can not know which nodes will receive the 793 packet, could not determine a minimum packet size 794 that all receivers can process (or Maximum Receive 795 Unit). 797 asymmetric reachability 798 - Neighbor Discovery detects the absence of 799 symmetric reachability; a node avoids paths to a 800 neighbor with which it does not have symmetric 801 connectivity. 803 The Neighbor Unreachability Detection will 804 typically identify such half-links and the node 805 will refrain from using them. 807 The protocol can presumably be extended in the 808 future to find viable paths in environments that 809 lack reflexive and transitive connectivity. 811 3.3. Securing Neighbor Discovery messages 813 Neighbor Discovery messages are needed for various functions. Several 814 functions are designed to allow hosts to ascertain the ownership of 815 an address or the mapping between link layer and IP layer addresses. 816 Having Neighbor Discovery functions on the ICMP layer allows for the 817 use of IP layer security mechanisms, which are available 818 independently of the availability of security on the link layer. 820 Vulnerabilities related to Neighbor Discovery are discussed in 821 section 11.1. A general solution for securing Neighbor Discovery is 822 outside the scope of this specification and is discussed in [SEND]. 823 However, Section 11.2 explains how and under which constraints IPsec 824 AH or ESP can be used to secure Neighbor Discovery. 826 4. MESSAGE FORMATS 828 4.1. Router Solicitation Message Format 830 Hosts send Router Solicitations in order to prompt routers to 831 generate Router Advertisements quickly. 833 0 1 2 3 834 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 835 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 836 | Type | Code | Checksum | 837 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 838 | Reserved | 839 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 840 | Options ... 841 +-+-+-+-+-+-+-+-+-+-+-+- 843 IP Fields: 845 Source Address 846 An IP address assigned to the sending interface, or 847 the unspecified address if no address is assigned 848 to the sending interface. 850 Destination Address 851 Typically the all-routers multicast address. 853 Hop Limit 255 855 ICMP Fields: 857 Type 133 859 Code 0 861 Checksum The ICMP checksum. See [ICMPv6]. 863 Reserved This field is unused. It MUST be initialized to 864 zero by the sender and MUST be ignored by the 865 receiver. 866 Valid Options: 868 Source link-layer address 869 The link-layer address of the sender, if known. 870 MUST NOT be included if the Source Address is the 871 unspecified address. Otherwise it SHOULD be 872 included on link layers that have addresses. 874 Future versions of this protocol may define new option types. 875 Receivers MUST silently ignore any options they do not recognize 876 and continue processing the message. 878 4.2. Router Advertisement Message Format 880 Routers send out Router Advertisement message periodically, or in 881 response to a Router Solicitation. 883 0 1 2 3 884 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 885 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 886 | Type | Code | Checksum | 887 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 888 | Cur Hop Limit |M|O| Reserved | Router Lifetime | 889 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 890 | Reachable Time | 891 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 892 | Retrans Timer | 893 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 894 | Options ... 895 +-+-+-+-+-+-+-+-+-+-+-+- 897 IP Fields: 899 Source Address 900 MUST be the link-local address assigned to the 901 interface from which this message is sent. 903 Destination Address 904 Typically the Source Address of an invoking Router 905 Solicitation or the all-nodes multicast address. 907 Hop Limit 255 909 ICMP Fields: 911 Type 134 912 Code 0 914 Checksum The ICMP checksum. See [ICMPv6]. 916 Cur Hop Limit 8-bit unsigned integer. The default value that 917 should be placed in the Hop Count field of the IP 918 header for outgoing IP packets. A value of zero 919 means unspecified (by this router). 921 M 1-bit "Managed address configuration" flag. When 922 set, it indicates that Dynamic Host Configuration 923 Protocol [DHCPv6] is available for address 924 configuration in addition to any addresses 925 autoconfigured using stateless address 926 autoconfiguration. The use of this flag is 927 further described in [ADDRCONF]. 929 O 1-bit "Other configuration" flag. When 930 set, it indicates that [DHCPv6lite] is available 931 for autoconfiguration of other (non-address) 932 information. Examples of such information are DNS- 933 related information or information on other servers 934 within the network. 936 Reserved A 6-bit unused field. It MUST be initialized to 937 zero by the sender and MUST be ignored by the 938 receiver. 940 Router Lifetime 941 16-bit unsigned integer. The lifetime associated 942 with the default router in units of seconds. 943 The field can contain values up to 65535 and 944 receivers should handle any value, while the 945 sending rules in section 6 limit the lifetime to 946 9000 seconds. A Lifetime of 0 indicates that the 947 router is not a default router and SHOULD NOT 948 appear on the default router list. The Router 949 Lifetime applies only to the router's usefulness as 950 a default router; it does not apply to information 951 contained in other message fields or options. 952 Options that need time limits for their information 953 include their own lifetime fields. 955 Reachable Time 32-bit unsigned integer. The time, in 956 milliseconds, that a node assumes a neighbor is 957 reachable after having received a reachability 958 confirmation. Used by the Neighbor Unreachability 959 Detection algorithm (see Section 7.3). A value of 960 zero means unspecified (by this router). 962 Retrans Timer 32-bit unsigned integer. The time, in 963 milliseconds, between retransmitted Neighbor 964 Solicitation messages. Used by address resolution 965 and the Neighbor Unreachability Detection algorithm 966 (see Sections 7.2 and 7.3). A value of zero means 967 unspecified (by this router). 969 Possible options: 971 Source link-layer address 972 The link-layer address of the interface from which 973 the Router Advertisement is sent. Only used on 974 link layers that have addresses. A router MAY omit 975 this option in order to enable inbound load sharing 976 across multiple link-layer addresses. 978 MTU SHOULD be sent on links that have a variable MTU 979 (as specified in the document that describes how to 980 run IP over the particular link type). MAY be sent 981 on other links. 983 Prefix Information 984 These options specify the prefixes that are on-link 985 and/or are used for address autoconfiguration. A 986 router SHOULD include all its on-link prefixes 987 (except the link-local prefix) so that multihomed 988 hosts have complete prefix information about on- 989 link destinations for the links to which they 990 attach. If complete information is lacking, a 991 multihomed host may not be able to choose the 992 correct outgoing interface when sending traffic to 993 its neighbors. 995 Future versions of this protocol may define new option types. 996 Receivers MUST silently ignore any options they do not recognize 997 and continue processing the message. 999 4.3. Neighbor Solicitation Message Format 1001 Nodes send Neighbor Solicitations to request the link-layer address 1002 of a target node while also providing their own link-layer address to 1003 the target. Neighbor Solicitations are multicast when the node needs 1004 to resolve an address and unicast when the node seeks to verify the 1005 reachability of a neighbor. 1007 0 1 2 3 1008 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 1009 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1010 | Type | Code | Checksum | 1011 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1012 | Reserved | 1013 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1014 | | 1015 + + 1016 | | 1017 + Target Address + 1018 | | 1019 + + 1020 | | 1021 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1022 | Options ... 1023 +-+-+-+-+-+-+-+-+-+-+-+- 1025 IP Fields: 1027 Source Address 1028 Either an address assigned to the interface from 1029 which this message is sent or (if Duplicate Address 1030 Detection is in progress [ADDRCONF]) the 1031 unspecified address. 1032 Destination Address 1033 Either the solicited-node multicast address 1034 corresponding to the target address, or the target 1035 address. 1036 Hop Limit 255 1038 ICMP Fields: 1040 Type 135 1042 Code 0 1044 Checksum The ICMP checksum. See [ICMPv6]. 1046 Reserved This field is unused. It MUST be initialized to 1047 zero by the sender and MUST be ignored by the 1048 receiver. 1050 Target Address 1051 The IP address of the target of the solicitation. 1052 It MUST NOT be a multicast address. 1054 Possible options: 1056 Source link-layer address 1057 The link-layer address for the sender. MUST NOT be 1058 included when the source IP address is the 1059 unspecified address. Otherwise, on link layers 1060 that have addresses this option MUST be included in 1061 multicast solicitations and SHOULD be included in 1062 unicast solicitations. 1064 Future versions of this protocol may define new option types. 1065 Receivers MUST silently ignore any options they do not recognize 1066 and continue processing the message. 1068 4.4. Neighbor Advertisement Message Format 1070 A node sends Neighbor Advertisements in response to Neighbor 1071 Solicitations and sends unsolicited Neighbor Advertisements in order 1072 to (unreliably) propagate new information quickly. 1074 0 1 2 3 1075 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 1076 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1077 | Type | Code | Checksum | 1078 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1079 |R|S|O| Reserved | 1080 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1081 | | 1082 + + 1083 | | 1084 + Target Address + 1085 | | 1086 + + 1087 | | 1088 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1089 | Options ... 1090 +-+-+-+-+-+-+-+-+-+-+-+- 1092 IP Fields: 1094 Source Address 1095 An address assigned to the interface from which the 1096 advertisement is sent. 1097 Destination Address 1098 For solicited advertisements, the Source Address of 1099 an invoking Neighbor Solicitation or, if the 1100 solicitation's Source Address is the unspecified 1101 address, the all-nodes multicast address. 1103 For unsolicited advertisements typically the all- 1104 nodes multicast address. 1106 Hop Limit 255 1108 ICMP Fields: 1110 Type 136 1112 Code 0 1114 Checksum The ICMP checksum. See [ICMPv6]. 1116 R Router flag. When set, the R-bit indicates that 1117 the sender is a router. The R-bit is used by 1118 Neighbor Unreachability Detection to detect a 1119 router that changes to a host. 1121 S Solicited flag. When set, the S-bit indicates that 1122 the advertisement was sent in response to a 1123 Neighbor Solicitation from the Destination address. 1124 The S-bit is used as a reachability confirmation 1125 for Neighbor Unreachability Detection. It MUST NOT 1126 be set in multicast advertisements or in 1127 unsolicited unicast advertisements. 1129 O Override flag. When set, the O-bit indicates that 1130 the advertisement should override an existing cache 1131 entry and update the cached link-layer address. 1132 When it is not set the advertisement will not 1133 update a cached link-layer address though it will 1134 update an existing Neighbor Cache entry for which 1135 no link-layer address is known. It SHOULD NOT be 1136 set in solicited advertisements for anycast 1137 addresses and in solicited proxy advertisements. 1138 It SHOULD be set in other solicited advertisements 1139 and in unsolicited advertisements. 1141 Reserved 29-bit unused field. It MUST be initialized to 1142 zero by the sender and MUST be ignored by the 1143 receiver. 1145 Target Address 1146 For solicited advertisements, the Target Address 1147 field in the Neighbor Solicitation message that 1148 prompted this advertisement. For an unsolicited 1149 advertisement, the address whose link-layer address 1150 has changed. The Target Address MUST NOT be a 1151 multicast address. 1153 Possible options: 1155 Target link-layer address 1156 The link-layer address for the target, i.e., the 1157 sender of the advertisement. This option MUST be 1158 included on link layers that have addresses when 1159 responding to multicast solicitations. When 1160 responding to a unicast Neighbor Solicitation this 1161 option SHOULD be included. 1163 The option MUST be included for multicast 1164 solicitations in order to avoid infinite Neighbor 1165 Solicitation "recursion" when the peer node does 1166 not have a cache entry to return a Neighbor 1167 Advertisements message. When responding to unicast 1168 solicitations, the option can be omitted since the 1169 sender of the solicitation has the correct link- 1170 layer address; otherwise it would not have be able 1171 to send the unicast solicitation in the first 1172 place. However, including the link-layer address in 1173 this case adds little overhead and eliminates a 1174 potential race condition where the sender deletes 1175 the cached link-layer address prior to receiving a 1176 response to a previous solicitation. 1178 Future versions of this protocol may define new option types. 1179 Receivers MUST silently ignore any options they do not recognize 1180 and continue processing the message. 1182 4.5. Redirect Message Format 1184 Routers send Redirect packets to inform a host of a better first-hop 1185 node on the path to a destination. Hosts can be redirected to a 1186 better first-hop router but can also be informed by a redirect that 1187 the destination is in fact a neighbor. The latter is accomplished by 1188 setting the ICMP Target Address equal to the ICMP Destination 1189 Address. 1191 0 1 2 3 1192 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 1193 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1194 | Type | Code | Checksum | 1195 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1196 | Reserved | 1197 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1198 | | 1199 + + 1200 | | 1201 + Target Address + 1202 | | 1203 + + 1204 | | 1205 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1206 | | 1207 + + 1208 | | 1209 + Destination Address + 1210 | | 1211 + + 1212 | | 1213 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1214 | Options ... 1215 +-+-+-+-+-+-+-+-+-+-+-+- 1217 IP Fields: 1219 Source Address 1220 MUST be the link-local address assigned to the 1221 interface from which this message is sent. 1223 Destination Address 1224 The Source Address of the packet that triggered the 1225 redirect. 1227 Hop Limit 255 1229 ICMP Fields: 1231 Type 137 1233 Code 0 1235 Checksum The ICMP checksum. See [ICMPv6]. 1237 Reserved This field is unused. It MUST be initialized to 1238 zero by the sender and MUST be ignored by the 1239 receiver. 1241 Target Address An IP address that is a better first hop to use for 1242 the ICMP Destination Address. When the target is 1243 the actual endpoint of communication, i.e., the 1244 destination is a neighbor, the Target Address field 1245 MUST contain the same value as the ICMP Destination 1246 Address field. Otherwise the target is a better 1247 first-hop router and the Target Address MUST be the 1248 router's link-local address so that hosts can 1249 uniquely identify routers. 1251 Destination Address 1252 The IP address of the destination which is 1253 redirected to the target. 1255 Possible options: 1257 Target link-layer address 1258 The link-layer address for the target. It SHOULD 1259 be included (if known). Note that on NBMA links, 1260 hosts may rely on the presence of the Target Link- 1261 Layer Address option in Redirect messages as the 1262 means for determining the link-layer addresses of 1263 neighbors. In such cases, the option MUST be 1264 included in Redirect messages. 1266 Redirected Header 1267 As much as possible of the IP packet that triggered 1268 the sending of the Redirect without making the 1269 redirect packet exceed 1280 octets. 1271 4.6. Option Formats 1273 Neighbor Discovery messages include zero or more options, some of 1274 which may appear multiple times in the same message. Options should 1275 be padded when necessary to ensure that they end on their natural 64- 1276 bit boundaries. All options are of the form: 1278 0 1 2 3 1279 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 1280 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1281 | Type | Length | ... | 1282 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1283 ~ ... ~ 1284 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1286 Fields: 1288 Type 8-bit identifier of the type of option. The 1289 options defined in this document are: 1291 Option Name Type 1293 Source Link-Layer Address 1 1294 Target Link-Layer Address 2 1295 Prefix Information 3 1296 Redirected Header 4 1297 MTU 5 1299 Length 8-bit unsigned integer. The length of the option 1300 (including the type and length fields) in units of 1301 8 octets. The value 0 is invalid. Nodes MUST 1302 silently discard an ND packet that contains an 1303 option with length zero. 1305 4.6.1. Source/Target Link-layer Address 1307 0 1 2 3 1308 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 1309 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1310 | Type | Length | Link-Layer Address ... 1311 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1313 Fields: 1315 Type 1316 1 for Source Link-layer Address 1317 2 for Target Link-layer Address 1319 Length The length of the option (including the type and 1320 length fields) in units of 8 octets. For example, 1321 the length for IEEE 802 addresses is 1 [IPv6- 1322 ETHER]. 1324 Link-Layer Address 1325 The variable length link-layer address. 1327 The content and format of this field (including 1328 byte and bit ordering) is expected to be specified 1329 in specific documents that describe how IPv6 1330 operates over different link layers. For instance, 1331 [IPv6-ETHER]. 1333 Description 1334 The Source Link-Layer Address option contains the 1335 link-layer address of the sender of the packet. It 1336 is used in the Neighbor Solicitation, Router 1337 Solicitation, and Router Advertisement packets. 1339 The Target Link-Layer Address option contains the 1340 link-layer address of the target. It is used in 1341 Neighbor Advertisement and Redirect packets. 1343 These options MUST be silently ignored for other 1344 Neighbor Discovery messages. 1346 4.6.2. Prefix Information 1348 0 1 2 3 1349 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 1350 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1351 | Type | Length | Prefix Length |L|A| Reserved1 | 1352 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1353 | Valid Lifetime | 1354 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1355 | Preferred Lifetime | 1356 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1357 | Reserved2 | 1358 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1359 | | 1360 + + 1361 | | 1362 + Prefix + 1363 | | 1364 + + 1365 | | 1366 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1368 Fields: 1370 Type 3 1372 Length 4 1374 Prefix Length 8-bit unsigned integer. The number of leading bits 1375 in the Prefix that are valid. The value ranges 1376 from 0 to 128. The prefix length field provides 1377 necessary information for on-link determination 1378 (when combined with other flags in the prefix 1379 option). It also assists with address 1380 autoconfiguration as specified in [ADDRCONF], for 1381 which there may be more restrictions on the prefix 1382 length. 1384 L 1-bit on-link flag. When set, indicates that this 1385 prefix can be used for on-link determination. When 1386 not set the advertisement makes no statement about 1387 on-link or off-link properties of the prefix. For 1388 instance, the prefix might be used for address 1389 configuration with some of the addresses belonging 1390 to the prefix being on-link and others being off- 1391 link. 1393 A 1-bit autonomous address-configuration flag. When 1394 set indicates that this prefix can be used for 1395 autonomous address configuration as specified in 1396 [ADDRCONF]. 1398 Reserved1 6-bit unused field. It MUST be initialized to zero 1399 by the sender and MUST be ignored by the receiver. 1401 Valid Lifetime 1402 32-bit unsigned integer. The length of time in 1403 seconds (relative to the time the packet is sent) 1404 that the prefix is valid for the purpose of on-link 1405 determination. A value of all one bits 1406 (0xffffffff) represents infinity. The Valid 1407 Lifetime is also used by [ADDRCONF]. 1409 Preferred Lifetime 1410 32-bit unsigned integer. The length of time in 1411 seconds (relative to the time the packet is sent) 1412 that addresses generated from the prefix via 1413 stateless address autoconfiguration remain 1414 preferred [ADDRCONF]. A value of all one bits 1415 (0xffffffff) represents infinity. See [ADDRCONF]. 1416 Note that the value of this field MUST NOT exceed 1417 the Valid Lifetime field to avoid preferring 1418 addresses that are no longer valid. 1420 Reserved2 This field is unused. It MUST be initialized to 1421 zero by the sender and MUST be ignored by the 1422 receiver. 1424 Prefix An IP address or a prefix of an IP address. The 1425 Prefix Length field contains the number of valid 1426 leading bits in the prefix. The bits in the prefix 1427 after the prefix length are reserved and MUST be 1428 initialized to zero by the sender and ignored by 1429 the receiver. A router SHOULD NOT send a prefix 1430 option for the link-local prefix and a host SHOULD 1431 ignore such a prefix option. 1433 Description 1434 The Prefix Information option provide hosts with 1435 on-link prefixes and prefixes for Address 1436 Autoconfiguration. 1438 The Prefix Information option appears in Router 1439 Advertisement packets and MUST be silently ignored 1440 for other messages. 1442 4.6.3. Redirected Header 1444 0 1 2 3 1445 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 1446 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1447 | Type | Length | Reserved | 1448 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1449 | Reserved | 1450 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1451 | | 1452 ~ IP header + data ~ 1453 | | 1454 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1456 Fields: 1458 Type 4 1460 Length The length of the option in units of 8 octets. 1462 Reserved These fields are unused. They MUST be initialized 1463 to zero by the sender and MUST be ignored by the 1464 receiver. 1466 IP header + data 1467 The original packet truncated to ensure that the 1468 size of the redirect message does not exceed 1280 1469 octets. 1471 Description 1472 The Redirected Header option is used in Redirect 1473 messages and contains all or part of the packet 1474 that is being redirected. 1476 This option MUST be silently ignored for other 1477 Neighbor Discovery messages. 1479 4.6.4. MTU 1481 0 1 2 3 1482 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 1483 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1484 | Type | Length | Reserved | 1485 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1486 | MTU | 1487 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1489 Fields: 1491 Type 5 1493 Length 1 1495 Reserved This field is unused. It MUST be initialized to 1496 zero by the sender and MUST be ignored by the 1497 receiver. 1499 MTU 32-bit unsigned integer. The recommended MTU for 1500 the link. 1502 Description 1503 The MTU option is used in Router Advertisement 1504 messages to insure that all nodes on a link use the 1505 same MTU value in those cases where the link MTU is 1506 not well known. 1508 This option MUST be silently ignored for other 1509 Neighbor Discovery messages. 1511 In configurations in which heterogeneous 1512 technologies are bridged together, the maximum 1513 supported MTU may differ from one segment to 1514 another. If the bridges do not generate ICMP 1515 Packet Too Big messages, communicating nodes will 1516 be unable to use Path MTU to dynamically determine 1517 the appropriate MTU on a per-neighbor basis. In 1518 such cases, routers can be configured to use the 1519 MTU option to specify the maximum MTU value that is 1520 supported by all segments. 1522 5. CONCEPTUAL MODEL OF A HOST 1524 This section describes a conceptual model of one possible data 1525 structure organization that hosts (and to some extent routers) will 1526 maintain in interacting with neighboring nodes. The described 1527 organization is provided to facilitate the explanation of how the 1528 Neighbor Discovery protocol should behave. This document does not 1529 mandate that implementations adhere to this model as long as their 1530 external behavior is consistent with that described in this document. 1532 This model is only concerned with the aspects of host behavior 1533 directly related to Neighbor Discovery. In particular, it does not 1534 concern itself with such issues as source address selection or the 1535 selecting of an outgoing interface on a multihomed host. 1537 5.1. Conceptual Data Structures 1539 Hosts will need to maintain the following pieces of information for 1540 each interface: 1542 Neighbor Cache 1543 - A set of entries about individual neighbors to 1544 which traffic has been sent recently. Entries are 1545 keyed on the neighbor's on-link unicast IP address 1546 and contain such information as its link-layer 1547 address, a flag indicating whether the neighbor is 1548 a router or a host (called IsRouter in this 1549 document), a pointer to any queued packets waiting 1550 for address resolution to complete, etc. 1551 A Neighbor Cache entry also contains information 1552 used by the Neighbor Unreachability Detection 1553 algorithm, including the reachability state, the 1554 number of unanswered probes, and the time the next 1555 Neighbor Unreachability Detection event is 1556 scheduled to take place. 1558 Destination Cache 1559 - A set of entries about destinations to which 1560 traffic has been sent recently. The Destination 1561 Cache includes both on-link and off-link 1562 destinations and provides a level of indirection 1563 into the Neighbor Cache; the Destination Cache maps 1564 a destination IP address to the IP address of the 1565 next-hop neighbor. This cache is updated with 1566 information learned from Redirect messages. 1567 Implementations may find it convenient to store 1568 additional information not directly related to 1569 Neighbor Discovery in Destination Cache entries, 1570 such as the Path MTU (PMTU) and round trip timers 1571 maintained by transport protocols. 1573 Prefix List - A list of the prefixes that define a set of 1574 addresses that are on-link. Prefix List entries 1575 are created from information received in Router 1576 Advertisements. Each entry has an associated 1577 invalidation timer value (extracted from the 1578 advertisement) used to expire prefixes when they 1579 become invalid. A special "infinity" timer value 1580 specifies that a prefix remains valid forever, 1581 unless a new (finite) value is received in a 1582 subsequent advertisement. 1584 The link-local prefix is considered to be on the 1585 prefix list with an infinite invalidation timer 1586 regardless of whether routers are advertising a 1587 prefix for it. Received Router Advertisements 1588 SHOULD NOT modify the invalidation timer for the 1589 link-local prefix. 1591 Default Router List 1592 - A list of routers to which packets may be sent. 1593 Router list entries point to entries in the 1594 Neighbor Cache; the algorithm for selecting a 1595 default router favors routers known to be reachable 1596 over those whose reachability is suspect. Each 1597 entry also has an associated invalidation timer 1598 value (extracted from Router Advertisements) used 1599 to delete entries that are no longer advertised. 1601 Note that the above conceptual data structures can be implemented 1602 using a variety of techniques. One possible implementation is to use 1603 a single longest-match routing table for all of the above data 1604 structures. Regardless of the specific implementation, it is 1605 critical that the Neighbor Cache entry for a router is shared by all 1606 Destination Cache entries using that router in order to prevent 1607 redundant Neighbor Unreachability Detection probes. 1609 Note also that other protocols (e.g., Mobile IPv6) might add 1610 additional conceptual data structures. An implementation is at 1611 liberty to implement such data structures in any way it pleases. For 1612 example, an implementation could merge all conceptual data structures 1613 into a single routing table. 1615 The Neighbor Cache contains information maintained by the Neighbor 1616 Unreachability Detection algorithm. A key piece of information is a 1617 neighbor's reachability state, which is one of five possible values. 1618 The following definitions are informal; precise definitions can be 1619 found in Section 7.3.2. 1621 INCOMPLETE Address resolution is in progress and the link-layer 1622 address of the neighbor has not yet been determined. 1624 REACHABLE Roughly speaking, the neighbor is known to have been 1625 reachable recently (within tens of seconds ago). 1627 STALE The neighbor is no longer known to be reachable but 1628 until traffic is sent to the neighbor, no attempt 1629 should be made to verify its reachability. 1631 DELAY The neighbor is no longer known to be reachable, and 1632 traffic has recently been sent to the neighbor. 1633 Rather than probe the neighbor immediately, however, 1634 delay sending probes for a short while in order to 1635 give upper layer protocols a chance to provide 1636 reachability confirmation. 1638 PROBE The neighbor is no longer known to be reachable, and 1639 unicast Neighbor Solicitation probes are being sent to 1640 verify reachability. 1642 5.2. Conceptual Sending Algorithm 1644 When sending a packet to a destination, a node uses a combination of 1645 the Destination Cache, the Prefix List, and the Default Router List 1646 to determine the IP address of the appropriate next hop, an operation 1647 known as "next-hop determination". Once the IP address of the next 1648 hop is known, the Neighbor Cache is consulted for link-layer 1649 information about that neighbor. 1651 Next-hop determination for a given unicast destination operates as 1652 follows. The sender performs a longest prefix match against the 1653 Prefix List to determine whether the packet's destination is on- or 1654 off-link. If the destination is on-link, the next-hop address is the 1655 same as the packet's destination address. Otherwise, the sender 1656 selects a router from the Default Router List (following the rules 1657 described in Section 6.3.6). 1659 For efficiency reasons, next-hop determination is not performed on 1660 every packet that is sent. Instead, the results of next-hop 1661 determination computations are saved in the Destination Cache (which 1662 also contains updates learned from Redirect messages). When the 1663 sending node has a packet to send, it first examines the Destination 1664 Cache. If no entry exists for the destination, next-hop 1665 determination is invoked to create a Destination Cache entry. 1667 Once the IP address of the next-hop node is known, the sender 1668 examines the Neighbor Cache for link-layer information about that 1669 neighbor. If no entry exists, the sender creates one, sets its state 1670 to INCOMPLETE, initiates Address Resolution, and then queues the data 1671 packet pending completion of address resolution. For multicast- 1672 capable interfaces Address Resolution consists of sending a Neighbor 1673 Solicitation message and waiting for a Neighbor Advertisement. When 1674 a Neighbor Advertisement response is received, the link-layer 1675 addresses is entered in the Neighbor Cache entry and the queued 1676 packet is transmitted. The address resolution mechanism is described 1677 in detail in Section 7.2. 1679 For multicast packets the next-hop is always the (multicast) 1680 destination address and is considered to be on-link. The procedure 1681 for determining the link-layer address corresponding to a given IP 1682 multicast address can be found in a separate document that covers 1683 operating IP over a particular link type (e.g., [IPv6-ETHER]). 1685 Each time a Neighbor Cache entry is accessed while transmitting a 1686 unicast packet, the sender checks Neighbor Unreachability Detection 1687 related information according to the Neighbor Unreachability 1688 Detection algorithm (Section 7.3). This unreachability check might 1689 result in the sender transmitting a unicast Neighbor Solicitation to 1690 verify that the neighbor is still reachable. 1692 Next-hop determination is done the first time traffic is sent to a 1693 destination. As long as subsequent communication to that destination 1694 proceeds successfully, the Destination Cache entry continues to be 1695 used. If at some point communication ceases to proceed, as 1696 determined by the Neighbor Unreachability Detection algorithm, next- 1697 hop determination may need to be performed again. For example, 1698 traffic through a failed router should be switched to a working 1699 router. Likewise, it may be possible to reroute traffic destined for 1700 a mobile node to a "mobility agent". 1702 Note that when a node redoes next-hop determination there is no need 1703 to discard the complete Destination Cache entry. In fact, it is 1704 generally beneficial to retain such cached information as the PMTU 1705 and round trip timer values that may also be kept in the Destination 1706 Cache entry. 1708 Routers and multihomed hosts have multiple interfaces. The remainder 1709 of this document assumes that all sent and received Neighbor 1710 Discovery messages refer to the interface of appropriate context. 1711 For example, when responding to a Router Solicitation, the 1712 corresponding Router Advertisement is sent out the interface on which 1713 the solicitation was received. 1715 5.3. Garbage Collection and Timeout Requirements 1717 The conceptual data structures described above use different 1718 mechanisms for discarding potentially stale or unused information. 1720 From the perspective of correctness there is no need to periodically 1721 purge Destination and Neighbor Cache entries. Although stale 1722 information can potentially remain in the cache indefinitely, the 1723 Neighbor Unreachability Detection algorithm ensures that stale 1724 information is purged quickly if it is actually being used. 1726 To limit the storage needed for the Destination and Neighbor Caches, 1727 a node may need to garbage-collect old entries. However, care must 1728 be taken to insure that sufficient space is always present to hold 1729 the working set of active entries. A small cache may result in an 1730 excessive number of Neighbor Discovery messages if entries are 1731 discarded and rebuilt in quick succession. Any LRU-based policy that 1732 only reclaims entries that have not been used in some time (e.g., ten 1733 minutes or more) should be adequate for garbage-collecting unused 1734 entries. 1736 A node should retain entries in the Default Router List and the 1737 Prefix List until their lifetimes expire. However, a node may 1738 garbage collect entries prematurely if it is low on memory. If not 1739 all routers are kept on the Default Router list, a node should retain 1740 at least two entries in the Default Router List (and preferably more) 1741 in order to maintain robust connectivity for off-link destinations. 1743 When removing an entry from the Prefix List there is no need to purge 1744 any entries from the Destination or Neighbor Caches. Neighbor 1745 Unreachability Detection will efficiently purge any entries in these 1746 caches that have become invalid. When removing an entry from the 1747 Default Router List, however, any entries in the Destination Cache 1748 that go through that router must perform next-hop determination again 1749 to select a new default router. 1751 6. ROUTER AND PREFIX DISCOVERY 1753 This section describes router and host behavior related to the Router 1754 Discovery portion of Neighbor Discovery. Router Discovery is used to 1755 locate neighboring routers as well as learn prefixes and 1756 configuration parameters related to address autoconfiguration. 1758 Prefix Discovery is the process through which hosts learn the ranges 1759 of IP addresses that reside on-link and can be reached directly 1760 without going through a router. Routers send Router Advertisements 1761 that indicate whether the sender is willing to be a default router. 1762 Router Advertisements also contain Prefix Information options that 1763 list the set of prefixes that identify on-link IP addresses. 1765 Stateless Address Autoconfiguration must also obtain subnet prefixes 1766 as part of configuring addresses. Although the prefixes used for 1767 address autoconfiguration are logically distinct from those used for 1768 on-link determination, autoconfiguration information is piggybacked 1769 on Router Discovery messages to reduce network traffic. Indeed, the 1770 same prefixes can be advertised for on-link determination and address 1771 autoconfiguration by specifying the appropriate flags in the Prefix 1772 Information options. See [ADDRCONF] for details on how 1773 autoconfiguration information is processed. 1775 6.1. Message Validation 1777 6.1.1. Validation of Router Solicitation Messages 1779 Hosts MUST silently discard any received Router Solicitation 1780 Messages. 1782 A router MUST silently discard any received Router Solicitation 1783 messages that do not satisfy all of the following validity checks: 1785 - The IP Hop Limit field has a value of 255, i.e., the packet 1786 could not possibly have been forwarded by a router. 1788 - ICMP Checksum is valid. 1790 - ICMP Code is 0. 1792 - ICMP length (derived from the IP length) is 8 or more octets. 1794 - All included options have a length that is greater than zero. 1796 - If the IP source address is the unspecified address, there is no 1797 source link-layer address option in the message. 1799 The contents of the Reserved field, and of any unrecognized options, 1800 MUST be ignored. Future, backward-compatible changes to the protocol 1801 may specify the contents of the Reserved field or add new options; 1802 backward-incompatible changes may use different Code values. 1804 The contents of any defined options that are not specified to be used 1805 with Router Solicitation messages MUST be ignored and the packet 1806 processed as normal. The only defined option that may appear is the 1807 Source Link-Layer Address option. 1809 A solicitation that passes the validity checks is called a "valid 1810 solicitation". 1812 6.1.2. Validation of Router Advertisement Messages 1814 A node MUST silently discard any received Router Advertisement 1815 messages that do not satisfy all of the following validity checks: 1817 - IP Source Address is a link-local address. Routers must use 1818 their link-local address as the source for Router Advertisement 1819 and Redirect messages so that hosts can uniquely identify 1820 routers. 1822 - The IP Hop Limit field has a value of 255, i.e., the packet 1823 could not possibly have been forwarded by a router. 1825 - ICMP Checksum is valid. 1827 - ICMP Code is 0. 1829 - ICMP length (derived from the IP length) is 16 or more octets. 1831 - All included options have a length that is greater than zero. 1833 The contents of the Reserved field, and of any unrecognized options, 1834 MUST be ignored. Future, backward-compatible changes to the protocol 1835 may specify the contents of the Reserved field or add new options; 1836 backward-incompatible changes may use different Code values. 1838 The contents of any defined options that are not specified to be used 1839 with Router Advertisement messages MUST be ignored and the packet 1840 processed as normal. The only defined options that may appear are 1841 the Source Link-Layer Address, Prefix Information and MTU options. 1843 An advertisement that passes the validity checks is called a "valid 1844 advertisement". 1846 6.2. Router Specification 1848 6.2.1. Router Configuration Variables 1850 A router MUST allow for the following conceptual variables to be 1851 configured by system management. The specific variable names are 1852 used for demonstration purposes only, and an implementation is not 1853 required to have them, so long as its external behavior is consistent 1854 with that described in this document. Default values are specified 1855 to simplify configuration in common cases. 1857 The default values for some of the variables listed below may be 1858 overridden by specific documents that describe how IPv6 operates over 1859 different link layers. This rule simplifies the configuration of 1860 Neighbor Discovery over link types with widely differing performance 1861 characteristics. 1863 For each interface: 1865 IsRouter A flag indicating whether routing is enabled on 1866 this interface. Enabling routing on the interface 1867 would imply that a router can forward packets 1868 to or from the interface. 1870 Default: FALSE 1872 AdvSendAdvertisements 1873 A flag indicating whether or not the router sends 1874 periodic Router Advertisements and responds to 1875 Router Solicitations. 1877 Default: FALSE 1879 Note that AdvSendAdvertisements MUST be FALSE by 1880 default so that a node will not accidentally start 1881 acting as a router unless it is explicitly 1882 configured by system management to send Router 1883 Advertisements. 1885 MaxRtrAdvInterval 1886 The maximum time allowed between sending 1887 unsolicited multicast Router Advertisements from 1888 the interface, in seconds. MUST be no less than 4 1889 seconds and no greater than 1800 seconds. 1891 Default: 600 seconds 1893 MinRtrAdvInterval 1894 The minimum time allowed between sending 1895 unsolicited multicast Router Advertisements from 1896 the interface, in seconds. MUST be no less than 3 1897 seconds and no greater than .75 *MaxRtrAdvInterval. 1899 Default: 0.33 * MaxRtrAdvInterval 1901 AdvManagedFlag 1902 The TRUE/FALSE value to be placed in the "Managed 1903 address configuration" flag field in the Router 1904 Advertisement. See [ADDRCONF]. 1906 Default: FALSE 1908 AdvOtherConfigFlag 1909 The TRUE/FALSE value to be placed in the "Other 1910 configuration" flag field in the Router 1911 Advertisement. See [ADDRCONF]. 1913 Default: FALSE 1915 AdvLinkMTU The value to be placed in MTU options sent by the 1916 router. A value of zero indicates that no MTU 1917 options are sent. 1919 Default: 0 1921 AdvReachableTime 1922 The value to be placed in the Reachable Time field 1923 in the Router Advertisement messages sent by the 1924 router. The value zero means unspecified (by this 1925 router). MUST be no greater than 3,600,000 1926 milliseconds (1 hour). 1928 Default: 0 1930 AdvRetransTimer The value to be placed in the Retrans Timer field 1931 in the Router Advertisement messages sent by the 1932 router. The value zero means unspecified (by this 1933 router). 1935 Default: 0 1937 AdvCurHopLimit 1938 The default value to be placed in the Cur Hop Limit 1939 field in the Router Advertisement messages sent by 1940 the router. The value should be set to that 1941 current diameter of the Internet. The value zero 1942 means unspecified (by this router). 1944 Default: The value specified in the "Assigned 1945 Numbers" RFC [ASSIGNED] that was in effect at the 1946 time of implementation. 1948 AdvDefaultLifetime 1949 The value to be placed in the Router Lifetime field 1950 of Router Advertisements sent from the interface, 1951 in seconds. MUST be either zero or between 1952 MaxRtrAdvInterval and 9000 seconds. A value of 1953 zero indicates that the router is not to be used as 1954 a default router. 1956 Default: 3 * MaxRtrAdvInterval 1958 AdvPrefixList 1959 A list of prefixes to be placed in Prefix 1960 Information options in Router Advertisement 1961 messages sent from the interface. 1963 Default: all prefixes that the router advertises 1964 via routing protocols as being on-link for the 1965 interface from which the advertisement is sent. 1966 The link-local prefix SHOULD NOT be included in the 1967 list of advertised prefixes. 1969 Each prefix has an associated: 1971 AdvValidLifetime 1972 The value to be placed in the Valid 1973 Lifetime in the Prefix Information 1974 option, in seconds. The designated value 1975 of all 1's (0xffffffff) represents 1976 infinity. Implementations MAY allow 1977 AdvValidLifetime to be specified in two 1978 ways: 1980 - a time that decrements in real time, 1981 that is, one that will result in a 1982 Lifetime of zero at the specified 1983 time in the future, or 1985 - a fixed time that stays the same in 1986 consecutive advertisements. 1988 Default: 2592000 seconds (30 days), fixed 1989 (i.e., stays the same in consecutive 1990 advertisements). 1992 AdvOnLinkFlag 1993 The value to be placed in the on-link 1994 flag ("L-bit") field in the Prefix 1995 Information option. 1997 Default: TRUE 1999 Automatic address configuration [ADDRCONF] 2000 defines additional information associated with 2001 each the prefixes: 2003 AdvPreferredLifetime 2004 The value to be placed in the Preferred 2005 Lifetime in the Prefix Information 2006 option, in seconds. The designated value 2007 of all 1's (0xffffffff) represents 2008 infinity. See [ADDRCONF] for details on 2009 how this value is used. Implementations 2010 MAY allow AdvPreferredLifetime to be 2011 specified in two ways: 2013 - a time that decrements in real time, 2014 that is, one that will result in a 2015 Lifetime of zero at a specified time 2016 in the future, or 2018 - a fixed time that stays the same in 2019 consecutive advertisements. 2021 Default: 604800 seconds (7 days), fixed 2022 (i.e., stays the same in consecutive 2023 advertisements). This value MUST NOT be 2024 larger than AdvValidLifetime. 2026 AdvAutonomousFlag 2027 The value to be placed in the Autonomous 2028 Flag field in the Prefix Information 2029 option. See [ADDRCONF]. 2031 Default: TRUE 2033 The above variables contain information that is placed in outgoing 2034 Router Advertisement messages. Hosts use the received information to 2035 initialize a set of analogous variables that control their external 2036 behavior (see Section 6.3.2). Some of these host variables (e.g., 2037 CurHopLimit, RetransTimer, and ReachableTime) apply to all nodes 2038 including routers. In practice, these variables may not actually be 2039 present on routers, since their contents can be derived from the 2040 variables described above. However, external router behavior MUST be 2041 the same as host behavior with respect to these variables. In 2042 particular, this includes the occasional randomization of the 2043 ReachableTime value as described in Section 6.3.2. 2045 Protocol constants are defined in Section 10. 2047 6.2.2. Becoming An Advertising Interface 2049 The term "advertising interface" refers to any functioning and 2050 enabled interface that has at least one unicast IP address 2051 assigned to it and whose corresponding AdvSendAdvertisements flag is 2052 TRUE. A router MUST NOT send Router Advertisements out any interface 2053 that is not an advertising interface. 2055 An interface may become an advertising interface at times other than 2056 system startup. For example: 2058 - changing the AdvSendAdvertisements flag on an enabled interface 2059 from FALSE to TRUE, or 2061 - administratively enabling the interface, if it had been 2062 administratively disabled, and its AdvSendAdvertisements flag is 2063 TRUE, or 2065 - enabling IP forwarding capability (i.e., changing the system 2066 from being a host to being a router), when the interface's 2067 AdvSendAdvertisements flag is TRUE. 2069 A router MUST join the all-routers multicast address on an 2070 advertising interface. Routers respond to Router Solicitations sent 2071 to the all-routers address and verify the consistency of Router 2072 Advertisements sent by neighboring routers. 2074 6.2.3. Router Advertisement Message Content 2076 A router sends periodic as well as solicited Router Advertisements 2077 out its advertising interfaces. Outgoing Router Advertisements are 2078 filled with the following values consistent with the message format 2079 given in Section 4.2: 2081 - In the Router Lifetime field: the interface's configured 2082 AdvDefaultLifetime. 2084 - In the M and O flags: the interface's configured AdvManagedFlag 2085 and AdvOtherConfigFlag, respectively. See [ADDRCONF]. 2087 - In the Cur Hop Limit field: the interface's configured 2088 CurHopLimit. 2090 - In the Reachable Time field: the interface's configured 2091 AdvReachableTime. 2093 - In the Retrans Timer field: the interface's configured 2094 AdvRetransTimer. 2096 - In the options: 2098 o Source Link-Layer Address option: link-layer address of the 2099 sending interface. This option MAY be omitted to 2100 facilitate in-bound load balancing over replicated 2101 interfaces. 2103 o MTU option: the interface's configured AdvLinkMTU value if 2104 the value is non-zero. If AdvLinkMTU is zero the MTU 2105 option is not sent. 2107 o Prefix Information options: one Prefix Information option 2108 for each prefix listed in AdvPrefixList with the option 2109 fields set from the information in the AdvPrefixList entry 2110 as follows: 2112 - In the "on-link" flag: the entry's AdvOnLinkFlag. 2114 - In the Valid Lifetime field: the entry's 2115 AdvValidLifetime. 2117 - In the "Autonomous address configuration" flag: the 2118 entry's AdvAutonomousFlag. 2120 - In the Preferred Lifetime field: the entry's 2121 AdvPreferredLifetime. 2123 A router might want to send Router Advertisements without advertising 2124 itself as a default router. For instance, a router might advertise 2125 prefixes for address autoconfiguration while not wishing to forward 2126 packets. Such a router sets the Router Lifetime field in outgoing 2127 advertisements to zero. 2129 A router MAY choose not to include some or all options when sending 2130 unsolicited Router Advertisements. For example, if prefix lifetimes 2131 are much longer than AdvDefaultLifetime, including them every few 2132 advertisements may be sufficient. However, when responding to a 2133 Router Solicitation or while sending the first few initial 2134 unsolicited advertisements, a router SHOULD include all options so 2135 that all information (e.g., prefixes) is propagated quickly during 2136 system initialization. 2138 If including all options causes the size of an advertisement to 2139 exceed the link MTU, multiple advertisements can be sent, each 2140 containing a subset of the options. 2142 6.2.4. Sending Unsolicited Router Advertisements 2144 A host MUST NOT send Router Advertisement messages at any time. 2146 Unsolicited Router Advertisements are not strictly periodic: the 2147 interval between subsequent transmissions is randomized to reduce the 2148 probability of synchronization with the advertisements from other 2149 routers on the same link [SYNC]. Each advertising interface has its 2150 own timer. Whenever a multicast advertisement is sent from an 2151 interface, the timer is reset to a uniformly-distributed random value 2152 between the interface's configured MinRtrAdvInterval and 2153 MaxRtrAdvInterval; expiration of the timer causes the next 2154 advertisement to be sent and a new random value to be chosen. 2156 For the first few advertisements (up to 2157 MAX_INITIAL_RTR_ADVERTISEMENTS) sent from an interface when it 2158 becomes an advertising interface, if the randomly chosen interval is 2159 greater than MAX_INITIAL_RTR_ADVERT_INTERVAL, the timer SHOULD be set 2160 to MAX_INITIAL_RTR_ADVERT_INTERVAL instead. Using a smaller interval 2161 for the initial advertisements increases the likelihood of a router 2162 being discovered quickly when it first becomes available, in the 2163 presence of possible packet loss. 2165 The information contained in Router Advertisements may change through 2166 actions of system management. For instance, the lifetime of 2167 advertised prefixes may change, new prefixes could be added, a router 2168 could cease to be a router (i.e., switch from being a router to being 2169 a host), etc. In such cases, the router MAY transmit up to 2170 MAX_INITIAL_RTR_ADVERTISEMENTS unsolicited advertisements, using the 2171 same rules as when an interface becomes an advertising interface. 2173 6.2.5. Ceasing To Be An Advertising Interface 2175 An interface may cease to be an advertising interface, through 2176 actions of system management such as: 2178 - changing the AdvSendAdvertisements flag of an enabled interface 2179 from TRUE to FALSE, or 2181 - administratively disabling the interface, or 2183 - shutting down the system. 2185 In such cases the router SHOULD transmit one or more (but not more 2186 than MAX_FINAL_RTR_ADVERTISEMENTS) final multicast Router 2187 Advertisements on the interface with a Router Lifetime field of zero. 2188 In the case of a router becoming a host, the system SHOULD also 2189 depart from the all-routers IP multicast group on all interfaces on 2190 which the router supports IP multicast (whether or not they had been 2191 advertising interfaces). In addition, the host MUST insure that 2192 subsequent Neighbor Advertisement messages sent from the interface 2193 have the Router flag set to zero. 2195 Note that system management may disable a router's IP forwarding 2196 capability (i.e., changing the system from being a router to being a 2197 host), a step that does not necessarily imply that the router's 2198 interfaces stop being advertising interfaces. In such cases, 2199 subsequent Router Advertisements MUST set the Router Lifetime field 2200 to zero. 2202 6.2.6. Processing Router Solicitations 2204 A host MUST silently discard any received Router Solicitation 2205 messages. 2207 In addition to sending periodic, unsolicited advertisements, a router 2208 sends advertisements in response to valid solicitations received on 2209 an advertising interface. A router MAY choose to unicast the 2210 response directly to the soliciting host's address (if the 2211 solicitation's source address is not the unspecified address), but 2212 the usual case is to multicast the response to the all-nodes group. 2213 In the latter case, the interface's interval timer is reset to a new 2214 random value, as if an unsolicited advertisement had just been sent 2215 (see Section 6.2.4). 2217 In all cases, Router Advertisements sent in response to a Router 2218 Solicitation MUST be delayed by a random time between 0 and 2219 MAX_RA_DELAY_TIME seconds. (If a single advertisement is sent in 2220 response to multiple solicitations, the delay is relative to the 2221 first solicitation.) In addition, consecutive Router Advertisements 2222 sent to the all-nodes multicast address MUST be rate limited to no 2223 more than one advertisement every MIN_DELAY_BETWEEN_RAS seconds. 2225 A router might process Router Solicitations as follows: 2227 - Upon receipt of a Router Solicitation, compute a random delay 2228 within the range 0 through MAX_RA_DELAY_TIME. If the computed 2229 value corresponds to a time later than the time the next multicast 2230 Router Advertisement is scheduled to be sent, ignore the random 2231 delay and send the advertisement at the already-scheduled time. 2233 - If the router sent a multicast Router Advertisement (solicited or 2234 unsolicited) within the last MIN_DELAY_BETWEEN_RAS seconds, 2235 schedule the advertisement to be sent at a time corresponding to 2236 MIN_DELAY_BETWEEN_RAS plus the random value after the previous 2237 advertisement was sent. This ensures that the multicast Router 2238 Advertisements are rate limited. 2240 - Otherwise, schedule the sending of a Router Advertisement at the 2241 time given by the random value. 2243 Note that a router is permitted to send multicast Router 2244 Advertisements more frequently than indicated by the 2245 MinRtrAdvInterval configuration variable so long as the more frequent 2246 advertisements are responses to Router Solicitations. In all cases, 2247 however, unsolicited multicast advertisements MUST NOT be sent more 2248 frequently than indicated by MinRtrAdvInterval. 2250 Router Solicitations in which the Source Address is the unspecified 2251 address MUST NOT update the router's Neighbor Cache; solicitations 2252 with a proper source address update the Neighbor Cache as follows. If 2253 the router already has a Neighbor Cache entry for the solicitation's 2254 sender, the solicitation contains a Source Link-Layer Address option, 2255 and the received link-layer address differs from that already in the 2256 cache, the link-layer address SHOULD be updated in the appropriate 2257 Neighbor Cache entry, and its reachability state MUST also be set to 2258 STALE. If there is no existing Neighbor Cache entry for the 2259 solicitation's sender, the router creates one, installs the link- 2260 layer address and sets its reachability state to STALE as specified 2261 in Section 7.3.3. If there is no existing Neighbor Cache entry and no 2262 Source Link-Layer Address option was present in the solicitation, the 2263 router may respond with either a multicast or a unicast router 2264 advertisement. Whether or not a Source Link-Layer Address option 2265 is provided, if a Neighbor Cache entry for the solicitation's sender 2266 exists (or is created) the entry's IsRouter flag MUST be set to 2267 FALSE. 2269 6.2.7. Router Advertisement Consistency 2271 Routers SHOULD inspect valid Router Advertisements sent by other 2272 routers and verify that the routers are advertising consistent 2273 information on a link. Detected inconsistencies indicate that one or 2274 more routers might be misconfigured and SHOULD be logged to system or 2275 network management. The minimum set of information to check 2276 includes: 2278 - Cur Hop Limit values (except for the unspecified value of zero 2279 other inconsistencies SHOULD be logged to system network 2280 management). 2282 - Values of the M or O flags. 2284 - Reachable Time values (except for the unspecified value of zero). 2286 - Retrans Timer values (except for the unspecified value of zero). 2288 - Values in the MTU options. 2290 - Preferred and Valid Lifetimes for the same prefix. If 2291 AdvPreferredLifetime and/or AdvValidLifetime decrement in real 2292 time as specified in section 6.2.1 then the comparison of the 2293 lifetimes can not compare the content of the fields in the Router 2294 Advertisement but must instead compare the time at which the 2295 prefix will become deprecated and invalidated, respectively. Due 2296 to link propagation delays and potentially poorly synchronized 2297 clocks between the routers such comparison SHOULD allow some time 2298 skew. 2300 Note that it is not an error for different routers to advertise 2301 different sets of prefixes. Also, some routers might leave some 2302 fields as unspecified, i.e., with the value zero, while other routers 2303 specify values. The logging of errors SHOULD be restricted to 2304 conflicting information that causes hosts to switch from one value to 2305 another with each received advertisement. 2307 Any other action on reception of Router Advertisement messages by a 2308 router is beyond the scope of this document. 2310 6.2.8. Link-local Address Change 2312 The link-local address on a router should rarely change, if ever. 2313 Nodes receiving Neighbor Discovery messages use the source address to 2314 identify the sender. If multiple packets from the same router 2315 contain different source addresses, nodes will assume they come from 2316 different routers, leading to undesirable behavior. For example, a 2317 node will ignore Redirect messages that are believed to have been 2318 sent by a router other than the current first-hop router. Thus the 2319 source address used in Router Advertisements sent by a particular 2320 router must be identical to the target address in a Redirect message 2321 when redirecting to that router. 2323 Using the link-local address to uniquely identify routers on the link 2324 has the benefit that the address a router is known by should not 2325 change when a site renumbers. 2327 If a router changes the link-local address for one of its interfaces, 2328 it SHOULD inform hosts of this change. The router SHOULD multicast a 2329 few Router Advertisements from the old link-local address with the 2330 Router Lifetime field set to zero and also multicast a few Router 2331 Advertisements from the new link-local address. The overall effect 2332 should be the same as if one interface ceases being an advertising 2333 interface, and a different one starts being an advertising interface. 2335 6.3. Host Specification 2337 6.3.1. Host Configuration Variables 2339 None. 2341 6.3.2. Host Variables 2343 A host maintains certain Neighbor Discovery related variables in 2344 addition to the data structures defined in Section 5.1. The specific 2345 variable names are used for demonstration purposes only, and an 2346 implementation is not required to have them, so long as its external 2347 behavior is consistent with that described in this document. 2349 These variables have default values that are overridden by 2350 information received in Router Advertisement messages. The default 2351 values are used when there is no router on the link or when all 2352 received Router Advertisements have left a particular value 2353 unspecified. 2355 The default values in this specification may be overridden by 2356 specific documents that describe how IP operates over different link 2357 layers. This rule allows Neighbor Discovery to operate over links 2358 with widely varying performance characteristics. 2360 For each interface: 2362 LinkMTU The MTU of the link. 2363 Default: The valued defined in the specific 2364 document that describes how IPv6 operates over 2365 the particular link layer (e.g., [IPv6-ETHER]). 2367 CurHopLimit The default hop limit to be used when sending 2368 (unicast) IP packets. 2370 Default: The value specified in the "Assigned 2371 Numbers" RFC [ASSIGNED] that was in effect at the 2372 time of implementation. 2374 BaseReachableTime 2375 A base value used for computing the random 2376 ReachableTime value. 2378 Default: REACHABLE_TIME milliseconds. 2380 ReachableTime The time a neighbor is considered reachable after 2381 receiving a reachability confirmation. 2383 This value should be a uniformly-distributed 2384 random value between MIN_RANDOM_FACTOR and 2385 MAX_RANDOM_FACTOR times BaseReachableTime 2386 milliseconds. A new random value should be 2387 calculated when BaseReachableTime changes (due to 2388 Router Advertisements) or at least every few 2389 hours even if no Router Advertisements are 2390 received. 2392 RetransTimer The time between retransmissions of Neighbor 2393 Solicitation messages to a neighbor when 2394 resolving the address or when probing the 2395 reachability of a neighbor. 2397 Default: RETRANS_TIMER milliseconds 2399 6.3.3. Interface Initialization 2401 The host joins the all-nodes multicast address on all multicast- 2402 capable interfaces. 2404 6.3.4. Processing Received Router Advertisements 2406 When multiple routers are present, the information advertised 2407 collectively by all routers may be a superset of the information 2408 contained in a single Router Advertisement. Moreover, information 2409 may also be obtained through other dynamic means like DHCPv6. Hosts 2410 accept the union of all received information; the receipt of a Router 2411 Advertisement MUST NOT invalidate all information received in a 2412 previous advertisement or from another source. However, when 2413 received information for a specific parameter (e.g., Link MTU) or 2414 option (e.g., Lifetime on a specific Prefix) differs from information 2415 received earlier, and the parameter/option can only have one value, 2416 the most recently-received information is considered authoritative. 2418 Some Router Advertisement fields (e.g., Cur Hop Limit, Reachable Time 2419 and Retrans Timer) may contain a value denoting unspecified. In such 2420 cases, the parameter should be ignored and the host should continue 2421 using whatever value it is already using. In particular, a host MUST 2422 NOT interpret the unspecified value as meaning change back to the 2423 default value that was in use before the first Router Advertisement 2424 was received. This rule prevents hosts from continually changing an 2425 internal variable when one router advertises a specific value, but 2426 other routers advertise the unspecified value. 2428 On receipt of a valid Router Advertisement, a host extracts the 2429 source address of the packet and does the following: 2431 - If the address is not already present in the host's Default 2432 Router List, and the advertisement's Router Lifetime is non- 2433 zero, create a new entry in the list, and initialize its 2434 invalidation timer value from the advertisement's Router 2435 Lifetime field. 2437 - If the address is already present in the host's Default Router 2438 List as a result of a previously-received advertisement, reset 2439 its invalidation timer to the Router Lifetime value in the 2440 newly-received advertisement. 2442 - If the address is already present in the host's Default Router 2443 List and the received Router Lifetime value is zero, immediately 2444 time-out the entry as specified in Section 6.3.5. 2446 To limit the storage needed for the Default Router List, a host MAY 2447 choose not to store all of the router addresses discovered via 2448 advertisements. However, a host MUST retain at least two router 2449 addresses and SHOULD retain more. Default router selections are made 2450 whenever communication to a destination appears to be failing. Thus, 2451 the more routers on the list, the more likely an alternative working 2452 router can be found quickly (e.g., without having to wait for the 2453 next advertisement to arrive). 2455 If the received Cur Hop Limit value is non-zero the host SHOULD set 2456 its CurHopLimit variable to the received value. 2458 If the received Reachable Time value is non-zero the host SHOULD set 2459 its BaseReachableTime variable to the received value. If the new 2460 value differs from the previous value, the host SHOULD recompute a 2461 new random ReachableTime value. ReachableTime is computed as a 2462 uniformly-distributed random value between MIN_RANDOM_FACTOR and 2463 MAX_RANDOM_FACTOR times the BaseReachableTime. Using a random 2464 component eliminates the possibility Neighbor Unreachability 2465 Detection messages synchronize with each other. 2467 In most cases, the advertised Reachable Time value will be the same 2468 in consecutive Router Advertisements and a host's BaseReachableTime 2469 rarely changes. In such cases, an implementation SHOULD insure that 2470 a new random value gets recomputed at least once every few hours. 2472 The RetransTimer variable SHOULD be copied from the Retrans Timer 2473 field, if the received value is non-zero. 2475 After extracting information from the fixed part of the Router 2476 Advertisement message, the advertisement is scanned for valid 2477 options. If the advertisement contains a Source Link-Layer Address 2478 option the link-layer address SHOULD be recorded in the Neighbor 2479 Cache entry for the router (creating an entry if necessary) and the 2480 IsRouter flag in the Neighbor Cache entry MUST be set to TRUE. If no 2481 Source Link-Layer Address is included, but a corresponding Neighbor 2482 Cache entry exists, its IsRouter flag MUST be set to TRUE. The 2483 IsRouter flag is used by Neighbor Unreachability Detection to 2484 determine when a router changes to being a host (i.e., no longer 2485 capable of forwarding packets). If a Neighbor Cache entry is created 2486 for the router its reachability state MUST be set to STALE as 2487 specified in Section 7.3.3. If a cache entry already exists and is 2488 updated with a different link-layer address the reachability state 2489 MUST also be set to STALE. 2491 If the MTU option is present, hosts SHOULD copy the option's value 2492 into LinkMTU so long as the value is greater than or equal to the 2493 minimum link MTU [IPv6] and does not exceed the maximum LinkMTU value 2494 specified in the link type specific document (e.g., [IPv6-ETHER]). 2496 Prefix Information options that have the "on-link" (L) flag set 2497 indicate a prefix identifying a range of addresses that should be 2498 considered on-link. Note, however, that a Prefix Information option 2499 with the on-link flag set to zero conveys no information concerning 2500 on-link determination and MUST NOT be interpreted to mean that 2501 addresses covered by the prefix are off-link. The only way to cancel 2502 a previous on-link indication is to advertise that prefix with the 2503 L-bit set and the Lifetime set to zero. The default behavior (see 2504 Section 5.2) when sending a packet to an address for which no 2505 information is known about the on-link status of the address is to 2506 forward the packet to a default router; the reception of a Prefix 2507 Information option with the "on-link " (L) flag set to zero does not 2508 change this behavior. The reasons for an address being treated as 2509 on-link is specified in the definition of "on-link" in Section 2.1. 2510 Prefixes with the on-link flag set to zero would normally have the 2511 autonomous flag set and be used by [ADDRCONF]. 2513 For each Prefix Information option with the on-link flag set, a host 2514 does the following: 2516 - If the prefix is the link-local prefix, silently ignore the 2517 Prefix Information option. 2519 - If the prefix is not already present in the Prefix List, and the 2520 Prefix Information option's Valid Lifetime field is non-zero, 2521 create a new entry for the prefix and initialize its 2522 invalidation timer to the Valid Lifetime value in the Prefix 2523 Information option. 2525 - If the prefix is already present in the host's Prefix List as 2526 the result of a previously-received advertisement, reset its 2527 invalidation timer to the Valid Lifetime value in the Prefix 2528 Information option. If the new Lifetime value is zero, time-out 2529 the prefix immediately (see Section 6.3.5). 2531 - If the Prefix Information option's Valid Lifetime field is zero, 2532 and the prefix is not present in the host's Prefix List, 2533 silently ignore the option. 2535 Stateless address autoconfiguration [ADDRCONF] may in some 2536 circumstances increase the Valid Lifetime of a prefix or ignore it 2537 completely in order to prevent a particular denial of service attack. 2538 However, since the effect of the same denial of service targeted at 2539 the on-link prefix list is not catastrophic (hosts would send packets 2540 to a default router and receive a redirect rather than sending 2541 packets directly to a neighbor) the Neighbor Discovery protocol does 2542 not impose such a check on the prefix lifetime values. Similarly, 2543 [ADDRCONF] may impose certain restrictions on the prefix length for 2544 address configuration purposes. Therefore, the prefix might be 2545 rejected by [ADDRCONF] implementation in the host. However, the 2546 prefix length is still valid for on-link determination when combined 2547 with other flags in the prefix option. 2549 Note: Implementations can choose to process the on-link aspects of 2550 the prefixes separately from the address autoconfiguration aspects 2551 of the prefixes by, e.g., passing a copy of each valid Router 2552 Advertisement message to both an "on-link" and an "addrconf" 2553 function. Each function can then operate independently on the 2554 prefixes that have the appropriate flag set. 2556 6.3.5. Timing out Prefixes and Default Routers 2558 Whenever the invalidation timer expires for a Prefix List entry, that 2559 entry is discarded. No existing Destination Cache entries need be 2560 updated, however. Should a reachability problem arise with an 2561 existing Neighbor Cache entry, Neighbor Unreachability Detection will 2562 perform any needed recovery. 2564 Whenever the Lifetime of an entry in the Default Router List expires, 2565 that entry is discarded. When removing a router from the Default 2566 Router list, the node MUST update the Destination Cache in such a way 2567 that all entries using the router perform next-hop determination 2568 again rather than continue sending traffic to the (deleted) router. 2570 6.3.6. Default Router Selection 2572 The algorithm for selecting a router depends in part on whether or 2573 not a router is known to be reachable. The exact details of how a 2574 node keeps track of a neighbor's reachability state are covered in 2575 Section 7.3. The algorithm for selecting a default router is invoked 2576 during next-hop determination when no Destination Cache entry exists 2577 for an off-link destination or when communication through an existing 2578 router appears to be failing. Under normal conditions, a router 2579 would be selected the first time traffic is sent to a destination, 2580 with subsequent traffic for that destination using the same router as 2581 indicated in the Destination Cache modulo any changes to the 2582 Destination Cache caused by Redirect messages. 2584 The policy for selecting routers from the Default Router List is as 2585 follows: 2587 1) Routers that are reachable or probably reachable (i.e., in any 2588 state other than INCOMPLETE) SHOULD be preferred over routers 2589 whose reachability is unknown or suspect (i.e., in the 2590 INCOMPLETE state, or for which no Neighbor Cache entry exists). 2591 An implementation may choose to always return the same router or 2592 cycle through the router list in a round-robin fashion as long 2593 as it always returns a reachable or a probably reachable router 2594 when one is available. 2596 2) When no routers on the list are known to be reachable or 2597 probably reachable, routers SHOULD be selected in a round-robin 2598 fashion, so that subsequent requests for a default router do not 2599 return the same router until all other routers have been 2600 selected. 2602 Cycling through the router list in this case ensures that all 2603 available routers are actively probed by the Neighbor 2604 Unreachability Detection algorithm. A request for a default 2605 router is made in conjunction with the sending of a packet to a 2606 router, and the selected router will be probed for reachability 2607 as a side effect. 2609 6.3.7. Sending Router Solicitations 2611 When an interface becomes enabled, a host may be unwilling to wait 2612 for the next unsolicited Router Advertisement to locate default 2613 routers or learn prefixes. To obtain Router Advertisements quickly, 2614 a host SHOULD transmit up to MAX_RTR_SOLICITATIONS Router 2615 Solicitation messages each separated by at least 2616 RTR_SOLICITATION_INTERVAL seconds. Router Solicitations may be sent 2617 after any of the following events: 2619 - The interface is initialized at system startup time. 2621 - The interface is reinitialized after a temporary interface 2622 failure or after being temporarily disabled by system 2623 management. 2625 - The system changes from being a router to being a host, by 2626 having its IP forwarding capability turned off by system 2627 management. 2629 - The host attaches to a link for the first time. 2631 - The host re-attaches to a link after being detached for some 2632 time. 2634 A host sends Router Solicitations to the All-Routers multicast 2635 address. The IP source address is set to either one of the 2636 interface's unicast addresses or the unspecified address. The Source 2637 Link-Layer Address option SHOULD be set to the host's link-layer 2638 address, if the IP source address is not the unspecified address. 2640 Before a host sends an initial solicitation, it SHOULD delay the 2641 transmission for a random amount of time between 0 and 2642 MAX_RTR_SOLICITATION_DELAY. This serves to alleviate congestion when 2643 many hosts start up on a link at the same time, such as might happen 2644 after recovery from a power failure. If a host has already performed 2645 a random delay since the interface became (re)enabled (e.g., as part 2646 of Duplicate Address Detection [ADDRCONF]) there is no need to delay 2647 again before sending the first Router Solicitation message. 2649 In some cases, the random delay MAY be omitted if necessary. For 2650 instance, a mobile node, using [MIPv6], moving to a new link would 2651 need to discover such movement as soon as possible to minimize the 2652 amount of packet losses resulting from the change in its topological 2653 movement. Router Solicitations provide a useful tool for movement 2654 detection in Mobile IPv6 as they allow mobile nodes to determine 2655 movement to new links. Hence, if a mobile node received link layer 2656 information indicating that movement might have taken place, it MAY 2657 send a Router Solicitation immediately, without random delays. The 2658 strength of such indications should be assessed by the mobile node's 2659 implementation depending on the level of certainty of the link layer 2660 hints and is outside the scope of this specification. Note that using 2661 this mechanism inappropriately (e.g. based on weak or transient 2662 indications) may result in Router Solicitation storms. Furthermore, 2663 simultaneous mobility of a large number of mobile nodes that use this 2664 mechanism can result in a large number of solicitations sent 2665 simultaneously. 2667 Once the host sends a Router Solicitation, and receives a valid 2668 Router Advertisement with a non-zero Router Lifetime, the host MUST 2669 desist from sending additional solicitations on that interface, until 2670 the next time one of the above events occurs. Moreover, a host 2671 SHOULD send at least one solicitation in the case where an 2672 advertisement is received prior to having sent a solicitation. 2673 Unsolicited Router Advertisements may be incomplete (see Section 2674 6.2.3); solicited advertisements are expected to contain complete 2675 information. 2677 If a host sends MAX_RTR_SOLICITATIONS solicitations, and receives no 2678 Router Advertisements after having waited MAX_RTR_SOLICITATION_DELAY 2679 seconds after sending the last solicitation, the host concludes that 2680 there are no routers on the link for the purpose of [ADDRCONF]. 2681 However, the host continues to receive and process Router 2682 Advertisements messages in the event that routers appear on the link. 2684 7. ADDRESS RESOLUTION AND NEIGHBOR UNREACHABILITY DETECTION 2686 This section describes the functions related to Neighbor Solicitation 2687 and Neighbor Advertisement messages and includes descriptions of 2688 address resolution and the Neighbor Unreachability Detection 2689 algorithm. 2691 Neighbor Solicitation and Advertisement messages are also used for 2692 Duplicate Address Detection as specified by [ADDRCONF]. In 2693 particular, Duplicate Address Detection sends Neighbor Solicitation 2694 messages with an unspecified source address targeting its own 2695 "tentative" address. Such messages trigger nodes already using the 2696 address to respond with a multicast Neighbor Advertisement indicating 2697 that the address is in use. 2699 7.1. Message Validation 2701 7.1.1. Validation of Neighbor Solicitations 2703 A node MUST silently discard any received Neighbor Solicitation 2704 messages that do not satisfy all of the following validity checks: 2706 - The IP Hop Limit field has a value of 255, i.e., the packet 2707 could not possibly have been forwarded by a router. 2709 - ICMP Checksum is valid. 2711 - ICMP Code is 0. 2713 - ICMP length (derived from the IP length) is 24 or more octets. 2715 - Target Address is not a multicast address. 2717 - All included options have a length that is greater than zero. 2719 - If the IP source address is the unspecified address, the IP 2720 destination address is a solicited-node multicast address. 2722 - If the IP source address is the unspecified address, there is no 2723 source link-layer address option in the message. 2725 The contents of the Reserved field, and of any unrecognized options, 2726 MUST be ignored. Future, backward-compatible changes to the protocol 2727 may specify the contents of the Reserved field or add new options; 2728 backward-incompatible changes may use different Code values. 2730 The contents of any defined options that are not specified to be used 2731 with Neighbor Solicitation messages MUST be ignored and the packet 2732 processed as normal. The only defined option that may appear is the 2733 Source Link-Layer Address option. 2735 A Neighbor Solicitation that passes the validity checks is called a 2736 "valid solicitation". 2738 7.1.2. Validation of Neighbor Advertisements 2740 A node MUST silently discard any received Neighbor Advertisement 2741 messages that do not satisfy all of the following validity checks: 2743 - The IP Hop Limit field has a value of 255, i.e., the packet 2744 could not possibly have been forwarded by a router. 2746 - ICMP Checksum is valid. 2748 - ICMP Code is 0. 2750 - ICMP length (derived from the IP length) is 24 or more octets. 2752 - Target Address is not a multicast address. 2754 - If the IP Destination Address is a multicast address the 2755 Solicited flag is zero. 2757 - All included options have a length that is greater than zero. 2759 The contents of the Reserved field, and of any unrecognized options, 2760 MUST be ignored. Future, backward-compatible changes to the protocol 2761 may specify the contents of the Reserved field or add new options; 2762 backward-incompatible changes may use different Code values. 2764 The contents of any defined options that are not specified to be used 2765 with Neighbor Advertisement messages MUST be ignored and the packet 2766 processed as normal. The only defined option that may appear is the 2767 Target Link-Layer Address option. 2769 A Neighbor Advertisements that passes the validity checks is called a 2770 "valid advertisement". 2772 7.2. Address Resolution 2774 Address resolution is the process through which a node determines the 2775 link-layer address of a neighbor given only its IP address. Address 2776 resolution is performed only on addresses that are determined to be 2777 on-link and for which the sender does not know the corresponding 2778 link-layer address (see section 5.2). Address resolution is never 2779 performed on multicast addresses. 2781 7.2.1. Interface Initialization 2783 When a multicast-capable interface becomes enabled the node MUST join 2784 the all-nodes multicast address on that interface, as well as the 2785 solicited-node multicast address corresponding to each of the IP 2786 addresses assigned to the interface. 2788 The set of addresses assigned to an interface may change over time. 2789 New addresses might be added and old addresses might be removed 2790 [ADDRCONF]. In such cases the node MUST join and leave the 2791 solicited-node multicast address corresponding to the new and old 2792 addresses, respectively. Joining the solicited-node multicast address 2793 SHOULD be done using the Multicast Listener Discovery [MLD] protocol. 2794 Note that multiple unicast addresses may map into the same solicited- 2795 node multicast address; a node MUST NOT leave the solicited-node 2796 multicast group until all assigned addresses corresponding to that 2797 multicast address have been removed. 2799 7.2.2. Sending Neighbor Solicitations 2801 When a node has a unicast packet to send to a neighbor, but does not 2802 know the neighbor's link-layer address, it performs address 2803 resolution. For multicast-capable interfaces this entails creating a 2804 Neighbor Cache entry in the INCOMPLETE state and transmitting a 2805 Neighbor Solicitation message targeted at the neighbor. The 2806 solicitation is sent to the solicited-node multicast address 2807 corresponding to the target address. 2809 If the source address of the packet prompting the solicitation is the 2810 same as one of the addresses assigned to the outgoing interface, that 2811 address SHOULD be placed in the IP Source Address of the outgoing 2812 solicitation. Otherwise, any one of the addresses assigned to the 2813 interface should be used. Using the prompting packet's source 2814 address when possible ensures that the recipient of the Neighbor 2815 Solicitation installs in its Neighbor Cache the IP address that is 2816 highly likely to be used in subsequent return traffic belonging to 2817 the prompting packet's "connection". 2819 If the solicitation is being sent to a solicited-node multicast 2820 address, the sender MUST include its link-layer address (if it has 2821 one) as a Source Link-Layer Address option. Otherwise, the sender 2822 SHOULD include its link-layer address (if it has one) as a Source 2823 Link-Layer Address option. Including the source link-layer address 2824 in a multicast solicitation is required to give the target an address 2825 to which it can send the Neighbor Advertisement. On unicast 2826 solicitations, an implementation MAY omit the Source Link-Layer 2827 Address option. The assumption here is that if the sender has a 2828 peer's link-layer address in its cache, there is a high probability 2829 that the peer will also have an entry in its cache for the sender. 2830 Consequently, it need not be sent. 2832 While waiting for address resolution to complete, the sender MUST, 2833 for each neighbor, retain a small queue of packets waiting for 2834 address resolution to complete. The queue MUST hold at least one 2835 packet, and MAY contain more. However, the number of queued packets 2836 per neighbor SHOULD be limited to some small value. When a queue 2837 overflows, the new arrival SHOULD replace the oldest entry. Once 2838 address resolution completes, the node transmits any queued packets. 2840 While awaiting a response, the sender SHOULD retransmit Neighbor 2841 Solicitation messages approximately every RetransTimer milliseconds, 2842 even in the absence of additional traffic to the neighbor. 2844 Retransmissions MUST be rate-limited to at most one solicitation per 2845 neighbor every RetransTimer milliseconds. 2847 If no Neighbor Advertisement is received after MAX_MULTICAST_SOLICIT 2848 solicitations, address resolution has failed. The sender MUST return 2849 ICMP destination unreachable indications with code 3 (Address 2850 Unreachable) for each packet queued awaiting address resolution. 2852 7.2.3. Receipt of Neighbor Solicitations 2854 A valid Neighbor Solicitation that does not meet any the following 2855 requirements MUST be silently discarded: 2857 - The Target Address is a "valid" unicast or anycast address 2858 assigned to the receiving interface [ADDRCONF], 2860 - The Target Address is a unicast or anycast address for which the 2861 node is offering proxy service, or 2863 - The Target Address is a "tentative" address on which Duplicate 2864 Address Detection is being performed [ADDRCONF]. 2866 If the Target Address is tentative, the Neighbor Solicitation should 2867 be processed as described in [ADDRCONF]. Otherwise, the following 2868 description applies. If the Source Address is not the unspecified 2869 address and, on link layers that have addresses, the solicitation 2870 includes a Source Link-Layer Address option, then the recipient 2871 SHOULD create or update the Neighbor Cache entry for the IP Source 2872 Address of the solicitation. If an entry does not already exist, the 2873 node SHOULD create a new one and set its reachability state to STALE 2874 as specified in Section 7.3.3. If an entry already exists, and the 2875 cached link-layer address differs from the one in the received Source 2876 Link-Layer option, the cached address should be replaced by the 2877 received address and the entry's reachability state MUST be set to 2878 STALE. 2880 If a Neighbor Cache entry is created the IsRouter flag SHOULD be set 2881 to FALSE. This will be the case even if the Neighbor Solicitation is 2882 sent by a router since the Neighbor Solicitation messages do not 2883 contain an indication of whether or not the sender is a router. In 2884 the event that the sender is a router, subsequent Neighbor 2885 Advertisement or Router Advertisement messages will set the correct 2886 IsRouter value. If a Neighbor Cache entry already exists its 2887 IsRouter flag MUST NOT be modified. 2889 If the Source Address is the unspecified address the node MUST NOT 2890 create or update the Neighbor Cache entry. 2892 After any updates to the Neighbor Cache, the node sends a Neighbor 2893 Advertisement response as described in the next section. 2895 7.2.4. Sending Solicited Neighbor Advertisements 2897 A node sends a Neighbor Advertisement in response to a valid Neighbor 2898 Solicitation targeting one of the node's assigned addresses. The 2899 Target Address of the advertisement is copied from the Target Address 2900 of the solicitation. If the solicitation's IP Destination Address is 2901 not a multicast address, the Target Link-Layer Address option MAY be 2902 omitted; the neighboring node's cached value must already be current 2903 in order for the solicitation to have been received. If the 2904 solicitation's IP Destination Address is a multicast address, the 2905 Target Link-Layer option MUST be included in the advertisement. 2906 Furthermore, if the node is a router, it MUST set the Router flag to 2907 one; otherwise it MUST set the flag to zero. 2909 If the Target Address is either an anycast address or a unicast 2910 address for which the node is providing proxy service, or the Target 2911 Link-Layer Address option is not included, the Override flag SHOULD 2912 be set to zero. Otherwise, the Override flag SHOULD be set to one. 2913 Proper setting of the Override flag ensures that nodes give 2914 preference to non-proxy advertisements, even when received after 2915 proxy advertisements, and also ensures that the first advertisement 2916 for an anycast address "wins". 2918 If the source of the solicitation is the unspecified address, the 2919 node MUST set the Solicited flag to zero and multicast the 2920 advertisement to the all-nodes address. Otherwise, the node MUST set 2921 the Solicited flag to one and unicast the advertisement to the Source 2922 Address of the solicitation. 2924 If the Target Address is an anycast address the sender SHOULD delay 2925 sending a response for a random time between 0 and 2926 MAX_ANYCAST_DELAY_TIME seconds. 2928 Because unicast Neighbor Solicitations are not required to include a 2929 Source Link-Layer Address, it is possible that a node sending a 2930 solicited Neighbor Advertisement does not have a corresponding link- 2931 layer address for its neighbor in its Neighbor Cache. In such 2932 situations, a node will first have to use Neighbor Discovery to 2933 determine the link-layer address of its neighbor (i.e., send out a 2934 multicast Neighbor Solicitation). 2936 7.2.5. Receipt of Neighbor Advertisements 2938 When a valid Neighbor Advertisement is received (either solicited or 2939 unsolicited), the Neighbor Cache is searched for the target's entry. 2940 If no entry exists, the advertisement SHOULD be silently discarded. 2941 There is no need to create an entry if none exists, since the 2942 recipient has apparently not initiated any communication with the 2943 target. 2945 Once the appropriate Neighbor Cache entry has been located, the 2946 specific actions taken depend on the state of the Neighbor Cache 2947 entry, the flags in the advertisement and the actual link-layer 2948 address supplied. 2950 In any state, if the link layer has addresses and an unsolicited 2951 Neighbor Advertisement is received with the O flag cleared, with no 2952 Target Link-Layer address option included, the receiving node SHOULD 2953 silently discard the received advertisement. 2955 If the target's Neighbor Cache entry is in the INCOMPLETE state when 2956 the advertisement is received, one of two things happen: If the 2957 advertisement were solicited, the state is changed to REACHABLE. 2958 Otherwise, the state is set to STALE. Note that the Override flag is 2959 ignored if the entry is in the 2960 INCOMPLETE state. 2962 If the Neighbor Cache entry is not in INCOMPLETE state, the receiving 2963 node performs the following steps: 2965 - It records the link-layer address in the Neighbor Cache entry. 2967 - If the advertisement's Solicited flag is set, the state of the 2968 entry is set to REACHABLE, otherwise it is set to STALE. 2970 - It sets the IsRouter flag in the cache entry based on the Router 2971 flag in the received advertisement. 2973 - It sends any packets queued for the neighbor awaiting address 2974 resolution. 2976 If the target's Neighbor Cache entry is in any state other than 2977 INCOMPLETE when the advertisement is received, the following actions 2978 take place: 2980 I. If the Override flag is clear and the supplied link-layer address 2981 differs from that in the cache, then one of two actions takes 2982 place: 2983 a. If the state of the entry is REACHABLE, set it to STALE, but 2984 do not update the entry in any other way. 2985 b. Otherwise, the received advertisement should be ignored and MUST 2986 NOT update the cache. 2987 II. If the Override flag is set, or, both the Override flag is clear 2988 and the supplied link-layer address is the same as that in the 2989 cache, or no Target Link-layer address option was supplied, 2990 the received advertisement MUST update the Neighbor Cache entry as 2991 follows: 2993 - The link-layer address in the Target Link-Layer Address option 2994 MUST be inserted in the cache (if one is supplied and is different 2995 than the already recorded address). 2997 - If the Solicited flag is set, the state of the entry MUST be set 2998 to REACHABLE. If the Solicited flag is zero and the link-layer 2999 address was updated with a different address the state MUST be set 3000 to STALE. Otherwise, the entry's state remains unchanged. 3002 An advertisement's Solicited flag should only be set if the 3003 advertisement is a response to a Neighbor Solicitation. Because 3004 Neighbor Unreachability Detection Solicitations are sent to the 3005 cached link-layer address, receipt of a solicited advertisement 3006 indicates that the forward path is working. Receipt of an 3007 unsolicited advertisement, however, suggests that a neighbor has 3008 urgent information to announce (e.g., a changed link-layer 3009 address). If the urgent information indicates a change from what 3010 a node is currently using, the node should verify the reachability 3011 of the (new) path when it sends the next packet. There is no need 3012 to update the state for unsolicited advertisements that do not 3013 change the contents of the cache. 3015 - The IsRouter flag in the cache entry MUST be set based on the 3016 Router flag in the received advertisement. In those cases where 3017 the IsRouter flag changes from TRUE to FALSE as a result of this 3018 update, the node MUST remove that router from the Default Router 3019 List and update the Destination Cache entries for all destinations 3020 using that neighbor as a router as specified in Section 7.3.3. 3021 This is needed to detect when a node that is used as a router 3022 stops forwarding packets due to being configured as a host. 3024 The above rules ensure that the cache is updated either when the 3025 Neighbor Advertisement takes precedence (i.e., the Override flag is 3026 set) or when the Neighbor Advertisement refers to the same link-layer 3027 address that is currently recorded in the cache. If none of the 3028 above apply, the advertisement prompts future Neighbor Unreachability 3029 Detection (if it is not already in progress) by changing the state in 3030 the cache entry. 3032 7.2.6. Sending Unsolicited Neighbor Advertisements 3034 In some cases a node may be able to determine that its link-layer 3035 address has changed (e.g., hot-swap of an interface card) and may 3036 wish to inform its neighbors of the new link-layer address quickly. 3037 In such cases a node MAY send up to MAX_NEIGHBOR_ADVERTISEMENT 3038 unsolicited Neighbor Advertisement messages to the all-nodes 3039 multicast address. These advertisements MUST be separated by at 3040 least RetransTimer seconds. 3042 The Target Address field in the unsolicited advertisement is set to 3043 an IP address of the interface, and the Target Link-Layer Address 3044 option is filled with the new link-layer address. The Solicited flag 3045 MUST be set to zero, in order to avoid confusing the Neighbor 3046 Unreachability Detection algorithm. If the node is a router, it MUST 3047 set the Router flag to one; otherwise it MUST set it to zero. The 3048 Override flag MAY be set to either zero or one. In either case, 3049 neighboring nodes will immediately change the state of their Neighbor 3050 Cache entries for the Target Address to STALE, prompting them to 3051 verify the path for reachability. If the Override flag is set to 3052 one, neighboring nodes will install the new link-layer address in 3053 their caches. Otherwise, they will ignore the new link-layer 3054 address, choosing instead to probe the cached address. 3056 A node that has multiple IP addresses assigned to an interface MAY 3057 multicast a separate Neighbor Advertisement for each address. In 3058 such a case the node SHOULD introduce a small delay between the 3059 sending of each advertisement to reduce the probability of the 3060 advertisements being lost due to congestion. 3062 A proxy MAY multicast Neighbor Advertisements when its link-layer 3063 address changes or when it is configured (by system management or 3064 other mechanisms) to proxy for an address. If there are multiple 3065 nodes that are providing proxy services for the same set of addresses 3066 the proxies SHOULD provide a mechanism that prevents multiple proxies 3067 from multicasting advertisements for any one address, in order to 3068 reduce the risk of excessive multicast traffic. This is a requirement 3069 on other protocols that need to use proxies for Neighbor 3070 Advertisements. An example of a node that performs proxy 3071 advertisements is the Home Agent specified in [MIPv6]. 3073 Also, a node belonging to an anycast address MAY multicast 3074 unsolicited Neighbor Advertisements for the anycast address when the 3075 node's link-layer address changes. 3077 Note that because unsolicited Neighbor Advertisements do not reliably 3078 update caches in all nodes (the advertisements might not be received 3079 by all nodes), they should only be viewed as a performance 3080 optimization to quickly update the caches in most neighbors. The 3081 Neighbor Unreachability Detection algorithm ensures that all nodes 3082 obtain a reachable link-layer address, though the delay may be 3083 slightly longer. 3085 7.2.7. Anycast Neighbor Advertisements 3087 From the perspective of Neighbor Discovery, anycast addresses are 3088 treated just like unicast addresses in most cases. Because an 3089 anycast address is syntactically the same as a unicast address, nodes 3090 performing address resolution or Neighbor Unreachability Detection on 3091 an anycast address treat it as if it were a unicast address. No 3092 special processing takes place. 3094 Nodes that have an anycast address assigned to an interface treat 3095 them exactly the same as if they were unicast addresses with two 3096 exceptions. First, Neighbor Advertisements sent in response to a 3097 Neighbor Solicitation SHOULD be delayed by a random time between 0 3098 and MAX_ANYCAST_DELAY_TIME to reduce the probability of network 3099 congestion. Second, the Override flag in Neighbor Advertisements 3100 SHOULD be set to 0, so that when multiple advertisements are 3101 received, the first received advertisement is used rather than the 3102 most recently received advertisement. 3104 As with unicast addresses, Neighbor Unreachability Detection ensures 3105 that a node quickly detects when the current binding for an anycast 3106 address becomes invalid. 3108 7.2.8. Proxy Neighbor Advertisements 3110 Under limited circumstances, a router MAY proxy for one or more other 3111 nodes, that is, through Neighbor Advertisements indicate that it is 3112 willing to accept packets not explicitly addressed to itself. For 3113 example, a router might accept packets on behalf of a mobile node 3114 that has moved off-link. The mechanisms used by proxy are identical 3115 to the mechanisms used with anycast addresses. 3117 A proxy MUST join the solicited-node multicast address(es) that 3118 correspond to the IP address(es) assigned to the node for which it is 3119 proxying. This SHOULD be done using [MLD]. 3121 All solicited proxy Neighbor Advertisement messages MUST have the 3122 Override flag set to zero. This ensures that if the node itself is 3123 present on the link its Neighbor Advertisement (with the Override 3124 flag set to one) will take precedence of any advertisement received 3125 from a proxy. A proxy MAY send unsolicited advertisements with the 3126 Override flag set to one as specified in Section 7.2.6, but doing so 3127 may cause the proxy advertisement to override a valid entry created 3128 by the node itself. 3130 Finally, when sending a proxy advertisement in response to a Neighbor 3131 Solicitation, the sender should delay its response by a random time 3132 between 0 and MAX_ANYCAST_DELAY_TIME seconds. 3134 7.3. Neighbor Unreachability Detection 3136 Communication to or through a neighbor may fail for numerous reasons 3137 at any time, including hardware failure, hot-swap of an interface 3138 card, etc. If the destination has failed, no recovery is possible 3139 and communication fails. On the other hand, if it is the path that 3140 has failed, recovery may be possible. Thus, a node actively tracks 3141 the reachability "state" for the neighbors to which it is sending 3142 packets. 3144 Neighbor Unreachability Detection is used for all paths between hosts 3145 and neighboring nodes, including host-to-host, host-to-router, and 3146 router-to-host communication. Neighbor Unreachability Detection may 3147 also be used between routers, but is not required if an equivalent 3148 mechanism is available, for example, as part of the routing 3149 protocols. 3151 When a path to a neighbor appears to be failing, the specific 3152 recovery procedure depends on how the neighbor is being used. If the 3153 neighbor is the ultimate destination, for example, address resolution 3154 should be performed again. If the neighbor is a router, however, 3155 attempting to switch to another router would be appropriate. The 3156 specific recovery that takes place is covered under next-hop 3157 determination; Neighbor Unreachability Detection signals the need for 3158 next-hop determination by deleting a Neighbor Cache entry. 3160 Neighbor Unreachability Detection is performed only for neighbors to 3161 which unicast packets are sent; it is not used when sending to 3162 multicast addresses. 3164 7.3.1. Reachability Confirmation 3166 A neighbor is considered reachable if the node has recently received 3167 a confirmation that packets sent recently to the neighbor were 3168 received by its IP layer. Positive confirmation can be gathered in 3169 two ways: hints from upper layer protocols that indicate a connection 3170 is making "forward progress", or receipt of a Neighbor Advertisement 3171 message that is a response to a Neighbor Solicitation message. 3173 A connection makes "forward progress" if the packets received from a 3174 remote peer can only be arriving if recent packets sent to that peer 3175 are actually reaching it. In TCP, for example, receipt of a (new) 3176 acknowledgement indicates that previously sent data reached the peer. 3177 Likewise, the arrival of new (non-duplicate) data indicates that 3178 earlier acknowledgements are being delivered to the remote peer. If 3179 packets are reaching the peer, they must also be reaching the 3180 sender's next-hop neighbor; thus "forward progress" is a confirmation 3181 that the next-hop neighbor is reachable. For off-link destinations, 3182 forward progress implies that the first-hop router is reachable. 3183 When available, this upper-layer information SHOULD be used. 3185 In some cases (e.g., UDP-based protocols and routers forwarding 3186 packets to hosts) such reachability information may not be readily 3187 available from upper-layer protocols. When no hints are available 3188 and a node is sending packets to a neighbor, the node actively probes 3189 the neighbor using unicast Neighbor Solicitation messages to verify 3190 that the forward path is still working. 3192 The receipt of a solicited Neighbor Advertisement serves as 3193 reachability confirmation, since advertisements with the Solicited 3194 flag set to one are sent only in response to a Neighbor Solicitation. 3195 Receipt of other Neighbor Discovery messages such as Router 3196 Advertisements and Neighbor Advertisement with the Solicited flag set 3197 to zero MUST NOT be treated as a reachability confirmation. Receipt 3198 of unsolicited messages only confirm the one-way path from the sender 3199 to the recipient node. In contrast, Neighbor Unreachability 3200 Detection requires that a node keep track of the reachability of the 3201 forward path to a neighbor from the its perspective, not the 3202 neighbor's perspective. Note that receipt of a solicited 3203 advertisement indicates that a path is working in both directions. 3204 The solicitation must have reached the neighbor, prompting it to 3205 generate an advertisement. Likewise, receipt of an advertisement 3206 indicates that the path from the sender to the recipient is working. 3207 However, the latter fact is known only to the recipient; the 3208 advertisement's sender has no direct way of knowing that the 3209 advertisement it sent actually reached a neighbor. From the 3210 perspective of Neighbor Unreachability Detection, only the 3211 reachability of the forward path is of interest. 3213 7.3.2. Neighbor Cache Entry States 3215 A Neighbor Cache entry can be in one of five states: 3217 INCOMPLETE Address resolution is being performed on the entry. 3218 Specifically, a Neighbor Solicitation has been sent to 3219 the solicited-node multicast address of the target, 3220 but the corresponding Neighbor Advertisement has not 3221 yet been received. 3223 REACHABLE Positive confirmation was received within the last 3224 ReachableTime milliseconds that the forward path to 3225 the neighbor was functioning properly. While 3226 REACHABLE, no special action takes place as packets 3227 are sent. 3229 STALE More than ReachableTime milliseconds have elapsed 3230 since the last positive confirmation was received that 3231 the forward path was functioning properly. While 3232 stale, no action takes place until a packet is sent. 3234 The STALE state is entered upon receiving an 3235 unsolicited Neighbor Discovery message that updates 3236 the cached link-layer address. Receipt of such a 3237 message does not confirm reachability, and entering 3238 the STALE state insures reachability is verified 3239 quickly if the entry is actually being used. However, 3240 reachability is not actually verified until the entry 3241 is actually used. 3243 DELAY More than ReachableTime milliseconds have elapsed 3244 since the last positive confirmation was received that 3245 the forward path was functioning properly, and a 3246 packet was sent within the last DELAY_FIRST_PROBE_TIME 3247 seconds. If no reachability confirmation is received 3248 within DELAY_FIRST_PROBE_TIME seconds of entering the 3249 DELAY state, send a Neighbor Solicitation and change 3250 the state to PROBE. 3252 The DELAY state is an optimization that gives upper- 3253 layer protocols additional time to provide 3254 reachability confirmation in those cases where 3255 ReachableTime milliseconds have passed since the last 3256 confirmation due to lack of recent traffic. Without 3257 this optimization the opening of a TCP connection 3258 after a traffic lull would initiate probes even though 3259 the subsequent three-way handshake would provide a 3260 reachability confirmation almost immediately. 3262 PROBE A reachability confirmation is actively sought by 3263 retransmitting Neighbor Solicitations every 3264 RetransTimer milliseconds until a reachability 3265 confirmation is received. 3267 7.3.3. Node Behavior 3269 Neighbor Unreachability Detection operates in parallel with the 3270 sending of packets to a neighbor. While reasserting a neighbor's 3271 reachability, a node continues sending packets to that neighbor using 3272 the cached link-layer address. If no traffic is sent to a neighbor, 3273 no probes are sent. 3275 When a node needs to perform address resolution on a neighboring 3276 address, it creates an entry in the INCOMPLETE state and initiates 3277 address resolution as specified in Section 7.2. If address 3278 resolution fails, the entry SHOULD be deleted, so that subsequent 3279 traffic to that neighbor invokes the next-hop determination procedure 3280 again. Invoking next-hop determination at this point insures that 3281 alternate default routers are tried. 3283 When a reachability confirmation is received (either through upper- 3284 layer advice or a solicited Neighbor Advertisement) an entry's state 3285 changes to REACHABLE. The one exception is that upper-layer advice 3286 has no effect on entries in the INCOMPLETE state (e.g., for which no 3287 link-layer address is cached). 3289 When ReachableTime milliseconds have passed since receipt of the last 3290 reachability confirmation for a neighbor, the Neighbor Cache entry's 3291 state changes from REACHABLE to STALE. 3293 Note: An implementation may actually defer changing the state from 3294 REACHABLE to STALE until a packet is sent to the neighbor, i.e., 3295 there need not be an explicit timeout event associated with the 3296 expiration of ReachableTime. 3298 The first time a node sends a packet to a neighbor whose entry is 3299 STALE, the sender changes the state to DELAY and a sets a timer to 3300 expire in DELAY_FIRST_PROBE_TIME seconds. If the entry is still in 3301 the DELAY state when the timer expires, the entry's state changes to 3302 PROBE. If reachability confirmation is received, the entry's state 3303 changes to REACHABLE. 3305 Upon entering the PROBE state, a node sends a unicast Neighbor 3306 Solicitation message to the neighbor using the cached link-layer 3307 address. While in the PROBE state, a node retransmits Neighbor 3308 Solicitation messages every RetransTimer milliseconds until 3309 reachability confirmation is obtained. Probes are retransmitted even 3310 if no additional packets are sent to the neighbor. If no response is 3311 received after waiting RetransTimer milliseconds after sending the 3312 MAX_UNICAST_SOLICIT solicitations, retransmissions cease and the 3313 entry SHOULD be deleted. Subsequent traffic to that neighbor will 3314 recreate the entry and performs address resolution again. 3316 Note that all Neighbor Solicitations are rate-limited on a per- 3317 neighbor basis. A node MUST NOT send Neighbor Solicitations to the 3318 same neighbor more frequently than once every RetransTimer 3319 milliseconds. 3321 A Neighbor Cache entry enters the STALE state when created as a 3322 result of receiving packets other than solicited Neighbor 3323 Advertisements (i.e., Router Solicitations, Router Advertisements, 3324 Redirects, and Neighbor Solicitations). These packets contain the 3325 link-layer address of either the sender or, in the case of Redirect, 3326 the redirection target. However, receipt of these link-layer 3327 addresses does not confirm reachability of the forward-direction path 3328 to that node. Placing a newly created Neighbor Cache entry for which 3329 the link-layer address is known in the STALE state provides assurance 3330 that path failures are detected quickly. In addition, should a 3331 cached link-layer address be modified due to receiving one of the 3332 above messages the state SHOULD also be set to STALE to provide 3333 prompt verification that the path to the new link-layer address is 3334 working. 3336 To properly detect the case where a router switches from being a 3337 router to being a host (e.g., if its IP forwarding capability is 3338 turned off by system management), a node MUST compare the Router flag 3339 field in all received Neighbor Advertisement messages with the 3340 IsRouter flag recorded in the Neighbor Cache entry. When a node 3341 detects that a neighbor has changed from being a router to being a 3342 host, the node MUST remove that router from the Default Router List 3343 and update the Destination Cache as described in Section 6.3.5. Note 3344 that a router may not be listed in the Default Router List, even 3345 though a Destination Cache entry is using it (e.g., a host was 3346 redirected to it). In such cases, all Destination Cache entries that 3347 reference the (former) router must perform next-hop determination 3348 again before using the entry. 3350 In some cases, link-specific information may indicate that a path to 3351 a neighbor has failed (e.g., the resetting of a virtual circuit). In 3352 such cases, link-specific information may be used to purge Neighbor 3353 Cache entries before the Neighbor Unreachability Detection would do 3354 so. However, link-specific information MUST NOT be used to confirm 3355 the reachability of a neighbor; such information does not provide 3356 end-to-end confirmation between neighboring IP layers. 3358 8. REDIRECT FUNCTION 3360 This section describes the functions related to the sending and 3361 processing of Redirect messages. 3363 Redirect messages are sent by routers to redirect a host to a better 3364 first-hop router for a specific destination or to inform hosts that a 3365 destination is in fact a neighbor (i.e., on-link). The latter is 3366 accomplished by having the ICMP Target Address be equal to the ICMP 3367 Destination Address. 3369 A router MUST be able to determine the link-local address for each of 3370 its neighboring routers in order to ensure that the target address in 3371 a Redirect message identifies the neighbor router by its link-local 3372 address. For static routing this requirement implies that the next- 3373 hop router's address should be specified using the link-local address 3374 of the router. For dynamic routing this requirement implies that all 3375 IPv6 routing protocols must somehow exchange the link-local addresses 3376 of neighboring routers. 3378 8.1. Validation of Redirect Messages 3380 A host MUST silently discard any received Redirect message that does 3381 not satisfy all of the following validity checks: 3383 - IP Source Address is a link-local address. Routers must use 3384 their link-local address as the source for Router Advertisement 3385 and Redirect messages so that hosts can uniquely identify 3386 routers. 3388 - The IP Hop Limit field has a value of 255, i.e., the packet 3389 could not possibly have been forwarded by a router. 3391 - ICMP Checksum is valid. 3393 - ICMP Code is 0. 3395 - ICMP length (derived from the IP length) is 40 or more octets. 3397 - The IP source address of the Redirect is the same as the current 3398 first-hop router for the specified ICMP Destination Address. 3400 - The ICMP Destination Address field in the redirect message does 3401 not contain a multicast address. 3403 - The ICMP Target Address is either a link-local address (when 3404 redirected to a router) or the same as the ICMP Destination 3405 Address (when redirected to the on-link destination). 3407 - All included options have a length that is greater than zero. 3409 The contents of the Reserved field, and of any unrecognized options 3410 MUST be ignored. Future, backward-compatible changes to the protocol 3411 may specify the contents of the Reserved field or add new options; 3412 backward-incompatible changes may use different Code values. 3414 The contents of any defined options that are not specified to be used 3415 with Redirect messages MUST be ignored and the packet processed as 3416 normal. The only defined options that may appear are the Target 3417 Link-Layer Address option and the Redirected Header option. 3419 A host MUST NOT consider a redirect invalid just because the Target 3420 Address of the redirect is not covered under one of the link's 3421 prefixes. Part of the semantics of the Redirect message is that the 3422 Target Address is on-link. 3424 A redirect that passes the validity checks is called a "valid 3425 redirect". 3427 8.2. Router Specification 3429 A router SHOULD send a redirect message, subject to rate limiting, 3430 whenever it forwards a packet that is not explicitly addressed to 3431 itself (i.e. a packet that is not source routed through the router) 3432 in which: 3434 - the Source Address field of the packet identifies a neighbor, 3435 and 3437 - the router determines (by means outside the scope of this 3438 specification) that a better first-hop node resides on 3439 the same link as the sending node for the Destination Address of 3440 the packet being forwarded, and 3442 - the Destination Address of the packet is not a multicast 3443 address, and 3445 The transmitted redirect packet contains, consistent with the message 3446 format given in Section 4.5: 3448 - In the Target Address field: the address to which subsequent 3449 packets for the destination SHOULD be sent. If the target is a 3450 router, that router's link-local address MUST be used. If the 3451 target is a host the target address field MUST be set to the 3452 same value as the Destination Address field. 3454 - In the Destination Address field: the destination address of the 3455 invoking IP packet. 3457 - In the options: 3459 o Target Link-Layer Address option: link-layer address of the 3460 target, if known. 3462 o Redirected Header: as much of the forwarded packet as can 3463 fit without the redirect packet exceeding 1280 octets in 3464 size. 3466 A router MUST limit the rate at which Redirect messages are sent, in 3467 order to limit the bandwidth and processing costs incurred by the 3468 Redirect messages when the source does not correctly respond to the 3469 Redirects, or the source chooses to ignore unauthenticated Redirect 3470 messages. More details on the rate-limiting of ICMP error messages 3471 can be found in [ICMPv6]. 3473 A router MUST NOT update its routing tables upon receipt of a 3474 Redirect. 3476 8.3. Host Specification 3478 A host receiving a valid redirect SHOULD update its Destination Cache 3479 accordingly so that subsequent traffic goes to the specified target. 3480 If no Destination Cache entry exists for the destination, an 3481 implementation SHOULD create such an entry. 3483 If the redirect contains a Target Link-Layer Address option the host 3484 either creates or updates the Neighbor Cache entry for the target. 3485 In both cases the cached link-layer address is copied from the Target 3486 Link-Layer Address option. If a Neighbor Cache entry is created for 3487 the target its reachability state MUST be set to STALE as specified 3488 in Section 7.3.3. If a cache entry already existed and it is updated 3489 with a different link-layer address, its reachability state MUST also 3490 be set to STALE. If the link-layer address is the same as that 3491 already in the cache, the cache entry's state remains unchanged. 3493 If the Target and Destination Addresses are the same, the host MUST 3494 treat the Target as on-link. If the Target Address is not the same 3495 as the Destination Address, the host MUST set IsRouter to TRUE for 3496 the target. If the Target and Destination Addresses are the same, 3497 however, one cannot reliably determine whether the Target Address is 3498 a router. Consequently, newly created Neighbor Cache entries should 3499 set the IsRouter flag to FALSE, while existing cache entries should 3500 leave the flag unchanged. If the Target is a router, subsequent 3501 Neighbor Advertisement or Router Advertisement messages will update 3502 IsRouter accordingly. 3504 Redirect messages apply to all flows that are being sent to a given 3505 destination. That is, upon receipt of a Redirect for a Destination 3506 Address, all Destination Cache entries to that address should be 3507 updated to use the specified next-hop, regardless of the contents of 3508 the Flow Label field that appears in the Redirected Header option. 3510 A host MUST NOT send Redirect messages. 3512 9. EXTENSIBILITY - OPTION PROCESSING 3514 Options provide a mechanism for encoding variable length fields, 3515 fields that may appear multiple times in the same packet, or 3516 information that may not appear in all packets. Options can also be 3517 used to add additional functionality to future versions of ND. 3519 In order to ensure that future extensions properly coexist with 3520 current implementations, all nodes MUST silently ignore any options 3521 they do not recognize in received ND packets and continue processing 3522 the packet. All options specified in this document MUST be 3523 recognized. A node MUST NOT ignore valid options just because the ND 3524 message contains unrecognized ones. 3526 The current set of options is defined in such a way that receivers 3527 can process multiple options in the same packet independently of each 3528 other. In order to maintain these properties future options SHOULD 3529 follow the simple rule: 3531 The option MUST NOT depend on the presence or absence of any 3532 other options. The semantics of an option should depend only on 3533 the information in the fixed part of the ND packet and on the 3534 information contained in the option itself. 3536 Adhering to the above rule has the following benefits: 3538 1) Receivers can process options independently of one another. For 3539 example, an implementation can choose to process the Prefix 3540 Information option contained in a Router Advertisement message 3541 in a user-space process while the link-layer address option in 3542 the same message is processed by routines in the kernel. 3544 2) Should the number of options cause a packet to exceed a link's 3545 MTU, multiple packets can carry subsets of the options without 3546 any change in semantics. 3548 3) Senders MAY send a subset of options in different packets. For 3549 instance, if a prefix's Valid and Preferred Lifetime are high 3550 enough, it might not be necessary to include the Prefix 3551 Information option in every Router Advertisement. In addition, 3552 different routers might send different sets of options. Thus, a 3553 receiver MUST NOT associate any action with the absence of an 3554 option in a particular packet. This protocol specifies that 3555 receivers should only act on the expiration of timers and on the 3556 information that is received in the packets. 3558 Options in Neighbor Discovery packets can appear in any order; 3559 receivers MUST be prepared to process them independently of their 3560 order. There can also be multiple instances of the same option in a 3561 message (e.g., Prefix Information options). 3563 If the number of included options in a Router Advertisement causes 3564 the advertisement's size to exceed the link MTU, the router can send 3565 multiple separate advertisements each containing a subset of the 3566 options. 3568 The amount of data to include in the Redirected Header option MUST be 3569 limited so that the entire redirect packet does not exceed 1280 3570 octets. 3572 All options are a multiple of 8 octets of length, ensuring 3573 appropriate alignment without any "pad" options. The fields in the 3574 options (as well as the fields in ND packets) are defined to align on 3575 their natural boundaries (e.g., a 16-bit field is aligned on a 16-bit 3576 boundary) with the exception of the 128-bit IP addresses/prefixes, 3577 which are aligned on a 64-bit boundary. The link-layer address field 3578 contains an uninterpreted octet string; it is aligned on an 8-bit 3579 boundary. 3581 The size of an ND packet including the IP header is limited to the 3582 link MTU (which is at least 1280 octets). When adding options to an 3583 ND packet a node MUST NOT exceed the link MTU. 3585 Future versions of this protocol may define new option types. 3586 Receivers MUST silently ignore any options they do not recognize and 3587 continue processing the message. 3589 10. PROTOCOL CONSTANTS 3591 Router constants: 3593 MAX_INITIAL_RTR_ADVERT_INTERVAL 16 seconds 3595 MAX_INITIAL_RTR_ADVERTISEMENTS 3 transmissions 3597 MAX_FINAL_RTR_ADVERTISEMENTS 3 transmissions 3599 MIN_DELAY_BETWEEN_RAS 3 seconds 3601 MAX_RA_DELAY_TIME .5 seconds 3603 Host constants: 3605 MAX_RTR_SOLICITATION_DELAY 1 second 3607 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 - 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 will not detect such a black hole 3673 as long as the rogue router politely answers the NUD probes with a 3674 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. It is natural to trust the routers 3695 on the link. If a host has been redirected to another node (i.e., 3696 the destination is on-link) there is no way to prevent the target 3697 from issuing another redirect to some other destination. However, 3698 this exposure is no worse than it was before being redirected; the 3699 target host, once subverted, could always act as a hidden router to 3700 forward traffic elsewhere. 3702 The protocol contains no mechanism to determine which neighbors are 3703 authorized to send a particular type of message (e.g., Router 3704 Advertisements); any neighbor, presumably even in the presence of 3705 authentication, can send Router Advertisement messages thereby being 3706 able to cause denial of service. Furthermore, any neighbor can send 3707 proxy Neighbor Advertisements as well as unsolicited Neighbor 3708 Advertisements as a potential denial of service attack. 3710 Many link layers are also subject to different denial of service 3711 attacks such as continuously occupying the link in CSMA/CD networks 3712 (e.g., by sending packets closely back-to-back or asserting the 3713 collision signal on the link), or originating packets with somebody 3714 else's source MAC address to confuse, e.g., Ethernet switches. On the 3715 other hand, many of the threats discussed in this section are less 3716 effective, or non-existent, on point-to-point links, or cellular 3717 links where a host shares a link with only one neighbor, i.e. the 3718 default router. 3720 11.2 Securing Neighbor Discovery messages 3722 The protocol reduces the exposure to the above threats in the absence 3723 of authentication by ignoring ND packets received from off-link 3724 senders. The Hop Limit field of all received packets is verified to 3725 contain 255, the maximum legal value. Because routers decrement the 3726 Hop Limit on all packets they forward, received packets containing a 3727 Hop Limit of 255 must have originated from a neighbor. 3729 In order to allow for IP layer authentication, a mechanism is 3730 required to allow for dynamic keying between neighbors. The use of 3731 the Internet Key Exchange [ICMPIKE] is not suited for creating 3732 dynamic security associations that can be used to secure address 3733 resolution or neighbor solicitation messages as documented in 3734 [ICMPIKE]. The security of Neighbor Discovery messages through 3735 dynamic keying is outside the scope of this document and is addressed 3736 in [SEND]. 3738 In some cases, it may be acceptable to use statically configured 3739 security associations with either [IPv6-AH] or [IPv6-ESP] to secure 3740 Neighbor Discovery messages. However, it is important to note that 3741 statically configured security associations are not scalable 3742 (especially when considering multicast links) and are therefore 3743 limited to small networks with known hosts. 3745 12. RENUMBERING CONSIDERATIONS 3747 The Neighbor Discovery protocol together with IPv6 Address 3748 Autoconfiguration [ADDRCONF] provides mechanisms to aid in 3749 renumbering - new prefixes and addresses can be introduced and old 3750 ones can be deprecated and removed. 3752 The robustness of these mechanisms is based on all the nodes on the 3753 link receiving the Router Advertisement messages in a timely manner. 3754 However, a host might be turned off or be unreachable for an extended 3755 period of time (i.e., a machine is powered down for months after a 3756 project terminates). It is possible to preserve robust renumbering 3757 in such cases but it does place some constraints on how long prefixes 3758 must be advertised. 3760 Consider the following example in which a prefix is initially 3761 advertised with a lifetime of 2 months, but on August 1st it is 3762 determined that the prefix needs to be deprecated and removed due to 3763 renumbering by September 1st. This can be done by reducing the 3764 advertised lifetime to 1 week starting on August 1st and as the 3765 cutoff gets closer the lifetimes can be made shorter until by 3766 September 1st the prefix is advertised with a zero lifetime. The 3767 point is that, if one or more nodes were unplugged from the link 3768 prior to September 1st they might still think that the prefix is 3769 valid since the last lifetime they received was 2 months. Thus if a 3771 node was unplugged on July 31st it thinks the prefix is valid until 3772 September 30th. If that node is plugged back in prior to September 3773 30th it may continue to use the old prefix. The only way to force a 3774 node to stop using a prefix that was previously advertised with a 3775 long Lifetime is to have that node receive an advertisement for that 3776 prefix that changes the lifetime downward. The solution in this 3777 example is simple: continue advertising the prefix with a lifetime of 3778 0 from September 1st until October 1st. 3780 In general, in order to be robust against nodes that might be 3781 unplugged from the link it is important to track the furthest into 3782 the future a particular prefix can be viewed valid by any node on the 3783 link. The prefix must then be advertised with a 0 Lifetime until 3784 that point in future. This "furthest into the future" time is simply 3785 the maximum, over all Router Advertisements, of the time the 3786 advertisement was sent plus the prefix's Lifetime contained in the 3787 advertisement. 3789 The above has an important implication on using infinite lifetimes. 3790 If a prefix is advertised with an infinite lifetime, and that prefix 3791 later needs to be renumbered, it is undesirable to continue 3792 advertising that prefix with a zero lifetime forever. Thus either 3793 infinite lifetimes should be avoided or there must be a limit on how 3794 long time a node can be unplugged from the link before it is plugged 3795 back in again. However, it is unclear how the network administrator 3796 can enforce a limit on how long time hosts such as laptops can be 3797 unplugged from the link. 3799 Network administrators should give serious consideration to using 3800 relatively short lifetimes (i.e., no more than a few weeks). While 3801 it might appear that using long lifetimes would help insure 3802 robustness, in reality a host will be unable to communicate in the 3803 absence of properly functioning routers. Such routers will be 3804 sending Router Advertisements that contain appropriate (and current) 3805 prefixes. A host connected to a network that has no functioning 3806 routers is likely to have more serious problems than just a lack of a 3807 valid prefix and address. 3809 The above discussion does not distinguish between the preferred and 3810 valid lifetimes. For all practical purposes it is probably 3811 sufficient to track the valid lifetime since the preferred lifetime 3812 will not exceed the valid lifetime. 3814 REFERENCES 3816 NORMATIVE 3818 [ADDR-ARCH] Hinden, R. and S. Deering, "IP Version 6 Addressing 3819 Architecture", RFC 3513, April 2003. 3821 [ICMPv6] Conta, A. and S. Deering, "Internet Control Message 3822 Protocol (ICMPv6) for the Internet Protocol Version 6 3823 (IPv6) Specification", RFC 2463, December 1998. 3825 [IPv6] Deering, S. and R. Hinden, "Internet Protocol, Version 6 3826 (IPv6) Specification", RFC 2460, December 1998. 3828 [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate 3829 Requirement Levels", BCP 14, RFC 2119, March 1997. 3831 INFORMATIVE 3833 [ADDRCONF] Thomson, S. Narten, T, and T. Jinmei, "IPv6 Address 3834 Autoconfiguration", draft-ietf-ipv6-rfc2462bis-07, Dec 3835 2004. 3836 [ANYCST] Partridge, C., Mendez, T. and W. Milliken, "Host 3837 Anycasting Service", RFC 1546, November 1993. 3839 [ARP] Plummer, D., "An Ethernet Address Resolution Protocol", 3840 STD 37, RFC 826, November 1982. 3842 [ASSIGNED] Reynolds, J., "Assigned Numbers: RFC 1700 is Replaced by 3843 an On-line Database", RFC 3232, January 2002. 3845 [DHCPv6] Droms, R., Ed, "Dynamic Host Configuration Protocol for 3846 IPv6 (DHCPv6)", RFC 3315, July 2003. 3848 [DHCPv6lite] Droms, R., "Stateless Dynamic Host Configuration 3849 Protocol (DHCP)for IPv6", RFC 3736, April 2004. 3851 [HR-CL] Braden, R., Editor, "Requirements for Internet Hosts -- 3852 Communication Layers", STD 3, RFC 1122, October 1989. 3854 [ICMPIKE] Arkko, J., "Effects of ICMPv6 on IKE", 3855 draft-arkko-icmpv6-ike-effects-02 (work in progress), 3856 March 2003. 3858 [ICMPv4] Postel, J., "Internet Control Message Protocol", STD 5, 3859 RFC 792, September 1981. 3861 [IPv6-3GPP] Wasserman, M., Ed, "Recommendations for IPv6 in Third 3862 Generation Partnership Project (3GPP) standards", RFC 3863 3314, September 2002. 3865 [IPv6-CELL] Arkko, J., Kuipers, G., Soliman, H., Loughney, J. and J. 3866 Wiljakka, " Internet Protocol version 6 (IPv6) for Some 3867 Second and Third Generation Cellular Hosts", RFC 3316, 3868 April 2003. 3870 [IPv6-ETHER] Crawford, M., "Transmission of IPv6 Packets over 3871 Ethernet Networks", RFC 2464, December 1998. 3873 [IPv6-NBMA] Armitage, G., Schulter, P., Jork, M. and G. Harter, " 3874 IPv6 over Non-broadcast Multiple Access (NBMA) 3875 networks", RFC 2491, January 1999. 3877 [IPv6-SA] Kent, S. and R. Atkinson, "Security Architecture for the 3878 Internet Protocol", RFC 2401, November 1998. 3880 [IPv6-AUTH] Kent, S. and R. Atkinson, "IP Authentication Header", 3881 RFC 2402, November 1998. 3883 [IPv6-ESP] Kent, S. and R. Atkinson, "IP Encapsulating Security 3884 Payload (ESP)", RFC 2406, November 1998. 3886 [MIPv6] D. Johnson, C. Perkins and J. Arkko, "Mobility Support 3887 in IPv6", RFC 3775, June 2004. 3889 [MLD] Deering, S., Fenner, W, and B. Haberman, "Multicast 3890 Listener Discovery for IPv6", RFC 2710, October 1999. 3892 [NDMAN] Arkko, J., "Manual Configuration of Security 3893 Associations for IPv6 Neighbor Discovery", draft-arkko- 3894 manual-icmpv6-sas-02 (work in progress), March 2003. 3896 [RDISC] Deering, S., "ICMP Router Discovery Messages", RFC 1256, 3897 September 1991. 3899 [SH-MEDIA] Braden, R., Postel, J. and Y. Rekhter, "Internet 3900 Architecture Extensions for Shared Media", RFC 1620, May 3901 1994. 3903 [SEND] Arkko, J., Kempf, J., Sommerfeld, B., Zill, B. and P. 3904 Nikander, "SEcure Neighbor Discovery (SEND)", 3905 draft-ietf-send-ndopt-04 (work in progress), 3906 February 2004. 3908 [SYNC] S. Floyd, V. Jacobson, "The Synchronization of Periodic 3909 Routing Messages", IEEE/ACM Transactions on Networking, 3910 April 1994. ftp://ftp.ee.lbl.gov/papers/sync_94.ps.Z 3912 IANA CONSIDERATIONS 3914 This document does not require any new ICMPv6 types or codes to be 3915 allocated. However, existing ICMPv6 types should be updated to point 3916 to the document instead of RFC 2461. Assignment of ICMPv6 types/codes 3917 is described in Section 7 of RFC 2780. 3919 Authors' Addresses 3921 Thomas Narten 3922 IBM Corporation 3923 P.O. Box 12195 3924 Research Triangle Park, NC 27709-2195 3925 USA 3927 Phone: +1 919 254 7798 3928 EMail: narten@raleigh.ibm.com 3930 Erik Nordmark 3931 Sun Microsystems, Inc. 3932 901 San Antonio Road 3933 Palo Alto, CA 94303 3934 USA 3936 Phone: +1 650 786 5166 3937 Fax: +1 650 786 5896 3938 EMail: nordmark@sun.com 3940 William Allen Simpson 3941 Daydreamer 3942 Computer Systems Consulting Services 3943 1384 Fontaine 3944 Madison Heights, Michigan 48071 3945 USA 3947 EMail: Bill.Simpson@um.cc.umich.edu 3948 bsimpson@MorningStar.com 3950 Hesham Soliman 3951 Flarion Technologies 3952 Phone: +1 908 997 9775 3953 Email: H.Soliman@flarion.com 3955 APPENDIX A: MULTIHOMED HOSTS 3957 There are a number of complicating issues that arise when Neighbor 3958 Discovery is used by hosts that have multiple interfaces. This 3959 section does not attempt to define the proper operation of multihomed 3960 hosts with regard to Neighbor Discovery. Rather, it identifies 3961 issues that require further study. Implementors are encouraged to 3962 experiment with various approaches to making Neighbor Discovery work 3963 on multihomed hosts and to report their experiences. 3965 If a multihomed host receives Router Advertisements on all of its 3966 interfaces, it will (probably) have learned on-link prefixes for the 3967 addresses residing on each link. When a packet must be sent through 3968 a router, however, selecting the "wrong" router can result in a 3969 suboptimal or non-functioning path. There are number of issues to 3970 consider: 3972 1) In order for a router to send a redirect, it must determine that 3973 the packet it is forwarding originates from a neighbor. The 3974 standard test for this case is to compare the source address of 3975 the packet to the list of on-link prefixes associated with the 3976 interface on which the packet was received. If the originating 3977 host is multihomed, however, the source address it uses may 3978 belong to an interface other than the interface from which it 3979 was sent. In such cases, a router will not send redirects, and 3980 suboptimal routing is likely. In order to be redirected, the 3981 sending host must always send packets out the interface 3982 corresponding to the outgoing packet's source address. Note 3983 that this issue never arises with non-multihomed hosts; they 3984 only have one interface. 3986 2) If the selected first-hop router does not have a route at all 3987 for the destination, it will be unable to deliver the packet. 3988 However, the destination may be reachable through a router on 3989 one of the other interfaces. Neighbor Discovery does not 3990 address this scenario; it does not arise in the non-multihomed 3991 case. 3993 3) Even if the first-hop router does have a route for a 3994 destination, there may be a better route via another interface. 3995 No mechanism exists for the multihomed host to detect this 3996 situation. 3998 If a multihomed host fails to receive Router Advertisements on one or 3999 more of its interfaces, it will not know (in the absence of 4000 configured information) which destinations are on-link on the 4001 affected interface(s). This leads to a number of problems: 4003 1) If no Router Advertisement is received on any interfaces, a 4004 multihomed host will have no way of knowing which interface to 4005 send packets out on, even for on-link destinations. Under 4006 similar conditions in the non-multihomed host case, a node 4007 treats all destinations as residing on-link, and communication 4008 proceeds. In the multihomed case, however, additional 4009 information is needed to select the proper outgoing interface. 4010 Alternatively, a node could attempt to perform address 4011 resolution on all interfaces, a step involving significant 4012 complexity that is not present in the non-multihomed host case. 4014 2) If Router Advertisements are received on some, but not all 4015 interfaces, a multihomed host could choose to only send packets 4016 out on the interfaces on which it has received Router 4017 Advertisements. A key assumption made here, however, is that 4018 routers on those other interfaces will be able to route packets 4019 to the ultimate destination, even when those destinations reside 4020 on the subnet to which the sender connects, but has no on-link 4021 prefix information. Should the assumption be FALSE, 4022 communication would fail. Even if the assumption holds, packets 4023 will traverse a sub-optimal path. 4025 APPENDIX B: FUTURE EXTENSIONS 4027 Possible extensions for future study are: 4029 o Using dynamic timers to be able to adapt to links with widely 4030 varying delay. Measuring round trip times, however, requires 4031 acknowledgments and sequence numbers in order to match received 4032 Neighbor Advertisements with the actual Neighbor Solicitation that 4033 triggered the advertisement. Implementors wishing to experiment 4034 with such a facility could do so in a backwards-compatible way by 4035 defining a new option carrying the necessary information. Nodes 4036 not understanding the option would simply ignore it. 4038 o Adding capabilities to facilitate the operation over links that 4039 currently require hosts to register with an address resolution 4040 server. This could for instance enable routers to ask hosts to 4041 send them periodic unsolicited advertisements. Once again this 4042 can be added using a new option sent in the Router Advertisements. 4044 o Adding additional procedures for links where asymmetric and non- 4045 transitive reachability is part of normal operations. Such 4046 procedures might allow hosts and routers to find usable paths on, 4047 e.g., radio links. 4049 APPENDIX C: STATE MACHINE FOR THE REACHABILITY STATE 4051 This appendix contains a summary of the rules specified in Sections 4052 7.2 and 7.3. This document does not mandate that implementations 4053 adhere to this model as long as their external behavior is consistent 4054 with that described in this document. 4056 When performing address resolution and Neighbor Unreachability 4057 Detection the following state transitions apply using the conceptual 4058 model: 4060 State Event Action New state 4062 - Packet to send. Create entry. INCOMPLETE 4063 Send multicast NS. 4064 Start retransmit timer 4066 INCOMPLETE Retransmit timeout, Retransmit NS INCOMPLETE 4067 less than N Start retransmit 4068 retransmissions. timer 4070 INCOMPLETE Retransmit timeout, Discard entry - 4071 N or more Send ICMP error 4072 retransmissions. 4074 INCOMPLETE NA, Solicited=0, Record link-layer STALE 4075 Override=any address. Send queued 4076 packets. 4078 INCOMPLETE NA, Solicited=1, Record link-layer REACHABLE 4079 Override=any address. Send queued 4080 packets. 4082 !INCOMPLETE NA, Solicited=1, - REACHABLE 4083 Override=0 4084 Same link-layer 4085 address as cached. 4087 REACHABLE NA, Solicited=1, - STALE 4088 Override=0 4089 Different link-layer 4090 address than cached. 4092 STALE, PROBE NA, Solicited=1, - unchanged 4093 Or DELAY Override=0 4094 Different link-layer 4095 address than cached. 4097 !INCOMPLETE NA, Solicited=1, Record link-layer REACHABLE 4098 Override=1 address (if 4099 different). 4101 !INCOMPLETE NA, Solicited=0, - unchanged 4102 Override=0 4104 !INCOMPLETE NA, Solicited=0, - unchanged 4105 Override=1 4106 Same link-layer 4107 address as cached. 4109 !INCOMPLETE NA, Solicited=0, Record link-layer STALE 4110 Override=1 address. 4111 Different link-layer 4112 address than cached. 4114 !INCOMPLETE upper-layer reachability - REACHABLE 4115 confirmation 4117 REACHABLE timeout, more than - STALE 4118 N seconds since 4119 reachability confirm. 4121 STALE Sending packet Start delay timer DELAY 4123 DELAY Delay timeout Send unicast NS probe PROBE 4124 Start retransmit timer 4126 PROBE Retransmit timeout, Retransmit NS PROBE 4127 less than N 4128 retransmissions. 4130 PROBE Retransmit timeout, Discard entry - 4131 N or more 4132 retransmissions. 4134 The state transitions for receiving unsolicited information other 4135 than Neighbor Advertisement messages apply to either the source of 4136 the packet (for Neighbor Solicitation, Router Solicitation, and 4137 Router Advertisement messages) or the target address (for Redirect 4138 messages) as follows: 4140 State Event Action New state 4142 - NS, RS, RA, Redirect Create entry. STALE 4144 INCOMPLETE NS, RS, RA, Redirect Record link-layer STALE 4145 address. Send queued 4146 packets. 4148 !INCOMPLETE NS, RS, RA, Redirect Update link-layer STALE 4149 Different link-layer address 4150 address than cached. 4152 !INCOMPLETE NS, RS, RA, Redirect - unchanged 4153 Same link-layer 4154 address as cached. 4156 APPENDIX D: SUMMARY OF ISROUTER RULES 4158 This appendix presents a summary of the rules for maintaining the 4159 IsRouter flag as specified in this document. 4161 The background for these rules is that the ND messages contain, 4162 either implicitly or explicitly, information that indicates whether 4163 or not the sender (or Target Address) is a host or a router. The 4164 following assumptions are used: 4166 - The sender of a Router Solicitation is implicitly assumed to be a 4167 host since there is no need for routers to send such messages. 4169 - The sender of a Router Advertisement is implicitly assumed to be a 4170 router. 4172 - Neighbor Solicitation messages do not contain either an implicit 4173 or explicit indication about the sender. Both hosts and routers 4174 send such messages. 4176 - Neighbor Advertisement messages contain an explicit "IsRouter 4177 flag", the R-bit. 4179 - The target of the redirect, when the target differs from the 4180 destination address in the packet being redirected, is implicitly 4181 assumed to be a router. This is a natural assumption since that 4182 node is expected to be able to forward the packets towards the 4183 destination. 4185 - The target of the redirect, when the target is the same as the 4186 destination, does not carry any host vs. router information. All 4187 that is known is that the destination (i.e. target) is on-link but 4188 it could be either a host or a router. 4190 The rules for setting the IsRouter flag are based on the information 4191 content above. If an ND message contains explicit or implicit 4192 information the receipt of the message will cause the IsRouter flag 4193 to be updated. But when there is no host vs. router information in 4194 the ND message the receipt of the message MUST NOT cause a change to 4195 the IsRouter state. When the receipt of such a message causes a 4196 Neighbor Cache entry to be created this document specifies that the 4197 IsRouter flag be set to FALSE. There is greater potential for 4198 mischief when a node incorrectly thinks a host is a router, than the 4199 other way around. In these cases a subsequent Neighbor Advertisement 4200 or Router Advertisement message will set the correct IsRouter value. 4202 APPENDIX E: IMPLEMENTATION ISSUES 4204 Appendix E.1: Reachability confirmations 4206 Neighbor Unreachability Detection requires explicit confirmation that 4207 a forward-path is functioning properly. To avoid the need for 4208 Neighbor Solicitation probe messages, upper layer protocols should 4209 provide such an indication when the cost of doing so is small. 4210 Reliable connection-oriented protocols such as TCP are generally 4211 aware when the forward-path is working. When TCP sends (or receives) 4212 data, for instance, it updates its window sequence numbers, sets and 4213 cancels retransmit timers, etc. Specific scenarios that usually 4214 indicate a properly functioning forward-path include: 4216 - Receipt of an acknowledgement that covers a sequence number (e.g., 4217 data) not previously acknowledged indicates that the forward path 4218 was working at the time the data was sent. 4220 - Completion of the initial three-way handshake is a special case of 4221 the previous rule; although no data is sent during the handshake, 4222 the SYN flags are counted as data from the sequence number 4223 perspective. This applies to both the SYN+ACK for the active open 4224 the ACK of that packet on the passively opening peer. 4226 - Receipt of new data (i.e., data not previously received) indicates 4227 that the forward-path was working at the time an acknowledgement 4228 was sent that advanced the peer's send window that allowed the new 4229 data to be sent. 4231 To minimize the cost of communicating reachability information 4232 between the TCP and IP layers, an implementation may wish to rate- 4233 limit the reachability confirmations its sends IP. One possibility 4234 is to process reachability only every few packets. For example, one 4235 might update reachability information once per round trip time, if an 4236 implementation only has one round trip timer per connection. For 4237 those implementations that cache Destination Cache entries within 4238 control blocks, it may be possible to update the Neighbor Cache entry 4239 directly (i.e., without an expensive lookup) once the TCP packet has 4240 been demultiplexed to its corresponding control block. For other 4241 implementation it may be possible to piggyback the reachability 4242 confirmation on the next packet submitted to IP assuming that the 4243 implementation guards against the piggybacked confirmation becoming 4244 stale when no packets are sent to IP for an extended period of time. 4246 TCP must also guard against thinking "stale" information indicates 4247 current reachability. For example, new data received 30 minutes 4248 after a window has opened up does not constitute a confirmation that 4249 the path is currently working. In merely indicates that 30 minutes 4250 ago the window update reached the peer i.e. the path was working at 4251 that point in time. An implementation must also take into account 4252 TCP zero-window probes that are sent even if the path is broken and 4253 the window update did not reach the peer. 4255 For UDP based applications (RPC, DNS) it is relatively simple to make 4256 the client send reachability confirmations when the response packet 4257 is received. It is more difficult and in some cases impossible for 4258 the server to generate such confirmations since there is no flow 4259 control, i.e., the server can not determine whether a received 4260 request indicates that a previous response reached the client. 4262 Note that an implementation can not use negative upper-layer advise 4263 as a replacement for the Neighbor Unreachability Detection algorithm. 4264 Negative advise (e.g. from TCP when there are excessive 4265 retransmissions) could serve as a hint that the forward path from the 4266 sender of the data might not be working. But it would fail to detect 4267 when the path from the receiver of the data is not functioning 4268 causing, none of the acknowledgement packets to reach the sender. 4270 APPENDIX F: CHANGES FROM RFC 2461 4272 o Removed all references to IPsec AH and ESP for securing messages 4273 or as part of validating the received message. 4275 o Added section 3.3. 4277 o Updated section 11 to include more detailed discussion on threats, 4278 IPsec limitations, and use of SeND. 4280 o Removed the on-link assumption in section 5.2 based on 4281 draft-ietf-v6ops-onlinkassumption 4283 o Clarified the definition of the Router Lifetime field in section 4284 4.2. 4286 o Updated the text in section 4.6.2 and 6.2.1 to indicate that the 4287 preferred lifetime must not be larger than valid lifetime. 4289 o Removed the reference to stateful configuration and added 4290 reference for DHCPv6 instead. 4292 o Added the IsRouter flag definition to section 6.2.1 to allow for 4293 mixed host/router behavior. 4295 o Allowed mobile nodes to be exempt from adding random delays before 4296 sending an RS during a handover. 4298 o Updated the definition of the prefix length in the prefix option 4300 o Updated the applicability to NBMA links in the introduction and 4301 added references to 3GPP RFCs. 4303 o Clarified support for Load balancing is limited to routers. 4305 o Clarified router behaviour when receiving a Router Solicitation 4306 without SLLAO. 4308 o Clarified that inconsistency checks for CurHopLimit are done for 4309 none zero values only. 4311 o Rearranged section 7.2.5 for clarity and described the processing 4312 when receiving the NA in INCOMPLETE state. 4314 o Miscellaneous editorials. 4316 Intellectual Property Statement 4318 The IETF takes no position regarding the validity or scope of any 4319 Intellectual Property Rights or other rights that might be claimed to 4320 pertain to the implementation or use of the technology described in 4321 this document or the extent to which any license under such rights 4322 might or might not be available; nor does it represent that it has 4323 made any independent effort to identify any such rights. Information 4324 on the IETF's procedures with respect to rights in IETF Documents can 4325 be found in RFC 3667 (BCP 78) and RFC 3668 (BCP 79). 4327 Copies of IPR disclosures made to the IETF Secretariat and any 4328 assurances of licenses to be made available, or the result of an 4329 attempt made to obtain a general license or permission for the use of 4330 such proprietary rights by implementers or users of this 4331 specification can be obtained from the IETF on-line IPR repository at 4332 http://www.ietf.org/ipr. 4334 The IETF invites any interested party to bring to its attention any 4335 copyrights, patents or patent applications, or other proprietary 4336 rights that may cover technology that may be required to implement 4337 this standard. Please address the information to the IETF at ietf- 4338 ipr@ietf.org. 4340 Full Copyright Statement 4342 Copyright (C) The Internet Society (2004). This document is subject 4343 to the rights, licenses and restrictions contained in BCP 78, and 4344 except as set forth therein, the authors retain all their rights. 4346 Disclaimer of Validity 4348 This document and the information contained herein are provided on an 4349 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 4350 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET 4351 ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, 4352 INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE 4353 INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 4354 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 4356 This Internet-Draft expires August, 2005.