idnits 2.17.1 draft-ietf-ipv6-2461bis-01.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 4311. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 4289. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 4295. ** 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 : ---------------------------------------------------------------------------- ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) == 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 4118 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 175, but not defined == Missing Reference: 'PSREQ' is mentioned on line 3628, but not defined == Missing Reference: 'IPv6-AH' is mentioned on line 3714, but not defined == Unused Reference: 'ANYCST' is defined on line 3811, but no explicit reference was found in the text == Unused Reference: 'IPv6-CELL' is defined on line 3837, but no explicit reference was found in the text == Unused Reference: 'IPv6-NBMA' is defined on line 3845, but no explicit reference was found in the text == Unused Reference: 'IPv6-SA' is defined on line 3849, but no explicit reference was found in the text == Unused Reference: 'IPv6-AUTH' is defined on line 3852, but no explicit reference was found in the text == Unused Reference: 'NDMAN' is defined on line 3864, but no explicit reference was found in the text ** Obsolete normative reference: RFC 2373 (ref. 'ADDR-ARCH') (Obsoleted by RFC 3513) ** 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-02 -- Obsolete informational reference (is this intentional?): RFC 3315 (ref. 'DHCPv6') (Obsoleted by RFC 8415) -- Obsolete informational reference (is this intentional?): RFC 3736 (ref. 'DHCPv6lite') (Obsoleted by RFC 8415) -- Obsolete informational reference (is this intentional?): RFC 3316 (ref. 'IPv6-CELL') (Obsoleted by RFC 7066) -- Obsolete informational reference (is this intentional?): RFC 2401 (ref. 'IPv6-SA') (Obsoleted by RFC 4301) -- Obsolete informational reference (is this intentional?): RFC 2402 (ref. 'IPv6-AUTH') (Obsoleted by RFC 4302, RFC 4305) -- Obsolete informational reference (is this intentional?): RFC 2406 (ref. 'IPv6-ESP') (Obsoleted by RFC 4303, RFC 4305) -- Obsolete informational reference (is this intentional?): RFC 3775 (ref. 'MIPv6') (Obsoleted by RFC 6275) -- Obsolete informational reference (is this intentional?): RFC 1700 (ref. 'ASSIGNED') (Obsoleted by RFC 3232) == Outdated reference: A later version (-06) exists of draft-ietf-send-ndopt-04 Summary: 11 errors (**), 0 flaws (~~), 16 warnings (==), 13 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 INTERNET-DRAFT T. Narten, 3 Expires: April 2005 IBM 4 E. Nordmark, 5 Sun Microsystems 6 W. Simpson, 7 Daydreamer 8 H. Soliman, 9 Flarion 10 October, 2004 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.............................................10 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.......................................46 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....................55 111 7.2.3. Receipt of Neighbor Solicitations.................56 112 7.2.4. Sending Solicited Neighbor Advertisements.........57 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.....................61 117 7.3. Neighbor Unreachability Detection........................62 118 7.3.1. Reachability Confirmation.........................62 119 7.3.2. Neighbor Cache Entry States.......................63 120 7.3.3. Node Behavior.....................................64 122 8. REDIRECT FUNCTION..............................................66 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..............................69 129 10. PROTOCOL CONSTANTS............................................71 131 11. SECURITY CONSIDERATIONS.......................................72 132 11.1 Threat analysis...........................................72 133 11.2 Securing Neighbor Discovery messages......................73 135 12. RENUMBERING CONSIDERATIONS....................................74 137 REFERENCES.........................................................75 139 Authors' Addresses.................................................77 141 APPENDIX A: MULTIHOMED HOSTS.......................................78 142 APPENDIX B: FUTURE EXTENSIONS......................................79 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..................................84 149 Full Copyright Statement.................Error! Bookmark not defined. 151 1. INTRODUCTION 153 This specification defines the Neighbor Discovery (ND) protocol for 154 Internet Protocol Version 6 (IPv6). Nodes (hosts and routers) use 155 Neighbor Discovery to determine the link-layer addresses for 156 neighbors known to reside on attached links and to quickly purge 157 cached values that become invalid. Hosts also use Neighbor Discovery 158 to find neighboring routers that are willing to forward packets on 159 their behalf. Finally, nodes use the protocol to actively keep track 160 of which neighbors are reachable and which are not, and to detect 161 changed link-layer addresses. When a router or the path to a router 162 fails, a host actively searches for functioning alternates. 164 Unless specified otherwise (in a document that covers operating IP 165 over a particular link type) this document applies to all link types. 166 However, because ND uses link-layer multicast for some of its 167 services, it is possible that on some link types (e.g., NBMA links) 168 alternative protocols or mechanisms to implement those services will 169 be specified (in the appropriate document covering the operation of 170 IP over a particular link type). The services described in this 171 document that are not directly dependent on multicast, such as 172 Redirects, Next-hop determination, Neighbor Unreachability Detection, 173 etc., are expected to be provided as specified in this document. The 174 details of how one uses ND on NBMA links are addressed in [IPv6- 175 NBMA]. In addition, [IPv6-3GPP] and [IPv6-CELLULAR] discuss the use 176 of this protocol over some cellular links, which are examples of NBMA 177 links. 179 The authors would like to acknowledge the contributions of the IPv6 180 working group and, in particular, (in alphabetical order) Ran 181 Atkinson, Jim Bound, Scott Bradner, Alex Conta, Elwyn Davies, Stephen 182 Deering Richard Draves, Francis Dupont, Robert Elz, Robert Gilligan, 183 Robert Hinden, Allison Mankin, Dan McDonald, Charles Perkins, Matt 184 Thomas, and Susan Thomson. 186 2. TERMINOLOGY 188 2.1. General 190 IP - Internet Protocol Version 6. The terms IPv4 and 191 IPv6 are used only in contexts where necessary to avoid 192 ambiguity. 194 ICMP - Internet Message Control Protocol for the Internet 195 Protocol Version 6. The terms ICMPv4 and ICMPv6 are 196 used only in contexts where necessary to avoid 197 ambiguity. 199 node - a device that implements IP. 201 router - a node that forwards IP packets not explicitly 202 addressed to itself. 204 host - any node that is not a router. 206 upper layer - a protocol layer immediately above IP. Examples are 207 transport protocols such as TCP and UDP, control 208 protocols such as ICMP, routing protocols such as OSPF, 209 and internet or lower-layer protocols being "tunneled" 210 over (i.e., encapsulated in) IP such as IPX, AppleTalk, 211 or IP itself. 213 link - a communication facility or medium over which nodes can 214 communicate at the link layer, i.e., the layer 215 immediately below IP. Examples are Ethernets (simple 216 or bridged), PPP links, X.25, Frame Relay, or ATM 217 networks as well as internet (or higher) layer 218 "tunnels", such as tunnels over IPv4 or IPv6 itself. 220 interface - a node's attachment to a link. 222 neighbors - nodes attached to the same link. 224 address - an IP-layer identifier for an interface or a set of 225 interfaces. 227 anycast address 228 - an identifier for a set of interfaces (typically 229 belonging to different nodes). A packet sent to an 230 anycast address is delivered to one of the interfaces 231 identified by that address (the "nearest" one, 232 according to the routing protocol's measure of 233 distance). See [ADDR-ARCH]. 235 Note that an anycast address is syntactically 236 indistinguishable from a unicast address. Thus, nodes 237 sending packets to anycast addresses don't generally 238 know that an anycast address is being used. Throughout 239 the rest of this document, references to unicast 240 addresses also apply to anycast addresses in those 241 cases where the node is unaware that a unicast address 242 is actually an anycast address. 244 prefix - a bit string that consists of some number of initial 245 bits of an address. 247 link-layer address 248 - a link-layer identifier for an interface. Examples 249 include IEEE 802 addresses for Ethernet links and E.164 250 addresses for ISDN links. 252 on-link - an address that is assigned to an interface on a 253 specified link. A node considers an address to be on- 254 link if: 256 - it is covered by one of the link's prefixes, or 258 - a neighboring router specifies the address as 259 the target of a Redirect message, or 261 - a Neighbor Advertisement message is received for 262 the (target) address, or 264 - any Neighbor Discovery message is received from 265 the address. 267 off-link - the opposite of "on-link"; an address that is not 268 assigned to any interfaces on the specified link. 270 longest prefix match 271 - The process of determining which prefix (if any) in 272 a set of prefixes covers a target address. A target 273 address is covered by a prefix if all of the bits in 274 the prefix match the left-most bits of the target 275 address. When multiple prefixes cover an address, 276 the longest prefix is the one that matches. 278 reachability 279 - whether or not the one-way "forward" path to a 280 neighbor is functioning properly. In particular, 281 whether packets sent to a neighbor are reaching the 282 IP layer on the neighboring machine and are being 283 processed properly by the receiving IP layer. For 284 neighboring routers, reachability means that packets 285 sent by a node's IP layer are delivered to the 286 router's IP layer, and the router is indeed 287 forwarding packets (i.e., it is configured as a 288 router, not a host). For hosts, reachability means 289 that packets sent by a node's IP layer are delivered 290 to the neighbor host's IP layer. 292 packet - an IP header plus payload. 294 link MTU - the maximum transmission unit, i.e., maximum packet 295 size in octets, that can be conveyed in one piece 296 over a link. 298 target - an address about which address resolution 299 information is sought, or an address which is the 300 new first-hop when being redirected. 302 proxy - a router that responds to Neighbor Discovery query 303 messages on behalf of another node. A router acting 304 on behalf of a mobile node that has moved off-link 305 could potentially act as a proxy for the mobile 306 node. 308 ICMP destination unreachable indication 309 - an error indication returned to the original sender 310 of a packet that cannot be delivered for the reasons 311 outlined in [ICMPv6]. If the error occurs on a node 312 other than the node originating the packet, an ICMP 313 error message is generated. If the error occurs on 314 the originating node, an implementation is not 315 required to actually create and send an ICMP error 316 packet to the source, as long as the upper-layer 317 sender is notified through an appropriate mechanism 318 (e.g., return value from a procedure call). Note, 319 however, that an implementation may find it 320 convenient in some cases to return errors to the 321 sender by taking the offending packet, generating an 322 ICMP error message, and then delivering it (locally) 323 through the generic error handling routines. 325 random delay 326 - when sending out messages, it is sometimes necessary to 327 delay a transmission for a random amount of time in 328 order to prevent multiple nodes from transmitting at 329 exactly the same time, or to prevent long-range 330 periodic transmissions from synchronizing with each 331 other [SYNC]. When a random component is required, a 332 node calculates the actual delay in such a way that the 333 computed delay forms a uniformly-distributed random 334 value that falls between the specified minimum and 335 maximum delay times. The implementor must take care to 336 insure that the granularity of the calculated random 337 component and the resolution of the timer used are both 338 high enough to insure that the probability of multiple 339 nodes delaying the same amount of time is small. 341 random delay seed 342 - If a pseudo-random number generator is used in 343 calculating a random delay component, the generator 344 should be initialized with a unique seed prior to being 345 used. Note that it is not sufficient to use the 346 interface token alone as the seed, since interface 347 tokens will not always be unique. To reduce the 348 probability that duplicate interface tokens cause the 349 same seed to be used, the seed should be calculated 350 from a variety of input sources (e.g., machine 351 components) that are likely to be different even on 352 identical "boxes". For example, the seed could be 353 formed by combining the CPU's serial number with an 354 interface token. 356 2.2. Link Types 358 Different link layers have different properties. The ones of concern 359 to Neighbor Discovery are: 361 multicast capable 362 - a link that supports a native mechanism at the 363 link layer for sending packets to all (i.e., 364 broadcast) or a subset of all neighbors. 366 point-to-point - a link that connects exactly two interfaces. A 367 point-to-point link is assumed to have multicast 368 capability and have a link-local address. 370 non-broadcast multi-access (NBMA) 371 - a link to which more than two interfaces can attach, 372 but that does not support a native form of multicast 373 or broadcast (e.g., X.25, ATM, frame relay, etc.). 375 Note that all link types (including NBMA) are 376 expected to provide multicast service for IP (e.g., 377 using multicast servers), but it is an issue for 378 further study whether ND should use such facilities 379 or an alternate mechanism that provides the 380 equivalent ND services. 382 shared media - a link that allows direct communication among a 383 number of nodes, but attached nodes are configured 384 in such a way that they do not have complete prefix 385 information for all on-link destinations. That is, 386 at the IP level, nodes on the same link may not know 387 that they are neighbors; by default, they 388 communicate through a router. Examples are large 389 (switched) public data networks such as SMDS and B- 390 ISDN. Also known as "large clouds". See [SH- 391 MEDIA]. 393 variable MTU - a link that does not have a well-defined MTU (e.g., 394 IEEE 802.5 token rings). Many links (e.g., 395 Ethernet) have a standard MTU defined by the link- 396 layer protocol or by the specific document 397 describing how to run IP over the link layer. 399 asymmetric reachability 400 - a link where non-reflexive and/or non-transitive 401 reachability is part of normal operation. (Non- 402 reflexive reachability means packets from A reach B 403 but packets from B don't reach A. Non-transitive 404 reachability means packets from A reach B, and 405 packets from B reach C, but packets from A don't 406 reach C.) Many radio links exhibit these 407 properties. 409 2.3. Addresses 411 Neighbor Discovery makes use of a number of different addresses 412 defined in [ADDR-ARCH], including: 414 all-nodes multicast address 415 - the link-local scope address to reach all nodes. 416 FF02::1 418 all-routers multicast address 419 - the link-local scope address to reach all routers. 420 FF02::2 422 solicited-node multicast address 423 - a link-local scope multicast address that is computed 424 as a function of the solicited target's address. The 425 function is described in [ADDR-ARCH]. The function is 426 chosen so that IP addresses which differ only in the 427 high-order bits, e.g., due to multiple high-order 428 prefixes associated with different providers, will map 429 to the same solicited-node address thereby reducing the 430 number of multicast addresses a node must join. 432 link-local address 433 - a unicast address having link-only scope that can be 434 used to reach neighbors. All interfaces on routers 435 MUST have a link-local address. Also, [ADDRCONF] 436 requires that interfaces on hosts have a link-local 437 address. 439 unspecified address 440 - a reserved address value that indicates the lack of an 441 address (e.g., the address is unknown). It is never 442 used as a destination address, but may be used as a 443 source address if the sender does not (yet) know its 444 own address (e.g., while verifying an address is unused 445 during address autoconfiguration [ADDRCONF]). The 446 unspecified address has a value of 0:0:0:0:0:0:0:0. 448 Note that this specification does not strictly comply with the 449 consistency requirements for the scopes of source and destination 450 addresses. It is possible in some cases for hosts to use a source 451 address of a larger scope than the destination address in the IPv6 452 header. 454 2.4. Requirements 456 The keywords MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, 457 SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL, when they appear in this 458 document, are to be interpreted as described in [KEYWORDS]. 460 This document also makes use of internal conceptual variables to 461 describe protocol behavior and external variables that an 462 implementation must allow system administrators to change. The 463 specific variable names, how their values change, and how their 464 settings influence protocol behavior are provided to demonstrate 465 protocol behavior. An implementation is not required to have them in 466 the exact form described here, so long as its external behavior is 467 consistent with that described in this document. 469 3. PROTOCOL OVERVIEW 471 This protocol solves a set of problems related to the interaction 472 between nodes attached to the same link. It defines mechanisms for 473 solving each of the following problems: 475 Router Discovery: How hosts locate routers that reside on an 476 attached link. 478 Prefix Discovery: How hosts discover the set of address prefixes 479 that define which destinations are on-link for an 480 attached link. (Nodes use prefixes to distinguish 481 destinations that reside on-link from those only 482 reachable through a router.) 484 Parameter Discovery: How a node learns such link parameters as the 485 link MTU or such Internet parameters as the hop limit 486 value to place in outgoing packets. 488 Address Autoconfiguration: Introduces the mechanisms needed in 489 order to allow nodes to automatically configure an 490 address for an interface. 492 Address resolution: How nodes determine the link-layer address of 493 an on-link destination (e.g., a neighbor) given only the 494 destination's IP address. 496 Next-hop determination: The algorithm for mapping an IP destination 497 address into the IP address of the neighbor to which 498 traffic for the destination should be sent. The next- 499 hop can be a router or the destination itself. 501 Neighbor Unreachability Detection: How nodes determine that a 502 neighbor is no longer reachable. For neighbors used as 503 routers, alternate default routers can be tried. For 504 both routers and hosts, address resolution can be 505 performed again. 507 Duplicate Address Detection: How a node determines that an address 508 it wishes to use is not already in use by another node. 510 Redirect: How a router informs a host of a better first-hop node 511 to reach a particular destination. 513 Neighbor Discovery defines five different ICMP packet types: A pair 514 of Router Solicitation and Router Advertisement messages, a pair of 515 Neighbor Solicitation and Neighbor Advertisements messages, and a 516 Redirect message. The messages serve the following purpose: 518 Router Solicitation: When an interface becomes enabled, hosts may 519 send out Router Solicitations that request routers to 520 generate Router Advertisements immediately rather than 521 at their next scheduled time. 523 Router Advertisement: Routers advertise their presence together 524 with various link and Internet parameters either 525 periodically, or in response to a Router Solicitation 526 message. Router Advertisements contain prefixes that 527 are used for on-link determination and/or address 528 configuration, a suggested hop limit value, etc. 530 Neighbor Solicitation: Sent by a node to determine the link-layer 531 address of a neighbor, or to verify that a neighbor is 532 still reachable via a cached link-layer address. 533 Neighbor Solicitations are also used for Duplicate 534 Address Detection. 536 Neighbor Advertisement: A response to a Neighbor Solicitation 537 message. A node may also send unsolicited Neighbor 538 Advertisements to announce a link-layer address change. 540 Redirect: Used by routers to inform hosts of a better first hop 541 for a destination. 543 On multicast-capable links, each router periodically multicasts a 544 Router Advertisement packet announcing its availability. A host 545 receives Router Advertisements from all routers, building a list of 546 default routers. Routers generate Router Advertisements frequently 547 enough that hosts will learn of their presence within a few minutes, 548 but not frequently enough to rely on an absence of advertisements to 549 detect router failure; a separate Neighbor Unreachability Detection 550 algorithm provides failure detection. 552 Router Advertisements contain a list of prefixes used for on-link 553 determination and/or autonomous address configuration; flags 554 associated with the prefixes specify the intended uses of a 555 particular prefix. Hosts use the advertised on-link prefixes to 556 build and maintain a list that is used in deciding when a packet's 557 destination is on-link or beyond a router. Note that a destination 558 can be on-link even though it is not covered by any advertised on- 559 link prefix. In such cases a router can send a Redirect informing 560 the sender that the destination is a neighbor. 562 Router Advertisements (and per-prefix flags) allow routers to inform 563 hosts how to perform Address Autoconfiguration. For example, routers 564 can specify whether hosts should use stateful (DHCPv6) and/or 565 autonomous (stateless) address configuration. The exact semantics 566 and usage of the address configuration-related information is 567 specified in [ADDRCONF]. 569 Router Advertisement messages also contain Internet parameters such 570 as the hop limit that hosts should use in outgoing packets and, 571 optionally, link parameters such as the link MTU. This facilitates 572 centralized administration of critical parameters that can be set on 573 routers and automatically propagated to all attached hosts. 575 Nodes accomplish address resolution by multicasting a Neighbor 576 Solicitation that asks the target node to return its link-layer 577 address. Neighbor Solicitation messages are multicast to the 578 solicited-node multicast address of the target address. The target 579 returns its link-layer address in a unicast Neighbor Advertisement 580 message. A single request-response pair of packets is sufficient for 581 both the initiator and the target to resolve each other's link-layer 582 addresses; the initiator includes its link-layer address in the 583 Neighbor Solicitation. 585 Neighbor Solicitation messages can also be used to determine if more 586 than one node has been assigned the same unicast address. The use of 587 Neighbor Solicitation messages for Duplicate Address Detection is 588 specified in [ADDRCONF]. 590 Neighbor Unreachability Detection detects the failure of a neighbor 591 or the failure of the forward path to the neighbor. Doing so 592 requires positive confirmation that packets sent to a neighbor are 593 actually reaching that neighbor and being processed properly by its 594 IP layer. Neighbor Unreachability Detection uses confirmation from 595 two sources. When possible, upper-layer protocols provide a positive 596 confirmation that a connection is making "forward progress", that is, 597 previously sent data is known to have been delivered correctly (e.g., 598 new acknowledgments were received recently). When positive 599 confirmation is not forthcoming through such "hints", a node sends 600 unicast Neighbor Solicitation messages that solicit Neighbor 601 Advertisements as reachability confirmation from the next hop. To 602 reduce unnecessary network traffic, probe messages are only sent to 603 neighbors to which the node is actively sending packets. 605 In addition to addressing the above general problems, Neighbor 606 Discovery also handles the following situations: 608 Link-layer address change - A node that knows its link-layer 609 address has changed can multicast a few (unsolicited) 610 Neighbor Advertisement packets to all nodes to quickly update 611 cached link-layer addresses that have become invalid. Note 612 that the sending of unsolicited advertisements is a 613 performance enhancement only (e.g., unreliable). The 614 Neighbor Unreachability Detection algorithm ensures that all 615 nodes will reliably discover the new address, though the 616 delay may be somewhat longer. 618 Inbound load balancing - Nodes with replicated interfaces may want 619 to load balance the reception of incoming packets across 620 multiple network interfaces on the same link. Such nodes 621 have multiple link-layer addresses assigned to the same 622 interface. For example, a single network driver could 623 represent multiple network interface cards as a single 624 logical interface having multiple link-layer addresses. 626 Load balancing is handled by allowing routers to omit the 627 source link-layer address from Router Advertisement packets, 628 thereby forcing neighbors to use Neighbor Solicitation 629 messages to learn link-layer addresses of routers. Returned 630 Neighbor Advertisement messages can then contain link-layer 631 addresses that differ depending on who issued the 632 solicitation. 634 Anycast addresses - Anycast addresses identify one of a set of 635 nodes providing an equivalent service, and multiple nodes on 636 the same link may be configured to recognize the same Anycast 637 address. Neighbor Discovery handles anycasts by having nodes 638 expect to receive multiple Neighbor Advertisements for the 639 same target. All advertisements for anycast addresses are 640 tagged as being non-Override advertisements. This invokes 641 specific rules to determine which of potentially multiple 642 advertisements should be used. 644 Proxy advertisements - A router willing to accept packets on behalf 645 of a target address that is unable to respond to Neighbor 646 Solicitations can issue non-Override Neighbor Advertisements. 647 Proxy advertisements are used by Mobile IPv6 home Agents to 648 defend mobile nodes' addresses when they move off-link. 649 However, it is not intended as a general mechanism to handle 650 nodes that, e.g., do not implement this protocol. 652 3.1. Comparison with IPv4 654 The IPv6 Neighbor Discovery protocol corresponds to a combination of 655 the IPv4 protocols ARP [ARP], ICMP Router Discovery [RDISC], and ICMP 656 Redirect [ICMPv4]. In IPv4 there is no generally agreed upon 657 protocol or mechanism for Neighbor Unreachability Detection, although 658 Hosts Requirements [HR-CL] does specify some possible algorithms for 659 Dead Gateway Detection (a subset of the problems Neighbor 660 Unreachability Detection tackles). 662 The Neighbor Discovery protocol provides a multitude of improvements 663 over the IPv4 set of protocols: 665 Router Discovery is part of the base protocol set; there is no 666 need for hosts to "snoop" the routing protocols. 668 Router advertisements carry link-layer addresses; no additional 669 packet exchange is needed to resolve the router's link-layer 670 address. 672 Router advertisements carry prefixes for a link; there is no need 673 to have a separate mechanism to configure the "netmask". 675 Router advertisements enable Address Autoconfiguration. 677 Routers can advertise an MTU for hosts to use on the link, 678 ensuring that all nodes use the same MTU value on links lacking a 679 well-defined MTU. 681 Address resolution multicasts are "spread" over 16 million (2^24) 682 multicast addresses greatly reducing address resolution related 683 interrupts on nodes other than the target. Moreover, non-IPv6 684 machines should not be interrupted at all. 686 Redirects contain the link-layer address of the new first hop; 687 separate address resolution is not needed upon receiving a 688 redirect. 690 Multiple prefixes can be associated with the same link. By 691 default, hosts learn all on-link prefixes from Router 692 Advertisements. However, routers may be configured to omit some 693 or all prefixes from Router Advertisements. In such cases hosts 694 assume that destinations are off-link and send traffic to routers. 695 A router can then issue redirects as appropriate. 697 Unlike IPv4, the recipient of an IPv6 redirect assumes that the 698 new next-hop is on-link. In IPv4, a host ignores redirects 699 specifying a next-hop that is not on-link according to the link's 700 network mask. The IPv6 redirect mechanism is analogous to the 701 XRedirect facility specified in [SH-MEDIA]. It is expected to be 702 useful on non-broadcast and shared media links in which it is 703 undesirable or not possible for nodes to know all prefixes for 704 on-link destinations. 706 Neighbor Unreachability Detection is part of the base 707 significantly improving the robustness of packet delivery in the 708 presence of failing routers, partially failing or partitioned 709 links and nodes that change their link-layer addresses. For 710 instance, mobile nodes can move off-link without losing any 711 connectivity due to stale ARP caches. 713 Unlike ARP, Neighbor Discovery detects half-link failures (using 714 Neighbor Unreachability Detection) and avoids sending traffic to 715 neighbors with which two-way connectivity is absent. 717 Unlike in IPv4 Router Discovery the Router Advertisement messages 718 do not contain a preference field. The preference field is not 719 needed to handle routers of different "stability"; the Neighbor 720 Unreachability Detection will detect dead routers and switch to a 721 working one. 723 The use of link-local addresses to uniquely identify routers (for 724 Router Advertisement and Redirect messages) makes it possible for 725 hosts to maintain the router associations in the event of the site 726 renumbering to use new global prefixes. 728 By setting the Hop Limit to 255, Neighbor Discovery is immune to 729 off-link senders that accidentally or intentionally send ND 730 messages. In IPv4 off-link senders can send both ICMP Redirects 731 and Router Advertisement messages. 733 Placing address resolution at the ICMP layer makes the protocol 734 more media-independent than ARP and makes it possible to use 735 standard IP authentication and security mechanisms as appropriate. 737 3.2. Supported Link Types 739 Neighbor Discovery supports links with different properties. In the 740 presence of certain properties only a subset of the ND protocol 741 mechanisms are fully specified in this document: 743 point-to-point - Neighbor Discovery handles such links just like 744 multicast links. (Multicast can be trivially 745 provided on point to point links, and interfaces 746 can be assigned link-local addresses.) Neighbor 747 Discovery should be implemented as described in 748 this document. 750 multicast - Neighbor Discovery should be implemented as 751 described in this document. 753 non-broadcast multiple access (NBMA) 754 - Redirect, Neighbor Unreachability Detection and 755 next-hop determination should be implemented as 756 described in this document. Address resolution, 757 and the mechanism for delivering Router 758 Solicitations and Advertisements on NBMA links is 759 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 all receivers can process. 796 asymmetric reachability 797 - Neighbor Discovery detects the absence of 798 symmetric reachability; a node avoids paths to a 799 neighbor with which it does not have symmetric 800 connectivity. 802 The Neighbor Unreachability Detection will 803 typically identify such half-links and the node 804 will refrain from using them. 806 The protocol can presumably be extended in the 807 future to find viable paths in environments that 808 lack reflexive and transitive connectivity. 810 3.3. Securing Neighbor Discovery messages 812 Neighbor Discovery messages are needed for various functions. Several 813 functions are designed to allow hosts to ascertain the ownership of 814 an address or the mapping between link layer and IP layer addresses. 815 Having Neighbor Discovery functions on the ICMP layer allows for the 816 use of IP layer security mechanisms, which are available 817 independently of the availability of security on the link layer. 819 Vulnerabilities related to Neighbor Discovery are discussed in 820 section 11.1. A general solution for securing Neighbor Discovery is 821 outside the scope of this specification and is discussed in [SEND]. 822 However, Section 11.2 explains how and under which constraints IPsec 823 AH or ESP can be used to secure Neighbor Discovery. 825 4. MESSAGE FORMATS 827 4.1. Router Solicitation Message Format 829 Hosts send Router Solicitations in order to prompt routers to 830 generate Router Advertisements quickly. 832 0 1 2 3 833 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 834 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 835 | Type | Code | Checksum | 836 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 837 | Reserved | 838 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 839 | Options ... 840 +-+-+-+-+-+-+-+-+-+-+-+- 842 IP Fields: 844 Source Address 845 An IP address assigned to the sending interface, or 846 the unspecified address if no address is assigned 847 to the sending interface. 849 Destination Address 850 Typically the all-routers multicast address. 852 Hop Limit 255 854 ICMP Fields: 856 Type 133 858 Code 0 860 Checksum The ICMP checksum. See [ICMPv6]. 862 Reserved This field is unused. It MUST be initialized to 863 zero by the sender and MUST be ignored by the 864 receiver. 865 Valid Options: 867 Source link-layer address 868 The link-layer address of the sender, if known. 869 MUST NOT be included if the Source Address is the 870 unspecified address. Otherwise it SHOULD be 871 included on link layers that have addresses. 873 Future versions of this protocol may define new option types. 874 Receivers MUST silently ignore any options they do not recognize 875 and continue processing the message. 877 4.2. Router Advertisement Message Format 879 Routers send out Router Advertisement message periodically, or in 880 response to a Router Solicitation. 882 0 1 2 3 883 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 884 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 885 | Type | Code | Checksum | 886 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 887 | Cur Hop Limit |M|O| Reserved | Router Lifetime | 888 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 889 | Reachable Time | 890 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 891 | Retrans Timer | 892 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 893 | Options ... 894 +-+-+-+-+-+-+-+-+-+-+-+- 896 IP Fields: 898 Source Address 899 MUST be the link-local address assigned to the 900 interface from which this message is sent. 902 Destination Address 903 Typically the Source Address of an invoking Router 904 Solicitation or the all-nodes multicast address. 906 Hop Limit 255 908 ICMP Fields: 910 Type 134 911 Code 0 913 Checksum The ICMP checksum. See [ICMPv6]. 915 Cur Hop Limit 8-bit unsigned integer. The default value that 916 should be placed in the Hop Count field of the IP 917 header for outgoing IP packets. A value of zero 918 means unspecified (by this router). 920 M 1-bit "Managed address configuration" flag. When 921 set, it indicates that Dynamic Host Configuration 922 Protocol [DHCPv6] is available for address 923 configuration in addition to any addresses 924 autoconfigured using stateless address 925 autoconfiguration. The use of this flag is 926 further described in [ADDRCONF]. 928 O 1-bit "Other stateful configuration" flag. When 929 set, it indicates that [DHCPv6lite] is available 930 for autoconfiguration of other (non-address) 931 information. Examples of such information are DNS- 932 related information or information on other servers 933 within the network. The use of this flag for add is 934 further described in [ADDRCONF]. 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 use the MTU option to specify 1519 the maximum MTU value that is supported by all 1520 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 stateful 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 MUST 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 MUST 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. Whether or not a Source Link-Layer Address option 2262 is provided, if a Neighbor Cache entry for the solicitation's sender 2263 exists (or is created) the entry's IsRouter flag MUST be set to 2264 FALSE. 2266 6.2.7. Router Advertisement Consistency 2268 Routers SHOULD inspect valid Router Advertisements sent by other 2269 routers and verify that the routers are advertising consistent 2270 information on a link. Detected inconsistencies indicate that one or 2271 more routers might be misconfigured and SHOULD be logged to system or 2272 network management. The minimum set of information to check 2273 includes: 2275 - Cur Hop Limit values (except for the unspecified value of zero). 2277 - Values of the M or O flags. 2279 - Reachable Time values (except for the unspecified value of zero). 2281 - Retrans Timer values (except for the unspecified value of zero). 2283 - Values in the MTU options. 2285 - Preferred and Valid Lifetimes for the same prefix. If 2286 AdvPreferredLifetime and/or AdvValidLifetime decrement in real 2287 time as specified in section 6.2.7 then the comparison of the 2288 lifetimes can not compare the content of the fields in the Router 2289 Advertisement but must instead compare the time at which the 2290 prefix will become deprecated and invalidated, respectively. Due 2291 to link propagation delays and potentially poorly synchronized 2292 clocks between the routers such comparison SHOULD allow some time 2293 skew. 2295 Note that it is not an error for different routers to advertise 2296 different sets of prefixes. Also, some routers might leave some 2297 fields as unspecified, i.e., with the value zero, while other routers 2298 specify values. The logging of errors SHOULD be restricted to 2299 conflicting information that causes hosts to switch from one value to 2300 another with each received advertisement. 2302 Any other action on reception of Router Advertisement messages by a 2303 router is beyond the scope of this document. 2305 6.2.8. Link-local Address Change 2307 The link-local address on a router SHOULD change rarely, if ever. 2308 Nodes receiving Neighbor Discovery messages use the source address to 2309 identify the sender. If multiple packets from the same router 2310 contain different source addresses, nodes will assume they come from 2311 different routers, leading to undesirable behavior. For example, a 2312 node will ignore Redirect messages that are believed to have been 2313 sent by a router other than the current first-hop router. Thus the 2314 source address used in Router Advertisements sent by a particular 2315 router must be identical to the target address in a Redirect message 2316 when redirecting to that router. 2318 Using the link-local address to uniquely identify routers on the link 2319 has the benefit that the address a router is known by should not 2320 change when a site renumbers. 2322 If a router changes the link-local address for one of its interfaces, 2323 it SHOULD inform hosts of this change. The router SHOULD multicast a 2324 few Router Advertisements from the old link-local address with the 2325 Router Lifetime field set to zero and also multicast a few Router 2326 Advertisements from the new link-local address. The overall effect 2327 should be the same as if one interface ceases being an advertising 2328 interface, and a different one starts being an advertising interface. 2330 6.3. Host Specification 2331 6.3.1. Host Configuration Variables 2333 None. 2335 6.3.2. Host Variables 2337 A host maintains certain Neighbor Discovery related variables in 2338 addition to the data structures defined in Section 5.1. The specific 2339 variable names are used for demonstration purposes only, and an 2340 implementation is not required to have them, so long as its external 2341 behavior is consistent with that described in this document. 2343 These variables have default values that are overridden by 2344 information received in Router Advertisement messages. The default 2345 values are used when there is no router on the link or when all 2346 received Router Advertisements have left a particular value 2347 unspecified. 2349 The default values in this specification may be overridden by 2350 specific documents that describe how IP operates over different link 2351 layers. This rule allows Neighbor Discovery to operate over links 2352 with widely varying performance characteristics. 2354 For each interface: 2356 LinkMTU The MTU of the link. 2357 Default: The valued defined in the specific 2358 document that describes how IPv6 operates over 2359 the particular link layer (e.g., [IPv6-ETHER]). 2361 CurHopLimit The default hop limit to be used when sending 2362 (unicast) IP packets. 2364 Default: The value specified in the "Assigned 2365 Numbers" RFC [ASSIGNED] that was in effect at the 2366 time of implementation. 2368 BaseReachableTime 2369 A base value used for computing the random 2370 ReachableTime value. 2372 Default: REACHABLE_TIME milliseconds. 2374 ReachableTime The time a neighbor is considered reachable after 2375 receiving a reachability confirmation. 2377 This value should be a uniformly-distributed 2378 random value between MIN_RANDOM_FACTOR and 2379 MAX_RANDOM_FACTOR times BaseReachableTime 2380 milliseconds. A new random value should be 2381 calculated when BaseReachableTime changes (due to 2382 Router Advertisements) or at least every few 2383 hours even if no Router Advertisements are 2384 received. 2386 RetransTimer The time between retransmissions of Neighbor 2387 Solicitation messages to a neighbor when 2388 resolving the address or when probing the 2389 reachability of a neighbor. 2391 Default: RETRANS_TIMER milliseconds 2393 6.3.3. Interface Initialization 2395 The host joins the all-nodes multicast address on all multicast- 2396 capable interfaces. 2398 6.3.4. Processing Received Router Advertisements 2400 When multiple routers are present, the information advertised 2401 collectively by all routers may be a superset of the information 2402 contained in a single Router Advertisement. Moreover, information 2403 may also be obtained through other dynamic means, such as stateful 2404 autoconfiguration. Hosts accept the union of all received 2405 information; the receipt of a Router Advertisement MUST NOT 2406 invalidate all information received in a previous advertisement or 2407 from another source. However, when received information for a 2408 specific parameter (e.g., Link MTU) or option (e.g., Lifetime on a 2409 specific Prefix) differs from information received earlier, and the 2410 parameter/option can only have one value, the most recently-received 2411 information is considered authoritative. 2413 Some Router Advertisement fields (e.g., Cur Hop Limit, Reachable Time 2414 and Retrans Timer) may contain a value denoting unspecified. In such 2415 cases, the parameter should be ignored and the host should continue 2416 using whatever value it is already using. In particular, a host MUST 2417 NOT interpret the unspecified value as meaning change back to the 2418 default value that was in use before the first Router Advertisement 2419 was received. This rule prevents hosts from continually changing an 2420 internal variable when one router advertises a specific value, but 2421 other routers advertise the unspecified value. 2423 On receipt of a valid Router Advertisement, a host extracts the 2424 source address of the packet and does the following: 2426 - If the address is not already present in the host's Default 2427 Router List, and the advertisement's Router Lifetime is non- 2428 zero, create a new entry in the list, and initialize its 2429 invalidation timer value from the advertisement's Router 2430 Lifetime field. 2432 - If the address is already present in the host's Default Router 2433 List as a result of a previously-received advertisement, reset 2434 its invalidation timer to the Router Lifetime value in the 2435 newly-received advertisement. 2437 - If the address is already present in the host's Default Router 2438 List and the received Router Lifetime value is zero, immediately 2439 time-out the entry as specified in Section 6.3.5. 2441 To limit the storage needed for the Default Router List, a host MAY 2442 choose not to store all of the router addresses discovered via 2443 advertisements. However, a host MUST retain at least two router 2444 addresses and SHOULD retain more. Default router selections are made 2445 whenever communication to a destination appears to be failing. Thus, 2446 the more routers on the list, the more likely an alternative working 2447 router can be found quickly (e.g., without having to wait for the 2448 next advertisement to arrive). 2450 If the received Cur Hop Limit value is non-zero the host SHOULD set 2451 its CurHopLimit variable to the received value. 2453 If the received Reachable Time value is non-zero the host SHOULD set 2454 its BaseReachableTime variable to the received value. If the new 2455 value differs from the previous value, the host SHOULD recompute a 2456 new random ReachableTime value. ReachableTime is computed as a 2457 uniformly-distributed random value between MIN_RANDOM_FACTOR and 2458 MAX_RANDOM_FACTOR times the BaseReachableTime. Using a random 2459 component eliminates the possibility Neighbor Unreachability 2460 Detection messages synchronize with each other. 2462 In most cases, the advertised Reachable Time value will be the same 2463 in consecutive Router Advertisements and a host's BaseReachableTime 2464 rarely changes. In such cases, an implementation SHOULD insure that 2465 a new random value gets recomputed at least once every few hours. 2467 The RetransTimer variable SHOULD be copied from the Retrans Timer 2468 field, if the received value is non-zero. 2470 After extracting information from the fixed part of the Router 2471 Advertisement message, the advertisement is scanned for valid 2472 options. If the advertisement contains a Source Link-Layer Address 2473 option the link-layer address SHOULD be recorded in the Neighbor 2474 Cache entry for the router (creating an entry if necessary) and the 2475 IsRouter flag in the Neighbor Cache entry MUST be set to TRUE. If no 2476 Source Link-Layer Address is included, but a corresponding Neighbor 2477 Cache entry exists, its IsRouter flag MUST be set to TRUE. The 2478 IsRouter flag is used by Neighbor Unreachability Detection to 2479 determine when a router changes to being a host (i.e., no longer 2480 capable of forwarding packets). If a Neighbor Cache entry is created 2481 for the router its reachability state MUST be set to STALE as 2482 specified in Section 7.3.3. If a cache entry already exists and is 2483 updated with a different link-layer address the reachability state 2484 MUST also be set to STALE. 2486 If the MTU option is present, hosts SHOULD copy the option's value 2487 into LinkMTU so long as the value is greater than or equal to the 2488 minimum link MTU [IPv6] and does not exceed the maximum LinkMTU value 2489 specified in the link type specific document (e.g., [IPv6-ETHER]). 2491 Prefix Information options that have the "on-link" (L) flag set 2492 indicate a prefix identifying a range of addresses that should be 2493 considered on-link. Note, however, that a Prefix Information option 2494 with the on-link flag set to zero conveys no information concerning 2495 on-link determination and MUST NOT be interpreted to mean that 2496 addresses covered by the prefix are off-link. The only way to cancel 2497 a previous on-link indication is to advertise that prefix with the 2498 L-bit set and the Lifetime set to zero. The default behavior (see 2499 Section 5.2) when sending a packet to an address for which no 2500 information is known about the on-link status of the address is to 2501 forward the packet to a default router; the reception of a Prefix 2502 Information option with the "on-link " (L) flag set to zero does not 2503 change this behavior. The reasons for an address being treated as 2504 on-link is specified in the definition of "on-link" in Section 2.1. 2505 Prefixes with the on-link flag set to zero would normally have the 2506 autonomous flag set and be used by [ADDRCONF]. 2508 For each Prefix Information option with the on-link flag set, a host 2509 does the following: 2511 - If the prefix is the link-local prefix, silently ignore the 2512 Prefix Information option. 2514 - If the prefix is not already present in the Prefix List, and the 2515 Prefix Information option's Valid Lifetime field is non-zero, 2516 create a new entry for the prefix and initialize its 2517 invalidation timer to the Valid Lifetime value in the Prefix 2518 Information option. 2520 - If the prefix is already present in the host's Prefix List as 2521 the result of a previously-received advertisement, reset its 2522 invalidation timer to the Valid Lifetime value in the Prefix 2523 Information option. If the new Lifetime value is zero, time-out 2524 the prefix immediately (see Section 6.3.5). 2526 - If the Prefix Information option's Valid Lifetime field is zero, 2527 and the prefix is not present in the host's Prefix List, 2528 silently ignore the option. 2530 Stateless address autoconfiguration [ADDRCONF] may in some 2531 circumstances increase the Valid Lifetime of a prefix or ignore it 2532 completely in order to prevent a particular denial of service attack. 2533 However, since the effect of the same denial of service targeted at 2534 the on-link prefix list is not catastrophic (hosts would send packets 2535 to a default router and receive a redirect rather than sending 2536 packets directly to a neighbor) the Neighbor Discovery protocol does 2537 not impose such a check on the prefix lifetime values. Similarly, 2538 [ADDRCONF] may impose certain restrictions on the prefix length for 2539 address configuration purposes. Therefore, the prefix might be 2540 rejected by [ADDRCONF] implementation in the host. However, the 2541 prefix length is still valid for on-link determination when combined 2542 with other flags in the prefix option. 2544 Note: Implementations can choose to process the on-link aspects of 2545 the prefixes separately from the address autoconfiguration aspects 2546 of the prefixes by, e.g., passing a copy of each valid Router 2547 Advertisement message to both an "on-link" and an "addrconf" 2548 function. Each function can then operate independently on the 2549 prefixes that have the appropriate flag set. 2551 6.3.5. Timing out Prefixes and Default Routers 2553 Whenever the invalidation timer expires for a Prefix List entry, that 2554 entry is discarded. No existing Destination Cache entries need be 2555 updated, however. Should a reachability problem arise with an 2556 existing Neighbor Cache entry, Neighbor Unreachability Detection will 2557 perform any needed recovery. 2559 Whenever the Lifetime of an entry in the Default Router List expires, 2560 that entry is discarded. When removing a router from the Default 2561 Router list, the node MUST update the Destination Cache in such a way 2562 that all entries using the router perform next-hop determination 2563 again rather than continue sending traffic to the (deleted) router. 2565 6.3.6. Default Router Selection 2567 The algorithm for selecting a router depends in part on whether or 2568 not a router is known to be reachable. The exact details of how a 2569 node keeps track of a neighbor's reachability state are covered in 2570 Section 7.3. The algorithm for selecting a default router is invoked 2571 during next-hop determination when no Destination Cache entry exists 2572 for an off-link destination or when communication through an existing 2573 router appears to be failing. Under normal conditions, a router 2574 would be selected the first time traffic is sent to a destination, 2575 with subsequent traffic for that destination using the same router as 2576 indicated in the Destination Cache modulo any changes to the 2577 Destination Cache caused by Redirect messages. 2579 The policy for selecting routers from the Default Router List is as 2580 follows: 2582 1) Routers that are reachable or probably reachable (i.e., in any 2583 state other than INCOMPLETE) SHOULD be preferred over routers 2584 whose reachability is unknown or suspect (i.e., in the 2585 INCOMPLETE state, or for which no Neighbor Cache entry exists). 2586 An implementation may choose to always return the same router or 2587 cycle through the router list in a round-robin fashion as long 2588 as it always returns a reachable or a probably reachable router 2589 when one is available. 2591 2) When no routers on the list are known to be reachable or 2592 probably reachable, routers SHOULD be selected in a round-robin 2593 fashion, so that subsequent requests for a default router do not 2594 return the same router until all other routers have been 2595 selected. 2597 Cycling through the router list in this case ensures that all 2598 available routers are actively probed by the Neighbor 2599 Unreachability Detection algorithm. A request for a default 2600 router is made in conjunction with the sending of a packet to a 2601 router, and the selected router will be probed for reachability 2602 as a side effect. 2604 6.3.7. Sending Router Solicitations 2606 When an interface becomes enabled, a host may be unwilling to wait 2607 for the next unsolicited Router Advertisement to locate default 2608 routers or learn prefixes. To obtain Router Advertisements quickly, 2609 a host SHOULD transmit up to MAX_RTR_SOLICITATIONS Router 2610 Solicitation messages each separated by at least 2611 RTR_SOLICITATION_INTERVAL seconds. Router Solicitations may be sent 2612 after any of the following events: 2614 - The interface is initialized at system startup time. 2616 - The interface is reinitialized after a temporary interface 2617 failure or after being temporarily disabled by system 2618 management. 2620 - The system changes from being a router to being a host, by 2621 having its IP forwarding capability turned off by system 2622 management. 2624 - The host attaches to a link for the first time. 2626 - The host re-attaches to a link after being detached for some 2627 time. 2629 A host sends Router Solicitations to the All-Routers multicast 2630 address. The IP source address is set to either one of the 2631 interface's unicast addresses or the unspecified address. The Source 2632 Link-Layer Address option SHOULD be set to the host's link-layer 2633 address, if the IP source address is not the unspecified address. 2635 Before a host sends an initial solicitation, it SHOULD delay the 2636 transmission for a random amount of time between 0 and 2637 MAX_RTR_SOLICITATION_DELAY. This serves to alleviate congestion when 2638 many hosts start up on a link at the same time, such as might happen 2639 after recovery from a power failure. If a host has already performed 2640 a random delay since the interface became (re)enabled (e.g., as part 2641 of Duplicate Address Detection [ADDRCONF]) there is no need to delay 2642 again before sending the first Router Solicitation message. In some 2643 cases, the random delay MAY be omitted if necessary. For instance, a 2644 mobile node, using [MIPv6], moving to a new link would need to 2645 discover such movement as soon as possible to minimize the amount of 2646 packet losses resulting from the change in its topological movement. 2647 Router Solicitations provide a useful tool for movement detection in 2648 Mobile IPv6 as they allow mobile nodes to determine movement to new 2649 links. Hence, if a mobile node received link layer information 2650 indicating that movement might have taken place, it MAY send a Router 2651 Solicitation immediately, without random delays. The strength of such 2652 indications should be assessed by the mobile node's implementation 2653 and is outside the scope of this specification. 2655 Once the host sends a Router Solicitation, and receives a valid 2656 Router Advertisement with a non-zero Router Lifetime, the host MUST 2657 desist from sending additional solicitations on that interface, until 2658 the next time one of the above events occurs. Moreover, a host 2659 SHOULD send at least one solicitation in the case where an 2660 advertisement is received prior to having sent a solicitation. 2661 Unsolicited Router Advertisements may be incomplete (see Section 2662 6.2.3); solicited advertisements are expected to contain complete 2663 information. 2665 If a host sends MAX_RTR_SOLICITATIONS solicitations, and receives no 2666 Router Advertisements after having waited MAX_RTR_SOLICITATION_DELAY 2667 seconds after sending the last solicitation, the host concludes that 2668 there are no routers on the link for the purpose of [ADDRCONF]. 2669 However, the host continues to receive and process Router 2670 Advertisements messages in the event that routers appear on the link. 2672 7. ADDRESS RESOLUTION AND NEIGHBOR UNREACHABILITY DETECTION 2674 This section describes the functions related to Neighbor Solicitation 2675 and Neighbor Advertisement messages and includes descriptions of 2676 address resolution and the Neighbor Unreachability Detection 2677 algorithm. 2679 Neighbor Solicitation and Advertisement messages are also used for 2680 Duplicate Address Detection as specified by [ADDRCONF]. In 2681 particular, Duplicate Address Detection sends Neighbor Solicitation 2682 messages with an unspecified source address targeting its own 2683 "tentative" address. Such messages trigger nodes already using the 2684 address to respond with a multicast Neighbor Advertisement indicating 2685 that the address is in use. 2687 7.1. Message Validation 2689 7.1.1. Validation of Neighbor Solicitations 2691 A node MUST silently discard any received Neighbor Solicitation 2692 messages that do not satisfy all of the following validity checks: 2694 - The IP Hop Limit field has a value of 255, i.e., the packet 2695 could not possibly have been forwarded by a router. 2697 - ICMP Checksum is valid. 2699 - ICMP Code is 0. 2701 - ICMP length (derived from the IP length) is 24 or more octets. 2703 - Target Address is not a multicast address. 2705 - All included options have a length that is greater than zero. 2707 - If the IP source address is the unspecified address, the IP 2708 destination address is a solicited-node multicast address. 2710 - If the IP source address is the unspecified address, there is no 2711 source link-layer address option in the message. 2713 The contents of the Reserved field, and of any unrecognized options, 2714 MUST be ignored. Future, backward-compatible changes to the protocol 2715 may specify the contents of the Reserved field or add new options; 2716 backward-incompatible changes may use different Code values. 2718 The contents of any defined options that are not specified to be used 2719 with Neighbor Solicitation messages MUST be ignored and the packet 2720 processed as normal. The only defined option that may appear is the 2721 Source Link-Layer Address option. 2723 A Neighbor Solicitation that passes the validity checks is called a 2724 "valid solicitation". 2726 7.1.2. Validation of Neighbor Advertisements 2728 A node MUST silently discard any received Neighbor Advertisement 2729 messages that do not satisfy all of the following validity checks: 2731 - The IP Hop Limit field has a value of 255, i.e., the packet 2732 could not possibly have been forwarded by a router. 2734 - ICMP Checksum is valid. 2736 - ICMP Code is 0. 2738 - ICMP length (derived from the IP length) is 24 or more octets. 2740 - Target Address is not a multicast address. 2742 - If the IP Destination Address is a multicast address the 2743 Solicited flag is zero. 2745 - All included options have a length that is greater than zero. 2747 The contents of the Reserved field, and of any unrecognized options, 2748 MUST be ignored. Future, backward-compatible changes to the protocol 2749 may specify the contents of the Reserved field or add new options; 2750 backward-incompatible changes may use different Code values. 2752 The contents of any defined options that are not specified to be used 2753 with Neighbor Advertisement messages MUST be ignored and the packet 2754 processed as normal. The only defined option that may appear is the 2755 Target Link-Layer Address option. 2757 A Neighbor Advertisements that passes the validity checks is called a 2758 "valid advertisement". 2760 7.2. Address Resolution 2762 Address resolution is the process through which a node determines the 2763 link-layer address of a neighbor given only its IP address. Address 2764 resolution is performed only on addresses that are determined to be 2765 on-link and for which the sender does not know the corresponding 2766 link-layer address (see section 5.2). Address resolution is never 2767 performed on multicast addresses. 2769 7.2.1. Interface Initialization 2771 When a multicast-capable interface becomes enabled the node MUST join 2772 the all-nodes multicast address on that interface, as well as the 2773 solicited-node multicast address corresponding to each of the IP 2774 addresses assigned to the interface. 2776 The set of addresses assigned to an interface may change over time. 2777 New addresses might be added and old addresses might be removed 2778 [ADDRCONF]. In such cases the node MUST join and leave the 2779 solicited-node multicast address corresponding to the new and old 2780 addresses, respectively. Joining the solicited-node multicast address 2781 SHOULD be done using the Multicast Listener Discovery [MLD] protocol. 2782 Note that multiple unicast addresses may map into the same solicited- 2783 node multicast address; a node MUST NOT leave the solicited-node 2784 multicast group until all assigned addresses corresponding to that 2785 multicast address have been removed. 2787 7.2.2. Sending Neighbor Solicitations 2788 When a node has a unicast packet to send to a neighbor, but does not 2789 know the neighbor's link-layer address, it performs address 2790 resolution. For multicast-capable interfaces this entails creating a 2791 Neighbor Cache entry in the INCOMPLETE state and transmitting a 2792 Neighbor Solicitation message targeted at the neighbor. The 2793 solicitation is sent to the solicited-node multicast address 2794 corresponding to the target address. 2796 If the source address of the packet prompting the solicitation is the 2797 same as one of the addresses assigned to the outgoing interface, that 2798 address SHOULD be placed in the IP Source Address of the outgoing 2799 solicitation. Otherwise, any one of the addresses assigned to the 2800 interface should be used. Using the prompting packet's source 2801 address when possible insures that the recipient of the Neighbor 2802 Solicitation installs in its Neighbor Cache the IP address that is 2803 highly likely to be used in subsequent return traffic belonging to 2804 the prompting packet's "connection". 2806 If the solicitation is being sent to a solicited-node multicast 2807 address, the sender MUST include its link-layer address (if it has 2808 one) as a Source Link-Layer Address option. Otherwise, the sender 2809 SHOULD include its link-layer address (if it has one) as a Source 2810 Link-Layer Address option. Including the source link-layer address 2811 in a multicast solicitation is required to give the target an address 2812 to which it can send the Neighbor Advertisement. On unicast 2813 solicitations, an implementation MAY omit the Source Link-Layer 2814 Address option. The assumption here is that if the sender has a 2815 peer's link-layer address in its cache, there is a high probability 2816 that the peer will also have an entry in its cache for the sender. 2817 Consequently, it need not be sent. 2819 While waiting for address resolution to complete, the sender MUST, 2820 for each neighbor, retain a small queue of packets waiting for 2821 address resolution to complete. The queue MUST hold at least one 2822 packet, and MAY contain more. However, the number of queued packets 2823 per neighbor SHOULD be limited to some small value. When a queue 2824 overflows, the new arrival SHOULD replace the oldest entry. Once 2825 address resolution completes, the node transmits any queued packets. 2827 While awaiting a response, the sender SHOULD retransmit Neighbor 2828 Solicitation messages approximately every RetransTimer milliseconds, 2829 even in the absence of additional traffic to the neighbor. 2830 Retransmissions MUST be rate-limited to at most one solicitation per 2831 neighbor every RetransTimer milliseconds. 2833 If no Neighbor Advertisement is received after MAX_MULTICAST_SOLICIT 2834 solicitations, address resolution has failed. The sender MUST return 2835 ICMP destination unreachable indications with code 3 (Address 2836 Unreachable) for each packet queued awaiting address resolution. 2838 7.2.3. Receipt of Neighbor Solicitations 2839 A valid Neighbor Solicitation that does not meet any the following 2840 requirements MUST be silently discarded: 2842 - The Target Address is a "valid" unicast or anycast address 2843 assigned to the receiving interface [ADDRCONF], 2845 - The Target Address is a unicast address for which the node is 2846 offering proxy service, or 2848 - The Target Address is a "tentative" address on which Duplicate 2849 Address Detection is being performed [ADDRCONF]. 2851 If the Target Address is tentative, the Neighbor Solicitation should 2852 be processed as described in [ADDRCONF]. Otherwise, the following 2853 description applies. If the Source Address is not the unspecified 2854 address and, on link layers that have addresses, the solicitation 2855 includes a Source Link-Layer Address option, then the recipient 2856 SHOULD create or update the Neighbor Cache entry for the IP Source 2857 Address of the solicitation. If an entry does not already exist, the 2858 node SHOULD create a new one and set its reachability state to STALE 2859 as specified in Section 7.3.3. If an entry already exists, and the 2860 cached link-layer address differs from the one in the received Source 2861 Link-Layer option, the cached address should be replaced by the 2862 received address and the entry's reachability state MUST be set to 2863 STALE. 2865 If a Neighbor Cache entry is created the IsRouter flag SHOULD be set 2866 to FALSE. This will be the case even if the Neighbor Solicitation is 2867 sent by a router since the Neighbor Solicitation messages do not 2868 contain an indication of whether or not the sender is a router. In 2869 the event that the sender is a router, subsequent Neighbor 2870 Advertisement or Router Advertisement messages will set the correct 2871 IsRouter value. If a Neighbor Cache entry already exists its 2872 IsRouter flag MUST NOT be modified. 2874 If the Source Address is the unspecified address the node MUST NOT 2875 create or update the Neighbor Cache entry. 2877 After any updates to the Neighbor Cache, the node sends a Neighbor 2878 Advertisement response as described in the next section. 2880 7.2.4. Sending Solicited Neighbor Advertisements 2882 A node sends a Neighbor Advertisement in response to a valid Neighbor 2883 Solicitation targeting one of the node's assigned addresses. The 2884 Target Address of the advertisement is copied from the Target Address 2885 of the solicitation. If the solicitation's IP Destination Address is 2886 not a multicast address, the Target Link-Layer Address option MAY be 2887 omitted; the neighboring node's cached value must already be current 2888 in order for the solicitation to have been received. If the 2889 solicitation's IP Destination Address is a multicast address, the 2890 Target Link-Layer option MUST be included in the advertisement. 2891 Furthermore, if the node is a router, it MUST set the Router flag to 2892 one; otherwise it MUST set the flag to zero. 2894 If the Target Address is either an anycast address or a unicast 2895 address for which the node is providing proxy service, or the Target 2896 Link-Layer Address option is not included, the Override flag SHOULD 2897 be set to zero. Otherwise, the Override flag SHOULD be set to one. 2898 Proper setting of the Override flag ensures that nodes give 2899 preference to non-proxy advertisements, even when received after 2900 proxy advertisements, and also ensures that the first advertisement 2901 for an anycast address "wins". 2903 If the source of the solicitation is the unspecified address, the 2904 node MUST set the Solicited flag to zero and multicast the 2905 advertisement to the all-nodes address. Otherwise, the node MUST set 2906 the Solicited flag to one and unicast the advertisement to the Source 2907 Address of the solicitation. 2909 If the Target Address is an anycast address the sender SHOULD delay 2910 sending a response for a random time between 0 and 2911 MAX_ANYCAST_DELAY_TIME seconds. 2913 Because unicast Neighbor Solicitations are not required to include a 2914 Source Link-Layer Address, it is possible that a node sending a 2915 solicited Neighbor Advertisement does not have a corresponding link- 2916 layer address for its neighbor in its Neighbor Cache. In such 2917 situations, a node will first have to use Neighbor Discovery to 2918 determine the link-layer address of its neighbor (i.e, send out a 2919 multicast Neighbor Solicitation). 2921 7.2.5. Receipt of Neighbor Advertisements 2923 When a valid Neighbor Advertisement is received (either solicited or 2924 unsolicited), the Neighbor Cache is searched for the target's entry. 2925 If no entry exists, the advertisement SHOULD be silently discarded. 2926 There is no need to create an entry if none exists, since the 2927 recipient has apparently not initiated any communication with the 2928 target. 2930 Once the appropriate Neighbor Cache entry has been located, the 2931 specific actions taken depend on the state of the Neighbor Cache 2932 entry, the flags in the advertisement and the actual link-layer 2933 address supplied. 2935 In any state, if the link layer has addresses and an unsolicited 2936 Neighbor Advertisement is received with the O flag cleared, with no 2937 Target Link-Layer address option included, the receiving node SHOULD 2938 silently discard the received advertisement. 2940 If the target's Neighbor Cache entry is in the INCOMPLETE state when 2941 the advertisement is received, one of two things happens. 2942 Otherwise, the receiving node performs the following 2943 steps: 2945 - It records the link-layer address in the Neighbor Cache entry. 2947 - If the advertisement's Solicited flag is set, the state of the 2948 entry is set to REACHABLE, otherwise it is set to STALE. 2950 - It sets the IsRouter flag in the cache entry based on the Router 2951 flag in the received advertisement. 2953 - It sends any packets queued for the neighbor awaiting address 2954 resolution. 2956 Note that the Override flag is ignored if the entry is in the 2957 INCOMPLETE state. 2959 If the target's Neighbor Cache entry is in any state other than 2960 INCOMPLETE when the advertisement is received, processing becomes 2961 quite a bit more complex. If the Override flag is clear and the 2962 supplied link-layer address differs from that in the cache, then one 2963 of two actions takes place: if the state of the entry is REACHABLE, 2964 set it to STALE, but do not update the entry in any other way; 2965 otherwise, the received advertisement should be ignored and MUST NOT 2966 update the cache. If the Override flag is set, both the Override 2967 flag is clear and the supplied link-layer address is the same as that 2968 in the cache, or no Target Link-layer address option was supplied, 2969 the received advertisement MUST update the Neighbor Cache entry as 2970 follows: 2972 - The link-layer address in the Target Link-Layer Address option 2973 MUST be inserted in the cache (if one is supplied and is different 2974 than the already recorded address). 2976 - If the Solicited flag is set, the state of the entry MUST be set 2977 to REACHABLE. If the Solicited flag is zero and the link-layer 2978 address was updated with a different address the state MUST be set 2979 to STALE. Otherwise, the entry's state remains unchanged. 2981 An advertisement's Solicited flag should only be set if the 2982 advertisement is a response to a Neighbor Solicitation. Because 2983 Neighbor Unreachability Detection Solicitations are sent to the 2984 cached link-layer address, receipt of a solicited advertisement 2985 indicates that the forward path is working. Receipt of an 2986 unsolicited advertisement, however, suggests that a neighbor has 2987 urgent information to announce (e.g., a changed link-layer 2988 address). If the urgent information indicates a change from what 2989 a node is currently using, the node should verify the reachability 2990 of the (new) path when it sends the next packet. There is no need 2991 to update the state for unsolicited advertisements that do not 2992 change the contents of the cache. 2994 - The IsRouter flag in the cache entry MUST be set based on the 2995 Router flag in the received advertisement. In those cases where 2996 the IsRouter flag changes from TRUE to FALSE as a result of this 2997 update, the node MUST remove that router from the Default Router 2998 List and update the Destination Cache entries for all destinations 2999 using that neighbor as a router as specified in Section 7.3.3. 3000 This is needed to detect when a node that is used as a router 3001 stops forwarding packets due to being configured as a host. 3003 The above rules ensure that the cache is updated either when the 3004 Neighbor Advertisement takes precedence (i.e., the Override flag is 3005 set) or when the Neighbor Advertisement refers to the same link-layer 3006 address that is currently recorded in the cache. If none of the 3007 above apply, the advertisement prompts future Neighbor Unreachability 3008 Detection (if it is not already in progress) by changing the state in 3009 the cache entry. 3011 7.2.6. Sending Unsolicited Neighbor Advertisements 3013 In some cases a node may be able to determine that its link-layer 3014 address has changed (e.g., hot-swap of an interface card) and may 3015 wish to inform its neighbors of the new link-layer address quickly. 3016 In such cases a node MAY send up to MAX_NEIGHBOR_ADVERTISEMENT 3017 unsolicited Neighbor Advertisement messages to the all-nodes 3018 multicast address. These advertisements MUST be separated by at 3019 least RetransTimer seconds. 3021 The Target Address field in the unsolicited advertisement is set to 3022 an IP address of the interface, and the Target Link-Layer Address 3023 option is filled with the new link-layer address. The Solicited flag 3024 MUST be set to zero, in order to avoid confusing the Neighbor 3025 Unreachability Detection algorithm. If the node is a router, it MUST 3026 set the Router flag to one; otherwise it MUST set it to zero. The 3027 Override flag MAY be set to either zero or one. In either case, 3028 neighboring nodes will immediately change the state of their Neighbor 3029 Cache entries for the Target Address to STALE, prompting them to 3030 verify the path for reachability. If the Override flag is set to 3031 one, neighboring nodes will install the new link-layer address in 3032 their caches. Otherwise, they will ignore the new link-layer 3033 address, choosing instead to probe the cached address. 3035 A node that has multiple IP addresses assigned to an interface MAY 3036 multicast a separate Neighbor Advertisement for each address. In 3037 such a case the node SHOULD introduce a small delay between the 3038 sending of each advertisement to reduce the probability of the 3039 advertisements being lost due to congestion. 3041 A proxy MAY multicast Neighbor Advertisements when its link-layer 3042 address changes or when it is configured (by system management or 3043 other mechanisms) to proxy for an address. If there are multiple 3044 nodes that are providing proxy services for the same set of addresses 3045 the proxies SHOULD provide a mechanism that prevents multiple proxies 3046 from multicasting advertisements for any one address, in order to 3047 reduce the risk of excessive multicast traffic. 3049 Also, a node belonging to an anycast address MAY multicast 3050 unsolicited Neighbor Advertisements for the anycast address when the 3051 node's link-layer address changes. 3053 Note that because unsolicited Neighbor Advertisements do not reliably 3054 update caches in all nodes (the advertisements might not be received 3055 by all nodes), they should only be viewed as a performance 3056 optimization to quickly update the caches in most neighbors. The 3057 Neighbor Unreachability Detection algorithm ensures that all nodes 3058 obtain a reachable link-layer address, though the delay may be 3059 slightly longer. 3061 7.2.7. Anycast Neighbor Advertisements 3063 From the perspective of Neighbor Discovery, anycast addresses are 3064 treated just like unicast addresses in most cases. Because an 3065 anycast address is syntactically the same as a unicast address, nodes 3066 performing address resolution or Neighbor Unreachability Detection on 3067 an anycast address treat it as if it were a unicast address. No 3068 special processing takes place. 3070 Nodes that have an anycast address assigned to an interface treat 3071 them exactly the same as if they were unicast addresses with two 3072 exceptions. First, Neighbor Advertisements sent in response to a 3073 Neighbor Solicitation SHOULD be delayed by a random time between 0 3074 and MAX_ANYCAST_DELAY_TIME to reduce the probability of network 3075 congestion. Second, the Override flag in Neighbor Advertisements 3076 SHOULD be set to 0, so that when multiple advertisements are 3077 received, the first received advertisement is used rather than the 3078 most recently received advertisement. 3080 As with unicast addresses, Neighbor Unreachability Detection ensures 3081 that a node quickly detects when the current binding for an anycast 3082 address becomes invalid. 3084 7.2.8. Proxy Neighbor Advertisements 3086 Under limited circumstances, a router MAY proxy for one or more other 3087 nodes, that is, through Neighbor Advertisements indicate that it is 3088 willing to accept packets not explicitly addressed to itself. For 3089 example, a router might accept packets on behalf of a mobile node 3090 that has moved off-link. The mechanisms used by proxy are identical 3091 to the mechanisms used with anycast addresses. 3093 A proxy MUST join the solicited-node multicast address(es) that 3094 correspond to the IP address(es) assigned to the node for which it is 3095 proxying. This SHOULD be done using [MLD]. 3097 All solicited proxy Neighbor Advertisement messages MUST have the 3098 Override flag set to zero. This ensures that if the node itself is 3099 present on the link its Neighbor Advertisement (with the Override 3100 flag set to one) will take precedence of any advertisement received 3101 from a proxy. A proxy MAY send unsolicited advertisements with the 3102 Override flag set to one as specified in Section 7.2.6, but doing so 3103 may cause the proxy advertisement to override a valid entry created 3104 by the node itself. 3106 Finally, when sending a proxy advertisement in response to a Neighbor 3107 Solicitation, the sender should delay its response by a random time 3108 between 0 and MAX_ANYCAST_DELAY_TIME seconds. 3110 7.3. Neighbor Unreachability Detection 3112 Communication to or through a neighbor may fail for numerous reasons 3113 at any time, including hardware failure, hot-swap of an interface 3114 card, etc. If the destination has failed, no recovery is possible 3115 and communication fails. On the other hand, if it is the path that 3116 has failed, recovery may be possible. Thus, a node actively tracks 3117 the reachability "state" for the neighbors to which it is sending 3118 packets. 3120 Neighbor Unreachability Detection is used for all paths between hosts 3121 and neighboring nodes, including host-to-host, host-to-router, and 3122 router-to-host communication. Neighbor Unreachability Detection may 3123 also be used between routers, but is not required if an equivalent 3124 mechanism is available, for example, as part of the routing 3125 protocols. 3127 When a path to a neighbor appears to be failing, the specific 3128 recovery procedure depends on how the neighbor is being used. If the 3129 neighbor is the ultimate destination, for example, address resolution 3130 should be performed again. If the neighbor is a router, however, 3131 attempting to switch to another router would be appropriate. The 3132 specific recovery that takes place is covered under next-hop 3133 determination; Neighbor Unreachability Detection signals the need for 3134 next-hop determination by deleting a Neighbor Cache entry. 3136 Neighbor Unreachability Detection is performed only for neighbors to 3137 which unicast packets are sent; it is not used when sending to 3138 multicast addresses. 3140 7.3.1. Reachability Confirmation 3142 A neighbor is considered reachable if the node has recently received 3143 a confirmation that packets sent recently to the neighbor were 3144 received by its IP layer. Positive confirmation can be gathered in 3145 two ways: hints from upper layer protocols that indicate a connection 3146 is making "forward progress", or receipt of a Neighbor Advertisement 3147 message that is a response to a Neighbor Solicitation message. 3149 A connection makes "forward progress" if the packets received from a 3150 remote peer can only be arriving if recent packets sent to that peer 3151 are actually reaching it. In TCP, for example, receipt of a (new) 3152 acknowledgement indicates that previously sent data reached the peer. 3153 Likewise, the arrival of new (non-duplicate) data indicates that 3154 earlier acknowledgements are being delivered to the remote peer. If 3155 packets are reaching the peer, they must also be reaching the 3156 sender's next-hop neighbor; thus "forward progress" is a confirmation 3157 that the next-hop neighbor is reachable. For off-link destinations, 3158 forward progress implies that the first-hop router is reachable. 3159 When available, this upper-layer information SHOULD be used. 3161 In some cases (e.g., UDP-based protocols and routers forwarding 3162 packets to hosts) such reachability information may not be readily 3163 available from upper-layer protocols. When no hints are available 3164 and a node is sending packets to a neighbor, the node actively probes 3165 the neighbor using unicast Neighbor Solicitation messages to verify 3166 that the forward path is still working. 3168 The receipt of a solicited Neighbor Advertisement serves as 3169 reachability confirmation, since advertisements with the Solicited 3170 flag set to one are sent only in response to a Neighbor Solicitation. 3171 Receipt of other Neighbor Discovery messages such as Router 3172 Advertisements and Neighbor Advertisement with the Solicited flag set 3173 to zero MUST NOT be treated as a reachability confirmation. Receipt 3174 of unsolicited messages only confirm the one-way path from the sender 3175 to the recipient node. In contrast, Neighbor Unreachability 3176 Detection requires that a node keep track of the reachability of the 3177 forward path to a neighbor from the its perspective, not the 3178 neighbor's perspective. Note that receipt of a solicited 3179 advertisement indicates that a path is working in both directions. 3180 The solicitation must have reached the neighbor, prompting it to 3181 generate an advertisement. Likewise, receipt of an advertisement 3182 indicates that the path from the sender to the recipient is working. 3183 However, the latter fact is known only to the recipient; the 3184 advertisement's sender has no direct way of knowing that the 3185 advertisement it sent actually reached a neighbor. From the 3186 perspective of Neighbor Unreachability Detection, only the 3187 reachability of the forward path is of interest. 3189 7.3.2. Neighbor Cache Entry States 3191 A Neighbor Cache entry can be in one of five states: 3193 INCOMPLETE Address resolution is being performed on the entry. 3194 Specifically, a Neighbor Solicitation has been sent to 3195 the solicited-node multicast address of the target, 3196 but the corresponding Neighbor Advertisement has not 3197 yet been received. 3199 REACHABLE Positive confirmation was received within the last 3200 ReachableTime milliseconds that the forward path to 3201 the neighbor was functioning properly. While 3202 REACHABLE, no special action takes place as packets 3203 are sent. 3205 STALE More than ReachableTime milliseconds have elapsed 3206 since the last positive confirmation was received that 3207 the forward path was functioning properly. While 3208 stale, no action takes place until a packet is sent. 3210 The STALE state is entered upon receiving an 3211 unsolicited Neighbor Discovery message that updates 3212 the cached link-layer address. Receipt of such a 3213 message does not confirm reachability, and entering 3214 the STALE state insures reachability is verified 3215 quickly if the entry is actually being used. However, 3216 reachability is not actually verified until the entry 3217 is actually used. 3219 DELAY More than ReachableTime milliseconds have elapsed 3220 since the last positive confirmation was received that 3221 the forward path was functioning properly, and a 3222 packet was sent within the last DELAY_FIRST_PROBE_TIME 3223 seconds. If no reachability confirmation is received 3224 within DELAY_FIRST_PROBE_TIME seconds of entering the 3225 DELAY state, send a Neighbor Solicitation and change 3226 the state to PROBE. 3228 The DELAY state is an optimization that gives upper- 3229 layer protocols additional time to provide 3230 reachability confirmation in those cases where 3231 ReachableTime milliseconds have passed since the last 3232 confirmation due to lack of recent traffic. Without 3233 this optimization the opening of a TCP connection 3234 after a traffic lull would initiate probes even though 3235 the subsequent three-way handshake would provide a 3236 reachability confirmation almost immediately. 3238 PROBE A reachability confirmation is actively sought by 3239 retransmitting Neighbor Solicitations every 3240 RetransTimer milliseconds until a reachability 3241 confirmation is received. 3243 7.3.3. Node Behavior 3245 Neighbor Unreachability Detection operates in parallel with the 3246 sending of packets to a neighbor. While reasserting a neighbor's 3247 reachability, a node continues sending packets to that neighbor using 3248 the cached link-layer address. If no traffic is sent to a neighbor, 3249 no probes are sent. 3251 When a node needs to perform address resolution on a neighboring 3252 address, it creates an entry in the INCOMPLETE state and initiates 3253 address resolution as specified in Section 7.2. If address 3254 resolution fails, the entry SHOULD be deleted, so that subsequent 3255 traffic to that neighbor invokes the next-hop determination procedure 3256 again. Invoking next-hop determination at this point insures that 3257 alternate default routers are tried. 3259 When a reachability confirmation is received (either through upper- 3260 layer advice or a solicited Neighbor Advertisement) an entry's state 3261 changes to REACHABLE. The one exception is that upper-layer advice 3262 has no effect on entries in the INCOMPLETE state (e.g., for which no 3263 link-layer address is cached). 3265 When ReachableTime milliseconds have passed since receipt of the last 3266 reachability confirmation for a neighbor, the Neighbor Cache entry's 3267 state changes from REACHABLE to STALE. 3269 Note: An implementation may actually defer changing the state from 3270 REACHABLE to STALE until a packet is sent to the neighbor, i.e., 3271 there need not be an explicit timeout event associated with the 3272 expiration of ReachableTime. 3274 The first time a node sends a packet to a neighbor whose entry is 3275 STALE, the sender changes the state to DELAY and a sets a timer to 3276 expire in DELAY_FIRST_PROBE_TIME seconds. If the entry is still in 3277 the DELAY state when the timer expires, the entry's state changes to 3278 PROBE. If reachability confirmation is received, the entry's state 3279 changes to REACHABLE. 3281 Upon entering the PROBE state, a node sends a unicast Neighbor 3282 Solicitation message to the neighbor using the cached link-layer 3283 address. While in the PROBE state, a node retransmits Neighbor 3284 Solicitation messages every RetransTimer milliseconds until 3285 reachability confirmation is obtained. Probes are retransmitted even 3286 if no additional packets are sent to the neighbor. If no response is 3287 received after waiting RetransTimer milliseconds after sending the 3288 MAX_UNICAST_SOLICIT solicitations, retransmissions cease and the 3289 entry SHOULD be deleted. Subsequent traffic to that neighbor will 3290 recreate the entry and performs address resolution again. 3292 Note that all Neighbor Solicitations are rate-limited on a per- 3293 neighbor basis. A node MUST NOT send Neighbor Solicitations to the 3294 same neighbor more frequently than once every RetransTimer 3295 milliseconds. 3297 A Neighbor Cache entry enters the STALE state when created as a 3298 result of receiving packets other than solicited Neighbor 3299 Advertisements (i.e., Router Solicitations, Router Advertisements, 3300 Redirects, and Neighbor Solicitations). These packets contain the 3301 link-layer address of either the sender or, in the case of Redirect, 3302 the redirection target. However, receipt of these link-layer 3303 addresses does not confirm reachability of the forward-direction path 3304 to that node. Placing a newly created Neighbor Cache entry for which 3305 the link-layer address is known in the STALE state provides assurance 3306 that path failures are detected quickly. In addition, should a 3307 cached link-layer address be modified due to receiving one of the 3308 above messages the state SHOULD also be set to STALE to provide 3309 prompt verification that the path to the new link-layer address is 3310 working. 3312 To properly detect the case where a router switches from being a 3313 router to being a host (e.g., if its IP forwarding capability is 3314 turned off by system management), a node MUST compare the Router flag 3315 field in all received Neighbor Advertisement messages with the 3316 IsRouter flag recorded in the Neighbor Cache entry. When a node 3317 detects that a neighbor has changed from being a router to being a 3318 host, the node MUST remove that router from the Default Router List 3319 and update the Destination Cache as described in Section 6.3.5. Note 3320 that a router may not be listed in the Default Router List, even 3321 though a Destination Cache entry is using it (e.g., a host was 3322 redirected to it). In such cases, all Destination Cache entries that 3323 reference the (former) router must perform next-hop determination 3324 again before using the entry. 3326 In some cases, link-specific information may indicate that a path to 3327 a neighbor has failed (e.g., the resetting of a virtual circuit). In 3328 such cases, link-specific information may be used to purge Neighbor 3329 Cache entries before the Neighbor Unreachability Detection would do 3330 so. However, link-specific information MUST NOT be used to confirm 3331 the reachability of a neighbor; such information does not provide 3332 end-to-end confirmation between neighboring IP layers. 3334 8. REDIRECT FUNCTION 3336 This section describes the functions related to the sending and 3337 processing of Redirect messages. 3339 Redirect messages are sent by routers to redirect a host to a better 3340 first-hop router for a specific destination or to inform hosts that a 3341 destination is in fact a neighbor (i.e., on-link). The latter is 3342 accomplished by having the ICMP Target Address be equal to the ICMP 3343 Destination Address. 3345 A router MUST be able to determine the link-local address for each of 3346 its neighboring routers in order to ensure that the target address in 3347 a Redirect message identifies the neighbor router by its link-local 3348 address. For static routing this requirement implies that the next- 3349 hop router's address should be specified using the link-local address 3350 of the router. For dynamic routing this requirement implies that all 3351 IPv6 routing protocols must somehow exchange the link-local addresses 3352 of neighboring routers. 3354 8.1. Validation of Redirect Messages 3356 A host MUST silently discard any received Redirect message that does 3357 not satisfy all of the following validity checks: 3359 - IP Source Address is a link-local address. Routers must use 3360 their link-local address as the source for Router Advertisement 3361 and Redirect messages so that hosts can uniquely identify 3362 routers. 3364 - The IP Hop Limit field has a value of 255, i.e., the packet 3365 could not possibly have been forwarded by a router. 3367 - ICMP Checksum is valid. 3369 - ICMP Code is 0. 3371 - ICMP length (derived from the IP length) is 40 or more octets. 3373 - The IP source address of the Redirect is the same as the current 3374 first-hop router for the specified ICMP Destination Address. 3376 - The ICMP Destination Address field in the redirect message does 3377 not contain a multicast address. 3379 - The ICMP Target Address is either a link-local address (when 3380 redirected to a router) or the same as the ICMP Destination 3381 Address (when redirected to the on-link destination). 3383 - All included options have a length that is greater than zero. 3385 The contents of the Reserved field, and of any unrecognized options 3386 MUST be ignored. Future, backward-compatible changes to the protocol 3387 may specify the contents of the Reserved field or add new options; 3388 backward-incompatible changes may use different Code values. 3390 The contents of any defined options that are not specified to be used 3391 with Redirect messages MUST be ignored and the packet processed as 3392 normal. The only defined options that may appear are the Target 3393 Link-Layer Address option and the Redirected Header option. 3395 A host MUST NOT consider a redirect invalid just because the Target 3396 Address of the redirect is not covered under one of the link's 3397 prefixes. Part of the semantics of the Redirect message is that the 3398 Target Address is on-link. 3400 A redirect that passes the validity checks is called a "valid 3401 redirect". 3403 8.2. Router Specification 3405 A router SHOULD send a redirect message, subject to rate limiting, 3406 whenever it forwards a packet that is not explicitly addressed to 3407 itself (i.e. a packet that is not source routed through the router) 3408 in which: 3410 - the Source Address field of the packet identifies a neighbor, 3411 and 3413 - the router determines that a better first-hop node resides on 3414 the same link as the sending node for the Destination Address of 3415 the packet being forwarded, and 3417 - the Destination Address of the packet is not a multicast 3418 address, and 3420 The transmitted redirect packet contains, consistent with the message 3421 format given in Section 4.5: 3423 - In the Target Address field: the address to which subsequent 3424 packets for the destination SHOULD be sent. If the target is a 3425 router, that router's link-local address MUST be used. If the 3426 target is a host the target address field MUST be set to the 3427 same value as the Destination Address field. 3429 - In the Destination Address field: the destination address of the 3430 invoking IP packet. 3432 - In the options: 3434 o Target Link-Layer Address option: link-layer address of the 3435 target, if known. 3437 o Redirected Header: as much of the forwarded packet as can 3438 fit without the redirect packet exceeding 1280 octets in 3439 size. 3441 A router MUST limit the rate at which Redirect messages are sent, in 3442 order to limit the bandwidth and processing costs incurred by the 3443 Redirect messages when the source does not correctly respond to the 3444 Redirects, or the source chooses to ignore unauthenticated Redirect 3445 messages. More details on the rate-limiting of ICMP error messages 3446 can be found in [ICMPv6]. 3448 A router MUST NOT update its routing tables upon receipt of a 3449 Redirect. 3451 8.3. Host Specification 3453 A host receiving a valid redirect SHOULD update its Destination Cache 3454 accordingly so that subsequent traffic goes to the specified target. 3455 If no Destination Cache entry exists for the destination, an 3456 implementation SHOULD create such an entry. 3458 If the redirect contains a Target Link-Layer Address option the host 3459 either creates or updates the Neighbor Cache entry for the target. 3460 In both cases the cached link-layer address is copied from the Target 3461 Link-Layer Address option. If a Neighbor Cache entry is created for 3462 the target its reachability state MUST be set to STALE as specified 3463 in Section 7.3.3. If a cache entry already existed and it is updated 3464 with a different link-layer address, its reachability state MUST also 3465 be set to STALE. If the link-layer address is the same as that 3466 already in the cache, the cache entry's state remains unchanged. 3468 If the Target and Destination Addresses are the same, the host MUST 3469 treat the Target as on-link. If the Target Address is not the same 3470 as the Destination Address, the host MUST set IsRouter to TRUE for 3471 the target. If the Target and Destination Addresses are the same, 3472 however, one cannot reliably determine whether the Target Address is 3473 a router. Consequently, newly created Neighbor Cache entries should 3474 set the IsRouter flag to FALSE, while existing cache entries should 3475 leave the flag unchanged. If the Target is a router, subsequent 3476 Neighbor Advertisement or Router Advertisement messages will update 3477 IsRouter accordingly. 3479 Redirect messages apply to all flows that are being sent to a given 3480 destination. That is, upon receipt of a Redirect for a Destination 3481 Address, all Destination Cache entries to that address should be 3482 updated to use the specified next-hop, regardless of the contents of 3483 the Flow Label field that appears in the Redirected Header option. 3485 A host MUST NOT send Redirect messages. 3487 9. EXTENSIBILITY - OPTION PROCESSING 3489 Options provide a mechanism for encoding variable length fields, 3490 fields that may appear multiple times in the same packet, or 3491 information that may not appear in all packets. Options can also be 3492 used to add additional functionality to future versions of ND. 3494 In order to ensure that future extensions properly coexist with 3495 current implementations, all nodes MUST silently ignore any options 3496 they do not recognize in received ND packets and continue processing 3497 the packet. All options specified in this document MUST be 3498 recognized. A node MUST NOT ignore valid options just because the ND 3499 message contains unrecognized ones. 3501 The current set of options is defined in such a way that receivers 3502 can process multiple options in the same packet independently of each 3503 other. In order to maintain these properties future options SHOULD 3504 follow the simple rule: 3506 The option MUST NOT depend on the presence or absence of any 3507 other options. The semantics of an option should depend only on 3508 the information in the fixed part of the ND packet and on the 3509 information contained in the option itself. 3511 Adhering to the above rule has the following benefits: 3513 1) Receivers can process options independently of one another. For 3514 example, an implementation can choose to process the Prefix 3515 Information option contained in a Router Advertisement message 3516 in a user-space process while the link-layer address option in 3517 the same message is processed by routines in the kernel. 3519 2) Should the number of options cause a packet to exceed a link's 3520 MTU, multiple packets can carry subsets of the options without 3521 any change in semantics. 3523 3) Senders MAY send a subset of options in different packets. For 3524 instance, if a prefix's Valid and Preferred Lifetime are high 3525 enough, it might not be necessary to include the Prefix 3526 Information option in every Router Advertisement. In addition, 3527 different routers might send different sets of options. Thus, a 3528 receiver MUST NOT associate any action with the absence of an 3529 option in a particular packet. This protocol specifies that 3530 receivers should only act on the expiration of timers and on the 3531 information that is received in the packets. 3533 Options in Neighbor Discovery packets can appear in any order; 3534 receivers MUST be prepared to process them independently of their 3535 order. There can also be multiple instances of the same option in a 3536 message (e.g., Prefix Information options). 3538 If the number of included options in a Router Advertisement causes 3539 the advertisement's size to exceed the link MTU, the router can send 3540 multiple separate advertisements each containing a subset of the 3541 options. 3543 The amount of data to include in the Redirected Header option MUST be 3544 limited so that the entire redirect packet does not exceed 1280 3545 octets. 3547 All options are a multiple of 8 octets of length, ensuring 3548 appropriate alignment without any "pad" options. The fields in the 3549 options (as well as the fields in ND packets) are defined to align on 3550 their natural boundaries (e.g., a 16-bit field is aligned on a 16-bit 3551 boundary) with the exception of the 128-bit IP addresses/prefixes, 3552 which are aligned on a 64-bit boundary. The link-layer address field 3553 contains an uninterpreted octet string; it is aligned on an 8-bit 3554 boundary. 3556 The size of an ND packet including the IP header is limited to the 3557 link MTU (which is at least 1280 octets). When adding options to an 3558 ND packet a node MUST NOT exceed the link MTU. 3560 Future versions of this protocol may define new option types. 3561 Receivers MUST silently ignore any options they do not recognize and 3562 continue processing the message. 3564 10. PROTOCOL CONSTANTS 3566 Router constants: 3568 MAX_INITIAL_RTR_ADVERT_INTERVAL 16 seconds 3570 MAX_INITIAL_RTR_ADVERTISEMENTS 3 transmissions 3572 MAX_FINAL_RTR_ADVERTISEMENTS 3 transmissions 3574 MIN_DELAY_BETWEEN_RAS 3 seconds 3576 MAX_RA_DELAY_TIME .5 seconds 3578 Host constants: 3580 MAX_RTR_SOLICITATION_DELAY 1 second 3582 RTR_SOLICITATION_INTERVAL 4 seconds 3584 MAX_RTR_SOLICITATIONS 3 transmissions 3586 Node constants: 3588 MAX_MULTICAST_SOLICIT 3 transmissions 3590 MAX_UNICAST_SOLICIT 3 transmissions 3592 MAX_ANYCAST_DELAY_TIME 1 second 3594 MAX_NEIGHBOR_ADVERTISEMENT 3 transmissions 3596 REACHABLE_TIME 30,000 milliseconds 3598 RETRANS_TIMER 1,000 milliseconds 3600 DELAY_FIRST_PROBE_TIME 5 seconds 3602 MIN_RANDOM_FACTOR .5 3603 MAX_RANDOM_FACTOR 1.5 3605 Additional protocol constants are defined with the message formats in 3606 Section 4. 3608 All protocol constants are subject to change in future revisions of 3609 the protocol. 3611 The constants in this specification may be overridden by specific 3612 documents that describe how IPv6 operates over different link layers. 3613 This rule allows Neighbor Discovery to operate over links with widely 3614 varying performance characteristics. 3616 11. SECURITY CONSIDERATIONS 3618 Neighbor Discovery is subject to attacks that cause IP packets to 3619 flow to unexpected places. Such attacks can be used to cause denial 3620 of service but also allow nodes to intercept and optionally modify 3621 packets destined for other nodes. This section deals with the main 3622 threats related to Neighbor Discovery messages and possible security 3623 mechanisms that can mitigate these threats. 3625 11.1 Threat analysis 3627 This section discusses the main threats associated with Neighbor 3628 Discovery. A more detailed analysis can be found in [PSREQ]. The main 3629 vulnerabilities of the protocol fall under three categories: 3631 - DoS attacks 3632 - Address spoofing attacks 3633 - Router spoofing attacks. 3635 An example of denial of service attacks is that a node on the link 3636 that can send packets with an arbitrary IP source address can both 3637 advertise itself as a default router and also send "forged" Router 3638 Advertisement messages that immediately time out all other default 3639 routers as well as all on-link prefixes. An intruder can achieve 3640 this by sending out multiple Router Advertisements, one for each 3641 legitimate router, with the source address set to the address of 3642 another router, the Router Lifetime field set to zero, and the 3643 Preferred and Valid lifetimes set to zero for all the prefixes. Such 3644 an attack would cause all packets, for both on-link and off-link 3645 destinations, to go to the rogue router. That router can then 3646 selectively examine, modify or drop all packets sent on the link. The 3647 Neighbor Unreachability Detection will not detect such a black hole 3648 as long as the rogue router politely answers the NUD probes with a 3649 Neighbor Advertisement with the R-bit set. 3651 It is also possible for any host to launch a DoS attack on another 3652 host by preventing it from configuring an address using [ADDRCONF]. 3654 The protocol does not allow hosts to verify whether the sender of a 3655 Neighbor Advertisement is the true owner of the IP address included 3656 in the message. 3658 Redirect attacks can also be achieved by any host in order to flood a 3659 victim or steal its traffic. A host can send a Neighbor advertisement 3660 (in response to a solicitation) that contains its IP address and a 3661 victim's link layer address in order to flood the victim with 3662 unwanted traffic. Alternatively, the host can send a Neighbor 3663 Advertisement that includes a victim's IP address and its own link 3664 layer address to overwrite an existing entry in the sender's 3665 destination cache, thereby forcing the sender to forward all of the 3666 victim's traffic to itself. 3667 The trust model for redirects is the same as in IPv4. A redirect is 3668 accepted only if received from the same router that is currently 3669 being used for that destination. It is natural to trust the routers 3670 on the link. If a host has been redirected to another node (i.e., 3671 the destination is on-link) there is no way to prevent the target 3672 from issuing another redirect to some other destination. However, 3673 this exposure is no worse than it was; the target host, once 3674 subverted, could always act as a hidden router to forward traffic 3675 elsewhere. 3677 The protocol contains no mechanism to determine which neighbors are 3678 authorized to send a particular type of message (e.g., Router 3679 Advertisements); any neighbor, presumably even in the presence of 3680 authentication, can send Router Advertisement messages thereby being 3681 able to cause denial of service. Furthermore, any neighbor can send 3682 proxy Neighbor Advertisements as well as unsolicited Neighbor 3683 Advertisements as a potential denial of service attack. 3685 Many link layers are also subject to different denial of service 3686 attacks such as continuously occupying the link in CSMA/CD networks 3687 (e.g., by sending packets closely back-to-back or asserting the 3688 collision signal on the link), or originating packets with somebody 3689 else's source MAC address to confuse, e.g., Ethernet switches. On the 3690 other hand, many of the threats discussed in this section are less 3691 effective, or non-existent, on point-to-point links, or cellular 3692 links where hosts share links with one neighbor, i.e. the default 3693 router. 3695 11.2 Securing Neighbor Discovery messages 3697 The protocol reduces the exposure to the above threats in the absence 3698 of authentication by ignoring ND packets received from off-link 3699 senders. The Hop Limit field of all received packets is verified to 3700 contain 255, the maximum legal value. Because routers decrement the 3701 Hop Limit on all packets they forward, received packets containing a 3702 Hop Limit of 255 must have originated from a neighbor. 3704 In order to allow for IP layer authentication, a mechanism is 3705 required to allow for dynamic keying between neighbors. The use of 3706 the Internet Key Exchange [ICMPIKE] is not suited for creating 3707 dynamic security associations that can be used to secure address 3708 resolution or neighbor solicitation messages as documented in 3709 [ICMPIKE]. The security of Neighbor Discovery messages through 3710 dynamic keying is outside the scope of this document and is addressed 3711 in [SEND]. 3713 In some cases, it may be acceptable to use statically configured 3714 security associations with either [IPv6-AH] or [IPv6-ESP] to secure 3715 Neighbor Discovery messages. However, it is important to note that 3716 statically configured security associations are not scalable 3717 (especially when considering multicast links) and are therefore 3718 limited to small networks with known hosts. 3720 12. RENUMBERING CONSIDERATIONS 3722 The Neighbor Discovery protocol together with IPv6 Address 3723 Autoconfiguration [ADDRCONF] provides mechanisms to aid in 3724 renumbering - new prefixes and addresses can be introduced and old 3725 ones can be deprecated and removed. 3727 The robustness of these mechanisms is based on all the nodes on the 3728 link receiving the Router Advertisement messages in a timely manner. 3729 However, a host might be turned off or be unreachable for an extended 3730 period of time (i.e., a machine is powered down for months after a 3731 project terminates). It is possible to preserve robust renumbering 3732 in such cases but it does place some constraints on how long prefixes 3733 must be advertised. 3735 Consider the following example in which a prefix is initially 3736 advertised with a lifetime of 2 months, but on August 1st it is 3737 determined that the prefix needs to be deprecated and removed due to 3738 renumbering by September 1st. This can be done by reducing the 3739 advertised lifetime to 1 week starting on August 1st and as the 3740 cutoff gets closer the lifetimes can be made shorter until by 3741 September 1st the prefix is advertised with a zero lifetime. The 3742 point is that, if one or more nodes were unplugged from the link 3743 prior to September 1st they might still think that the prefix is 3744 valid since the last lifetime they received was 2 months. Thus if a 3746 node was unplugged on July 31st it thinks the prefix is valid until 3747 September 30th. If that node is plugged back in prior to September 3748 30th it may continue to use the old prefix. The only way to force a 3749 node to stop using a prefix that was previously advertised with a 3750 long Lifetime is to have that node receive an advertisement for that 3751 prefix that changes the lifetime downward. The solution in this 3752 example is simple: continue advertising the prefix with a lifetime of 3753 0 from September 1st until October 1st. 3755 In general, in order to be robust against nodes that might be 3756 unplugged from the link it is important to track the furthest into 3757 the future a particular prefix can be viewed valid by any node on the 3758 link. The prefix must then be advertised with a 0 Lifetime until 3759 that point in future. This "furthest into the future" time is simply 3760 the maximum, over all Router Advertisements, of the time the 3761 advertisement was sent plus the prefix's Lifetime contained in the 3762 advertisement. 3764 The above has an important implication on using infinite lifetimes. 3765 If a prefix is advertised with an infinite lifetime, and that prefix 3766 later needs to be renumbered, it is undesirable to continue 3767 advertising that prefix with a zero lifetime forever. Thus either 3768 infinite lifetimes should be avoided or there must be a limit on how 3769 long time a node can be unplugged from the link before it is plugged 3770 back in again. However, it is unclear how the network administrator 3771 can enforce a limit on how long time hosts such as laptops can be 3772 unplugged from the link. 3774 Network administrators should give serious consideration to using 3775 relatively short lifetimes (i.e., no more than a few weeks). While 3776 it might appear that using long lifetimes would help insure 3777 robustness, in reality a host will be unable to communicate in the 3778 absence of properly functioning routers. Such routers will be 3779 sending Router Advertisements that contain appropriate (and current) 3780 prefixes. A host connected to a network that has no functioning 3781 routers is likely to have more serious problems than just a lack of a 3782 valid prefix and address. 3784 The above discussion does not distinguish between the preferred and 3785 valid lifetimes. For all practical purposes it is probably 3786 sufficient to track the valid lifetime since the preferred lifetime 3787 will not exceed the valid lifetime. 3789 REFERENCES 3791 NORMATIVE 3793 [ADDR-ARCH] Hinden, R. and S. Deering, "IP Version 6 Addressing 3794 Architecture", RFC 2373, July 1998. 3796 [ICMPv6] Conta, A. and S. Deering, "Internet Control Message 3797 Protocol (ICMPv6) for the Internet Protocol Version 6 3798 (IPv6) Specification", RFC 2463, December 1998. 3800 [IPv6] Deering, S. and R. Hinden, "Internet Protocol, Version 6 3801 (IPv6) Specification", RFC 2460, December 1998. 3803 [MLD] Deering, S., Fenner, W, and B. Haberman, "Multicast 3804 Listener Discovery for IPv6", RFC 2710, October 1999. 3806 INFORMATIVE 3808 [ADDRCONF] Thomson, S. Narten, T, and T. Jinmei, "IPv6 Address 3809 Autoconfiguration", draft-ietf-ipv6-rfc2462bis-02, June 3810 2004. 3811 [ANYCST] Partridge, C., Mendez, T. and W. Milliken, "Host 3812 Anycasting Service", RFC 1546, November 1993. 3814 [ARP] Plummer, D., "An Ethernet Address Resolution Protocol", 3815 STD 37, RFC 826, November 1982. 3817 [DHCPv6] Droms, R., Ed, "Dynamic Host Configuration Protocol for 3818 IPv6 (DHCPv6)", RFC 3315, July 2003. 3820 [DHCPv6lite] Droms, R., "Stateless Dynamic Host Configuration 3821 Protocol (DHCP)for IPv6", RFC 3736, April 2004. 3823 [HR-CL] Braden, R., Editor, "Requirements for Internet Hosts -- 3824 Communication Layers", STD 3, RFC 1122, October 1989. 3826 [ICMPIKE] Arkko, J., "Effects of ICMPv6 on IKE", 3827 draft-arkko-icmpv6-ike-effects-02 (work in progress), 3828 March 2003. 3830 [ICMPv4] Postel, J., "Internet Control Message Protocol", STD 5, 3831 RFC 792, September 1981. 3833 [IPv6-3GPP] Wasserman, M., Ed, "Recommendations for IPv6 in Third 3834 Generation Partnership Project (3GPP) standards", RFC 3835 3314, September 2002. 3837 [IPv6-CELL] Arkko, J., Kuipers, G., Soliman, H., Loughney, J. and J. 3838 Wiljakka, " Internet Protocol version 6 (IPv6) for Some 3839 Second and Third Generation Cellular Hosts", RFC 3316, 3840 April 2003. 3842 [IPv6-ETHER] Crawford, M., "Transmission of IPv6 Packets over 3843 Ethernet Networks", RFC 2464, December 1998. 3845 [IPv6-NBMA] Armitage, G., Schulter, P., Jork, M. and G. Harter, " 3846 IPv6 over Non-broadcast Multiple Access (NBMA) 3847 networks", RFC 2491, January 1999. 3849 [IPv6-SA] Kent, S. and R. Atkinson, "Security Architecture for the 3850 Internet Protocol", RFC 2401, November 1998. 3852 [IPv6-AUTH] Kent, S. and R. Atkinson, "IP Authentication Header", 3853 RFC 2402, November 1998. 3855 [IPv6-ESP] Kent, S. and R. Atkinson, "IP Encapsulating Security 3856 Payload (ESP)", RFC 2406, November 1998. 3858 [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate 3859 Requirement Levels", BCP 14, RFC 2119, March 1997. 3861 [MIPv6] D. Johnson, C. Perkins and J. Arkko, "Mobility Support 3862 in IPv6", RFC 3775, June 2004. 3864 [NDMAN] Arkko, J., "Manual Configuration of Security 3865 Associations for IPv6 Neighbor Discovery", draft-arkko- 3866 manual-icmpv6-sas-02 (work in progress), March 2003. 3868 [RDISC] Deering, S., "ICMP Router Discovery Messages", RFC 1256, 3869 September 1991. 3871 [SH-MEDIA] Braden, R., Postel, J. and Y. Rekhter, "Internet 3872 Architecture Extensions for Shared Media", RFC 1620, May 3873 1994. 3875 [ASSIGNED] Reynolds, J. and J. Postel, "ASSIGNED NUMBERS", STD 2, 3876 RFC 1700, October 1994. See also: 3877 http://www.iana.org/numbers.html 3879 [SEND] Arkko, J., Kempf, J., Sommerfeld, B., Zill, B. and P. 3880 Nikander, "SEcure Neighbor Discovery (SEND)", 3881 draft-ietf-send-ndopt-04 (work in progress), 3882 February 2004. 3884 [SYNC] S. Floyd, V. Jacobson, "The Synchronization of Periodic 3885 Routing Messages", IEEE/ACM Transactions on Networking, 3886 April 1994. ftp://ftp.ee.lbl.gov/papers/sync_94.ps.Z 3888 Authors' Addresses 3890 Thomas Narten 3891 IBM Corporation 3892 P.O. Box 12195 3893 Research Triangle Park, NC 27709-2195 3894 USA 3896 Phone: +1 919 254 7798 3897 EMail: narten@raleigh.ibm.com 3899 Erik Nordmark 3900 Sun Microsystems, Inc. 3901 901 San Antonio Road 3902 Palo Alto, CA 94303 3903 USA 3905 Phone: +1 650 786 5166 3906 Fax: +1 650 786 5896 3907 EMail: nordmark@sun.com 3909 William Allen Simpson 3910 Daydreamer 3911 Computer Systems Consulting Services 3912 1384 Fontaine 3913 Madison Heights, Michigan 48071 3914 USA 3916 EMail: Bill.Simpson@um.cc.umich.edu 3917 bsimpson@MorningStar.com 3919 Hesham Soliman 3920 Flarion Technologies 3921 Phone: +1 908 997 9775 3922 Email: H.Soliman@flarion.com 3924 APPENDIX A: MULTIHOMED HOSTS 3926 There are a number of complicating issues that arise when Neighbor 3927 Discovery is used by hosts that have multiple interfaces. This 3928 section does not attempt to define the proper operation of multihomed 3929 hosts with regard to Neighbor Discovery. Rather, it identifies 3930 issues that require further study. Implementors are encouraged to 3931 experiment with various approaches to making Neighbor Discovery work 3932 on multihomed hosts and to report their experiences. 3934 If a multihomed host receives Router Advertisements on all of its 3935 interfaces, it will (probably) have learned on-link prefixes for the 3936 addresses residing on each link. When a packet must be sent through 3937 a router, however, selecting the "wrong" router can result in a 3938 suboptimal or non-functioning path. There are number of issues to 3939 consider: 3941 1) In order for a router to send a redirect, it must determine that 3942 the packet it is forwarding originates from a neighbor. The 3943 standard test for this case is to compare the source address of 3944 the packet to the list of on-link prefixes associated with the 3945 interface on which the packet was received. If the originating 3946 host is multihomed, however, the source address it uses may 3947 belong to an interface other than the interface from which it 3948 was sent. In such cases, a router will not send redirects, and 3949 suboptimal routing is likely. In order to be redirected, the 3950 sending host must always send packets out the interface 3951 corresponding to the outgoing packet's source address. Note 3952 that this issue never arises with non-multihomed hosts; they 3953 only have one interface. 3955 2) If the selected first-hop router does not have a route at all 3956 for the destination, it will be unable to deliver the packet. 3957 However, the destination may be reachable through a router on 3958 one of the other interfaces. Neighbor Discovery does not 3959 address this scenario; it does not arise in the non-multihomed 3960 case. 3962 3) Even if the first-hop router does have a route for a 3963 destination, there may be a better route via another interface. 3964 No mechanism exists for the multihomed host to detect this 3965 situation. 3967 If a multihomed host fails to receive Router Advertisements on one or 3968 more of its interfaces, it will not know (in the absence of 3969 configured information) which destinations are on-link on the 3970 affected interface(s). This leads to a number of problems: 3972 1) If no Router Advertisement is received on any interfaces, a 3973 multihomed host will have no way of knowing which interface to 3974 send packets out on, even for on-link destinations. Under 3975 similar conditions in the non-multihomed host case, a node 3976 treats all destinations as residing on-link, and communication 3977 proceeds. In the multihomed case, however, additional 3978 information is needed to select the proper outgoing interface. 3979 Alternatively, a node could attempt to perform address 3980 resolution on all interfaces, a step involving significant 3981 complexity that is not present in the non-multihomed host case. 3983 2) If Router Advertisements are received on some, but not all 3984 interfaces, a multihomed host could choose to only send packets 3985 out on the interfaces on which it has received Router 3986 Advertisements. A key assumption made here, however, is that 3987 routers on those other interfaces will be able to route packets 3988 to the ultimate destination, even when those destinations reside 3989 on the subnet to which the sender connects, but has no on-link 3990 prefix information. Should the assumption be FALSE, 3991 communication would fail. Even if the assumption holds, packets 3992 will traverse a sub-optimal path. 3994 APPENDIX B: FUTURE EXTENSIONS 3996 Possible extensions for future study are: 3998 o Using dynamic timers to be able to adapt to links with widely 3999 varying delay. Measuring round trip times, however, requires 4000 acknowledgments and sequence numbers in order to match received 4001 Neighbor Advertisements with the actual Neighbor Solicitation that 4002 triggered the advertisement. Implementors wishing to experiment 4003 with such a facility could do so in a backwards-compatible way by 4004 defining a new option carrying the necessary information. Nodes 4005 not understanding the option would simply ignore it. 4007 o Adding capabilities to facilitate the operation over links that 4008 currently require hosts to register with an address resolution 4009 server. This could for instance enable routers to ask hosts to 4010 send them periodic unsolicited advertisements. Once again this 4011 can be added using a new option sent in the Router Advertisements. 4013 o Adding additional procedures for links where asymmetric and non- 4014 transitive reachability is part of normal operations. Such 4015 procedures might allow hosts and routers to find usable paths on, 4016 e.g., radio links. 4018 APPENDIX C: STATE MACHINE FOR THE REACHABILITY STATE 4020 This appendix contains a summary of the rules specified in Sections 4021 7.2 and 7.3. This document does not mandate that implementations 4022 adhere to this model as long as their external behavior is consistent 4023 with that described in this document. 4025 When performing address resolution and Neighbor Unreachability 4026 Detection the following state transitions apply using the conceptual 4027 model: 4029 State Event Action New state 4031 - Packet to send. Create entry. INCOMPLETE 4032 Send multicast NS. 4033 Start retransmit timer 4035 INCOMPLETE Retransmit timeout, Retransmit NS INCOMPLETE 4036 less than N Start retransmit 4037 retransmissions. timer 4039 INCOMPLETE Retransmit timeout, Discard entry - 4040 N or more Send ICMP error 4041 retransmissions. 4043 INCOMPLETE NA, Solicited=0, Record link-layer STALE 4044 Override=any address. Send queued 4045 packets. 4047 INCOMPLETE NA, Solicited=1, Record link-layer REACHABLE 4048 Override=any address. Send queued 4049 packets. 4051 !INCOMPLETE NA, Solicited=1, - REACHABLE 4052 Override=0 4053 Same link-layer 4054 address as cached. 4056 REACHABLE NA, Solicited=1, - STALE 4057 Override=0 4058 Different link-layer 4059 address than cached. 4061 STALE, PROBE NA, Solicited=1, - unchanged 4062 Or DELAY Override=0 4063 Different link-layer 4064 address than cached. 4066 !INCOMPLETE NA, Solicited=1, Record link-layer REACHABLE 4067 Override=1 address (if 4068 different). 4070 !INCOMPLETE NA, Solicited=0, - unchanged 4071 Override=0 4073 !INCOMPLETE NA, Solicited=0, - unchanged 4074 Override=1 4075 Same link-layer 4076 address as cached. 4078 !INCOMPLETE NA, Solicited=0, Record link-layer STALE 4079 Override=1 address. 4080 Different link-layer 4081 address than cached. 4083 !INCOMPLETE upper-layer reachability - REACHABLE 4084 confirmation 4086 REACHABLE timeout, more than - STALE 4087 N seconds since 4088 reachability confirm. 4090 STALE Sending packet Start delay timer DELAY 4092 DELAY Delay timeout Send unicast NS probe PROBE 4093 Start retransmit timer 4095 PROBE Retransmit timeout, Retransmit NS PROBE 4096 less than N 4097 retransmissions. 4099 PROBE Retransmit timeout, Discard entry - 4100 N or more 4101 retransmissions. 4103 The state transitions for receiving unsolicited information other 4104 than Neighbor Advertisement messages apply to either the source of 4105 the packet (for Neighbor Solicitation, Router Solicitation, and 4106 Router Advertisement messages) or the target address (for Redirect 4107 messages) as follows: 4109 State Event Action New state 4111 - NS, RS, RA, Redirect Create entry. STALE 4113 INCOMPLETE NS, RS, RA, Redirect Record link-layer STALE 4114 address. Send queued 4115 packets. 4117 !INCOMPLETE NS, RS, RA, Redirect Update link-layer STALE 4118 Different link-layer address 4119 address than cached. 4121 !INCOMPLETE NS, RS, RA, Redirect - unchanged 4122 Same link-layer 4123 address as cached. 4125 APPENDIX D: SUMMARY OF ISROUTER RULES 4127 This appendix presents a summary of the rules for maintaining the 4128 IsRouter flag as specified in this document. 4130 The background for these rules is that the ND messages contain, 4131 either implicitly or explicitly, information that indicates whether 4132 or not the sender (or Target Address) is a host or a router. The 4133 following assumptions are used: 4135 - The sender of a Router Solicitation is implicitly assumed to be a 4136 host since there is no need for routers to send such messages. 4138 - The sender of a Router Advertisement is implicitly assumed to be a 4139 router. 4141 - Neighbor Solicitation messages do not contain either an implicit 4142 or explicit indication about the sender. Both hosts and routers 4143 send such messages. 4145 - Neighbor Advertisement messages contain an explicit "IsRouter 4146 flag", the R-bit. 4148 - The target of the redirect, when the target differs from the 4149 destination address in the packet being redirected, is implicitly 4150 assumed to be a router. This is a natural assumption since that 4151 node is expected to be able to forward the packets towards the 4152 destination. 4154 - The target of the redirect, when the target is the same as the 4155 destination, does not carry any host vs. router information. All 4156 that is known is that the destination (i.e. target) is on-link but 4157 it could be either a host or a router. 4159 The rules for setting the IsRouter flag are based on the information 4160 content above. If an ND message contains explicit or implicit 4161 information the receipt of the message will cause the IsRouter flag 4162 to be updated. But when there is no host vs. router information in 4163 the ND message the receipt of the message MUST NOT cause a change to 4164 the IsRouter state. When the receipt of such a message causes a 4165 Neighbor Cache entry to be created this document specifies that the 4166 IsRouter flag be set to FALSE. There is greater potential for 4167 mischief when a node incorrectly thinks a host is a router, than the 4168 other way around. In these cases a subsequent Neighbor Advertisement 4169 or Router Advertisement message will set the correct IsRouter value. 4171 APPENDIX E: IMPLEMENTATION ISSUES 4173 Appendix E.1: Reachability confirmations 4175 Neighbor Unreachability Detection requires explicit confirmation that 4176 a forward-path is functioning properly. To avoid the need for 4177 Neighbor Solicitation probe messages, upper layer protocols should 4178 provide such an indication when the cost of doing so is small. 4179 Reliable connection-oriented protocols such as TCP are generally 4180 aware when the forward-path is working. When TCP sends (or receives) 4181 data, for instance, it updates its window sequence numbers, sets and 4182 cancels retransmit timers, etc. Specific scenarios that usually 4183 indicate a properly functioning forward-path include: 4185 - Receipt of an acknowledgement that covers a sequence number (e.g., 4186 data) not previously acknowledged indicates that the forward path 4187 was working at the time the data was sent. 4189 - Completion of the initial three-way handshake is a special case of 4190 the previous rule; although no data is sent during the handshake, 4191 the SYN flags are counted as data from the sequence number 4192 perspective. This applies to both the SYN+ACK for the active open 4193 the ACK of that packet on the passively opening peer. 4195 - Receipt of new data (i.e., data not previously received) indicates 4196 that the forward-path was working at the time an acknowledgement 4197 was sent that advanced the peer's send window that allowed the new 4198 data to be sent. 4200 To minimize the cost of communicating reachability information 4201 between the TCP and IP layers, an implementation may wish to rate- 4202 limit the reachability confirmations its sends IP. One possibility 4203 is to process reachability only every few packets. For example, one 4204 might update reachability information once per round trip time, if an 4205 implementation only has one round trip timer per connection. For 4206 those implementations that cache Destination Cache entries within 4207 control blocks, it may be possible to update the Neighbor Cache entry 4208 directly (i.e., without an expensive lookup) once the TCP packet has 4209 been demultiplexed to its corresponding control block. For other 4210 implementation it may be possible to piggyback the reachability 4211 confirmation on the next packet submitted to IP assuming that the 4212 implementation guards against the piggybacked confirmation becoming 4213 stale when no packets are sent to IP for an extended period of time. 4215 TCP must also guard against thinking "stale" information indicates 4216 current reachability. For example, new data received 30 minutes 4217 after a window has opened up does not constitute a confirmation that 4218 the path is currently working. In merely indicates that 30 minutes 4219 ago the window update reached the peer i.e. the path was working at 4220 that point in time. An implementation must also take into account 4221 TCP zero-window probes that are sent even if the path is broken and 4222 the window update did not reach the peer. 4224 For UDP based applications (RPC, DNS) it is relatively simple to make 4225 the client send reachability confirmations when the response packet 4226 is received. It is more difficult and in some cases impossible for 4227 the server to generate such confirmations since there is no flow 4228 control, i.e., the server can not determine whether a received 4229 request indicates that a previous response reached the client. 4231 Note that an implementation can not use negative upper-layer advise 4232 as a replacement for the Neighbor Unreachability Detection algorithm. 4233 Negative advise (e.g. from TCP when there are excessive 4234 retransmissions) could serve as a hint that the forward path from the 4235 sender of the data might not be working. But it would fail to detect 4236 when the path from the receiver of the data is not functioning 4237 causing, none of the acknowledgement packets to reach the sender. 4239 APPENDIX F: CHANGES FROM RFC 2461 4241 o Removed all references to IPsec AH and ESP for securing messages 4242 or as part of validating the received message. 4244 o Added section 3.3. 4246 o Updated section 11 to include more detailed discussion on threats, 4247 IPsec limitations, and use of SEND. 4249 o Removed the on-link assumption in section 5.2 4251 o Clarified the definition of the Router Lifetime field in section 4252 4.2. 4254 o Updated the text in section 4.6.2 and 6.2.1 to indicate that the 4255 preferred lifetime must not be larger than valid lifetime. 4257 o Updated the reference to stateful configuration and added 4258 reference for DHCPv6. 4260 o Added the IsRouter flag definition to section 6.2.1 to allow for 4261 mixed host/router behavior. 4263 o Allowed mobile nodes to be exempt from adding random delays before 4264 sending an RS during a handover. 4266 o Updated the definition of the prefix length in the prefix option 4268 o Updated the applicability to NBMA links in the introduction and 4269 added references to 3GPP RFCs. 4271 o Miscellaneous editorials. 4273 Intellectual Property Statement 4275 The IETF takes no position regarding the validity or scope of any 4276 Intellectual Property Rights or other rights that might be claimed to 4277 pertain to the implementation or use of the technology described in 4278 this document or the extent to which any license under such rights 4279 might or might not be available; nor does it represent that it has 4280 made any independent effort to identify any such rights. Information 4281 on the IETF's procedures with respect to rights in IETF Documents can 4282 be found in RFC 3667 (BCP 78) and RFC 3668 (BCP 79). 4284 Copies of IPR disclosures made to the IETF Secretariat and any 4285 assurances of licenses to be made available, or the result of an 4286 attempt made to obtain a general license or permission for the use of 4287 such proprietary rights by implementers or users of this 4288 specification can be obtained from the IETF on-line IPR repository at 4289 http://www.ietf.org/ipr. 4291 The IETF invites any interested party to bring to its attention any 4292 copyrights, patents or patent applications, or other proprietary 4293 rights that may cover technology that may be required to implement 4294 this standard. Please address the information to the IETF at ietf- 4295 ipr@ietf.org. 4297 Copyright Statement 4299 Copyright (C) The Internet Society (2004). This document is subject 4300 to the rights, licenses and restrictions contained in BCP 78, and 4301 except as set forth therein, the authors retain all their rights. 4303 Disclaimer of Validity 4305 This document and the information contained herein are provided on an 4306 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 4307 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET 4308 ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, 4309 INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE 4310 INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 4311 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 4313 This Internet-Draft expires April, 2005.