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