idnits 2.17.1 draft-ietf-ipv6-2461bis-09.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** It looks like you're using RFC 3978 boilerplate. You should update this to the boilerplate described in the IETF Trust License Policy document (see https://trustee.ietf.org/license-info), which is required now. -- Found old boilerplate from RFC 3978, Section 5.1 on line 20. -- Found old boilerplate from RFC 3978, Section 5.5 on line 4423. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 4401. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 4407. ** 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 Internet-Drafts being working documents -- however, there's a paragraph with a matching beginning. Boilerplate error? == No 'Intended status' indicated for this document; assuming Proposed Standard Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- == There are 1 instance of lines with non-RFC3849-compliant IPv6 addresses in the document. If these are example addresses, they should be changed. -- The draft header indicates that this document obsoletes RFC2461, but the abstract doesn't seem to mention this, which it should. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the RFC 3978 Section 5.4 Copyright Line does not match the current year == Line 4131 has weird spacing: '...tent of unc...' == Line 4143 has weird spacing: '...tent of unc...' == Line 4210 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) ** Obsolete normative reference: RFC 3513 (ref. 'ADDR-ARCH') (Obsoleted by RFC 4291) ** Obsolete normative reference: RFC 2463 (ref. 'ICMPv6') (Obsoleted by RFC 4443) ** Obsolete normative reference: RFC 2460 (ref. 'IPv6') (Obsoleted by RFC 8200) -- Obsolete informational reference (is this intentional?): RFC 3484 (ref. 'ADDR-SEL') (Obsoleted by RFC 6724) -- Obsolete informational reference (is this intentional?): RFC 3315 (ref. 'DHCPv6') (Obsoleted by RFC 8415) -- Obsolete informational reference (is this intentional?): RFC 3316 (ref. 'IPv6-CELL') (Obsoleted by RFC 7066) -- Obsolete informational reference (is this intentional?): RFC 3775 (ref. 'MIPv6') (Obsoleted by RFC 6275) -- Obsolete informational reference (is this intentional?): RFC 3667 (Obsoleted by RFC 3978) Summary: 8 errors (**), 0 flaws (~~), 7 warnings (==), 12 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 INTERNET-DRAFT T. Narten, 3 Expires: April 2007 IBM 4 Obsoletes: 2461 (if approved) E. Nordmark, 5 Sun Microsystems 6 W. Simpson, 7 Daydreamer 8 H. Soliman, 9 Flarion 10 October, 2006 12 Neighbor Discovery for IP version 6 (IPv6) 13 15 Status of this memo 17 By submitting this Internet-Draft, each author represents that any 18 applicable patent or other IPR claims of which he or she is aware 19 have been or will be disclosed, and any of which he or she becomes 20 aware will be disclosed, in accordance with Section 6 of BCP 79. 22 Internet-Drafts are working documents of the Internet Engineering 23 Task Force (IETF), its areas, and its working groups. Note that other 24 groups may also distribute working documents as Internet- Drafts. 26 Internet-Drafts are draft documents valid for a maximum of six months 27 and may be updated, replaced, or obsoleted by other documents at any 28 time. It is inappropriate to use Internet-Drafts as reference 29 material or to cite them other than as "work in progress." 31 The list of current Internet-Drafts can be accessed at 32 http://www.ietf.org/ietf/1id-abstracts.txt. 34 The list of Internet-Draft Shadow Directories can be accessed at 35 http://www.ietf.org/shadow.html. 37 Copyright Notice 39 Copyright (C) The Internet Society (2006). 41 Abstract 43 This document specifies the Neighbor Discovery protocol for IP 44 Version 6. IPv6 nodes on the same link use Neighbor Discovery to 45 discover each other's presence, to determine each other's link-layer 46 addresses, to find routers and to maintain reachability information 47 about the paths to active neighbors. 49 Table of Contents 51 1. INTRODUCTION....................................................4 53 2. TERMINOLOGY.....................................................4 54 2.1. General...................................................4 55 2.2. Link Types................................................8 56 2.3. Addresses.................................................9 57 2.4. Requirements.............................................10 59 3. PROTOCOL OVERVIEW..............................................10 60 3.1. Comparison with IPv4.....................................13 61 3.2. Supported Link Types.....................................15 62 3.3. Securing Neighbor Discovery messages......................17 64 4. MESSAGE FORMATS................................................17 65 4.1. Router Solicitation Message Format.......................17 66 4.2. Router Advertisement Message Format......................18 67 4.3. Neighbor Solicitation Message Format.....................20 68 4.4. Neighbor Advertisement Message Format....................22 69 4.5. Redirect Message Format..................................24 70 4.6. Option Formats...........................................26 71 4.6.2. Prefix Information.................................27 72 4.6.3. Redirected Header..................................29 73 4.6.4. MTU................................................30 75 5. CONCEPTUAL MODEL OF A HOST.....................................31 76 5.1. Conceptual Data Structures...............................31 77 5.2. Conceptual Sending Algorithm.............................33 78 5.3. Garbage Collection and Timeout Requirements..............35 80 6. ROUTER AND PREFIX DISCOVERY....................................35 81 6.1. Message Validation.......................................36 82 6.1.1. Validation of Router Solicitation Messages.........36 83 6.1.2. Validation of Router Advertisement Messages........37 84 6.2. Router Specification.....................................37 85 6.2.1. Router Configuration Variables....................37 86 6.2.2. Becoming An Advertising Interface.................41 87 6.2.3. Router Advertisement Message Content..............42 88 6.2.4. Sending Unsolicited Router Advertisements.........43 89 6.2.5. Ceasing To Be An Advertising Interface............44 90 6.2.6. Processing Router Solicitations...................44 91 6.2.7. Router Advertisement Consistency..................46 92 6.2.8. Link-local Address Change.........................46 93 6.3. Host Specification.......................................47 94 6.3.1. Host Configuration Variables......................47 95 6.3.2. Host Variables....................................47 96 6.3.3. Interface Initialization..........................48 97 6.3.4. Processing Received Router Advertisements.........48 98 6.3.5. Timing out Prefixes and Default Routers...........51 99 6.3.6. Default Router Selection..........................51 100 6.3.7. Sending Router Solicitations......................52 102 7. ADDRESS RESOLUTION AND NEIGHBOR UNREACHABILITY DETECTION.......54 103 7.1. Message Validation.......................................54 104 7.1.1. Validation of Neighbor Solicitations..............54 105 7.1.2. Validation of Neighbor Advertisements.............55 106 7.2. Address Resolution.......................................55 107 7.2.1. Interface Initialization..........................56 108 7.2.2. Sending Neighbor Solicitations....................56 109 7.2.3. Receipt of Neighbor Solicitations.................57 110 7.2.4. Sending Solicited Neighbor Advertisements.........58 111 7.2.5. Receipt of Neighbor Advertisements................59 112 7.2.6. Sending Unsolicited Neighbor Advertisements.......61 113 7.2.7. Anycast Neighbor Advertisements...................62 114 7.2.8. Proxy Neighbor Advertisements.....................62 115 7.3. Neighbor Unreachability Detection........................63 116 7.3.1. Reachability Confirmation.........................63 117 7.3.2. Neighbor Cache Entry States.......................64 118 7.3.3. Node Behavior.....................................65 120 8. REDIRECT FUNCTION..............................................67 121 8.1. Validation of Redirect Messages..........................67 122 8.2. Router Specification.....................................68 123 8.3. Host Specification.......................................69 125 9. EXTENSIBILITY - OPTION PROCESSING..............................70 127 10. PROTOCOL CONSTANTS............................................72 129 11. SECURITY CONSIDERATIONS.......................................73 130 11.1 Threat analysis...........................................73 131 11.2 Securing Neighbor Discovery messages......................74 133 12. RENUMBERING CONSIDERATIONS....................................75 135 REFERENCES.........................................................76 137 Authors' Addresses.................................................79 139 APPENDIX A: MULTIHOMED HOSTS.......................................80 140 APPENDIX B: FUTURE EXTENSIONS......................................81 141 APPENDIX C: STATE MACHINE FOR THE REACHABILITY STATE...............82 142 APPENDIX D: SUMMARY OF ISROUTER RULES..............................84 143 APPENDIX E: IMPLEMENTATION ISSUES..................................85 144 Appendix E.1: Reachability confirmations...........................85 145 APPENDIX F: CHANGES FROM RFC 2461..................................86 147 1. INTRODUCTION 149 This specification defines the Neighbor Discovery (ND) protocol for 150 Internet Protocol Version 6 (IPv6). Nodes (hosts and routers) use 151 Neighbor Discovery to determine the link-layer addresses for 152 neighbors known to reside on attached links and to quickly purge 153 cached values that become invalid. Hosts also use Neighbor Discovery 154 to find neighboring routers that are willing to forward packets on 155 their behalf. Finally, nodes use the protocol to actively keep track 156 of which neighbors are reachable and which are not, and to detect 157 changed link-layer addresses. When a router or the path to a router 158 fails, a host actively searches for functioning alternates. 160 Unless specified otherwise (in a document that covers operating IP 161 over a particular link type) this document applies to all link types. 162 However, because ND uses link-layer multicast for some of its 163 services, it is possible that on some link types (e.g., NBMA links) 164 alternative protocols or mechanisms to implement those services will 165 be specified (in the appropriate document covering the operation of 166 IP over a particular link type). The services described in this 167 document that are not directly dependent on multicast, such as 168 Redirects, Next-hop determination, Neighbor Unreachability Detection, 169 etc., are expected to be provided as specified in this document. The 170 details of how one uses ND on NBMA links are addressed in [IPv6- 171 NBMA]. In addition, [IPv6-3GPP] and [IPv6-CELL] discuss the use of 172 this protocol over some cellular links, which are examples of NBMA 173 links. 175 The authors would like to acknowledge the contributions of the IPv6 176 working group and, in particular, (in alphabetical order) Ran 177 Atkinson, Jim Bound, Scott Bradner, Alex Conta, Elwyn Davies, Stephen 178 Deering Richard Draves, Francis Dupont, Robert Elz, Robert Gilligan, 179 Robert Hinden, Tatuya Jinmei, Allison Mankin, Dan McDonald, Charles 180 Perkins, Matt Thomas, and Susan Thomson. 182 2. TERMINOLOGY 184 2.1. General 186 IP - Internet Protocol Version 6. The terms IPv4 and 187 IPv6 are used only in contexts where necessary to avoid 188 ambiguity. 190 ICMP - Internet Message Control Protocol for the Internet 191 Protocol Version 6. The terms ICMPv4 and ICMPv6 are 192 used only in contexts where necessary to avoid 193 ambiguity. 195 node - a device that implements IP. 197 router - a node that forwards IP packets not explicitly 198 addressed to itself. 200 host - any node that is not a router. 202 upper layer - a protocol layer immediately above IP. Examples are 203 transport protocols such as TCP and UDP, control 204 protocols such as ICMP, routing protocols such as OSPF, 205 and internet or lower-layer protocols being "tunneled" 206 over (i.e., encapsulated in) IP such as IPX, AppleTalk, 207 or IP itself. 209 link - a communication facility or medium over which nodes can 210 communicate at the link layer, i.e., the layer 211 immediately below IP. Examples are Ethernets (simple 212 or bridged), PPP links, X.25, Frame Relay, or ATM 213 networks as well as internet (or higher) layer 214 "tunnels", such as tunnels over IPv4 or IPv6 itself. 216 interface - a node's attachment to a link. 218 neighbors - nodes attached to the same link. 220 address - an IP-layer identifier for an interface or a set of 221 interfaces. 223 anycast address 224 - an identifier for a set of interfaces (typically 225 belonging to different nodes). A packet sent to an 226 anycast address is delivered to one of the interfaces 227 identified by that address (the "nearest" one, 228 according to the routing protocol's measure of 229 distance). See [ADDR-ARCH]. 231 Note that an anycast address is syntactically 232 indistinguishable from a unicast address. Thus, nodes 233 sending packets to anycast addresses don't generally 234 know that an anycast address is being used. Throughout 235 the rest of this document, references to unicast 236 addresses also apply to anycast addresses in those 237 cases where the node is unaware that a unicast address 238 is actually an anycast address. 240 prefix - a bit string that consists of some number of initial 241 bits of an address. 243 link-layer address 244 - a link-layer identifier for an interface. Examples 245 include IEEE 802 addresses for Ethernet links. 247 on-link - an address that is assigned to an interface on a 248 specified link. A node considers an address to be on- 249 link if: 251 - it is covered by one of the link's prefixes, or 253 - a neighboring router specifies the address as 254 the target of a Redirect message, or 256 - a Neighbor Advertisement message is received for 257 the (target) address, or 259 - any Neighbor Discovery message is received from 260 the address. 262 off-link - the opposite of "on-link"; an address that is not 263 assigned to any interfaces on the specified link. 265 longest prefix match 266 - The process of determining which prefix (if any) in 267 a set of prefixes covers a target address. A target 268 address is covered by a prefix if all of the bits in 269 the prefix match the left-most bits of the target 270 address. When multiple prefixes cover an address, 271 the longest prefix is the one that matches. 273 reachability 274 - whether or not the one-way "forward" path to a 275 neighbor is functioning properly. In particular, 276 whether packets sent to a neighbor are reaching the 277 IP layer on the neighboring machine and are being 278 processed properly by the receiving IP layer. For 279 neighboring routers, reachability means that packets 280 sent by a node's IP layer are delivered to the 281 router's IP layer, and the router is indeed 282 forwarding packets (i.e., it is configured as a 283 router, not a host). For hosts, reachability means 284 that packets sent by a node's IP layer are delivered 285 to the neighbor host's IP layer. 287 packet - an IP header plus payload. 289 link MTU - the maximum transmission unit, i.e., maximum packet 290 size in octets, that can be conveyed in one piece 291 over a link. 293 target - an address about which address resolution 294 information is sought, or an address which is the 295 new first-hop when being redirected. 297 proxy - a router that responds to Neighbor Discovery query 298 messages on behalf of another node. A router acting 299 on behalf of a mobile node that has moved off-link 300 could potentially act as a proxy for the mobile 301 node. 303 ICMP destination unreachable indication 304 - an error indication returned to the original sender 305 of a packet that cannot be delivered for the reasons 306 outlined in [ICMPv6]. If the error occurs on a node 307 other than the node originating the packet, an ICMP 308 error message is generated. If the error occurs on 309 the originating node, an implementation is not 310 required to actually create and send an ICMP error 311 packet to the source, as long as the upper-layer 312 sender is notified through an appropriate mechanism 313 (e.g., return value from a procedure call). Note, 314 however, that an implementation may find it 315 convenient in some cases to return errors to the 316 sender by taking the offending packet, generating an 317 ICMP error message, and then delivering it (locally) 318 through the generic error handling routines. 320 random delay 321 - when sending out messages, it is sometimes necessary to 322 delay a transmission for a random amount of time in 323 order to prevent multiple nodes from transmitting at 324 exactly the same time, or to prevent long-range 325 periodic transmissions from synchronizing with each 326 other [SYNC]. When a random component is required, a 327 node calculates the actual delay in such a way that the 328 computed delay forms a uniformly-distributed random 329 value that falls between the specified minimum and 330 maximum delay times. The implementor must take care to 331 insure that the granularity of the calculated random 332 component and the resolution of the timer used are both 333 high enough to insure that the probability of multiple 334 nodes delaying the same amount of time is small. 336 random delay seed 337 - If a pseudo-random number generator is used in 338 calculating a random delay component, the generator 339 should be initialized with a unique seed prior to being 340 used. Note that it is not sufficient to use the 341 interface token alone as the seed, since interface 342 tokens will not always be unique. To reduce the 343 probability that duplicate interface tokens cause the 344 same seed to be used, the seed should be calculated 345 from a variety of input sources (e.g., machine 346 components) that are likely to be different even on 347 identical "boxes". For example, the seed could be 348 formed by combining the CPU's serial number with an 349 interface token. 351 2.2. Link Types 353 Different link layers have different properties. The ones of concern 354 to Neighbor Discovery are: 356 multicast capable 357 - a link that supports a native mechanism at the 358 link layer for sending packets to all (i.e., 359 broadcast) or a subset of all neighbors. 361 point-to-point - a link that connects exactly two interfaces. A 362 point-to-point link is assumed to have multicast 363 capability and have a link-local address. 365 non-broadcast multi-access (NBMA) 366 - a link to which more than two interfaces can attach, 367 but that does not support a native form of multicast 368 or broadcast (e.g., X.25, ATM, frame relay, etc.). 369 Note that all link types (including NBMA) are 370 expected to provide multicast service for 371 applications that need it(e.g., using multicast 372 servers). However, it is an issue for further study 373 whether ND should use such facilities or an 374 alternate mechanism that provides the equivalent 375 multicast capability for ND. 377 shared media - a link that allows direct communication among a 378 number of nodes, but attached nodes are configured 379 in such a way that they do not have complete prefix 380 information for all on-link destinations. That is, 381 at the IP level, nodes on the same link may not know 382 that they are neighbors; by default, they 383 communicate through a router. Examples are large 384 (switched) public data networks such as SMDS and B- 385 ISDN. Also known as "large clouds". See [SH- 386 MEDIA]. 388 variable MTU - a link that does not have a well-defined MTU (e.g., 389 IEEE 802.5 token rings). Many links (e.g., 390 Ethernet) have a standard MTU defined by the link- 391 layer protocol or by the specific document 392 describing how to run IP over the link layer. 394 asymmetric reachability 395 - a link where non-reflexive and/or non-transitive 396 reachability is part of normal operation. (Non- 397 reflexive reachability means packets from A reach B 398 but packets from B don't reach A. Non-transitive 399 reachability means packets from A reach B, and 400 packets from B reach C, but packets from A don't 401 reach C.) Many radio links exhibit these 402 properties. 404 2.3. Addresses 406 Neighbor Discovery makes use of a number of different addresses 407 defined in [ADDR-ARCH], including: 409 all-nodes multicast address 410 - the link-local scope address to reach all nodes, 411 FF02::1. 413 all-routers multicast address 414 - the link-local scope address to reach all routers, 415 FF02::2. 417 solicited-node multicast address 418 - a link-local scope multicast address that is computed 419 as a function of the solicited target's address. The 420 function is described in [ADDR-ARCH]. The function is 421 chosen so that IP addresses which differ only in the 422 most significant bits, e.g., due to multiple 423 prefixes associated with different providers, will map 424 to the same solicited-node address thereby reducing the 425 number of multicast addresses a node must join. 427 link-local address 428 - a unicast address having link-only scope that can be 429 used to reach neighbors. All interfaces on routers 430 MUST have a link-local address. Also, [ADDRCONF] 431 requires that interfaces on hosts have a link-local 432 address. 434 unspecified address 435 - a reserved address value that indicates the lack of an 436 address (e.g., the address is unknown). It is never 437 used as a destination address, but may be used as a 438 source address if the sender does not (yet) know its 439 own address (e.g., while verifying an address is unused 440 during address autoconfiguration [ADDRCONF]). The 441 unspecified address has a value of 0:0:0:0:0:0:0:0. 443 Note that this specification does not strictly comply with the 444 consistency requirements in [ADDR-SEL] for the scopes of source and 445 destination addresses. It is possible in some cases for hosts to use 446 a source address of a larger scope than the destination address in 447 the IPv6 header. 449 2.4. Requirements 451 The keywords MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, 452 SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL, when they appear in this 453 document, are to be interpreted as described in [KEYWORDS]. 455 This document also makes use of internal conceptual variables to 456 describe protocol behavior and external variables that an 457 implementation must allow system administrators to change. The 458 specific variable names, how their values change, and how their 459 settings influence protocol behavior are provided to demonstrate 460 protocol behavior. An implementation is not required to have them in 461 the exact form described here, so long as its external behavior is 462 consistent with that described in this document. 464 3. PROTOCOL OVERVIEW 466 This protocol solves a set of problems related to the interaction 467 between nodes attached to the same link. It defines mechanisms for 468 solving each of the following problems: 470 Router Discovery: How hosts locate routers that reside on an 471 attached link. 473 Prefix Discovery: How hosts discover the set of address prefixes 474 that define which destinations are on-link for an 475 attached link. (Nodes use prefixes to distinguish 476 destinations that reside on-link from those only 477 reachable through a router.) 479 Parameter Discovery: How a node learns such link parameters as the 480 link MTU or such Internet parameters as the hop limit 481 value to place in outgoing packets. 483 Address Autoconfiguration: Introduces the mechanisms needed in 484 order to allow nodes to automatically configure an 485 address for an interface. 487 Address resolution: How nodes determine the link-layer address of 488 an on-link destination (e.g., a neighbor) given only the 489 destination's IP address. 491 Next-hop determination: The algorithm for mapping an IP destination 492 address into the IP address of the neighbor to which 493 traffic for the destination should be sent. The next- 494 hop can be a router or the destination itself. 496 Neighbor Unreachability Detection: How nodes determine that a 497 neighbor is no longer reachable. For neighbors used as 498 routers, alternate default routers can be tried. For 499 both routers and hosts, address resolution can be 500 performed again. 502 Duplicate Address Detection: How a node determines that an address 503 it wishes to use is not already in use by another node. 505 Redirect: How a router informs a host of a better first-hop node 506 to reach a particular destination. 508 Neighbor Discovery defines five different ICMP packet types: A pair 509 of Router Solicitation and Router Advertisement messages, a pair of 510 Neighbor Solicitation and Neighbor Advertisements messages, and a 511 Redirect message. The messages serve the following purpose: 513 Router Solicitation: When an interface becomes enabled, hosts may 514 send out Router Solicitations that request routers to 515 generate Router Advertisements immediately rather than 516 at their next scheduled time. 518 Router Advertisement: Routers advertise their presence together 519 with various link and Internet parameters either 520 periodically, or in response to a Router Solicitation 521 message. Router Advertisements contain prefixes that 522 are used for on-link determination and/or address 523 configuration, a suggested hop limit value, etc. 525 Neighbor Solicitation: Sent by a node to determine the link-layer 526 address of a neighbor, or to verify that a neighbor is 527 still reachable via a cached link-layer address. 528 Neighbor Solicitations are also used for Duplicate 529 Address Detection. 531 Neighbor Advertisement: A response to a Neighbor Solicitation 532 message. A node may also send unsolicited Neighbor 533 Advertisements to announce a link-layer address change. 535 Redirect: Used by routers to inform hosts of a better first hop 536 for a destination. 538 On multicast-capable links, each router periodically multicasts a 539 Router Advertisement packet announcing its availability. A host 540 receives Router Advertisements from all routers, building a list of 541 default routers. Routers generate Router Advertisements frequently 542 enough that hosts will learn of their presence within a few minutes, 543 but not frequently enough to rely on an absence of advertisements to 544 detect router failure; a separate Neighbor Unreachability Detection 545 algorithm provides failure detection. 547 Router Advertisements contain a list of prefixes used for on-link 548 determination and/or autonomous address configuration; flags 549 associated with the prefixes specify the intended uses of a 550 particular prefix. Hosts use the advertised on-link prefixes to 551 build and maintain a list that is used in deciding when a packet's 552 destination is on-link or beyond a router. Note that a destination 553 can be on-link even though it is not covered by any advertised on- 554 link prefix. In such cases a router can send a Redirect informing 555 the sender that the destination is a neighbor. 557 Router Advertisements (and per-prefix flags) allow routers to inform 558 hosts how to perform Address Autoconfiguration. For example, routers 559 can specify whether hosts should use DHCPv6 and/or 560 autonomous (stateless) address configuration. 562 Router Advertisement messages also contain Internet parameters such 563 as the hop limit that hosts should use in outgoing packets and, 564 optionally, link parameters such as the link MTU. This facilitates 565 centralized administration of critical parameters that can be set on 566 routers and automatically propagated to all attached hosts. 568 Nodes accomplish address resolution by multicasting a Neighbor 569 Solicitation that asks the target node to return its link-layer 570 address. Neighbor Solicitation messages are multicast to the 571 solicited-node multicast address of the target address. The target 572 returns its link-layer address in a unicast Neighbor Advertisement 573 message. A single request-response pair of packets is sufficient for 574 both the initiator and the target to resolve each other's link-layer 575 addresses; the initiator includes its link-layer address in the 576 Neighbor Solicitation. 578 Neighbor Solicitation messages can also be used to determine if more 579 than one node has been assigned the same unicast address. The use of 580 Neighbor Solicitation messages for Duplicate Address Detection is 581 specified in [ADDRCONF]. 583 Neighbor Unreachability Detection detects the failure of a neighbor 584 or the failure of the forward path to the neighbor. Doing so 585 requires positive confirmation that packets sent to a neighbor are 586 actually reaching that neighbor and being processed properly by its 587 IP layer. Neighbor Unreachability Detection uses confirmation from 588 two sources. When possible, upper-layer protocols provide a positive 589 confirmation that a connection is making "forward progress", that is, 590 previously sent data is known to have been delivered correctly (e.g., 591 new acknowledgments were received recently). When positive 592 confirmation is not forthcoming through such "hints", a node sends 593 unicast Neighbor Solicitation messages that solicit Neighbor 594 Advertisements as reachability confirmation from the next hop. To 595 reduce unnecessary network traffic, probe messages are only sent to 596 neighbors to which the node is actively sending packets. 598 In addition to addressing the above general problems, Neighbor 599 Discovery also handles the following situations: 601 Link-layer address change - A node that knows its link-layer 602 address has changed can multicast a few (unsolicited) 603 Neighbor Advertisement packets to all nodes to quickly update 604 cached link-layer addresses that have become invalid. Note 605 that the sending of unsolicited advertisements is a 606 performance enhancement only (e.g., unreliable). The 607 Neighbor Unreachability Detection algorithm ensures that all 608 nodes will reliably discover the new address, though the 609 delay may be somewhat longer. 611 Inbound load balancing - Nodes with replicated interfaces may want 612 to load balance the reception of incoming packets across 613 multiple network interfaces on the same link. Such nodes 614 have multiple link-layer addresses assigned to the same 615 interface. For example, a single network driver could 616 represent multiple network interface cards as a single 617 logical interface having multiple link-layer addresses. 619 Neighbor Discovery allows a router to perform Load balancing 620 for traffic addressed to itself by allowing routers to omit 621 the source link-layer address from Router Advertisement 622 packets, thereby forcing neighbors to use Neighbor 623 Solicitation messages to learn link-layer addresses of 624 routers. Returned Neighbor Advertisement messages can then 625 contain link-layer addresses that differ depending on who 626 issued the solicitation. This specification does not support 627 a mechanism that allows host to Load balance incoming 628 packets. 630 Anycast addresses - Anycast addresses identify one of a set of 631 nodes providing an equivalent service, and multiple nodes on 632 the same link may be configured to recognize the same Anycast 633 address. Neighbor Discovery handles anycasts by having nodes 634 expect to receive multiple Neighbor Advertisements for the 635 same target. All advertisements for anycast addresses are 636 tagged as being non-Override advertisements. This invokes 637 specific rules to determine which of potentially multiple 638 advertisements should be used. 640 Proxy advertisements - A router willing to accept packets on behalf 641 of a target address that is unable to respond to Neighbor 642 Solicitations can issue non-Override Neighbor Advertisements. 643 Proxy advertisements are used by Mobile IPv6 home Agents to 644 defend mobile nodes' addresses when they move off-link. 645 However, it is not intended as a general mechanism to handle 646 nodes that, e.g., do not implement this protocol. 648 3.1. Comparison with IPv4 650 The IPv6 Neighbor Discovery protocol corresponds to a combination of 651 the IPv4 protocols ARP [ARP], ICMP Router Discovery [RDISC], and ICMP 652 Redirect [ICMPv4]. In IPv4 there is no generally agreed upon 653 protocol or mechanism for Neighbor Unreachability Detection, although 654 Hosts Requirements [HR-CL] does specify some possible algorithms for 655 Dead Gateway Detection (a subset of the problems Neighbor 656 Unreachability Detection tackles). 658 The Neighbor Discovery protocol provides a multitude of improvements 659 over the IPv4 set of protocols: 661 Router Discovery is part of the base protocol set; there is no 662 need for hosts to "snoop" the routing protocols. 664 Router advertisements carry link-layer addresses; no additional 665 packet exchange is needed to resolve the router's link-layer 666 address. 668 Router advertisements carry prefixes for a link; there is no need 669 to have a separate mechanism to configure the "netmask". 671 Router advertisements enable Address Autoconfiguration. 673 Routers can advertise an MTU for hosts to use on the link, 674 ensuring that all nodes use the same MTU value on links lacking a 675 well-defined MTU. 677 Address resolution multicasts are "spread" over 16 million (2^24) 678 multicast addresses greatly reducing address resolution related 679 interrupts on nodes other than the target. Moreover, non-IPv6 680 machines should not be interrupted at all. 682 Redirects contain the link-layer address of the new first hop; 683 separate address resolution is not needed upon receiving a 684 redirect. 686 Multiple prefixes can be associated with the same link. By 687 default, hosts learn all on-link prefixes from Router 688 Advertisements. However, routers may be configured to omit some 689 or all prefixes from Router Advertisements. In such cases hosts 690 assume that destinations are off-link and send traffic to routers. 691 A router can then issue redirects as appropriate. 693 Unlike IPv4, the recipient of an IPv6 redirect assumes that the 694 new next-hop is on-link. In IPv4, a host ignores redirects 695 specifying a next-hop that is not on-link according to the link's 696 network mask. The IPv6 redirect mechanism is analogous to the 697 XRedirect facility specified in [SH-MEDIA]. It is expected to be 698 useful on non-broadcast and shared media links in which it is 699 undesirable or not possible for nodes to know all prefixes for 700 on-link destinations. 702 Neighbor Unreachability Detection is part of the base 703 significantly improving the robustness of packet delivery in the 704 presence of failing routers, partially failing or partitioned 705 links and nodes that change their link-layer addresses. For 706 instance, mobile nodes can move off-link without losing any 707 connectivity due to stale ARP caches. 709 Unlike ARP, Neighbor Discovery detects half-link failures (using 710 Neighbor Unreachability Detection) and avoids sending traffic to 711 neighbors with which two-way connectivity is absent. 713 Unlike in IPv4 Router Discovery the Router Advertisement messages 714 do not contain a preference field. The preference field is not 715 needed to handle routers of different "stability"; the Neighbor 716 Unreachability Detection will detect dead routers and switch to a 717 working one. 719 The use of link-local addresses to uniquely identify routers (for 720 Router Advertisement and Redirect messages) makes it possible for 721 hosts to maintain the router associations in the event of the site 722 renumbering to use new global prefixes. 724 By setting the Hop Limit to 255, Neighbor Discovery is immune to 725 off-link senders that accidentally or intentionally send ND 726 messages. In IPv4 off-link senders can send both ICMP Redirects 727 and Router Advertisement messages. 729 Placing address resolution at the ICMP layer makes the protocol 730 more media-independent than ARP and makes it possible to use 731 generic IP layer authentication and security mechanisms as 732 appropriate. 734 3.2. Supported Link Types 736 Neighbor Discovery supports links with different properties. In the 737 presence of certain properties only a subset of the ND protocol 738 mechanisms are fully specified in this document: 740 point-to-point - Neighbor Discovery handles such links just like 741 multicast links. (Multicast can be trivially 742 provided on point to point links, and interfaces 743 can be assigned link-local addresses.) Neighbor 744 Discovery should be implemented as described in 745 this document. 747 multicast - Neighbor Discovery should be implemented as 748 described in this document. 750 non-broadcast multiple access (NBMA) 751 - Redirect, Neighbor Unreachability Detection and 752 next-hop determination should be implemented as 753 described in this document. Address resolution, 754 and the mechanism for delivering Router 755 Solicitations and Advertisements on NBMA links is 756 not specified in this document. Note that if 758 hosts support manual configuration of a list of 759 default routers, hosts can dynamically acquire the 760 link-layer addresses for their neighbors from 761 Redirect messages. 763 shared media - The Redirect message is modeled after the 764 XRedirect message in [SH-MEDIA] in order to 765 simplify use of the protocol on shared media 766 links. 768 This specification does not address shared media 769 issues that only relate to routers, such as: 771 - How routers exchange reachability information 772 on a shared media link. 774 - How a router determines the link-layer address 775 of a host, which it needs to send redirect 776 messages to the host. 778 - How a router determines that it is the first- 779 hop router for a received packet. 781 The protocol is extensible (through the definition 782 of new options) so that other solutions might be 783 possible in the future. 785 variable MTU - Neighbor Discovery allows routers to specify a MTU 786 for the link, which all nodes then use. All nodes 787 on a link must use the same MTU (or Maximum 788 Receive Unit) in order for multicast to work 789 properly. Otherwise when multicasting, a sender, 790 which can not know which nodes will receive the 791 packet, could not determine a minimum packet size 792 that all receivers can process (or Maximum Receive 793 Unit). 795 asymmetric reachability 796 - Neighbor Discovery detects the absence of 797 symmetric reachability; a node avoids paths to a 798 neighbor with which it does not have symmetric 799 connectivity. 801 The Neighbor Unreachability Detection will 802 typically identify such half-links and the node 803 will refrain from using them. 805 The protocol can presumably be extended in the 806 future to find viable paths in environments that 807 lack reflexive and transitive connectivity. 809 3.3. Securing Neighbor Discovery messages 811 Neighbor Discovery messages are needed for various functions. Several 812 functions are designed to allow hosts to ascertain the ownership of 813 an address or the mapping between link layer and IP layer addresses. 814 Vulnerabilities related to Neighbor Discovery are discussed in 815 section 11.1. A general solution for securing Neighbor Discovery is 816 outside the scope of this specification and is discussed in [SEND]. 817 However, Section 11.2 explains how and under which constraints IPsec 818 AH or ESP can be used to secure Neighbor Discovery. 820 4. MESSAGE FORMATS 822 4.1. Router Solicitation Message Format 824 Hosts send Router Solicitations in order to prompt routers to 825 generate Router Advertisements quickly. 827 0 1 2 3 828 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 829 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 830 | Type | Code | Checksum | 831 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 832 | Reserved | 833 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 834 | Options ... 835 +-+-+-+-+-+-+-+-+-+-+-+- 837 IP Fields: 839 Source Address 840 An IP address assigned to the sending interface, or 841 the unspecified address if no address is assigned 842 to the sending interface. 844 Destination Address 845 Typically the all-routers multicast address. 847 Hop Limit 255 849 ICMP Fields: 851 Type 133 853 Code 0 854 Checksum The ICMP checksum. See [ICMPv6]. 856 Reserved This field is unused. It MUST be initialized to 857 zero by the sender and MUST be ignored by the 858 receiver. 859 Valid Options: 861 Source link-layer address 862 The link-layer address of the sender, if known. 863 MUST NOT be included if the Source Address is the 864 unspecified address. Otherwise it SHOULD be 865 included on link layers that have addresses. 867 Future versions of this protocol may define new option types. 868 Receivers MUST silently ignore any options they do not recognize 869 and continue processing the message. 871 4.2. Router Advertisement Message Format 873 Routers send out Router Advertisement message periodically, or in 874 response to a Router Solicitation. 876 0 1 2 3 877 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 878 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 879 | Type | Code | Checksum | 880 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 881 | Cur Hop Limit |M|O| Reserved | Router Lifetime | 882 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 883 | Reachable Time | 884 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 885 | Retrans Timer | 886 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 887 | Options ... 888 +-+-+-+-+-+-+-+-+-+-+-+- 890 IP Fields: 892 Source Address 893 MUST be the link-local address assigned to the 894 interface from which this message is sent. 896 Destination Address 897 Typically the Source Address of an invoking Router 898 Solicitation or the all-nodes multicast address. 900 Hop Limit 255 902 ICMP Fields: 904 Type 134 906 Code 0 908 Checksum The ICMP checksum. See [ICMPv6]. 910 Cur Hop Limit 8-bit unsigned integer. The default value that 911 should be placed in the Hop Count field of the IP 912 header for outgoing IP packets. A value of zero 913 means unspecified (by this router). 915 M 1-bit "Managed address configuration" flag. When 916 set, it indicates that addresses are available via 917 Dynamic Host Configuration Protocol [DHCPv6]. 919 If the M flag is set, the O flag is redundant and 920 can be ignored because DHCPv6 will return all 921 available configuration information. 923 O 1-bit "Other configuration" flag. When 924 set, it indicates that other configuration 925 information is available via DHCPv6. 926 Examples of such information are DNS-related 927 information or information on other servers within 928 the network. 930 Note: If neither M nor O flags are set this indicates that no 931 information is available via DHCPv6. 933 Reserved A 6-bit unused field. It MUST be initialized to 934 zero by the sender and MUST be ignored by the 935 receiver. 937 Router Lifetime 938 16-bit unsigned integer. The lifetime associated 939 with the default router in units of seconds. 940 The field can contain values up to 65535 and 941 receivers should handle any value, while the 942 sending rules in section 6 limit the lifetime to 943 9000 seconds. A Lifetime of 0 indicates that the 944 router is not a default router and SHOULD NOT 945 appear on the default router list. The Router 946 Lifetime applies only to the router's usefulness as 947 a default router; it does not apply to information 948 contained in other message fields or options. 949 Options that need time limits for their information 950 include their own lifetime fields. 952 Reachable Time 32-bit unsigned integer. The time, in 953 milliseconds, that a node assumes a neighbor is 954 reachable after having received a reachability 955 confirmation. Used by the Neighbor Unreachability 956 Detection algorithm (see Section 7.3). A value of 957 zero means unspecified (by this router). 959 Retrans Timer 32-bit unsigned integer. The time, in 960 milliseconds, between retransmitted Neighbor 961 Solicitation messages. Used by address resolution 962 and the Neighbor Unreachability Detection algorithm 963 (see Sections 7.2 and 7.3). A value of zero means 964 unspecified (by this router). 966 Possible options: 968 Source link-layer address 969 The link-layer address of the interface from which 970 the Router Advertisement is sent. Only used on 971 link layers that have addresses. A router MAY omit 972 this option in order to enable inbound load sharing 973 across multiple link-layer addresses. 975 MTU SHOULD be sent on links that have a variable MTU 976 (as specified in the document that describes how to 977 run IP over the particular link type). MAY be sent 978 on other links. 980 Prefix Information 981 These options specify the prefixes that are on-link 982 and/or are used for address autoconfiguration. A 983 router SHOULD include all its on-link prefixes 984 (except the link-local prefix) so that multihomed 985 hosts have complete prefix information about on- 986 link destinations for the links to which they 987 attach. If complete information is lacking, a 988 multihomed host may not be able to choose the 989 correct outgoing interface when sending traffic to 990 its neighbors. 992 Future versions of this protocol may define new option types. 993 Receivers MUST silently ignore any options they do not recognize 994 and continue processing the message. 996 4.3. Neighbor Solicitation Message Format 998 Nodes send Neighbor Solicitations to request the link-layer address 999 of a target node while also providing their own link-layer address to 1000 the target. Neighbor Solicitations are multicast when the node needs 1001 to resolve an address and unicast when the node seeks to verify the 1002 reachability of a neighbor. 1004 0 1 2 3 1005 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 1006 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1007 | Type | Code | Checksum | 1008 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1009 | Reserved | 1010 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1011 | | 1012 + + 1013 | | 1014 + Target Address + 1015 | | 1016 + + 1017 | | 1018 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1019 | Options ... 1020 +-+-+-+-+-+-+-+-+-+-+-+- 1022 IP Fields: 1024 Source Address 1025 Either an address assigned to the interface from 1026 which this message is sent or (if Duplicate Address 1027 Detection is in progress [ADDRCONF]) the 1028 unspecified address. 1029 Destination Address 1030 Either the solicited-node multicast address 1031 corresponding to the target address, or the target 1032 address. 1033 Hop Limit 255 1035 ICMP Fields: 1037 Type 135 1039 Code 0 1041 Checksum The ICMP checksum. See [ICMPv6]. 1043 Reserved This field is unused. It MUST be initialized to 1044 zero by the sender and MUST be ignored by the 1045 receiver. 1047 Target Address 1048 The IP address of the target of the solicitation. 1049 It MUST NOT be a multicast address. 1051 Possible options: 1053 Source link-layer address 1054 The link-layer address for the sender. MUST NOT be 1055 included when the source IP address is the 1056 unspecified address. Otherwise, on link layers 1057 that have addresses this option MUST be included in 1058 multicast solicitations and SHOULD be included in 1059 unicast solicitations. 1061 Future versions of this protocol may define new option types. 1062 Receivers MUST silently ignore any options they do not recognize 1063 and continue processing the message. 1065 4.4. Neighbor Advertisement Message Format 1067 A node sends Neighbor Advertisements in response to Neighbor 1068 Solicitations and sends unsolicited Neighbor Advertisements in order 1069 to (unreliably) propagate new information quickly. 1071 0 1 2 3 1072 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 1073 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1074 | Type | Code | Checksum | 1075 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1076 |R|S|O| Reserved | 1077 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1078 | | 1079 + + 1080 | | 1081 + Target Address + 1082 | | 1083 + + 1084 | | 1085 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1086 | Options ... 1087 +-+-+-+-+-+-+-+-+-+-+-+- 1089 IP Fields: 1091 Source Address 1092 An address assigned to the interface from which the 1093 advertisement is sent. 1094 Destination Address 1095 For solicited advertisements, the Source Address of 1096 an invoking Neighbor Solicitation or, if the 1097 solicitation's Source Address is the unspecified 1098 address, the all-nodes multicast address. 1100 For unsolicited advertisements typically the all- 1101 nodes multicast address. 1103 Hop Limit 255 1105 ICMP Fields: 1107 Type 136 1109 Code 0 1111 Checksum The ICMP checksum. See [ICMPv6]. 1113 R Router flag. When set, the R-bit indicates that 1114 the sender is a router. The R-bit is used by 1115 Neighbor Unreachability Detection to detect a 1116 router that changes to a host. 1118 S Solicited flag. When set, the S-bit indicates that 1119 the advertisement was sent in response to a 1120 Neighbor Solicitation from the Destination address. 1121 The S-bit is used as a reachability confirmation 1122 for Neighbor Unreachability Detection. It MUST NOT 1123 be set in multicast advertisements or in 1124 unsolicited unicast advertisements. 1126 O Override flag. When set, the O-bit indicates that 1127 the advertisement should override an existing cache 1128 entry and update the cached link-layer address. 1129 When it is not set the advertisement will not 1130 update a cached link-layer address though it will 1131 update an existing Neighbor Cache entry for which 1132 no link-layer address is known. It SHOULD NOT be 1133 set in solicited advertisements for anycast 1134 addresses and in solicited proxy advertisements. 1135 It SHOULD be set in other solicited advertisements 1136 and in unsolicited advertisements. 1138 Reserved 29-bit unused field. It MUST be initialized to 1139 zero by the sender and MUST be ignored by the 1140 receiver. 1142 Target Address 1143 For solicited advertisements, the Target Address 1144 field in the Neighbor Solicitation message that 1145 prompted this advertisement. For an unsolicited 1146 advertisement, the address whose link-layer address 1147 has changed. The Target Address MUST NOT be a 1148 multicast address. 1150 Possible options: 1152 Target link-layer address 1153 The link-layer address for the target, i.e., the 1154 sender of the advertisement. This option MUST be 1155 included on link layers that have addresses when 1156 responding to multicast solicitations. When 1157 responding to a unicast Neighbor Solicitation this 1158 option SHOULD be included. 1160 The option MUST be included for multicast 1161 solicitations in order to avoid infinite Neighbor 1162 Solicitation "recursion" when the peer node does 1163 not have a cache entry to return a Neighbor 1164 Advertisements message. When responding to unicast 1165 solicitations, the option can be omitted since the 1166 sender of the solicitation has the correct link- 1167 layer address; otherwise it would not be able 1168 to send the unicast solicitation in the first 1169 place. However, including the link-layer address in 1170 this case adds little overhead and eliminates a 1171 potential race condition where the sender deletes 1172 the cached link-layer address prior to receiving a 1173 response to a previous solicitation. 1175 Future versions of this protocol may define new option types. 1176 Receivers MUST silently ignore any options they do not recognize 1177 and continue processing the message. 1179 4.5. Redirect Message Format 1181 Routers send Redirect packets to inform a host of a better first-hop 1182 node on the path to a destination. Hosts can be redirected to a 1183 better first-hop router but can also be informed by a redirect that 1184 the destination is in fact a neighbor. The latter is accomplished by 1185 setting the ICMP Target Address equal to the ICMP Destination 1186 Address. 1188 0 1 2 3 1189 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 1190 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1191 | Type | Code | Checksum | 1192 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1193 | Reserved | 1194 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1195 | | 1196 + + 1197 | | 1198 + Target Address + 1199 | | 1200 + + 1201 | | 1202 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1203 | | 1204 + + 1205 | | 1206 + Destination Address + 1207 | | 1208 + + 1209 | | 1210 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1211 | Options ... 1212 +-+-+-+-+-+-+-+-+-+-+-+- 1214 IP Fields: 1216 Source Address 1217 MUST be the link-local address assigned to the 1218 interface from which this message is sent. 1220 Destination Address 1221 The Source Address of the packet that triggered the 1222 redirect. 1224 Hop Limit 255 1226 ICMP Fields: 1228 Type 137 1230 Code 0 1232 Checksum The ICMP checksum. See [ICMPv6]. 1234 Reserved This field is unused. It MUST be initialized to 1235 zero by the sender and MUST be ignored by the 1236 receiver. 1238 Target Address An IP address that is a better first hop to use for 1239 the ICMP Destination Address. When the target is 1240 the actual endpoint of communication, i.e., the 1241 destination is a neighbor, the Target Address field 1242 MUST contain the same value as the ICMP Destination 1243 Address field. Otherwise the target is a better 1244 first-hop router and the Target Address MUST be the 1245 router's link-local address so that hosts can 1246 uniquely identify routers. 1248 Destination Address 1249 The IP address of the destination which is 1250 redirected to the target. 1252 Possible options: 1254 Target link-layer address 1255 The link-layer address for the target. It SHOULD 1256 be included (if known). Note that on NBMA links, 1257 hosts may rely on the presence of the Target Link- 1258 Layer Address option in Redirect messages as the 1259 means for determining the link-layer addresses of 1260 neighbors. In such cases, the option MUST be 1261 included in Redirect messages. 1263 Redirected Header 1264 As much as possible of the IP packet that triggered 1265 the sending of the Redirect without making the 1266 redirect packet exceed the minimum MTU specified in 1267 [IPv6]. 1269 4.6. Option Formats 1271 Neighbor Discovery messages include zero or more options, some of 1272 which may appear multiple times in the same message. Options should 1273 be padded when necessary to ensure that they end on their natural 64- 1274 bit boundaries. All options are of the form: 1276 0 1 2 3 1277 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 1278 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1279 | Type | Length | ... | 1280 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1281 ~ ... ~ 1282 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1284 Fields: 1286 Type 8-bit identifier of the type of option. The 1287 options defined in this document are: 1289 Option Name Type 1291 Source Link-Layer Address 1 1292 Target Link-Layer Address 2 1293 Prefix Information 3 1294 Redirected Header 4 1295 MTU 5 1297 Length 8-bit unsigned integer. The length of the option 1298 (including the type and length fields) in units of 1299 8 octets. The value 0 is invalid. Nodes MUST 1300 silently discard an ND packet that contains an 1301 option with length zero. 1303 4.6.1. Source/Target Link-layer Address 1305 0 1 2 3 1306 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 1307 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1308 | Type | Length | Link-Layer Address ... 1309 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1311 Fields: 1313 Type 1314 1 for Source Link-layer Address 1315 2 for Target Link-layer Address 1317 Length The length of the option (including the type and 1318 length fields) in units of 8 octets. For example, 1319 the length for IEEE 802 addresses is 1 [IPv6- 1320 ETHER]. 1322 Link-Layer Address 1323 The variable length link-layer address. 1325 The content and format of this field (including 1326 byte and bit ordering) is expected to be specified 1327 in specific documents that describe how IPv6 1328 operates over different link layers. For instance, 1329 [IPv6-ETHER]. 1331 Description 1332 The Source Link-Layer Address option contains the 1333 link-layer address of the sender of the packet. It 1334 is used in the Neighbor Solicitation, Router 1335 Solicitation, and Router Advertisement packets. 1337 The Target Link-Layer Address option contains the 1338 link-layer address of the target. It is used in 1339 Neighbor Advertisement and Redirect packets. 1341 These options MUST be silently ignored for other 1342 Neighbor Discovery messages. 1344 4.6.2. Prefix Information 1346 0 1 2 3 1347 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 1348 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1349 | Type | Length | Prefix Length |L|A| Reserved1 | 1350 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1351 | Valid Lifetime | 1352 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1353 | Preferred Lifetime | 1354 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1355 | Reserved2 | 1356 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1357 | | 1358 + + 1359 | | 1360 + Prefix + 1361 | | 1362 + + 1363 | | 1364 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1366 Fields: 1368 Type 3 1370 Length 4 1372 Prefix Length 8-bit unsigned integer. The number of leading bits 1373 in the Prefix that are valid. The value ranges 1374 from 0 to 128. The prefix length field provides 1375 necessary information for on-link determination 1376 (when combined with the L flag in the prefix 1377 information option). It also assists with address 1378 autoconfiguration as specified in [ADDRCONF], for 1379 which there may be more restrictions on the prefix 1380 length. 1382 L 1-bit on-link flag. When set, indicates that this 1383 prefix can be used for on-link determination. When 1384 not set the advertisement makes no statement about 1385 on-link or off-link properties of the prefix. For 1386 instance, the prefix might be used for address 1387 configuration with some of the addresses belonging 1388 to the prefix being on-link and others being off- 1389 link. 1391 A 1-bit autonomous address-configuration flag. When 1392 set indicates that this prefix can be used for 1393 stateless address configuration as specified in 1394 [ADDRCONF]. 1396 Reserved1 6-bit unused field. It MUST be initialized to zero 1397 by the sender and MUST be ignored by the receiver. 1399 Valid Lifetime 1400 32-bit unsigned integer. The length of time in 1401 seconds (relative to the time the packet is sent) 1402 that the prefix is valid for the purpose of on-link 1403 determination. A value of all one bits 1404 (0xffffffff) represents infinity. The Valid 1405 Lifetime is also used by [ADDRCONF]. 1407 Preferred Lifetime 1408 32-bit unsigned integer. The length of time in 1409 seconds (relative to the time the packet is sent) 1410 that addresses generated from the prefix via 1411 stateless address autoconfiguration remain 1412 preferred [ADDRCONF]. A value of all one bits 1413 (0xffffffff) represents infinity. See [ADDRCONF]. 1414 Note that the value of this field MUST NOT exceed 1415 the Valid Lifetime field to avoid preferring 1416 addresses that are no longer valid. 1418 Reserved2 This field is unused. It MUST be initialized to 1419 zero by the sender and MUST be ignored by the 1420 receiver. 1422 Prefix An IP address or a prefix of an IP address. The 1423 Prefix Length field contains the number of valid 1424 leading bits in the prefix. The bits in the prefix 1425 after the prefix length are reserved and MUST be 1426 initialized to zero by the sender and ignored by 1427 the receiver. A router SHOULD NOT send a prefix 1428 option for the link-local prefix and a host SHOULD 1429 ignore such a prefix option. 1431 Description 1432 The Prefix Information option provide hosts with 1433 on-link prefixes and prefixes for Address 1434 Autoconfiguration. 1436 The Prefix Information option appears in Router 1437 Advertisement packets and MUST be silently ignored 1438 for other messages. 1440 4.6.3. Redirected Header 1442 0 1 2 3 1443 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 1444 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1445 | Type | Length | Reserved | 1446 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1447 | Reserved | 1448 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1449 | | 1450 ~ IP header + data ~ 1451 | | 1452 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1454 Fields: 1456 Type 4 1458 Length The length of the option in units of 8 octets. 1460 Reserved These fields are unused. They MUST be initialized 1461 to zero by the sender and MUST be ignored by the 1462 receiver. 1464 IP header + data 1465 The original packet truncated to ensure that the 1466 size of the redirect message does not exceed the 1467 minimum MTU required to support IPv6 as specified 1468 in [IPv6]. 1470 Description 1471 The Redirected Header option is used in Redirect 1472 messages and contains all or part of the packet 1473 that is being redirected. 1475 This option MUST be silently ignored for other 1476 Neighbor Discovery messages. 1478 4.6.4. MTU 1480 0 1 2 3 1481 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 1482 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1483 | Type | Length | Reserved | 1484 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1485 | MTU | 1486 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1488 Fields: 1490 Type 5 1492 Length 1 1494 Reserved This field is unused. It MUST be initialized to 1495 zero by the sender and MUST be ignored by the 1496 receiver. 1498 MTU 32-bit unsigned integer. The recommended MTU for 1499 the link. 1501 Description 1502 The MTU option is used in Router Advertisement 1503 messages to insure that all nodes on a link use the 1504 same MTU value in those cases where the link MTU is 1505 not well known. 1507 This option MUST be silently ignored for other 1508 Neighbor Discovery messages. 1510 In configurations in which heterogeneous 1511 technologies are bridged together, the maximum 1512 supported MTU may differ from one segment to 1513 another. If the bridges do not generate ICMP 1514 Packet Too Big messages, communicating nodes will 1515 be unable to use Path MTU to dynamically determine 1516 the appropriate MTU on a per-neighbor basis. In 1517 such cases, routers can be configured to use the 1518 MTU option to specify the maximum MTU value that is 1519 supported by all segments. 1521 5. CONCEPTUAL MODEL OF A HOST 1523 This section describes a conceptual model of one possible data 1524 structure organization that hosts (and to some extent routers) will 1525 maintain in interacting with neighboring nodes. The described 1526 organization is provided to facilitate the explanation of how the 1527 Neighbor Discovery protocol should behave. This document does not 1528 mandate that implementations adhere to this model as long as their 1529 external behavior is consistent with that described in this document. 1531 This model is only concerned with the aspects of host behavior 1532 directly related to Neighbor Discovery. In particular, it does not 1533 concern itself with such issues as source address selection or the 1534 selecting of an outgoing interface on a multihomed host. 1536 5.1. Conceptual Data Structures 1538 Hosts will need to maintain the following pieces of information for 1539 each interface: 1541 Neighbor Cache 1542 - A set of entries about individual neighbors to 1543 which traffic has been sent recently. Entries are 1544 keyed on the neighbor's on-link unicast IP address 1545 and contain such information as its link-layer 1546 address, a flag indicating whether the neighbor is 1547 a router or a host (called IsRouter in this 1548 document), a pointer to any queued packets waiting 1549 for address resolution to complete, etc. 1550 A Neighbor Cache entry also contains information 1551 used by the Neighbor Unreachability Detection 1552 algorithm, including the reachability state, the 1553 number of unanswered probes, and the time the next 1554 Neighbor Unreachability Detection event is 1555 scheduled to take place. 1557 Destination Cache 1558 - A set of entries about destinations to which 1559 traffic has been sent recently. The Destination 1560 Cache includes both on-link and off-link 1561 destinations and provides a level of indirection 1562 into the Neighbor Cache; the Destination Cache maps 1563 a destination IP address to the IP address of the 1564 next-hop neighbor. This cache is updated with 1565 information learned from Redirect messages. 1566 Implementations may find it convenient to store 1567 additional information not directly related to 1568 Neighbor Discovery in Destination Cache entries, 1569 such as the Path MTU (PMTU) and round trip timers 1570 maintained by transport protocols. 1572 Prefix List - A list of the prefixes that define a set of 1573 addresses that are on-link. Prefix List entries 1574 are created from information received in Router 1575 Advertisements. Each entry has an associated 1576 invalidation timer value (extracted from the 1577 advertisement) used to expire prefixes when they 1578 become invalid. A special "infinity" timer value 1579 specifies that a prefix remains valid forever, 1580 unless a new (finite) value is received in a 1581 subsequent advertisement. 1583 The link-local prefix is considered to be on the 1584 prefix list with an infinite invalidation timer 1585 regardless of whether routers are advertising a 1586 prefix for it. Received Router Advertisements 1587 SHOULD NOT modify the invalidation timer for the 1588 link-local prefix. 1590 Default Router List 1591 - A list of routers to which packets may be sent. 1592 Router list entries point to entries in the 1593 Neighbor Cache; the algorithm for selecting a 1594 default router favors routers known to be reachable 1595 over those whose reachability is suspect. Each 1596 entry also has an associated invalidation timer 1597 value (extracted from Router Advertisements) used 1598 to delete entries that are no longer advertised. 1600 Note that the above conceptual data structures can be implemented 1601 using a variety of techniques. One possible implementation is to use 1602 a single longest-match routing table for all of the above data 1603 structures. Regardless of the specific implementation, it is 1604 critical that the Neighbor Cache entry for a router is shared by all 1605 Destination Cache entries using that router in order to prevent 1606 redundant Neighbor Unreachability Detection probes. 1608 Note also that other protocols (e.g., Mobile IPv6) might add 1609 additional conceptual data structures. An implementation is at 1610 liberty to implement such data structures in any way it pleases. For 1611 example, an implementation could merge all conceptual data structures 1612 into a single routing table. 1614 The Neighbor Cache contains information maintained by the Neighbor 1615 Unreachability Detection algorithm. A key piece of information is a 1616 neighbor's reachability state, which is one of five possible values. 1617 The following definitions are informal; precise definitions can be 1618 found in Section 7.3.2. 1620 INCOMPLETE Address resolution is in progress and the link-layer 1621 address of the neighbor has not yet been determined. 1623 REACHABLE Roughly speaking, the neighbor is known to have been 1624 reachable recently (within tens of seconds ago). 1626 STALE The neighbor is no longer known to be reachable but 1627 until traffic is sent to the neighbor, no attempt 1628 should be made to verify its reachability. 1630 DELAY The neighbor is no longer known to be reachable, and 1631 traffic has recently been sent to the neighbor. 1632 Rather than probe the neighbor immediately, however, 1633 delay sending probes for a short while in order to 1634 give upper layer protocols a chance to provide 1635 reachability confirmation. 1637 PROBE The neighbor is no longer known to be reachable, and 1638 unicast Neighbor Solicitation probes are being sent to 1639 verify reachability. 1641 5.2. Conceptual Sending Algorithm 1643 When sending a packet to a destination, a node uses a combination of 1644 the Destination Cache, the Prefix List, and the Default Router List 1645 to determine the IP address of the appropriate next hop, an operation 1646 known as "next-hop determination". Once the IP address of the next 1647 hop is known, the Neighbor Cache is consulted for link-layer 1648 information about that neighbor. 1650 Next-hop determination for a given unicast destination operates as 1651 follows. The sender performs a longest prefix match against the 1652 Prefix List to determine whether the packet's destination is on- or 1653 off-link. If the destination is on-link, the next-hop address is the 1654 same as the packet's destination address. Otherwise, the sender 1655 selects a router from the Default Router List (following the rules 1656 described in Section 6.3.6). 1658 For efficiency reasons, next-hop determination is not performed on 1659 every packet that is sent. Instead, the results of next-hop 1660 determination computations are saved in the Destination Cache (which 1661 also contains updates learned from Redirect messages). When the 1662 sending node has a packet to send, it first examines the Destination 1663 Cache. If no entry exists for the destination, next-hop 1664 determination is invoked to create a Destination Cache entry. 1666 Once the IP address of the next-hop node is known, the sender 1667 examines the Neighbor Cache for link-layer information about that 1668 neighbor. If no entry exists, the sender creates one, sets its state 1669 to INCOMPLETE, initiates Address Resolution, and then queues the data 1670 packet pending completion of address resolution. For multicast- 1671 capable interfaces Address Resolution consists of sending a Neighbor 1672 Solicitation message and waiting for a Neighbor Advertisement. When 1673 a Neighbor Advertisement response is received, the link-layer 1674 addresses is entered in the Neighbor Cache entry and the queued 1675 packet is transmitted. The address resolution mechanism is described 1676 in detail in Section 7.2. 1678 For multicast packets the next-hop is always the (multicast) 1679 destination address and is considered to be on-link. The procedure 1680 for determining the link-layer address corresponding to a given IP 1681 multicast address can be found in a separate document that covers 1682 operating IP over a particular link type (e.g., [IPv6-ETHER]). 1684 Each time a Neighbor Cache entry is accessed while transmitting a 1685 unicast packet, the sender checks Neighbor Unreachability Detection 1686 related information according to the Neighbor Unreachability 1687 Detection algorithm (Section 7.3). This unreachability check might 1688 result in the sender transmitting a unicast Neighbor Solicitation to 1689 verify that the neighbor is still reachable. 1691 Next-hop determination is done the first time traffic is sent to a 1692 destination. As long as subsequent communication to that destination 1693 proceeds successfully, the Destination Cache entry continues to be 1694 used. If at some point communication ceases to proceed, as 1695 determined by the Neighbor Unreachability Detection algorithm, next- 1696 hop determination may need to be performed again. For example, 1697 traffic through a failed router should be switched to a working 1698 router. Likewise, it may be possible to reroute traffic destined for 1699 a mobile node to a "mobility agent". 1701 Note that when a node redoes next-hop determination there is no need 1702 to discard the complete Destination Cache entry. In fact, it is 1703 generally beneficial to retain such cached information as the PMTU 1704 and round trip timer values that may also be kept in the Destination 1705 Cache entry. 1707 Routers and multihomed hosts have multiple interfaces. The remainder 1708 of this document assumes that all sent and received Neighbor 1709 Discovery messages refer to the interface of appropriate context. 1710 For example, when responding to a Router Solicitation, the 1711 corresponding Router Advertisement is sent out the interface on which 1712 the solicitation was received. 1714 5.3. Garbage Collection and Timeout Requirements 1716 The conceptual data structures described above use different 1717 mechanisms for discarding potentially stale or unused information. 1719 From the perspective of correctness there is no need to periodically 1720 purge Destination and Neighbor Cache entries. Although stale 1721 information can potentially remain in the cache indefinitely, the 1722 Neighbor Unreachability Detection algorithm ensures that stale 1723 information is purged quickly if it is actually being used. 1725 To limit the storage needed for the Destination and Neighbor Caches, 1726 a node may need to garbage-collect old entries. However, care must 1727 be taken to insure that sufficient space is always present to hold 1728 the working set of active entries. A small cache may result in an 1729 excessive number of Neighbor Discovery messages if entries are 1730 discarded and rebuilt in quick succession. Any LRU-based policy that 1731 only reclaims entries that have not been used in some time (e.g., ten 1732 minutes or more) should be adequate for garbage-collecting unused 1733 entries. 1735 A node should retain entries in the Default Router List and the 1736 Prefix List until their lifetimes expire. However, a node may 1737 garbage collect entries prematurely if it is low on memory. If not 1738 all routers are kept on the Default Router list, a node should retain 1739 at least two entries in the Default Router List (and preferably more) 1740 in order to maintain robust connectivity for off-link destinations. 1742 When removing an entry from the Prefix List there is no need to purge 1743 any entries from the Destination or Neighbor Caches. Neighbor 1744 Unreachability Detection will efficiently purge any entries in these 1745 caches that have become invalid. When removing an entry from the 1746 Default Router List, however, any entries in the Destination Cache 1747 that go through that router must perform next-hop determination again 1748 to select a new default router. 1750 6. ROUTER AND PREFIX DISCOVERY 1752 This section describes router and host behavior related to the Router 1753 Discovery portion of Neighbor Discovery. Router Discovery is used to 1754 locate neighboring routers as well as learn prefixes and 1755 configuration parameters related to address autoconfiguration. 1757 Prefix Discovery is the process through which hosts learn the ranges 1758 of IP addresses that reside on-link and can be reached directly 1759 without going through a router. Routers send Router Advertisements 1760 that indicate whether the sender is willing to be a default router. 1761 Router Advertisements also contain Prefix Information options that 1762 list the set of prefixes that identify on-link IP addresses. 1764 Stateless Address Autoconfiguration must also obtain subnet prefixes 1765 as part of configuring addresses. Although the prefixes used for 1766 address autoconfiguration are logically distinct from those used for 1767 on-link determination, autoconfiguration information is piggybacked 1768 on Router Discovery messages to reduce network traffic. Indeed, the 1769 same prefixes can be advertised for on-link determination and address 1770 autoconfiguration by specifying the appropriate flags in the Prefix 1771 Information options. See [ADDRCONF] for details on how 1772 autoconfiguration information is processed. 1774 6.1. Message Validation 1776 6.1.1. Validation of Router Solicitation Messages 1778 Hosts MUST silently discard any received Router Solicitation 1779 Messages. 1781 A router MUST silently discard any received Router Solicitation 1782 messages that do not satisfy all of the following validity checks: 1784 - The IP Hop Limit field has a value of 255, i.e., the packet 1785 could not possibly have been forwarded by a router. 1787 - ICMP Checksum is valid. 1789 - ICMP Code is 0. 1791 - ICMP length (derived from the IP length) is 8 or more octets. 1793 - All included options have a length that is greater than zero. 1795 - If the IP source address is the unspecified address, there is no 1796 source link-layer address option in the message. 1798 The contents of the Reserved field, and of any unrecognized options, 1799 MUST be ignored. Future, backward-compatible changes to the protocol 1800 may specify the contents of the Reserved field or add new options; 1801 backward-incompatible changes may use different Code values. 1803 The contents of any defined options that are not specified to be used 1804 with Router Solicitation messages MUST be ignored and the packet 1805 processed as normal. The only defined option that may appear is the 1806 Source Link-Layer Address option. 1808 A solicitation that passes the validity checks is called a "valid 1809 solicitation". 1811 6.1.2. Validation of Router Advertisement Messages 1813 A node MUST silently discard any received Router Advertisement 1814 messages that do not satisfy all of the following validity checks: 1816 - IP Source Address is a link-local address. Routers must use 1817 their link-local address as the source for Router Advertisement 1818 and Redirect messages so that hosts can uniquely identify 1819 routers. 1821 - The IP Hop Limit field has a value of 255, i.e., the packet 1822 could not possibly have been forwarded by a router. 1824 - ICMP Checksum is valid. 1826 - ICMP Code is 0. 1828 - ICMP length (derived from the IP length) is 16 or more octets. 1830 - All included options have a length that is greater than zero. 1832 The contents of the Reserved field, and of any unrecognized options, 1833 MUST be ignored. Future, backward-compatible changes to the protocol 1834 may specify the contents of the Reserved field or add new options; 1835 backward-incompatible changes may use different Code values. 1837 The contents of any defined options that are not specified to be used 1838 with Router Advertisement messages MUST be ignored and the packet 1839 processed as normal. The only defined options that may appear are 1840 the Source Link-Layer Address, Prefix Information and MTU options. 1842 An advertisement that passes the validity checks is called a "valid 1843 advertisement". 1845 6.2. Router Specification 1847 6.2.1. Router Configuration Variables 1849 A router MUST allow for the following conceptual variables to be 1850 configured by system management. The specific variable names are 1851 used for demonstration purposes only, and an implementation is not 1852 required to have them, so long as its external behavior is consistent 1853 with that described in this document. Default values are specified 1854 to simplify configuration in common cases. 1856 The default values for some of the variables listed below may be 1857 overridden by specific documents that describe how IPv6 operates over 1858 different link layers. This rule simplifies the configuration of 1859 Neighbor Discovery over link types with widely differing performance 1860 characteristics. 1862 For each interface: 1864 IsRouter A flag indicating whether routing is enabled on 1865 this interface. Enabling routing on the interface 1866 would imply that a router can forward packets 1867 to or from the interface. 1869 Default: FALSE 1871 AdvSendAdvertisements 1872 A flag indicating whether or not the router sends 1873 periodic Router Advertisements and responds to 1874 Router Solicitations. 1876 Default: FALSE 1878 Note that AdvSendAdvertisements MUST be FALSE by 1879 default so that a node will not accidentally start 1880 acting as a router unless it is explicitly 1881 configured by system management to send Router 1882 Advertisements. 1884 MaxRtrAdvInterval 1885 The maximum time allowed between sending 1886 unsolicited multicast Router Advertisements from 1887 the interface, in seconds. MUST be no less than 4 1888 seconds and no greater than 1800 seconds. 1890 Default: 600 seconds 1892 MinRtrAdvInterval 1893 The minimum time allowed between sending 1894 unsolicited multicast Router Advertisements from 1895 the interface, in seconds. MUST be no less than 3 1896 seconds and no greater than .75 *MaxRtrAdvInterval. 1898 Default: 0.33 * MaxRtrAdvInterval 1900 AdvManagedFlag 1901 The TRUE/FALSE value to be placed in the "Managed 1902 address configuration" flag field in the Router 1903 Advertisement. See [ADDRCONF]. 1905 Default: FALSE 1907 AdvOtherConfigFlag 1908 The TRUE/FALSE value to be placed in the "Other 1909 configuration" flag field in the Router 1910 Advertisement. See [ADDRCONF]. 1912 Default: FALSE 1914 AdvLinkMTU The value to be placed in MTU options sent by the 1915 router. A value of zero indicates that no MTU 1916 options are sent. 1918 Default: 0 1920 AdvReachableTime 1921 The value to be placed in the Reachable Time field 1922 in the Router Advertisement messages sent by the 1923 router. The value zero means unspecified (by this 1924 router). MUST be no greater than 3,600,000 1925 milliseconds (1 hour). 1927 Default: 0 1929 AdvRetransTimer The value to be placed in the Retrans Timer field 1930 in the Router Advertisement messages sent by the 1931 router. The value zero means unspecified (by this 1932 router). 1934 Default: 0 1936 AdvCurHopLimit 1937 The default value to be placed in the Cur Hop Limit 1938 field in the Router Advertisement messages sent by 1939 the router. The value should be set to that 1940 current diameter of the Internet. The value zero 1941 means unspecified (by this router). 1943 Default: The value specified in the "Assigned 1944 Numbers" RFC [ASSIGNED] that was in effect at the 1945 time of implementation. 1947 AdvDefaultLifetime 1948 The value to be placed in the Router Lifetime field 1949 of Router Advertisements sent from the interface, 1950 in seconds. MUST be either zero or between 1951 MaxRtrAdvInterval and 9000 seconds. A value of 1952 zero indicates that the router is not to be used as 1953 a default router. 1955 Default: 3 * MaxRtrAdvInterval 1957 AdvPrefixList 1958 A list of prefixes to be placed in Prefix 1959 Information options in Router Advertisement 1960 messages sent from the interface. 1962 Default: all prefixes that the router advertises 1963 via routing protocols as being on-link for the 1964 interface from which the advertisement is sent. 1965 The link-local prefix SHOULD NOT be included in the 1966 list of advertised prefixes. 1968 Each prefix has an associated: 1970 AdvValidLifetime 1971 The value to be placed in the Valid 1972 Lifetime in the Prefix Information 1973 option, in seconds. The designated value 1974 of all 1's (0xffffffff) represents 1975 infinity. Implementations MAY allow 1976 AdvValidLifetime to be specified in two 1977 ways: 1979 - a time that decrements in real time, 1980 that is, one that will result in a 1981 Lifetime of zero at the specified 1982 time in the future, or 1984 - a fixed time that stays the same in 1985 consecutive advertisements. 1987 Default: 2592000 seconds (30 days), fixed 1988 (i.e., stays the same in consecutive 1989 advertisements). 1991 AdvOnLinkFlag 1992 The value to be placed in the on-link 1993 flag ("L-bit") field in the Prefix 1994 Information option. 1996 Default: TRUE 1998 Automatic address configuration [ADDRCONF] 1999 defines additional information associated with 2000 each the prefixes: 2002 AdvPreferredLifetime 2003 The value to be placed in the Preferred 2004 Lifetime in the Prefix Information 2005 option, in seconds. The designated value 2006 of all 1's (0xffffffff) represents 2007 infinity. See [ADDRCONF] for details on 2008 how this value is used. Implementations 2009 MAY allow AdvPreferredLifetime to be 2010 specified in two ways: 2012 - a time that decrements in real time, 2013 that is, one that will result in a 2014 Lifetime of zero at a specified time 2015 in the future, or 2017 - a fixed time that stays the same in 2018 consecutive advertisements. 2020 Default: 604800 seconds (7 days), fixed 2021 (i.e., stays the same in consecutive 2022 advertisements). This value MUST NOT be 2023 larger than AdvValidLifetime. 2025 AdvAutonomousFlag 2026 The value to be placed in the Autonomous 2027 Flag field in the Prefix Information 2028 option. See [ADDRCONF]. 2030 Default: TRUE 2032 The above variables contain information that is placed in outgoing 2033 Router Advertisement messages. Hosts use the received information to 2034 initialize a set of analogous variables that control their external 2035 behavior (see Section 6.3.2). Some of these host variables (e.g., 2036 CurHopLimit, RetransTimer, and ReachableTime) apply to all nodes 2037 including routers. In practice, these variables may not actually be 2038 present on routers, since their contents can be derived from the 2039 variables described above. However, external router behavior MUST be 2040 the same as host behavior with respect to these variables. In 2041 particular, this includes the occasional randomization of the 2042 ReachableTime value as described in Section 6.3.2. 2044 Protocol constants are defined in Section 10. 2046 6.2.2. Becoming An Advertising Interface 2048 The term "advertising interface" refers to any functioning and 2049 enabled interface that has at least one unicast IP address 2050 assigned to it and whose corresponding AdvSendAdvertisements flag is 2051 TRUE. A router MUST NOT send Router Advertisements out any interface 2052 that is not an advertising interface. 2054 An interface may become an advertising interface at times other than 2055 system startup. For example: 2057 - changing the AdvSendAdvertisements flag on an enabled interface 2058 from FALSE to TRUE, or 2060 - administratively enabling the interface, if it had been 2061 administratively disabled, and its AdvSendAdvertisements flag is 2062 TRUE, or 2064 - enabling IP forwarding capability (i.e., changing the system 2065 from being a host to being a router), when the interface's 2066 AdvSendAdvertisements flag is TRUE. 2068 A router MUST join the all-routers multicast address on an 2069 advertising interface. Routers respond to Router Solicitations sent 2070 to the all-routers address and verify the consistency of Router 2071 Advertisements sent by neighboring routers. 2073 6.2.3. Router Advertisement Message Content 2075 A router sends periodic as well as solicited Router Advertisements 2076 out its advertising interfaces. Outgoing Router Advertisements are 2077 filled with the following values consistent with the message format 2078 given in Section 4.2: 2080 - In the Router Lifetime field: the interface's configured 2081 AdvDefaultLifetime. 2083 - In the M and O flags: the interface's configured AdvManagedFlag 2084 and AdvOtherConfigFlag, respectively. 2086 - In the Cur Hop Limit field: the interface's configured 2087 CurHopLimit. 2089 - In the Reachable Time field: the interface's configured 2090 AdvReachableTime. 2092 - In the Retrans Timer field: the interface's configured 2093 AdvRetransTimer. 2095 - In the options: 2097 o Source Link-Layer Address option: link-layer address of the 2098 sending interface. This option MAY be omitted to 2099 facilitate in-bound load balancing over replicated 2100 interfaces. 2102 o MTU option: the interface's configured AdvLinkMTU value if 2103 the value is non-zero. If AdvLinkMTU is zero the MTU 2104 option is not sent. 2106 o Prefix Information options: one Prefix Information option 2107 for each prefix listed in AdvPrefixList with the option 2108 fields set from the information in the AdvPrefixList entry 2109 as follows: 2111 - In the "on-link" flag: the entry's AdvOnLinkFlag. 2113 - In the Valid Lifetime field: the entry's 2114 AdvValidLifetime. 2116 - In the "Autonomous address configuration" flag: the 2117 entry's AdvAutonomousFlag. 2119 - In the Preferred Lifetime field: the entry's 2120 AdvPreferredLifetime. 2122 A router might want to send Router Advertisements without advertising 2123 itself as a default router. For instance, a router might advertise 2124 prefixes for address autoconfiguration while not wishing to forward 2125 packets. Such a router sets the Router Lifetime field in outgoing 2126 advertisements to zero. 2128 A router MAY choose not to include some or all options when sending 2129 unsolicited Router Advertisements. For example, if prefix lifetimes 2130 are much longer than AdvDefaultLifetime, including them every few 2131 advertisements may be sufficient. However, when responding to a 2132 Router Solicitation or while sending the first few initial 2133 unsolicited advertisements, a router SHOULD include all options so 2134 that all information (e.g., prefixes) is propagated quickly during 2135 system initialization. 2137 If including all options causes the size of an advertisement to 2138 exceed the link MTU, multiple advertisements can be sent, each 2139 containing a subset of the options. 2141 6.2.4. Sending Unsolicited Router Advertisements 2143 A host MUST NOT send Router Advertisement messages at any time. 2145 Unsolicited Router Advertisements are not strictly periodic: the 2146 interval between subsequent transmissions is randomized to reduce the 2147 probability of synchronization with the advertisements from other 2148 routers on the same link [SYNC]. Each advertising interface has its 2149 own timer. Whenever a multicast advertisement is sent from an 2150 interface, the timer is reset to a uniformly-distributed random value 2151 between the interface's configured MinRtrAdvInterval and 2152 MaxRtrAdvInterval; expiration of the timer causes the next 2153 advertisement to be sent and a new random value to be chosen. 2155 For the first few advertisements (up to 2156 MAX_INITIAL_RTR_ADVERTISEMENTS) sent from an interface when it 2157 becomes an advertising interface, if the randomly chosen interval is 2158 greater than MAX_INITIAL_RTR_ADVERT_INTERVAL, the timer SHOULD be set 2159 to MAX_INITIAL_RTR_ADVERT_INTERVAL instead. Using a smaller interval 2160 for the initial advertisements increases the likelihood of a router 2161 being discovered quickly when it first becomes available, in the 2162 presence of possible packet loss. 2164 The information contained in Router Advertisements may change through 2165 actions of system management. For instance, the lifetime of 2166 advertised prefixes may change, new prefixes could be added, a router 2167 could cease to be a router (i.e., switch from being a router to being 2168 a host), etc. In such cases, the router MAY transmit up to 2169 MAX_INITIAL_RTR_ADVERTISEMENTS unsolicited advertisements, using the 2170 same rules as when an interface becomes an advertising interface. 2172 6.2.5. Ceasing To Be An Advertising Interface 2174 An interface may cease to be an advertising interface, through 2175 actions of system management such as: 2177 - changing the AdvSendAdvertisements flag of an enabled interface 2178 from TRUE to FALSE, or 2180 - administratively disabling the interface, or 2182 - shutting down the system. 2184 In such cases the router SHOULD transmit one or more (but not more 2185 than MAX_FINAL_RTR_ADVERTISEMENTS) final multicast Router 2186 Advertisements on the interface with a Router Lifetime field of zero. 2187 In the case of a router becoming a host, the system SHOULD also 2188 depart from the all-routers IP multicast group on all interfaces on 2189 which the router supports IP multicast (whether or not they had been 2190 advertising interfaces). In addition, the host MUST insure that 2191 subsequent Neighbor Advertisement messages sent from the interface 2192 have the Router flag set to zero. 2194 Note that system management may disable a router's IP forwarding 2195 capability (i.e., changing the system from being a router to being a 2196 host), a step that does not necessarily imply that the router's 2197 interfaces stop being advertising interfaces. In such cases, 2198 subsequent Router Advertisements MUST set the Router Lifetime field 2199 to zero. 2201 6.2.6. Processing Router Solicitations 2203 A host MUST silently discard any received Router Solicitation 2204 messages. 2206 In addition to sending periodic, unsolicited advertisements, a router 2207 sends advertisements in response to valid solicitations received on 2208 an advertising interface. A router MAY choose to unicast the 2209 response directly to the soliciting host's address (if the 2210 solicitation's source address is not the unspecified address), but 2211 the usual case is to multicast the response to the all-nodes group. 2212 In the latter case, the interface's interval timer is reset to a new 2213 random value, as if an unsolicited advertisement had just been sent 2214 (see Section 6.2.4). 2216 In all cases, Router Advertisements sent in response to a Router 2217 Solicitation MUST be delayed by a random time between 0 and 2218 MAX_RA_DELAY_TIME seconds. (If a single advertisement is sent in 2219 response to multiple solicitations, the delay is relative to the 2220 first solicitation.) In addition, consecutive Router Advertisements 2221 sent to the all-nodes multicast address MUST be rate limited to no 2222 more than one advertisement every MIN_DELAY_BETWEEN_RAS seconds. 2224 A router might process Router Solicitations as follows: 2226 - Upon receipt of a Router Solicitation, compute a random delay 2227 within the range 0 through MAX_RA_DELAY_TIME. If the computed 2228 value corresponds to a time later than the time the next multicast 2229 Router Advertisement is scheduled to be sent, ignore the random 2230 delay and send the advertisement at the already-scheduled time. 2232 - If the router sent a multicast Router Advertisement (solicited or 2233 unsolicited) within the last MIN_DELAY_BETWEEN_RAS seconds, 2234 schedule the advertisement to be sent at a time corresponding to 2235 MIN_DELAY_BETWEEN_RAS plus the random value after the previous 2236 advertisement was sent. This ensures that the multicast Router 2237 Advertisements are rate limited. 2239 - Otherwise, schedule the sending of a Router Advertisement at the 2240 time given by the random value. 2242 Note that a router is permitted to send multicast Router 2243 Advertisements more frequently than indicated by the 2244 MinRtrAdvInterval configuration variable so long as the more frequent 2245 advertisements are responses to Router Solicitations. In all cases, 2246 however, unsolicited multicast advertisements MUST NOT be sent more 2247 frequently than indicated by MinRtrAdvInterval. 2249 Router Solicitations in which the Source Address is the unspecified 2250 address MUST NOT update the router's Neighbor Cache; solicitations 2251 with a proper source address update the Neighbor Cache as follows. If 2252 the router already has a Neighbor Cache entry for the solicitation's 2253 sender, the solicitation contains a Source Link-Layer Address option, 2254 and the received link-layer address differs from that already in the 2255 cache, the link-layer address SHOULD be updated in the appropriate 2256 Neighbor Cache entry, and its reachability state MUST also be set to 2257 STALE. If there is no existing Neighbor Cache entry for the 2258 solicitation's sender, the router creates one, installs the link- 2259 layer address and sets its reachability state to STALE as specified 2260 in Section 7.3.3. If there is no existing Neighbor Cache entry and no 2261 Source Link-Layer Address option was present in the solicitation, the 2262 router may respond with either a multicast or a unicast router 2263 advertisement. Whether or not a Source Link-Layer Address option 2264 is provided, if a Neighbor Cache entry for the solicitation's sender 2265 exists (or is created) the entry's IsRouter flag MUST be set to 2266 FALSE. 2268 6.2.7. Router Advertisement Consistency 2270 Routers SHOULD inspect valid Router Advertisements sent by other 2271 routers and verify that the routers are advertising consistent 2272 information on a link. Detected inconsistencies indicate that one or 2273 more routers might be misconfigured and SHOULD be logged to system or 2274 network management. The minimum set of information to check 2275 includes: 2277 - Cur Hop Limit values (except for the unspecified value of zero 2278 other inconsistencies SHOULD be logged to system network 2279 management). 2280 - Values of the M or O flags. 2282 - Reachable Time values (except for the unspecified value of zero). 2284 - Retrans Timer values (except for the unspecified value of zero). 2286 - Values in the MTU options. 2288 - Preferred and Valid Lifetimes for the same prefix. If 2289 AdvPreferredLifetime and/or AdvValidLifetime decrement in real 2290 time as specified in section 6.2.1 then the comparison of the 2291 lifetimes can not compare the content of the fields in the Router 2292 Advertisement but must instead compare the time at which the 2293 prefix will become deprecated and invalidated, respectively. Due 2294 to link propagation delays and potentially poorly synchronized 2295 clocks between the routers such comparison SHOULD allow some time 2296 skew. 2298 Note that it is not an error for different routers to advertise 2299 different sets of prefixes. Also, some routers might leave some 2300 fields as unspecified, i.e., with the value zero, while other routers 2301 specify values. The logging of errors SHOULD be restricted to 2302 conflicting information that causes hosts to switch from one value to 2303 another with each received advertisement. 2305 Any other action on reception of Router Advertisement messages by a 2306 router is beyond the scope of this document. 2308 6.2.8. Link-local Address Change 2310 The link-local address on a router should rarely change, if ever. 2311 Nodes receiving Neighbor Discovery messages use the source address to 2312 identify the sender. If multiple packets from the same router 2313 contain different source addresses, nodes will assume they come from 2314 different routers, leading to undesirable behavior. For example, a 2315 node will ignore Redirect messages that are believed to have been 2316 sent by a router other than the current first-hop router. Thus the 2317 source address used in Router Advertisements sent by a particular 2318 router must be identical to the target address in a Redirect message 2319 when redirecting to that router. 2321 Using the link-local address to uniquely identify routers on the link 2322 has the benefit that the address a router is known by should not 2323 change when a site renumbers. 2325 If a router changes the link-local address for one of its interfaces, 2326 it SHOULD inform hosts of this change. The router SHOULD multicast a 2327 few Router Advertisements from the old link-local address with the 2328 Router Lifetime field set to zero and also multicast a few Router 2329 Advertisements from the new link-local address. The overall effect 2330 should be the same as if one interface ceases being an advertising 2331 interface, and a different one starts being an advertising interface. 2333 6.3. Host Specification 2335 6.3.1. Host Configuration Variables 2337 None. 2339 6.3.2. Host Variables 2341 A host maintains certain Neighbor Discovery related variables in 2342 addition to the data structures defined in Section 5.1. The specific 2343 variable names are used for demonstration purposes only, and an 2344 implementation is not required to have them, so long as its external 2345 behavior is consistent with that described in this document. 2347 These variables have default values that are overridden by 2348 information received in Router Advertisement messages. The default 2349 values are used when there is no router on the link or when all 2350 received Router Advertisements have left a particular value 2351 unspecified. 2353 The default values in this specification may be overridden by 2354 specific documents that describe how IP operates over different link 2355 layers. This rule allows Neighbor Discovery to operate over links 2356 with widely varying performance characteristics. 2358 For each interface: 2360 LinkMTU The MTU of the link. 2361 Default: The valued defined in the specific 2362 document that describes how IPv6 operates over 2363 the particular link layer (e.g., [IPv6-ETHER]). 2365 CurHopLimit The default hop limit to be used when sending 2366 (unicast) IP packets. 2368 Default: The value specified in the "Assigned 2369 Numbers" RFC [ASSIGNED] that was in effect at the 2370 time of implementation. 2372 BaseReachableTime 2373 A base value used for computing the random 2374 ReachableTime value. 2376 Default: REACHABLE_TIME milliseconds. 2378 ReachableTime The time a neighbor is considered reachable after 2379 receiving a reachability confirmation. 2381 This value should be a uniformly-distributed 2382 random value between MIN_RANDOM_FACTOR and 2383 MAX_RANDOM_FACTOR times BaseReachableTime 2384 milliseconds. A new random value should be 2385 calculated when BaseReachableTime changes (due to 2386 Router Advertisements) or at least every few 2387 hours even if no Router Advertisements are 2388 received. 2390 RetransTimer The time between retransmissions of Neighbor 2391 Solicitation messages to a neighbor when 2392 resolving the address or when probing the 2393 reachability of a neighbor. 2395 Default: RETRANS_TIMER milliseconds 2397 6.3.3. Interface Initialization 2399 The host joins the all-nodes multicast address on all multicast- 2400 capable interfaces. 2402 6.3.4. Processing Received Router Advertisements 2404 When multiple routers are present, the information advertised 2405 collectively by all routers may be a superset of the information 2406 contained in a single Router Advertisement. Moreover, information 2407 may also be obtained through other dynamic means like DHCPv6. Hosts 2408 accept the union of all received information; the receipt of a Router 2409 Advertisement MUST NOT invalidate all information received in a 2410 previous advertisement or from another source. However, when 2411 received information for a specific parameter (e.g., Link MTU) or 2412 option (e.g., Lifetime on a specific Prefix) differs from information 2413 received earlier, and the parameter/option can only have one value, 2414 the most recently-received information is considered authoritative. 2416 Some Router Advertisement fields (e.g., Cur Hop Limit, Reachable Time 2417 and Retrans Timer) may contain a value denoting unspecified. In such 2418 cases, the parameter should be ignored and the host should continue 2419 using whatever value it is already using. In particular, a host MUST 2420 NOT interpret the unspecified value as meaning change back to the 2421 default value that was in use before the first Router Advertisement 2422 was received. This rule prevents hosts from continually changing an 2423 internal variable when one router advertises a specific value, but 2424 other routers advertise the unspecified value. 2426 On receipt of a valid Router Advertisement, a host extracts the 2427 source address of the packet and does the following: 2429 - If the address is not already present in the host's Default 2430 Router List, and the advertisement's Router Lifetime is non- 2431 zero, create a new entry in the list, and initialize its 2432 invalidation timer value from the advertisement's Router 2433 Lifetime field. 2435 - If the address is already present in the host's Default Router 2436 List as a result of a previously-received advertisement, reset 2437 its invalidation timer to the Router Lifetime value in the 2438 newly-received advertisement. 2440 - If the address is already present in the host's Default Router 2441 List and the received Router Lifetime value is zero, immediately 2442 time-out the entry as specified in Section 6.3.5. 2444 To limit the storage needed for the Default Router List, a host MAY 2445 choose not to store all of the router addresses discovered via 2446 advertisements. However, a host MUST retain at least two router 2447 addresses and SHOULD retain more. Default router selections are made 2448 whenever communication to a destination appears to be failing. Thus, 2449 the more routers on the list, the more likely an alternative working 2450 router can be found quickly (e.g., without having to wait for the 2451 next advertisement to arrive). 2453 If the received Cur Hop Limit value is non-zero the host SHOULD set 2454 its CurHopLimit variable to the received value. 2456 If the received Reachable Time value is non-zero the host SHOULD set 2457 its BaseReachableTime variable to the received value. If the new 2458 value differs from the previous value, the host SHOULD recompute a 2459 new random ReachableTime value. ReachableTime is computed as a 2460 uniformly-distributed random value between MIN_RANDOM_FACTOR and 2461 MAX_RANDOM_FACTOR times the BaseReachableTime. Using a random 2462 component eliminates the possibility Neighbor Unreachability 2463 Detection messages synchronize with each other. 2465 In most cases, the advertised Reachable Time value will be the same 2466 in consecutive Router Advertisements and a host's BaseReachableTime 2467 rarely changes. In such cases, an implementation SHOULD insure that 2468 a new random value gets recomputed at least once every few hours. 2470 The RetransTimer variable SHOULD be copied from the Retrans Timer 2471 field, if the received value is non-zero. 2473 After extracting information from the fixed part of the Router 2474 Advertisement message, the advertisement is scanned for valid 2475 options. If the advertisement contains a Source Link-Layer Address 2476 option the link-layer address SHOULD be recorded in the Neighbor 2477 Cache entry for the router (creating an entry if necessary) and the 2478 IsRouter flag in the Neighbor Cache entry MUST be set to TRUE. If no 2479 Source Link-Layer Address is included, but a corresponding Neighbor 2480 Cache entry exists, its IsRouter flag MUST be set to TRUE. The 2481 IsRouter flag is used by Neighbor Unreachability Detection to 2482 determine when a router changes to being a host (i.e., no longer 2483 capable of forwarding packets). If a Neighbor Cache entry is created 2484 for the router its reachability state MUST be set to STALE as 2485 specified in Section 7.3.3. If a cache entry already exists and is 2486 updated with a different link-layer address the reachability state 2487 MUST also be set to STALE. 2489 If the MTU option is present, hosts SHOULD copy the option's value 2490 into LinkMTU so long as the value is greater than or equal to the 2491 minimum link MTU [IPv6] and does not exceed the maximum LinkMTU value 2492 specified in the link type specific document (e.g., [IPv6-ETHER]). 2494 Prefix Information options that have the "on-link" (L) flag set 2495 indicate a prefix identifying a range of addresses that should be 2496 considered on-link. Note, however, that a Prefix Information option 2497 with the on-link flag set to zero conveys no information concerning 2498 on-link determination and MUST NOT be interpreted to mean that 2499 addresses covered by the prefix are off-link. The only way to cancel 2500 a previous on-link indication is to advertise that prefix with the 2501 L-bit set and the Lifetime set to zero. The default behavior (see 2502 Section 5.2) when sending a packet to an address for which no 2503 information is known about the on-link status of the address is to 2504 forward the packet to a default router; the reception of a Prefix 2505 Information option with the "on-link " (L) flag set to zero does not 2506 change this behavior. The reasons for an address being treated as 2507 on-link is specified in the definition of "on-link" in Section 2.1. 2508 Prefixes with the on-link flag set to zero would normally have the 2509 autonomous flag set and be used by [ADDRCONF]. 2511 For each Prefix Information option with the on-link flag set, a host 2512 does the following: 2514 - If the prefix is the link-local prefix, silently ignore the 2515 Prefix Information option. 2517 - If the prefix is not already present in the Prefix List, and the 2518 Prefix Information option's Valid Lifetime field is non-zero, 2519 create a new entry for the prefix and initialize its 2520 invalidation timer to the Valid Lifetime value in the Prefix 2521 Information option. 2523 - If the prefix is already present in the host's Prefix List as 2524 the result of a previously-received advertisement, reset its 2525 invalidation timer to the Valid Lifetime value in the Prefix 2526 Information option. If the new Lifetime value is zero, time-out 2527 the prefix immediately (see Section 6.3.5). 2529 - If the Prefix Information option's Valid Lifetime field is zero, 2530 and the prefix is not present in the host's Prefix List, 2531 silently ignore the option. 2533 Stateless address autoconfiguration [ADDRCONF] may in some 2534 circumstances use a larger Valid Lifetime of a prefix or ignore it 2535 completely in order to prevent a particular denial of service attack. 2536 However, since the effect of the same denial of service targeted at 2537 the on-link prefix list is not catastrophic (hosts would send packets 2538 to a default router and receive a redirect rather than sending 2539 packets directly to a neighbor) the Neighbor Discovery protocol does 2540 not impose such a check on the prefix lifetime values. Similarly, 2541 [ADDRCONF] may impose certain restrictions on the prefix length for 2542 address configuration purposes. Therefore, the prefix might be 2543 rejected by [ADDRCONF] implementation in the host. However, the 2544 prefix length is still valid for on-link determination when combined 2545 with other flags in the prefix option. 2547 Note: Implementations can choose to process the on-link aspects of 2548 the prefixes separately from the address autoconfiguration aspects 2549 of the prefixes by, e.g., passing a copy of each valid Router 2550 Advertisement message to both an "on-link" and an "addrconf" 2551 function. Each function can then operate independently on the 2552 prefixes that have the appropriate flag set. 2554 6.3.5. Timing out Prefixes and Default Routers 2556 Whenever the invalidation timer expires for a Prefix List entry, that 2557 entry is discarded. No existing Destination Cache entries need be 2558 updated, however. Should a reachability problem arise with an 2559 existing Neighbor Cache entry, Neighbor Unreachability Detection will 2560 perform any needed recovery. 2562 Whenever the Lifetime of an entry in the Default Router List expires, 2563 that entry is discarded. When removing a router from the Default 2564 Router list, the node MUST update the Destination Cache in such a way 2565 that all entries using the router perform next-hop determination 2566 again rather than continue sending traffic to the (deleted) router. 2568 6.3.6. Default Router Selection 2570 The algorithm for selecting a router depends in part on whether or 2571 not a router is known to be reachable. The exact details of how a 2572 node keeps track of a neighbor's reachability state are covered in 2573 Section 7.3. The algorithm for selecting a default router is invoked 2574 during next-hop determination when no Destination Cache entry exists 2575 for an off-link destination or when communication through an existing 2576 router appears to be failing. Under normal conditions, a router 2577 would be selected the first time traffic is sent to a destination, 2578 with subsequent traffic for that destination using the same router as 2579 indicated in the Destination Cache modulo any changes to the 2580 Destination Cache caused by Redirect messages. 2582 The policy for selecting routers from the Default Router List is as 2583 follows: 2585 1) Routers that are reachable or probably reachable (i.e., in any 2586 state other than INCOMPLETE) SHOULD be preferred over routers 2587 whose reachability is unknown or suspect (i.e., in the 2588 INCOMPLETE state, or for which no Neighbor Cache entry exists). 2589 Further implementation hints on default router selection when 2590 multiple equivalent routers are available are discussed in 2591 [LD-SHRE]. 2593 2) When no routers on the list are known to be reachable or 2594 probably reachable, routers SHOULD be selected in a round-robin 2595 fashion, so that subsequent requests for a default router do not 2596 return the same router until all other routers have been 2597 selected. 2599 Cycling through the router list in this case ensures that all 2600 available routers are actively probed by the Neighbor 2601 Unreachability Detection algorithm. A request for a default 2602 router is made in conjunction with the sending of a packet to a 2603 router, and the selected router will be probed for reachability 2604 as a side effect. 2606 6.3.7. Sending Router Solicitations 2608 When an interface becomes enabled, a host may be unwilling to wait 2609 for the next unsolicited Router Advertisement to locate default 2610 routers or learn prefixes. To obtain Router Advertisements quickly, 2611 a host SHOULD transmit up to MAX_RTR_SOLICITATIONS Router 2612 Solicitation messages each separated by at least 2613 RTR_SOLICITATION_INTERVAL seconds. Router Solicitations may be sent 2614 after any of the following events: 2616 - The interface is initialized at system startup time. 2618 - The interface is reinitialized after a temporary interface 2619 failure or after being temporarily disabled by system 2620 management. 2622 - The system changes from being a router to being a host, by 2623 having its IP forwarding capability turned off by system 2624 management. 2626 - The host attaches to a link for the first time. 2628 - The host re-attaches to a link after being detached for some 2629 time. 2631 A host sends Router Solicitations to the All-Routers multicast 2632 address. The IP source address is set to either one of the 2633 interface's unicast addresses or the unspecified address. The Source 2634 Link-Layer Address option SHOULD be set to the host's link-layer 2635 address, if the IP source address is not the unspecified address. 2637 Before a host sends an initial solicitation, it SHOULD delay the 2638 transmission for a random amount of time between 0 and 2639 MAX_RTR_SOLICITATION_DELAY. This serves to alleviate congestion when 2640 many hosts start up on a link at the same time, such as might happen 2641 after recovery from a power failure. If a host has already performed 2642 a random delay since the interface became (re)enabled (e.g., as part 2643 of Duplicate Address Detection [ADDRCONF]) there is no need to delay 2644 again before sending the first Router Solicitation message. 2646 In some cases, the random delay MAY be omitted if necessary. For 2647 instance, a mobile node, using [MIPv6], moving to a new link would 2648 need to discover such movement as soon as possible to minimize the 2649 amount of packet losses resulting from the change in its topological 2650 movement. Router Solicitations provide a useful tool for movement 2651 detection in Mobile IPv6 as they allow mobile nodes to determine 2652 movement to new links. Hence, if a mobile node received link layer 2653 information indicating that movement might have taken place, it MAY 2654 send a Router Solicitation immediately, without random delays. The 2655 strength of such indications should be assessed by the mobile node's 2656 implementation depending on the level of certainty of the link layer 2657 hints and is outside the scope of this specification. Note that using 2658 this mechanism inappropriately (e.g. based on weak or transient 2659 indications) may result in Router Solicitation storms. Furthermore, 2660 simultaneous mobility of a large number of mobile nodes that use this 2661 mechanism can result in a large number of solicitations sent 2662 simultaneously. 2664 Once the host sends a Router Solicitation, and receives a valid 2665 Router Advertisement with a non-zero Router Lifetime, the host MUST 2666 desist from sending additional solicitations on that interface, until 2667 the next time one of the above events occurs. Moreover, a host 2668 SHOULD send at least one solicitation in the case where an 2669 advertisement is received prior to having sent a solicitation. 2670 Unsolicited Router Advertisements may be incomplete (see Section 2671 6.2.3); solicited advertisements are expected to contain complete 2672 information. 2674 If a host sends MAX_RTR_SOLICITATIONS solicitations, and receives no 2675 Router Advertisements after having waited MAX_RTR_SOLICITATION_DELAY 2676 seconds after sending the last solicitation, the host concludes that 2677 there are no routers on the link for the purpose of [ADDRCONF]. 2678 However, the host continues to receive and process Router 2679 Advertisements messages in the event that routers appear on the link. 2681 7. ADDRESS RESOLUTION AND NEIGHBOR UNREACHABILITY DETECTION 2683 This section describes the functions related to Neighbor Solicitation 2684 and Neighbor Advertisement messages and includes descriptions of 2685 address resolution and the Neighbor Unreachability Detection 2686 algorithm. 2688 Neighbor Solicitation and Advertisement messages are also used for 2689 Duplicate Address Detection as specified by [ADDRCONF]. In 2690 particular, Duplicate Address Detection sends Neighbor Solicitation 2691 messages with an unspecified source address targeting its own 2692 "tentative" address. Such messages trigger nodes already using the 2693 address to respond with a multicast Neighbor Advertisement indicating 2694 that the address is in use. 2696 7.1. Message Validation 2698 7.1.1. Validation of Neighbor Solicitations 2700 A node MUST silently discard any received Neighbor Solicitation 2701 messages that do not satisfy all of the following validity checks: 2703 - The IP Hop Limit field has a value of 255, i.e., the packet 2704 could not possibly have been forwarded by a router. 2706 - ICMP Checksum is valid. 2708 - ICMP Code is 0. 2710 - ICMP length (derived from the IP length) is 24 or more octets. 2712 - Target Address is not a multicast address. 2714 - All included options have a length that is greater than zero. 2716 - If the IP source address is the unspecified address, the IP 2717 destination address is a solicited-node multicast address. 2719 - If the IP source address is the unspecified address, there is no 2720 source link-layer address option in the message. 2722 The contents of the Reserved field, and of any unrecognized options, 2723 MUST be ignored. Future, backward-compatible changes to the protocol 2724 may specify the contents of the Reserved field or add new options; 2725 backward-incompatible changes may use different Code values. 2727 The contents of any defined options that are not specified to be used 2728 with Neighbor Solicitation messages MUST be ignored and the packet 2729 processed as normal. The only defined option that may appear is the 2730 Source Link-Layer Address option. 2732 A Neighbor Solicitation that passes the validity checks is called a 2733 "valid solicitation". 2735 7.1.2. Validation of Neighbor Advertisements 2737 A node MUST silently discard any received Neighbor Advertisement 2738 messages that do not satisfy all of the following validity checks: 2740 - The IP Hop Limit field has a value of 255, i.e., the packet 2741 could not possibly have been forwarded by a router. 2743 - ICMP Checksum is valid. 2745 - ICMP Code is 0. 2747 - ICMP length (derived from the IP length) is 24 or more octets. 2749 - Target Address is not a multicast address. 2751 - If the IP Destination Address is a multicast address the 2752 Solicited flag is zero. 2754 - All included options have a length that is greater than zero. 2756 The contents of the Reserved field, and of any unrecognized options, 2757 MUST be ignored. Future, backward-compatible changes to the protocol 2758 may specify the contents of the Reserved field or add new options; 2759 backward-incompatible changes may use different Code values. 2761 The contents of any defined options that are not specified to be used 2762 with Neighbor Advertisement messages MUST be ignored and the packet 2763 processed as normal. The only defined option that may appear is the 2764 Target Link-Layer Address option. 2766 A Neighbor Advertisements that passes the validity checks is called a 2767 "valid advertisement". 2769 7.2. Address Resolution 2771 Address resolution is the process through which a node determines the 2772 link-layer address of a neighbor given only its IP address. Address 2773 resolution is performed only on addresses that are determined to be 2774 on-link and for which the sender does not know the corresponding 2775 link-layer address (see section 5.2). Address resolution is never 2776 performed on multicast addresses. 2778 It is possible that a host may receive a solicitation, a router 2779 advertisement, or a Redirect message without a link-layer address 2780 option included. These messages MUST NOT create or update neighbor 2781 cache entries, except with respect to the IsRouter flag as specified 2782 in sections 6.3.4 and 7.2.5. If a neighbor cache entry does not exist 2783 for the source of such a message, Address Resolution will be required 2784 before unicast communications with that address to begin. This is 2785 particularly relevant for unicast responses to solicitations where an 2786 additional packet exchange is required for advertisement delivery. 2788 7.2.1. Interface Initialization 2790 When a multicast-capable interface becomes enabled the node MUST join 2791 the all-nodes multicast address on that interface, as well as the 2792 solicited-node multicast address corresponding to each of the IP 2793 addresses assigned to the interface. 2795 The set of addresses assigned to an interface may change over time. 2796 New addresses might be added and old addresses might be removed 2797 [ADDRCONF]. In such cases the node MUST join and leave the 2798 solicited-node multicast address corresponding to the new and old 2799 addresses, respectively. Joining the solicited-node multicast address 2800 SHOULD be done using the Multicast Listener Discovery [MLD] or 2801 [MLDv2] protocols. Note that multiple unicast addresses may map into 2802 the same solicited-node multicast address; a node MUST NOT leave the 2803 solicited-node multicast group until all assigned addresses 2804 corresponding to that multicast address have been removed. 2806 7.2.2. Sending Neighbor Solicitations 2808 When a node has a unicast packet to send to a neighbor, but does not 2809 know the neighbor's link-layer address, it performs address 2810 resolution. For multicast-capable interfaces this entails creating a 2811 Neighbor Cache entry in the INCOMPLETE state and transmitting a 2812 Neighbor Solicitation message targeted at the neighbor. The 2813 solicitation is sent to the solicited-node multicast address 2814 corresponding to the target address. 2816 If the source address of the packet prompting the solicitation is the 2817 same as one of the addresses assigned to the outgoing interface, that 2818 address SHOULD be placed in the IP Source Address of the outgoing 2819 solicitation. Otherwise, any one of the addresses assigned to the 2820 interface should be used. Using the prompting packet's source 2821 address when possible ensures that the recipient of the Neighbor 2822 Solicitation installs in its Neighbor Cache the IP address that is 2823 highly likely to be used in subsequent return traffic belonging to 2824 the prompting packet's "connection". 2826 If the solicitation is being sent to a solicited-node multicast 2827 address, the sender MUST include its link-layer address (if it has 2828 one) as a Source Link-Layer Address option. Otherwise, the sender 2829 SHOULD include its link-layer address (if it has one) as a Source 2830 Link-Layer Address option. Including the source link-layer address 2831 in a multicast solicitation is required to give the target an address 2832 to which it can send the Neighbor Advertisement. On unicast 2833 solicitations, an implementation MAY omit the Source Link-Layer 2834 Address option. The assumption here is that if the sender has a 2835 peer's link-layer address in its cache, there is a high probability 2836 that the peer will also have an entry in its cache for the sender. 2837 Consequently, it need not be sent. 2839 While waiting for address resolution to complete, the sender MUST, 2840 for each neighbor, retain a small queue of packets waiting for 2841 address resolution to complete. The queue MUST hold at least one 2842 packet, and MAY contain more. However, the number of queued packets 2843 per neighbor SHOULD be limited to some small value. When a queue 2844 overflows, the new arrival SHOULD replace the oldest entry. Once 2845 address resolution completes, the node transmits any queued packets. 2847 While awaiting a response, the sender SHOULD retransmit Neighbor 2848 Solicitation messages approximately every RetransTimer milliseconds, 2849 even in the absence of additional traffic to the neighbor. 2850 Retransmissions MUST be rate-limited to at most one solicitation per 2851 neighbor every RetransTimer milliseconds. 2853 If no Neighbor Advertisement is received after MAX_MULTICAST_SOLICIT 2854 solicitations, address resolution has failed. The sender MUST return 2855 ICMP destination unreachable indications with code 3 (Address 2856 Unreachable) for each packet queued awaiting address resolution. 2858 7.2.3. Receipt of Neighbor Solicitations 2860 A valid Neighbor Solicitation that does not meet any of the following 2861 requirements MUST be silently discarded: 2863 - The Target Address is a "valid" unicast or anycast address 2864 assigned to the receiving interface [ADDRCONF], 2866 - The Target Address is a unicast or anycast address for which the 2867 node is offering proxy service, or 2869 - The Target Address is a "tentative" address on which Duplicate 2870 Address Detection is being performed [ADDRCONF]. 2872 If the Target Address is tentative, the Neighbor Solicitation should 2873 be processed as described in [ADDRCONF]. Otherwise, the following 2874 description applies. If the Source Address is not the unspecified 2875 address and, on link layers that have addresses, the solicitation 2876 includes a Source Link-Layer Address option, then the recipient 2877 SHOULD create or update the Neighbor Cache entry for the IP Source 2878 Address of the solicitation. If an entry does not already exist, the 2879 node SHOULD create a new one and set its reachability state to STALE 2880 as specified in Section 7.3.3. If an entry already exists, and the 2881 cached link-layer address differs from the one in the received Source 2882 Link-Layer option, the cached address should be replaced by the 2883 received address and the entry's reachability state MUST be set to 2884 STALE. 2886 If a Neighbor Cache entry is created the IsRouter flag SHOULD be set 2887 to FALSE. This will be the case even if the Neighbor Solicitation is 2888 sent by a router since the Neighbor Solicitation messages do not 2889 contain an indication of whether or not the sender is a router. In 2890 the event that the sender is a router, subsequent Neighbor 2891 Advertisement or Router Advertisement messages will set the correct 2892 IsRouter value. If a Neighbor Cache entry already exists its 2893 IsRouter flag MUST NOT be modified. 2895 If the Source Address is the unspecified address the node MUST NOT 2896 create or update the Neighbor Cache entry. 2898 After any updates to the Neighbor Cache, the node sends a Neighbor 2899 Advertisement response as described in the next section. 2901 7.2.4. Sending Solicited Neighbor Advertisements 2903 A node sends a Neighbor Advertisement in response to a valid Neighbor 2904 Solicitation targeting one of the node's assigned addresses. The 2905 Target Address of the advertisement is copied from the Target Address 2906 of the solicitation. If the solicitation's IP Destination Address is 2907 not a multicast address, the Target Link-Layer Address option MAY be 2908 omitted; the neighboring node's cached value must already be current 2909 in order for the solicitation to have been received. If the 2910 solicitation's IP Destination Address is a multicast address, the 2911 Target Link-Layer option MUST be included in the advertisement. 2912 Furthermore, if the node is a router, it MUST set the Router flag to 2913 one; otherwise it MUST set the flag to zero. 2915 If the Target Address is either an anycast address or a unicast 2916 address for which the node is providing proxy service, or the Target 2917 Link-Layer Address option is not included, the Override flag SHOULD 2918 be set to zero. Otherwise, the Override flag SHOULD be set to one. 2919 Proper setting of the Override flag ensures that nodes give 2920 preference to non-proxy advertisements, even when received after 2921 proxy advertisements, and also ensures that the first advertisement 2922 for an anycast address "wins". 2924 If the source of the solicitation is the unspecified address, the 2925 node MUST set the Solicited flag to zero and multicast the 2926 advertisement to the all-nodes address. Otherwise, the node MUST set 2927 the Solicited flag to one and unicast the advertisement to the Source 2928 Address of the solicitation. 2930 If the Target Address is an anycast address the sender SHOULD delay 2931 sending a response for a random time between 0 and 2932 MAX_ANYCAST_DELAY_TIME seconds. 2934 Because unicast Neighbor Solicitations are not required to include a 2935 Source Link-Layer Address, it is possible that a node sending a 2936 solicited Neighbor Advertisement does not have a corresponding link- 2937 layer address for its neighbor in its Neighbor Cache. In such 2938 situations, a node will first have to use Neighbor Discovery to 2939 determine the link-layer address of its neighbor (i.e., send out a 2940 multicast Neighbor Solicitation). 2942 7.2.5. Receipt of Neighbor Advertisements 2944 When a valid Neighbor Advertisement is received (either solicited or 2945 unsolicited), the Neighbor Cache is searched for the target's entry. 2946 If no entry exists, the advertisement SHOULD be silently discarded. 2947 There is no need to create an entry if none exists, since the 2948 recipient has apparently not initiated any communication with the 2949 target. 2951 Once the appropriate Neighbor Cache entry has been located, the 2952 specific actions taken depend on the state of the Neighbor Cache 2953 entry, the flags in the advertisement and the actual link-layer 2954 address supplied. 2956 If the target's Neighbor Cache entry is in the INCOMPLETE state when 2957 the advertisement is received, one of two things happens. If the 2958 link layer has addresses and no Target Link-Layer address option is 2959 included, the receiving node SHOULD silently discard the received 2960 advertisement. Otherwise, the receiving node performs the following 2961 steps: 2963 - It records the link-layer address in the Neighbor Cache entry. 2965 - If the advertisement's Solicited flag is set, the state of the 2966 entry is set to REACHABLE, otherwise it is set to STALE. 2968 - It sets the IsRouter flag in the cache entry based on the Router 2969 flag in the received advertisement. 2971 - It sends any packets queued for the neighbor awaiting address 2972 resolution. 2974 Note that the Override flag is ignored if the entry is in the 2975 INCOMPLETE state. 2977 If the target's Neighbor Cache entry is in any state other than 2978 INCOMPLETE when the advertisement is received, the following actions 2979 take place: 2981 I. If the Override flag is clear and the supplied link-layer address 2982 differs from that in the cache, then one of two actions takes 2983 place: 2984 a. If the state of the entry is REACHABLE, set it to STALE, but 2985 do not update the entry in any other way. 2986 b. Otherwise, the received advertisement should be ignored and 2987 MUST NOT update the cache. 2989 II. If the Override flag is set, or the supplied link-layer address 2990 is the same as that in the cache, or no Target Link-layer address 2991 option was supplied, the received advertisement MUST update the 2992 Neighbor Cache entry as follows: 2994 - The link-layer address in the Target Link-Layer Address option 2995 MUST be inserted in the cache (if one is supplied and is 2996 Different than the already recorded address). 2998 - If the Solicited flag is set, the state of the entry MUST be 2999 set to REACHABLE. If the Solicited flag is zero and the link 3000 layer address was updated with a different address the state 3001 MUST be set to STALE. Otherwise, the entry's state remains 3002 unchanged. 3004 An advertisement's Solicited flag should only be set if the 3005 advertisement is a response to a Neighbor Solicitation. 3006 Because Neighbor Unreachability Detection Solicitations are 3007 sent to the cached link-layer address, receipt of a solicited 3008 advertisement indicates that the forward path is working. 3009 Receipt of an unsolicited advertisement, however, suggests that 3010 a neighbor has urgent information to announce (e.g., a changed 3011 link-layer address). If the urgent information indicates a 3012 change from what a node is currently using, the node should 3013 verify the reachability of the (new) path when it sends the 3014 next packet. There is no need to update the state for 3015 unsolicited advertisements that do not change the contents of 3016 the cache. 3018 - The IsRouter flag in the cache entry MUST be set based on the 3019 Router flag in the received advertisement. In those cases 3020 where the IsRouter flag changes from TRUE to FALSE as a result 3021 of this update, the node MUST remove that router from the 3022 Default Router List and update the Destination Cache entries 3023 for all destinations using that neighbor as a router as 3024 specified in Section 7.3.3. This is needed to detect when a 3025 node that is used as a router stops forwarding packets due to 3026 being configured as a host. 3028 The above rules ensure that the cache is updated either when the 3029 Neighbor Advertisement takes precedence (i.e., the Override flag is 3030 set) or when the Neighbor Advertisement refers to the same link-layer 3031 address that is currently recorded in the cache. If none of the 3032 above apply, the advertisement prompts future Neighbor Unreachability 3033 Detection (if it is not already in progress) by changing the state in 3034 the cache entry. 3036 7.2.6. Sending Unsolicited Neighbor Advertisements 3038 In some cases a node may be able to determine that its link-layer 3039 address has changed (e.g., hot-swap of an interface card) and may 3040 wish to inform its neighbors of the new link-layer address quickly. 3041 In such cases a node MAY send up to MAX_NEIGHBOR_ADVERTISEMENT 3042 unsolicited Neighbor Advertisement messages to the all-nodes 3043 multicast address. These advertisements MUST be separated by at 3044 least RetransTimer seconds. 3046 The Target Address field in the unsolicited advertisement is set to 3047 an IP address of the interface, and the Target Link-Layer Address 3048 option is filled with the new link-layer address. The Solicited flag 3049 MUST be set to zero, in order to avoid confusing the Neighbor 3050 Unreachability Detection algorithm. If the node is a router, it MUST 3051 set the Router flag to one; otherwise it MUST set it to zero. The 3052 Override flag MAY be set to either zero or one. In either case, 3053 neighboring nodes will immediately change the state of their Neighbor 3054 Cache entries for the Target Address to STALE, prompting them to 3055 verify the path for reachability. If the Override flag is set to 3056 one, neighboring nodes will install the new link-layer address in 3057 their caches. Otherwise, they will ignore the new link-layer 3058 address, choosing instead to probe the cached address. 3060 A node that has multiple IP addresses assigned to an interface MAY 3061 multicast a separate Neighbor Advertisement for each address. In 3062 such a case the node SHOULD introduce a small delay between the 3063 sending of each advertisement to reduce the probability of the 3064 advertisements being lost due to congestion. 3066 A proxy MAY multicast Neighbor Advertisements when its link-layer 3067 address changes or when it is configured (by system management or 3068 other mechanisms) to proxy for an address. If there are multiple 3069 nodes that are providing proxy services for the same set of addresses 3070 the proxies SHOULD provide a mechanism that prevents multiple proxies 3071 from multicasting advertisements for any one address, in order to 3072 reduce the risk of excessive multicast traffic. This is a requirement 3073 on other protocols that need to use proxies for Neighbor 3074 Advertisements. An example of a node that performs proxy 3075 advertisements is the Home Agent specified in [MIPv6]. 3077 Also, a node belonging to an anycast address MAY multicast 3078 unsolicited Neighbor Advertisements for the anycast address when the 3079 node's link-layer address changes. 3081 Note that because unsolicited Neighbor Advertisements do not reliably 3082 update caches in all nodes (the advertisements might not be received 3083 by all nodes), they should only be viewed as a performance 3084 optimization to quickly update the caches in most neighbors. The 3085 Neighbor Unreachability Detection algorithm ensures that all nodes 3086 obtain a reachable link-layer address, though the delay may be 3087 slightly longer. 3089 7.2.7. Anycast Neighbor Advertisements 3091 From the perspective of Neighbor Discovery, anycast addresses are 3092 treated just like unicast addresses in most cases. Because an 3093 anycast address is syntactically the same as a unicast address, nodes 3094 performing address resolution or Neighbor Unreachability Detection on 3095 an anycast address treat it as if it were a unicast address. No 3096 special processing takes place. 3098 Nodes that have an anycast address assigned to an interface treat 3099 them exactly the same as if they were unicast addresses with two 3100 exceptions. First, Neighbor Advertisements sent in response to a 3101 Neighbor Solicitation SHOULD be delayed by a random time between 0 3102 and MAX_ANYCAST_DELAY_TIME to reduce the probability of network 3103 congestion. Second, the Override flag in Neighbor Advertisements 3104 SHOULD be set to 0, so that when multiple advertisements are 3105 received, the first received advertisement is used rather than the 3106 most recently received advertisement. 3108 As with unicast addresses, Neighbor Unreachability Detection ensures 3109 that a node quickly detects when the current binding for an anycast 3110 address becomes invalid. 3112 7.2.8. Proxy Neighbor Advertisements 3114 Under limited circumstances, a router MAY proxy for one or more other 3115 nodes, that is, through Neighbor Advertisements indicate that it is 3116 willing to accept packets not explicitly addressed to itself. For 3117 example, a router might accept packets on behalf of a mobile node 3118 that has moved off-link. The mechanisms used by proxy are identical 3119 to the mechanisms used with anycast addresses. 3121 A proxy MUST join the solicited-node multicast address(es) that 3122 correspond to the IP address(es) assigned to the node for which it is 3123 proxying. This SHOULD be done using [MLD] or [MLDv2]. 3125 All solicited proxy Neighbor Advertisement messages MUST have the 3126 Override flag set to zero. This ensures that if the node itself is 3127 present on the link its Neighbor Advertisement (with the Override 3128 flag set to one) will take precedence of any advertisement received 3129 from a proxy. A proxy MAY send unsolicited advertisements with the 3130 Override flag set to one as specified in Section 7.2.6, but doing so 3131 may cause the proxy advertisement to override a valid entry created 3132 by the node itself. 3134 Finally, when sending a proxy advertisement in response to a Neighbor 3135 Solicitation, the sender should delay its response by a random time 3136 between 0 and MAX_ANYCAST_DELAY_TIME seconds. 3138 7.3. Neighbor Unreachability Detection 3140 Communication to or through a neighbor may fail for numerous reasons 3141 at any time, including hardware failure, hot-swap of an interface 3142 card, etc. If the destination has failed, no recovery is possible 3143 and communication fails. On the other hand, if it is the path that 3144 has failed, recovery may be possible. Thus, a node actively tracks 3145 the reachability "state" for the neighbors to which it is sending 3146 packets. 3148 Neighbor Unreachability Detection is used for all paths between hosts 3149 and neighboring nodes, including host-to-host, host-to-router, and 3150 router-to-host communication. Neighbor Unreachability Detection may 3151 also be used between routers, but is not required if an equivalent 3152 mechanism is available, for example, as part of the routing 3153 protocols. 3155 When a path to a neighbor appears to be failing, the specific 3156 recovery procedure depends on how the neighbor is being used. If the 3157 neighbor is the ultimate destination, for example, address resolution 3158 should be performed again. If the neighbor is a router, however, 3159 attempting to switch to another router would be appropriate. The 3160 specific recovery that takes place is covered under next-hop 3161 determination; Neighbor Unreachability Detection signals the need for 3162 next-hop determination by deleting a Neighbor Cache entry. 3164 Neighbor Unreachability Detection is performed only for neighbors to 3165 which unicast packets are sent; it is not used when sending to 3166 multicast addresses. 3168 7.3.1. Reachability Confirmation 3170 A neighbor is considered reachable if the node has recently received 3171 a confirmation that packets sent recently to the neighbor were 3172 received by its IP layer. Positive confirmation can be gathered in 3173 two ways: hints from upper layer protocols that indicate a connection 3174 is making "forward progress", or receipt of a Neighbor Advertisement 3175 message that is a response to a Neighbor Solicitation message. 3177 A connection makes "forward progress" if the packets received from a 3178 remote peer can only be arriving if recent packets sent to that peer 3179 are actually reaching it. In TCP, for example, receipt of a (new) 3180 acknowledgement indicates that previously sent data reached the peer. 3181 Likewise, the arrival of new (non-duplicate) data indicates that 3182 earlier acknowledgements are being delivered to the remote peer. If 3183 packets are reaching the peer, they must also be reaching the 3184 sender's next-hop neighbor; thus "forward progress" is a confirmation 3185 that the next-hop neighbor is reachable. For off-link destinations, 3186 forward progress implies that the first-hop router is reachable. 3187 When available, this upper-layer information SHOULD be used. 3189 In some cases (e.g., UDP-based protocols and routers forwarding 3190 packets to hosts) such reachability information may not be readily 3191 available from upper-layer protocols. When no hints are available 3192 and a node is sending packets to a neighbor, the node actively probes 3193 the neighbor using unicast Neighbor Solicitation messages to verify 3194 that the forward path is still working. 3196 The receipt of a solicited Neighbor Advertisement serves as 3197 reachability confirmation, since advertisements with the Solicited 3198 flag set to one are sent only in response to a Neighbor Solicitation. 3199 Receipt of other Neighbor Discovery messages such as Router 3200 Advertisements and Neighbor Advertisement with the Solicited flag set 3201 to zero MUST NOT be treated as a reachability confirmation. Receipt 3202 of unsolicited messages only confirms the one-way path from the 3203 sender to the recipient node. In contrast, Neighbor Unreachability 3204 Detection requires that a node keep track of the reachability of the 3205 forward path to a neighbor from the its perspective, not the 3206 neighbor's perspective. Note that receipt of a solicited 3207 advertisement indicates that a path is working in both directions. 3208 The solicitation must have reached the neighbor, prompting it to 3209 generate an advertisement. Likewise, receipt of an advertisement 3210 indicates that the path from the sender to the recipient is working. 3211 However, the latter fact is known only to the recipient; the 3212 advertisement's sender has no direct way of knowing that the 3213 advertisement it sent actually reached a neighbor. From the 3214 perspective of Neighbor Unreachability Detection, only the 3215 reachability of the forward path is of interest. 3217 7.3.2. Neighbor Cache Entry States 3219 A Neighbor Cache entry can be in one of five states: 3221 INCOMPLETE Address resolution is being performed on the entry. 3222 Specifically, a Neighbor Solicitation has been sent to 3223 the solicited-node multicast address of the target, 3224 but the corresponding Neighbor Advertisement has not 3225 yet been received. 3227 REACHABLE Positive confirmation was received within the last 3228 ReachableTime milliseconds that the forward path to 3229 the neighbor was functioning properly. While 3230 REACHABLE, no special action takes place as packets 3231 are sent. 3233 STALE More than ReachableTime milliseconds have elapsed 3234 since the last positive confirmation was received that 3235 the forward path was functioning properly. While 3236 stale, no action takes place until a packet is sent. 3238 The STALE state is entered upon receiving an 3239 unsolicited Neighbor Discovery message that updates 3240 the cached link-layer address. Receipt of such a 3241 message does not confirm reachability, and entering 3242 the STALE state insures reachability is verified 3243 quickly if the entry is actually being used. However, 3244 reachability is not actually verified until the entry 3245 is actually used. 3247 DELAY More than ReachableTime milliseconds have elapsed 3248 since the last positive confirmation was received that 3249 the forward path was functioning properly, and a 3250 packet was sent within the last DELAY_FIRST_PROBE_TIME 3251 seconds. If no reachability confirmation is received 3252 within DELAY_FIRST_PROBE_TIME seconds of entering the 3253 DELAY state, send a Neighbor Solicitation and change 3254 the state to PROBE. 3256 The DELAY state is an optimization that gives upper- 3257 layer protocols additional time to provide 3258 reachability confirmation in those cases where 3259 ReachableTime milliseconds have passed since the last 3260 confirmation due to lack of recent traffic. Without 3261 this optimization the opening of a TCP connection 3262 after a traffic lull would initiate probes even though 3263 the subsequent three-way handshake would provide a 3264 reachability confirmation almost immediately. 3266 PROBE A reachability confirmation is actively sought by 3267 retransmitting Neighbor Solicitations every 3268 RetransTimer milliseconds until a reachability 3269 confirmation is received. 3271 7.3.3. Node Behavior 3273 Neighbor Unreachability Detection operates in parallel with the 3274 sending of packets to a neighbor. While reasserting a neighbor's 3275 reachability, a node continues sending packets to that neighbor using 3276 the cached link-layer address. If no traffic is sent to a neighbor, 3277 no probes are sent. 3279 When a node needs to perform address resolution on a neighboring 3280 address, it creates an entry in the INCOMPLETE state and initiates 3281 address resolution as specified in Section 7.2. If address 3282 resolution fails, the entry SHOULD be deleted, so that subsequent 3283 traffic to that neighbor invokes the next-hop determination procedure 3284 again. Invoking next-hop determination at this point insures that 3285 alternate default routers are tried. 3287 When a reachability confirmation is received (either through upper- 3288 layer advice or a solicited Neighbor Advertisement) an entry's state 3289 changes to REACHABLE. The one exception is that upper-layer advice 3290 has no effect on entries in the INCOMPLETE state (e.g., for which no 3291 link-layer address is cached). 3293 When ReachableTime milliseconds have passed since receipt of the last 3294 reachability confirmation for a neighbor, the Neighbor Cache entry's 3295 state changes from REACHABLE to STALE. 3297 Note: An implementation may actually defer changing the state from 3298 REACHABLE to STALE until a packet is sent to the neighbor, i.e., 3299 there need not be an explicit timeout event associated with the 3300 expiration of ReachableTime. 3302 The first time a node sends a packet to a neighbor whose entry is 3303 STALE, the sender changes the state to DELAY and a sets a timer to 3304 expire in DELAY_FIRST_PROBE_TIME seconds. If the entry is still in 3305 the DELAY state when the timer expires, the entry's state changes to 3306 PROBE. If reachability confirmation is received, the entry's state 3307 changes to REACHABLE. 3309 Upon entering the PROBE state, a node sends a unicast Neighbor 3310 Solicitation message to the neighbor using the cached link-layer 3311 address. While in the PROBE state, a node retransmits Neighbor 3312 Solicitation messages every RetransTimer milliseconds until 3313 reachability confirmation is obtained. Probes are retransmitted even 3314 if no additional packets are sent to the neighbor. If no response is 3315 received after waiting RetransTimer milliseconds after sending the 3316 MAX_UNICAST_SOLICIT solicitations, retransmissions cease and the 3317 entry SHOULD be deleted. Subsequent traffic to that neighbor will 3318 recreate the entry and performs address resolution again. 3320 Note that all Neighbor Solicitations are rate-limited on a per- 3321 neighbor basis. A node MUST NOT send Neighbor Solicitations to the 3322 same neighbor more frequently than once every RetransTimer 3323 milliseconds. 3325 A Neighbor Cache entry enters the STALE state when created as a 3326 result of receiving packets other than solicited Neighbor 3327 Advertisements (i.e., Router Solicitations, Router Advertisements, 3328 Redirects, and Neighbor Solicitations). These packets contain the 3329 link-layer address of either the sender or, in the case of Redirect, 3330 the redirection target. However, receipt of these link-layer 3331 addresses does not confirm reachability of the forward-direction path 3332 to that node. Placing a newly created Neighbor Cache entry for which 3333 the link-layer address is known in the STALE state provides assurance 3334 that path failures are detected quickly. In addition, should a 3335 cached link-layer address be modified due to receiving one of the 3336 above messages the state SHOULD also be set to STALE to provide 3337 prompt verification that the path to the new link-layer address is 3338 working. 3340 To properly detect the case where a router switches from being a 3341 router to being a host (e.g., if its IP forwarding capability is 3342 turned off by system management), a node MUST compare the Router flag 3343 field in all received Neighbor Advertisement messages with the 3344 IsRouter flag recorded in the Neighbor Cache entry. When a node 3345 detects that a neighbor has changed from being a router to being a 3346 host, the node MUST remove that router from the Default Router List 3347 and update the Destination Cache as described in Section 6.3.5. Note 3348 that a router may not be listed in the Default Router List, even 3349 though a Destination Cache entry is using it (e.g., a host was 3350 redirected to it). In such cases, all Destination Cache entries that 3351 reference the (former) router must perform next-hop determination 3352 again before using the entry. 3354 In some cases, link-specific information may indicate that a path to 3355 a neighbor has failed (e.g., the resetting of a virtual circuit). In 3356 such cases, link-specific information may be used to purge Neighbor 3357 Cache entries before the Neighbor Unreachability Detection would do 3358 so. However, link-specific information MUST NOT be used to confirm 3359 the reachability of a neighbor; such information does not provide 3360 end-to-end confirmation between neighboring IP layers. 3362 8. REDIRECT FUNCTION 3364 This section describes the functions related to the sending and 3365 processing of Redirect messages. 3367 Redirect messages are sent by routers to redirect a host to a better 3368 first-hop router for a specific destination or to inform hosts that a 3369 destination is in fact a neighbor (i.e., on-link). The latter is 3370 accomplished by having the ICMP Target Address be equal to the ICMP 3371 Destination Address. 3373 A router MUST be able to determine the link-local address for each of 3374 its neighboring routers in order to ensure that the target address in 3375 a Redirect message identifies the neighbor router by its link-local 3376 address. For static routing this requirement implies that the next- 3377 hop router's address should be specified using the link-local address 3378 of the router. For dynamic routing this requirement implies that all 3379 IPv6 routing protocols must somehow exchange the link-local addresses 3380 of neighboring routers. 3382 8.1. Validation of Redirect Messages 3384 A host MUST silently discard any received Redirect message that does 3385 not satisfy all of the following validity checks: 3387 - IP Source Address is a link-local address. Routers must use 3388 their link-local address as the source for Router Advertisement 3389 and Redirect messages so that hosts can uniquely identify 3390 routers. 3392 - The IP Hop Limit field has a value of 255, i.e., the packet 3393 could not possibly have been forwarded by a router. 3395 - ICMP Checksum is valid. 3397 - ICMP Code is 0. 3399 - ICMP length (derived from the IP length) is 40 or more octets. 3401 - The IP source address of the Redirect is the same as the current 3402 first-hop router for the specified ICMP Destination Address. 3404 - The ICMP Destination Address field in the redirect message does 3405 not contain a multicast address. 3407 - The ICMP Target Address is either a link-local address (when 3408 redirected to a router) or the same as the ICMP Destination 3409 Address (when redirected to the on-link destination). 3411 - All included options have a length that is greater than zero. 3413 The contents of the Reserved field, and of any unrecognized options 3414 MUST be ignored. Future, backward-compatible changes to the protocol 3415 may specify the contents of the Reserved field or add new options; 3416 backward-incompatible changes may use different Code values. 3418 The contents of any defined options that are not specified to be used 3419 with Redirect messages MUST be ignored and the packet processed as 3420 normal. The only defined options that may appear are the Target 3421 Link-Layer Address option and the Redirected Header option. 3423 A host MUST NOT consider a redirect invalid just because the Target 3424 Address of the redirect is not covered under one of the link's 3425 prefixes. Part of the semantics of the Redirect message is that the 3426 Target Address is on-link. 3428 A redirect that passes the validity checks is called a "valid 3429 redirect". 3431 8.2. Router Specification 3433 A router SHOULD send a redirect message, subject to rate limiting, 3434 whenever it forwards a packet that is not explicitly addressed to 3435 itself (i.e. a packet that is not source routed through the router) 3436 in which: 3438 - the Source Address field of the packet identifies a neighbor, 3439 and 3441 - the router determines (by means outside the scope of this 3442 specification) that a better first-hop node resides on 3443 the same link as the sending node for the Destination Address of 3444 the packet being forwarded, and 3446 - the Destination Address of the packet is not a multicast 3447 address 3449 The transmitted redirect packet contains, consistent with the message 3450 format given in Section 4.5: 3452 - In the Target Address field: the address to which subsequent 3453 packets for the destination SHOULD be sent. If the target is a 3454 router, that router's link-local address MUST be used. If the 3455 target is a host the target address field MUST be set to the 3456 same value as the Destination Address field. 3458 - In the Destination Address field: the destination address of the 3459 invoking IP packet. 3461 - In the options: 3463 o Target Link-Layer Address option: link-layer address of the 3464 target, if known. 3466 o Redirected Header: as much of the forwarded packet as can 3467 fit without the redirect packet exceeding the minimum MTU 3468 required to support IPv6 as specified in [IPv6]. 3470 A router MUST limit the rate at which Redirect messages are sent, in 3471 order to limit the bandwidth and processing costs incurred by the 3472 Redirect messages when the source does not correctly respond to the 3473 Redirects, or the source chooses to ignore unauthenticated Redirect 3474 messages. More details on the rate-limiting of ICMP error messages 3475 can be found in [ICMPv6]. 3477 A router MUST NOT update its routing tables upon receipt of a 3478 Redirect. 3480 8.3. Host Specification 3482 A host receiving a valid redirect SHOULD update its Destination Cache 3483 accordingly so that subsequent traffic goes to the specified target. 3484 If no Destination Cache entry exists for the destination, an 3485 implementation SHOULD create such an entry. 3487 If the redirect contains a Target Link-Layer Address option the host 3488 either creates or updates the Neighbor Cache entry for the target. 3490 In both cases the cached link-layer address is copied from the Target 3491 Link-Layer Address option. If a Neighbor Cache entry is created for 3492 the target its reachability state MUST be set to STALE as specified 3493 in Section 7.3.3. If a cache entry already existed and it is updated 3494 with a different link-layer address, its reachability state MUST also 3495 be set to STALE. If the link-layer address is the same as that 3496 already in the cache, the cache entry's state remains unchanged. 3498 If the Target and Destination Addresses are the same, the host MUST 3499 treat the Target as on-link. If the Target Address is not the same 3500 as the Destination Address, the host MUST set IsRouter to TRUE for 3501 the target. If the Target and Destination Addresses are the same, 3502 however, one cannot reliably determine whether the Target Address is 3503 a router. Consequently, newly created Neighbor Cache entries should 3504 set the IsRouter flag to FALSE, while existing cache entries should 3505 leave the flag unchanged. If the Target is a router, subsequent 3506 Neighbor Advertisement or Router Advertisement messages will update 3507 IsRouter accordingly. 3509 Redirect messages apply to all flows that are being sent to a given 3510 destination. That is, upon receipt of a Redirect for a Destination 3511 Address, all Destination Cache entries to that address should be 3512 updated to use the specified next-hop, regardless of the contents of 3513 the Flow Label field that appears in the Redirected Header option. 3515 A host MUST NOT send Redirect messages. 3517 9. EXTENSIBILITY - OPTION PROCESSING 3519 Options provide a mechanism for encoding variable length fields, 3520 fields that may appear multiple times in the same packet, or 3521 information that may not appear in all packets. Options can also be 3522 used to add additional functionality to future versions of ND. 3524 In order to ensure that future extensions properly coexist with 3525 current implementations, all nodes MUST silently ignore any options 3526 they do not recognize in received ND packets and continue processing 3527 the packet. All options specified in this document MUST be 3528 recognized. A node MUST NOT ignore valid options just because the ND 3529 message contains unrecognized ones. 3531 The current set of options is defined in such a way that receivers 3532 can process multiple options in the same packet independently of each 3533 other. In order to maintain these properties future options SHOULD 3534 follow the simple rule: 3536 The option MUST NOT depend on the presence or absence of any 3537 other options. The semantics of an option should depend only on 3538 the information in the fixed part of the ND packet and on the 3539 information contained in the option itself. 3541 Adhering to the above rule has the following benefits: 3543 1) Receivers can process options independently of one another. For 3544 example, an implementation can choose to process the Prefix 3545 Information option contained in a Router Advertisement message 3546 in a user-space process while the link-layer address option in 3547 the same message is processed by routines in the kernel. 3549 2) Should the number of options cause a packet to exceed a link's 3550 MTU, multiple packets can carry subsets of the options without 3551 any change in semantics. 3553 3) Senders MAY send a subset of options in different packets. For 3554 instance, if a prefix's Valid and Preferred Lifetime are high 3555 enough, it might not be necessary to include the Prefix 3556 Information option in every Router Advertisement. In addition, 3557 different routers might send different sets of options. Thus, a 3558 receiver MUST NOT associate any action with the absence of an 3559 option in a particular packet. This protocol specifies that 3560 receivers should only act on the expiration of timers and on the 3561 information that is received in the packets. 3563 Options in Neighbor Discovery packets can appear in any order; 3564 receivers MUST be prepared to process them independently of their 3565 order. There can also be multiple instances of the same option in a 3566 message (e.g., Prefix Information options). 3568 If the number of included options in a Router Advertisement causes 3569 the advertisement's size to exceed the link MTU, the router can send 3570 multiple separate advertisements each containing a subset of the 3571 options. 3573 The amount of data to include in the Redirected Header option MUST be 3574 limited so that the entire redirect packet does not exceed the 3575 minimum MTU required to support IPv6 as specified in [IPv6]. 3577 All options are a multiple of 8 octets of length, ensuring 3578 appropriate alignment without any "pad" options. The fields in the 3579 options (as well as the fields in ND packets) are defined to align on 3580 their natural boundaries (e.g., a 16-bit field is aligned on a 16-bit 3581 boundary) with the exception of the 128-bit IP addresses/prefixes, 3582 which are aligned on a 64-bit boundary. The link-layer address field 3583 contains an uninterpreted octet string; it is aligned on an 8-bit 3584 boundary. 3586 The size of an ND packet including the IP header is limited to the 3587 link MTU. When adding options to an ND packet a node MUST NOT exceed 3588 the link MTU. 3590 Future versions of this protocol may define new option types. 3591 Receivers MUST silently ignore any options they do not recognize and 3592 continue processing the message. 3594 10. PROTOCOL CONSTANTS 3596 Router constants: 3598 MAX_INITIAL_RTR_ADVERT_INTERVAL 16 seconds 3600 MAX_INITIAL_RTR_ADVERTISEMENTS 3 transmissions 3602 MAX_FINAL_RTR_ADVERTISEMENTS 3 transmissions 3604 MIN_DELAY_BETWEEN_RAS 3 seconds 3606 MAX_RA_DELAY_TIME .5 seconds 3608 Host constants: 3610 MAX_RTR_SOLICITATION_DELAY 1 second 3612 RTR_SOLICITATION_INTERVAL 4 seconds 3614 MAX_RTR_SOLICITATIONS 3 transmissions 3616 Node constants: 3618 MAX_MULTICAST_SOLICIT 3 transmissions 3620 MAX_UNICAST_SOLICIT 3 transmissions 3622 MAX_ANYCAST_DELAY_TIME 1 second 3624 MAX_NEIGHBOR_ADVERTISEMENT 3 transmissions 3626 REACHABLE_TIME 30,000 milliseconds 3628 RETRANS_TIMER 1,000 milliseconds 3630 DELAY_FIRST_PROBE_TIME 5 seconds 3632 MIN_RANDOM_FACTOR .5 3634 MAX_RANDOM_FACTOR 1.5 3636 Additional protocol constants are defined with the message formats in 3637 Section 4. 3639 All protocol constants are subject to change in future revisions of 3640 the protocol. 3642 The constants in this specification may be overridden by specific 3643 documents that describe how IPv6 operates over different link layers. 3644 This rule allows Neighbor Discovery to operate over links with widely 3645 varying performance characteristics. 3647 11. SECURITY CONSIDERATIONS 3649 Neighbor Discovery is subject to attacks that cause IP packets to 3650 flow to unexpected places. Such attacks can be used to cause denial 3651 of service but also allow nodes to intercept and optionally modify 3652 packets destined for other nodes. This section deals with the main 3653 threats related to Neighbor Discovery messages and possible security 3654 mechanisms that can mitigate these threats. 3656 11.1 Threat analysis 3658 This section discusses the main threats associated with Neighbor 3659 Discovery. A more detailed analysis can be found in [PSREQ]. The main 3660 vulnerabilities of the protocol fall under three categories: 3662 - Denial of Service (DoS) attacks. 3663 - Address spoofing attacks. 3664 - Router spoofing attacks. 3666 An example of denial of service attacks is that a node on the link 3667 that can send packets with an arbitrary IP source address can both 3668 advertise itself as a default router and also send "forged" Router 3669 Advertisement messages that immediately time out all other default 3670 routers as well as all on-link prefixes. An intruder can achieve 3671 this by sending out multiple Router Advertisements, one for each 3672 legitimate router, with the source address set to the address of 3673 another router, the Router Lifetime field set to zero, and the 3674 Preferred and Valid lifetimes set to zero for all the prefixes. Such 3675 an attack would cause all packets, for both on-link and off-link 3676 destinations, to go to the rogue router. That router can then 3677 selectively examine, modify or drop all packets sent on the link. The 3678 Neighbor Unreachability Detection (NUD) will not detect such a black 3679 hole as long as the rogue router politely answers the NUD probes with 3680 a Neighbor Advertisement with the R-bit set. 3682 It is also possible for any host to launch a DoS attack on another 3683 host by preventing it from configuring an address using [ADDRCONF]. 3684 The protocol does not allow hosts to verify whether the sender of a 3685 Neighbor Advertisement is the true owner of the IP address included 3686 in the message. 3688 Redirect attacks can also be achieved by any host in order to flood a 3689 victim or steal its traffic. A host can send a Neighbor advertisement 3690 (in response to a solicitation) that contains its IP address and a 3691 victim's link layer address in order to flood the victim with 3692 unwanted traffic. Alternatively, the host can send a Neighbor 3693 Advertisement that includes a victim's IP address and its own link 3694 layer address to overwrite an existing entry in the sender's 3695 destination cache, thereby forcing the sender to forward all of the 3696 victim's traffic to itself. 3698 The trust model for redirects is the same as in IPv4. A redirect is 3699 accepted only if received from the same router that is currently 3700 being used for that destination. If a host has been redirected to 3701 another node (i.e., the destination is on-link) there is no way to 3702 prevent the target from issuing another redirect to some other 3703 destination. However, this exposure is no worse than it was before 3704 being redirected; the target host, once subverted, could always act 3705 as a hidden router to forward traffic elsewhere. 3707 The protocol contains no mechanism to determine which neighbors are 3708 authorized to send a particular type of message (e.g., Router 3709 Advertisements); any neighbor, presumably even in the presence of 3710 authentication, can send Router Advertisement messages thereby being 3711 able to cause denial of service. Furthermore, any neighbor can send 3712 proxy Neighbor Advertisements as well as unsolicited Neighbor 3713 Advertisements as a potential denial of service attack. 3715 Many link layers are also subject to different denial of service 3716 attacks such as continuously occupying the link in CSMA/CD networks 3717 (e.g., by sending packets closely back-to-back or asserting the 3718 collision signal on the link), or originating packets with somebody 3719 else's source MAC address to confuse, e.g., Ethernet switches. On the 3720 other hand, many of the threats discussed in this section are less 3721 effective, or non-existent, on point-to-point links, or cellular 3722 links where a host shares a link with only one neighbor, i.e. the 3723 default router. 3725 11.2 Securing Neighbor Discovery messages 3727 The protocol reduces the exposure to the above threats in the absence 3728 of authentication by ignoring ND packets received from off-link 3729 senders. The Hop Limit field of all received packets is verified to 3730 contain 255, the maximum legal value. Because routers decrement the 3731 Hop Limit on all packets they forward, received packets containing a 3732 Hop Limit of 255 must have originated from a neighbor. 3734 Cryptographic security mechanisms for Neighbor Discovery are outside 3735 the scope of this document and are defined in [SEND]. Alternatively, 3736 IPsec can be used for IP layer authentication [IPv6-SA]. The use of 3737 the Internet Key Exchange (IKE) is not suited for creating dynamic 3738 security associations that can be used to secure address resolution 3739 or neighbor solicitation messages as documented in [ICMPIKE]. 3741 In some cases, it may be acceptable to use statically configured 3742 security associations with either [IPv6-AUTH] or [IPv6-ESP] to secure 3743 Neighbor Discovery messages. However, it is important to note that 3744 statically configured security associations are not scalable 3745 (especially when considering multicast links) and are therefore 3746 limited to small networks with known hosts. In any case, if either 3747 [IPv6-AUTH] or [IPv6-ESP] is used, ND packets MUST be verified for 3748 the purpose of authentication. Packets that fail authentication 3749 checks MUST be silently discarded. 3751 12. RENUMBERING CONSIDERATIONS 3753 The Neighbor Discovery protocol together with IPv6 Address 3754 Autoconfiguration [ADDRCONF] provides mechanisms to aid in 3755 renumbering - new prefixes and addresses can be introduced and old 3756 ones can be deprecated and removed. 3758 The robustness of these mechanisms is based on all the nodes on the 3759 link receiving the Router Advertisement messages in a timely manner. 3760 However, a host might be turned off or be unreachable for an extended 3761 period of time (i.e., a machine is powered down for months after a 3762 project terminates). It is possible to preserve robust renumbering 3763 in such cases but it does place some constraints on how long prefixes 3764 must be advertised. 3766 Consider the following example in which a prefix is initially 3767 advertised with a lifetime of 2 months, but on August 1st it is 3768 determined that the prefix needs to be deprecated and removed due to 3769 renumbering by September 1st. This can be done by reducing the 3770 advertised lifetime to 1 week starting on August 1st and as the 3771 cutoff gets closer the lifetimes can be made shorter until by 3772 September 1st the prefix is advertised with a zero lifetime. The 3773 point is that, if one or more nodes were unplugged from the link 3774 prior to September 1st they might still think that the prefix is 3775 valid since the last lifetime they received was 2 months. Thus if a 3776 node was unplugged on July 31st it thinks the prefix is valid until 3777 September 30th. If that node is plugged back in prior to September 3778 30th it may continue to use the old prefix. The only way to force a 3779 node to stop using a prefix that was previously advertised with a 3780 long Lifetime is to have that node receive an advertisement for that 3781 prefix that changes the lifetime downward. The solution in this 3782 example is simple: continue advertising the prefix with a lifetime of 3783 0 from September 1st until October 1st. 3785 In general, in order to be robust against nodes that might be 3786 unplugged from the link it is important to track the furthest into 3787 the future a particular prefix can be viewed valid by any node on the 3788 link. The prefix must then be advertised with a 0 Lifetime until 3789 that point in future. This "furthest into the future" time is simply 3790 the maximum, over all Router Advertisements, of the time the 3791 advertisement was sent plus the prefix's Lifetime contained in the 3792 advertisement. 3794 The above has an important implication on using infinite lifetimes. 3796 If a prefix is advertised with an infinite lifetime, and that prefix 3797 later needs to be renumbered, it is undesirable to continue 3798 advertising that prefix with a zero lifetime forever. Thus either 3799 infinite lifetimes should be avoided or there must be a limit on how 3800 long time a node can be unplugged from the link before it is plugged 3801 back in again. However, it is unclear how the network administrator 3802 can enforce a limit on how long time hosts such as laptops can be 3803 unplugged from the link. 3805 Network administrators should give serious consideration to using 3806 relatively short lifetimes (i.e., no more than a few weeks). While 3807 it might appear that using long lifetimes would help insure 3808 robustness, in reality a host will be unable to communicate in the 3809 absence of properly functioning routers. Such routers will be 3810 sending Router Advertisements that contain appropriate (and current) 3811 prefixes. A host connected to a network that has no functioning 3812 routers is likely to have more serious problems than just a lack of a 3813 valid prefix and address. 3815 The above discussion does not distinguish between the preferred and 3816 valid lifetimes. For all practical purposes it is probably 3817 sufficient to track the valid lifetime since the preferred lifetime 3818 will not exceed the valid lifetime. 3820 REFERENCES 3822 NORMATIVE 3824 [ADDR-ARCH] Hinden, R. and S. Deering, "IP Version 6 Addressing 3825 Architecture", RFC 3513, April 2003. 3827 [ICMPv6] Conta, A. and S. Deering, "Internet Control Message 3828 Protocol (ICMPv6) for the Internet Protocol Version 6 3829 (IPv6) Specification", RFC 2463, December 1998. 3831 [IPv6] Deering, S. and R. Hinden, "Internet Protocol, Version 6 3832 (IPv6) Specification", RFC 2460, December 1998. 3834 [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate 3835 Requirement Levels", BCP 14, RFC 2119, March 1997. 3837 INFORMATIVE 3839 [ADDRCONF] Thomson, S. Narten, T, and T. Jinmei, "IPv6 Address 3840 Autoconfiguration", draft-ietf-ipv6-rfc2462bis-08, May 3841 2005. 3843 [ADDR-SEL] Draves, R., "Default Address Selection for Internet 3844 Protocol version 6 (IPv6)", RFC 3484, February 2003. 3846 [ARP] Plummer, D., "An Ethernet Address Resolution Protocol", 3847 STD 37, RFC 826, November 1982. 3849 [ASSIGNED] Reynolds, J., "Assigned Numbers: RFC 1700 is Replaced by 3850 an On-line Database", RFC 3232, January 2002. 3852 [DHCPv6] Droms, R., Ed, "Dynamic Host Configuration Protocol for 3853 IPv6 (DHCPv6)", RFC 3315, July 2003. 3855 [HR-CL] Braden, R., Editor, "Requirements for Internet Hosts -- 3856 Communication Layers", STD 3, RFC 1122, October 1989. 3858 [ICMPIKE] Arkko, J., "Effects of ICMPv6 on IKE", 3859 draft-arkko-icmpv6-ike-effects-02 (work in progress), 3860 March 2003. 3862 [ICMPv4] Postel, J., "Internet Control Message Protocol", STD 5, 3863 RFC 792, September 1981. 3865 [IPv6-3GPP] Wasserman, M., Ed, "Recommendations for IPv6 in Third 3866 Generation Partnership Project (3GPP) standards", RFC 3867 3314, September 2002. 3869 [IPv6-CELL] Arkko, J., Kuipers, G., Soliman, H., Loughney, J. and J. 3870 Wiljakka, " Internet Protocol version 6 (IPv6) for Some 3871 Second and Third Generation Cellular Hosts", RFC 3316, 3872 April 2003. 3874 [IPv6-ETHER] Crawford, M., "Transmission of IPv6 Packets over 3875 Ethernet Networks", RFC 2464, December 1998. 3877 [IPv6-SA] Kent, S. and R. Atkinson, "Security Architecture for the 3878 Internet Protocol", RFC 4301, December 2005. 3880 [IPv6-AUTH] S. Kent, "IP Authentication Header", RFC 4302, December 3881 2005. 3883 [IPv6-ESP] S. Kent, "IP Encapsulating Security Payload (ESP)", RFC 3884 4303, December 2005. 3886 [LD-SHRE] Hinden, R. and D. Thaler, "IPv6 Host-to-Router Load 3887 Sharing", RFC 4311, November 2005. 3889 [MIPv6] D. Johnson, C. Perkins and J. Arkko, "Mobility Support 3890 in IPv6", RFC 3775, June 2004. 3892 [MLD] Deering, S., Fenner, W, and B. Haberman, "Multicast 3893 Listener Discovery for IPv6", RFC 2710, October 1999. 3895 [MLDv2] Vida, R. and L. Costa, "Multicast Listener Discovery 3896 Version 2 (MLDv2) for IPv6", RFC 3810, June 2004. 3898 [PSREQ] Nikander, P., Kempf, J. And E. Nordmark, "IPv6 Neighbor 3899 Discovery (ND) Trust and Threats", RFC 3756, May 2004. 3901 [RDISC] Deering, S., "ICMP Router Discovery Messages", RFC 1256, 3902 September 1991. 3904 [RFC3667] Bradner, S., "IETF Rights in Contributions", RFC 3667, 3905 February 2004. 3907 [RTSEL] Draves, R. and D. Thaler, "Default Router Preferences 3908 and more Specific Routes", draft-ietf-ipv6-router- 3909 selection-07, (work in progress), January 2005. 3911 [SH-MEDIA] Braden, R., Postel, J. and Y. Rekhter, "Internet 3912 Architecture Extensions for Shared Media", RFC 1620, May 3913 1994. 3915 [SEND] Arkko, J., Kempf, J., Sommerfeld, B., Zill, B. and P. 3916 Nikander, "SEcure Neighbor Discovery (SEND)",RFC3971, 3917 March 2005. 3919 [SYNC] S. Floyd, V. Jacobson, "The Synchronization of Periodic 3920 Routing Messages", IEEE/ACM Transactions on Networking, 3921 April 1994. ftp://ftp.ee.lbl.gov/papers/sync_94.ps.Z 3923 IANA CONSIDERATIONS 3925 This document does not require any new ICMPv6 types or codes to be 3926 allocated. However, existing ICMPv6 types should be updated to point 3927 to the document instead of RFC 2461. The procedure for the assignment 3928 of ICMPv6 types/codes is described in Section 6 of [ICMPv6]. 3930 This document continues to use the following ICMPv6 message types 3931 introduced in RFC 2461 and already assigned by IANA: 3933 Message name ICMPv6 Type 3935 Router Solicitation 133 3936 Router Advertisement 134 3937 Neighbor Solicitation 135 3938 Neighbor Advertisement 136 3939 Redirect 137 3941 This document continues to use the following Neighbor Discovery 3942 option types introduced in RFC 2461 and already assigned by IANA: 3944 Option Name Type 3946 Source Link-Layer Address 1 3947 Target Link-Layer Address 2 3948 Prefix Information 3 3949 Redirected Header 4 3950 MTU 5 3952 Neighbor Discovery option types are allocated using following 3953 procedure: 3955 1. The IANA should allocate and permanently register new option types 3956 from IETF RFC publication. This is for all RFC types 3957 including standards track, informational, and experimental status 3958 that originate from the IETF and have been approved by the IESG 3959 for publication. 3961 2. IETF working groups with working group consensus and area director 3962 approval can request reclaimable Neighbor Discovery option type 3963 assignments from the IANA. The IANA will tag the values as 3964 "reclaimable in future". 3966 The "reclaimable in the future" tag will be removed when an RFC is 3967 published documenting the protocol as defined in 1). This will 3968 make the assignment permanent and update the reference on the IANA 3969 web pages. 3971 At the point where the option type values are 85% assigned, the 3972 IETF will review the assignments tagged "reclaimable in the 3973 future" and inform the IANA which ones should be reclaimed and 3974 reassigned. 3976 3. Requests for new option type value assignments from outside the 3977 IETF are only made through the publication of an IETF document, 3978 per 1) above. Note also that documents published as "RFC Editor 3979 contributions" [RFC3667] are not considered to be IETF documents. 3981 Authors' Addresses 3983 Thomas Narten 3984 IBM Corporation 3985 P.O. Box 12195 3986 Research Triangle Park, NC 27709-2195 3987 USA 3989 Phone: +1 919 254 7798 3990 EMail: narten@raleigh.ibm.com 3992 Erik Nordmark 3993 Sun Microsystems, Inc. 3994 901 San Antonio Road 3995 Palo Alto, CA 94303 3996 USA 3998 Phone: +1 650 786 5166 3999 Fax: +1 650 786 5896 4000 EMail: nordmark@sun.com 4002 William Allen Simpson 4003 Daydreamer 4004 Computer Systems Consulting Services 4005 1384 Fontaine 4006 Madison Heights, Michigan 48071 4007 USA 4009 EMail: Bill.Simpson@um.cc.umich.edu 4010 bsimpson@MorningStar.com 4012 Hesham Soliman 4013 Qualcomm-Flarion Technologies 4014 Email: Hesham@Qualcomm.com 4016 APPENDIX A: MULTIHOMED HOSTS 4018 There are a number of complicating issues that arise when Neighbor 4019 Discovery is used by hosts that have multiple interfaces. This 4020 section does not attempt to define the proper operation of multihomed 4021 hosts with regard to Neighbor Discovery. Rather, it identifies 4022 issues that require further study. Implementors are encouraged to 4023 experiment with various approaches to making Neighbor Discovery work 4024 on multihomed hosts and to report their experiences. Further work 4025 related to this problem can be found in [RTSEL]. 4027 If a multihomed host receives Router Advertisements on all of its 4028 interfaces, it will (probably) have learned on-link prefixes for the 4029 addresses residing on each link. When a packet must be sent through 4030 a router, however, selecting the "wrong" router can result in a 4031 suboptimal or non-functioning path. There are number of issues to 4032 consider: 4034 1) In order for a router to send a redirect, it must determine that 4035 the packet it is forwarding originates from a neighbor. The 4036 standard test for this case is to compare the source address of 4037 the packet to the list of on-link prefixes associated with the 4038 interface on which the packet was received. If the originating 4039 host is multihomed, however, the source address it uses may 4040 belong to an interface other than the interface from which it 4041 was sent. In such cases, a router will not send redirects, and 4042 suboptimal routing is likely. In order to be redirected, the 4043 sending host must always send packets out the interface 4044 corresponding to the outgoing packet's source address. Note 4045 that this issue never arises with non-multihomed hosts; they 4046 only have one interface. 4048 2) If the selected first-hop router does not have a route at all 4049 for the destination, it will be unable to deliver the packet. 4050 However, the destination may be reachable through a router on 4051 one of the other interfaces. Neighbor Discovery does not 4052 address this scenario; it does not arise in the non-multihomed 4053 case. 4055 3) Even if the first-hop router does have a route for a 4056 destination, there may be a better route via another interface. 4057 No mechanism exists for the multihomed host to detect this 4058 situation. 4060 If a multihomed host fails to receive Router Advertisements on one or 4061 more of its interfaces, it will not know (in the absence of 4062 configured information) which destinations are on-link on the 4063 affected interface(s). This leads to the following problem: If Router 4064 Advertisements are received on some, but not all interfaces, a 4065 multihomed host could choose to only send packets out on the 4066 interfaces on which it has received Router Advertisements. A key 4067 assumption made here, however, is that routers on those other 4068 interfaces will be able to route packets to the ultimate destination, 4069 even when those destinations reside on the subnet to which the sender 4070 connects, but has no on-link prefix information. Should the 4071 assumption be FALSE, communication would fail. Even if the assumption 4072 holds, packets will traverse a sub-optimal path. 4074 APPENDIX B: FUTURE EXTENSIONS 4076 Possible extensions for future study are: 4078 o Using dynamic timers to be able to adapt to links with widely 4079 varying delay. Measuring round trip times, however, requires 4080 acknowledgments and sequence numbers in order to match received 4081 Neighbor Advertisements with the actual Neighbor Solicitation that 4082 triggered the advertisement. Implementors wishing to experiment 4083 with such a facility could do so in a backwards-compatible way by 4084 defining a new option carrying the necessary information. Nodes 4085 not understanding the option would simply ignore it. 4087 o Adding capabilities to facilitate the operation over links that 4088 currently require hosts to register with an address resolution 4089 server. This could for instance enable routers to ask hosts to 4090 send them periodic unsolicited advertisements. Once again this 4091 can be added using a new option sent in the Router Advertisements. 4093 o Adding additional procedures for links where asymmetric and non- 4094 transitive reachability is part of normal operations. Such 4095 procedures might allow hosts and routers to find usable paths on, 4096 e.g., radio links. 4098 APPENDIX C: STATE MACHINE FOR THE REACHABILITY STATE 4100 This appendix contains a summary of the rules specified in Sections 4101 7.2 and 7.3. This document does not mandate that implementations 4102 adhere to this model as long as their external behavior is consistent 4103 with that described in this document. 4105 When performing address resolution and Neighbor Unreachability 4106 Detection the following state transitions apply using the conceptual 4107 model: 4109 State Event Action New state 4111 - Packet to send. Create entry. INCOMPLETE 4112 Send multicast NS. 4113 Start retransmit timer 4115 INCOMPLETE Retransmit timeout, Retransmit NS INCOMPLETE 4116 less than N Start retransmit 4117 retransmissions. timer 4119 INCOMPLETE Retransmit timeout, Discard entry - 4120 N or more Send ICMP error 4121 retransmissions. 4123 INCOMPLETE NA, Solicited=0, Record link-layer STALE 4124 Override=any address. Send queued 4125 packets. 4127 INCOMPLETE NA, Solicited=1, Record link-layer REACHABLE 4128 Override=any address. Send queued 4129 packets. 4131 INCOMPLETE NA, Solicited=any, Update content of unchanged 4132 Override=any, No IsRouter flag 4133 Link-layer address 4135 - NS, RS, Redirect - - 4136 No link layer address 4138 !INCOMPLETE NA, Solicited=1, - REACHABLE 4139 Override=0 4140 Same link-layer 4141 address as cached. 4143 !INCOMPLETE NA, Solicited=any, Update content of unchanged 4144 Override=any, No IsRouter flag. 4146 link-layer address 4148 REACHABLE NA, Solicited=1, - STALE 4149 Override=0 4150 Different link-layer 4151 address than cached. 4153 STALE, PROBE NA, Solicited=1, - unchanged 4154 Or DELAY Override=0 4155 Different link-layer 4156 address than cached. 4158 !INCOMPLETE NA, Solicited=1, Record link-layer REACHABLE 4159 Override=1 address (if 4160 different). 4162 !INCOMPLETE NA, Solicited=0, - unchanged 4163 Override=0 4165 !INCOMPLETE NA, Solicited=0, - unchanged 4166 Override=1 4167 Same link-layer 4168 address as cached. 4170 !INCOMPLETE NA, Solicited=0, Record link-layer STALE 4171 Override=1 address. 4172 Different link-layer 4173 address than cached. 4175 !INCOMPLETE upper-layer reachability - REACHABLE 4176 confirmation 4178 REACHABLE timeout, more than - STALE 4179 N seconds since 4180 reachability confirm. 4182 STALE Sending packet Start delay timer DELAY 4184 DELAY Delay timeout Send unicast NS probe PROBE 4185 Start retransmit timer 4187 PROBE Retransmit timeout, Retransmit NS PROBE 4188 less than N 4189 retransmissions. 4191 PROBE Retransmit timeout, Discard entry - 4192 N or more 4193 retransmissions. 4195 The state transitions for receiving unsolicited information other 4196 than Neighbor Advertisement messages apply to either the source of 4197 the packet (for Neighbor Solicitation, Router Solicitation, and 4198 Router Advertisement messages) or the target address (for Redirect 4199 messages) as follows: 4201 State Event Action New state 4203 - NS, RS, RA, Redirect Create entry. STALE 4205 INCOMPLETE NS, RS, RA, Redirect Record link-layer STALE 4206 address. Send queued 4207 packets. 4209 !INCOMPLETE NS, RS, RA, Redirect Update link-layer STALE 4210 Different link-layer address 4211 address than cached. 4213 INCOMPLETE NS, RS No link-layer - unchanged 4214 address 4216 !INCOMPLETE NS, RS, RA, Redirect - unchanged 4217 Same link-layer 4218 address as cached. 4220 APPENDIX D: SUMMARY OF ISROUTER RULES 4222 This appendix presents a summary of the rules for maintaining the 4223 IsRouter flag as specified in this document. 4225 The background for these rules is that the ND messages contain, 4226 either implicitly or explicitly, information that indicates whether 4227 or not the sender (or Target Address) is a host or a router. The 4228 following assumptions are used: 4230 - The sender of a Router Solicitation is implicitly assumed to be a 4231 host since there is no need for routers to send such messages. 4233 - The sender of a Router Advertisement is implicitly assumed to be a 4234 router. 4236 - Neighbor Solicitation messages do not contain either an implicit 4237 or explicit indication about the sender. Both hosts and routers 4238 send such messages. 4240 - Neighbor Advertisement messages contain an explicit "IsRouter 4241 flag", the R-bit. 4243 - The target of the redirect, when the target differs from the 4244 destination address in the packet being redirected, is implicitly 4245 assumed to be a router. This is a natural assumption since that 4246 node is expected to be able to forward the packets towards the 4247 destination. 4249 - The target of the redirect, when the target is the same as the 4250 destination, does not carry any host vs. router information. All 4251 that is known is that the destination (i.e. target) is on-link but 4252 it could be either a host or a router. 4254 The rules for setting the IsRouter flag are based on the information 4255 content above. If an ND message contains explicit or implicit 4256 information the receipt of the message will cause the IsRouter flag 4257 to be updated. But when there is no host vs. router information in 4258 the ND message the receipt of the message MUST NOT cause a change to 4259 the IsRouter state. When the receipt of such a message causes a 4260 Neighbor Cache entry to be created this document specifies that the 4261 IsRouter flag be set to FALSE. There is greater potential for 4262 mischief when a node incorrectly thinks a host is a router, than the 4263 other way around. In these cases a subsequent Neighbor Advertisement 4264 or Router Advertisement message will set the correct IsRouter value. 4266 APPENDIX E: IMPLEMENTATION ISSUES 4268 Appendix E.1: Reachability confirmations 4270 Neighbor Unreachability Detection requires explicit confirmation that 4271 a forward-path is functioning properly. To avoid the need for 4272 Neighbor Solicitation probe messages, upper layer protocols should 4273 provide such an indication when the cost of doing so is small. 4274 Reliable connection-oriented protocols such as TCP are generally 4275 aware when the forward-path is working. When TCP sends (or receives) 4276 data, for instance, it updates its window sequence numbers, sets and 4277 cancels retransmit timers, etc. Specific scenarios that usually 4278 indicate a properly functioning forward-path include: 4280 - Receipt of an acknowledgement that covers a sequence number (e.g., 4281 data) not previously acknowledged indicates that the forward path 4282 was working at the time the data was sent. 4284 - Completion of the initial three-way handshake is a special case of 4285 the previous rule; although no data is sent during the handshake, 4286 the SYN flags are counted as data from the sequence number 4287 perspective. This applies to both the SYN+ACK for the active open 4288 the ACK of that packet on the passively opening peer. 4290 - Receipt of new data (i.e., data not previously received) indicates 4291 that the forward-path was working at the time an acknowledgement 4292 was sent that advanced the peer's send window that allowed the new 4293 data to be sent. 4295 To minimize the cost of communicating reachability information 4296 between the TCP and IP layers, an implementation may wish to rate- 4297 limit the reachability confirmations its sends IP. One possibility 4298 is to process reachability only every few packets. For example, one 4299 might update reachability information once per round trip time, if an 4300 implementation only has one round trip timer per connection. For 4301 those implementations that cache Destination Cache entries within 4302 control blocks, it may be possible to update the Neighbor Cache entry 4303 directly (i.e., without an expensive lookup) once the TCP packet has 4304 been demultiplexed to its corresponding control block. For other 4305 implementation it may be possible to piggyback the reachability 4306 confirmation on the next packet submitted to IP assuming that the 4307 implementation guards against the piggybacked confirmation becoming 4308 stale when no packets are sent to IP for an extended period of time. 4310 TCP must also guard against thinking "stale" information indicates 4311 current reachability. For example, new data received 30 minutes 4312 after a window has opened up does not constitute a confirmation that 4313 the path is currently working. It merely indicates that 30 minutes 4314 ago the window update reached the peer i.e. the path was working at 4315 that point in time. An implementation must also take into account 4316 TCP zero-window probes that are sent even if the path is broken and 4317 the window update did not reach the peer. 4319 For UDP based applications (RPC, DNS) it is relatively simple to make 4320 the client send reachability confirmations when the response packet 4321 is received. It is more difficult and in some cases impossible for 4322 the server to generate such confirmations since there is no flow 4323 control, i.e., the server can not determine whether a received 4324 request indicates that a previous response reached the client. 4326 Note that an implementation can not use negative upper-layer advise 4327 as a replacement for the Neighbor Unreachability Detection algorithm. 4328 Negative advise (e.g. from TCP when there are excessive 4329 retransmissions) could serve as a hint that the forward path from the 4330 sender of the data might not be working. But it would fail to detect 4331 when the path from the receiver of the data is not functioning 4332 causing, none of the acknowledgement packets to reach the sender. 4334 APPENDIX F: CHANGES FROM RFC 2461 4336 o Removed references to IPsec AH and ESP for securing messages 4337 or as part of validating the received message. 4339 o Added section 3.3. 4341 o Updated section 11 to include more detailed discussion on threats, 4342 IPsec limitations, and use of SeND. 4344 o Removed the on-link assumption in section 5.2 based on 4345 draft-ietf-v6ops-onlinkassumption 4347 o Clarified the definition of the Router Lifetime field in section 4348 4.2. 4350 o Updated the text in section 4.6.2 and 6.2.1 to indicate that the 4351 preferred lifetime must not be larger than valid lifetime. 4353 o Removed the reference to stateful configuration and added 4354 reference for DHCPv6 instead. 4356 o Added the IsRouter flag definition to section 6.2.1 to allow for 4357 mixed host/router behavior. 4359 o Allowed mobile nodes to be exempt from adding random delays before 4360 sending an RS during a handover. 4362 o Updated the definition of the prefix length in the prefix option 4364 o Updated the applicability to NBMA links in the introduction and 4365 added references to 3GPP RFCs. 4367 o Clarified support for Load balancing is limited to routers. 4369 o Clarified router behaviour when receiving a Router Solicitation 4370 without SLLAO. 4372 o Clarified that inconsistency checks for CurHopLimit are done for 4373 none zero values only. 4375 o Rearranged section 7.2.5 for clarity and described the processing 4376 when receiving the NA in INCOMPLETE state. 4378 o Added clarifications in section 7.2 on how a node should react 4379 upon receiving a message without SLLAO. 4381 O Added New IANA section. 4383 o Miscellaneous editorials. 4385 Intellectual Property Statement 4387 The IETF takes no position regarding the validity or scope of any 4388 Intellectual Property Rights or other rights that might be claimed to 4389 pertain to the implementation or use of the technology described in 4390 this document or the extent to which any license under such rights 4391 might or might not be available; nor does it represent that it has 4392 made any independent effort to identify any such rights. Information 4393 on the IETF's procedures with respect to rights in IETF Documents can 4394 be found in RFC 3667 (BCP 78) and RFC 3668 (BCP 79). 4396 Copies of IPR disclosures made to the IETF Secretariat and any 4397 assurances of licenses to be made available, or the result of an 4398 attempt made to obtain a general license or permission for the use of 4399 such proprietary rights by implementers or users of this 4400 specification can be obtained from the IETF on-line IPR repository at 4401 http://www.ietf.org/ipr. 4403 The IETF invites any interested party to bring to its attention any 4404 copyrights, patents or patent applications, or other proprietary 4405 rights that may cover technology that may be required to implement 4406 this standard. Please address the information to the IETF at ietf- 4407 ipr@ietf.org. 4409 Full Copyright Statement 4411 Copyright (C) The Internet Society (2006). This document is subject 4412 to the rights, licenses and restrictions contained in BCP 78, and 4413 except as set forth therein, the authors retain all their rights. 4415 Disclaimer of Validity 4417 This document and the information contained herein are provided on an 4418 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 4419 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET 4420 ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, 4421 INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE 4422 INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 4423 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 4425 This Internet-Draft expires April, 2007.