idnits 2.17.1 draft-ietf-zeroconf-ipv4-linklocal-10.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Looks like you're using RFC 2026 boilerplate. This must be updated to follow RFC 3978/3979, as updated by RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** Missing expiration date. The document expiration date should appear on the first and last page. == The page length should not exceed 58 lines per page, but there was 30 longer pages, the longest (page 2) being 63 lines == It seems as if not all pages are separated by form feeds - found 0 form feeds but 30 pages Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- == There are 2 instances of lines with non-RFC6890-compliant IPv4 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 == The document seems to use 'NOT RECOMMENDED' as an RFC 2119 keyword, but does not include the phrase in its RFC 2119 key words list. -- 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: 'RFC 959' is mentioned on line 1076, but not defined == Unused Reference: 'RFC2434' is defined on line 1144, but no explicit reference was found in the text ** Obsolete normative reference: RFC 2434 (Obsoleted by RFC 5226) -- Obsolete informational reference (is this intentional?): RFC 2462 (Obsoleted by RFC 4862) == Outdated reference: A later version (-18) exists of draft-ietf-dhc-dna-ipv4-01 == Outdated reference: A later version (-47) exists of draft-ietf-dnsext-mdns-23 Summary: 3 errors (**), 0 flaws (~~), 9 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 ZEROCONF Working Group Stuart Cheshire 3 INTERNET-DRAFT Apple Computer 4 Category: Standards Track Bernard Aboba 5 Microsoft Corporation 6 29 September 2003 Erik Guttman 7 Sun Microsystems 9 Dynamic Configuration of Link-Local IPv4 Addresses 11 This document is an Internet-Draft and is in full conformance with all 12 provisions of Section 10 of RFC 2026. 14 Internet-Drafts are working documents of the Internet Engineering Task 15 Force (IETF), its areas, and its working groups. Note that other groups 16 may also distribute working documents as Internet-Drafts. 18 Internet-Drafts are draft documents valid for a maximum of six months 19 and may be updated, replaced, or obsoleted by other documents at any 20 time. It is inappropriate to use Internet-Drafts as reference material 21 or to cite them other than as "work in progress." 23 The list of current Internet-Drafts can be accessed at 24 http://www.ietf.org/ietf/1id-abstracts.txt 26 The list of Internet-Draft Shadow Directories can be accessed at 27 http://www.ietf.org/shadow.html. 29 Copyright Notice 31 Copyright (C) The Internet Society (2003). All Rights Reserved. 33 Abstract 35 To participate in wide-area IP networking, a host needs to be 36 configured, either manually by the user or automatically from a 37 source on the network such as a DHCP server. Unfortunately, such 38 external configuration information may not always be available. It 39 is therefore beneficial for a host to be able to depend on a useful 40 subset of IP networking functions even when no configuration is 41 available. This document describes how a host may automatically 42 configure an interface with an IPv4 address within the 169.254/16 43 prefix that is valid for communication with other devices connected 44 to the same physical (or logical) link. 46 Link-Local IPv4 addresses are not suitable for communication with 47 devices not directly connected to the same physical (or logical) 48 link, and are only used where stable, routable addresses are not 49 available (such as on ad hoc or isolated networks). This document 50 does not recommend that Link-Local IPv4 addresses and routable 51 addresses be configured simultaneously on the same interface. 53 Table of Contents 55 1. Introduction.............................................. 3 56 1.1 Requirements ....................................... 3 57 1.2 Terminology ........................................ 3 58 1.3 Applicability....................................... 4 59 1.4 Application Layer Protocol Considerations........... 5 60 1.5 Autoconfiguration Issues ........................... 6 61 1.6 Alternate Use Prohibition .......................... 6 62 1.7 Multiple Addresses per Interface.................... 7 63 1.8 Multiple Interfaces................................. 7 64 1.9 Communication with Routable Addresses............... 8 65 2. Address Selection, Defense and Delivery................... 8 66 2.1 Link-Local Address Selection........................ 8 67 2.2 Claiming a Link-Local Address....................... 9 68 2.3 Shorter Timeouts ................................... 11 69 2.4 Announcing an Address............................... 11 70 2.5 Conflict Detection and Defense...................... 11 71 2.6 Address Usage and Forwarding Rules.................. 12 72 2.7 Link-Local Packets Are Not Forwarded................ 14 73 2.8 Link-Local Packets are Local........................ 14 74 2.9 Higher-Layer Protocol Considerations................ 15 75 2.10 Privacy Concerns.................................... 15 76 2.11 Transition from Link-Local to Routable Address ..... 16 77 3. Considerations for Multiple Interfaces.................... 16 78 3.1 Scoped Addresses.................................... 16 79 3.2 Address Ambiguity................................... 17 80 3.3 Interaction with Hosts with Routable Addresses...... 18 81 3.4 Unintentional Autoimmunity.......................... 19 82 4. Healing of Network Partitions ............................ 19 83 5. Security Considerations................................... 20 84 6. Application Programming Considerations.................... 21 85 6.1 Address Changes, Failure and Recovery............... 21 86 6.2 Limited Forwarding of Locators...................... 22 87 6.3 Address Ambiguity................................... 22 88 7. Router Considerations..................................... 22 89 8. IANA Considerations....................................... 23 90 9. Constants ................................................ 23 91 10. References ............................................... 23 92 10.1 Normative References ............................... 23 93 10.2 Informative References ............................. 23 94 Acknowledgments .............................................. 24 95 Authors' Addresses ........................................... 25 96 Appendix A - Prior Implementations............................ 26 97 Intellectual Property Statement .............................. 29 98 Full Copyright Statement ..................................... 30 99 1. Introduction 101 As the Internet Protocol continues to grow in popularity, it becomes 102 increasingly valuable to be able to use familiar IP tools such as FTP 103 not only for global communication, but for local communication as 104 well. For example, two people with laptop computers supporting IEEE 105 802.11 Wireless LANs [802.11] may meet and wish to exchange files. 106 It is desirable for these people to be able to use IP application 107 software without the inconvenience of having to manually configure 108 static IP addresses or set up a DHCP server [RFC2131]. 110 This document describes a method by which a host may automatically 111 configure an interface with an IPv4 address in the 169.254/16 prefix 112 that is valid for Link-Local communication on that interface. This 113 is especially valuable in environments where no other configuration 114 mechanism is available. The IPv4 prefix 169.254/16 is registered 115 with the IANA for this purpose. Allocation of Link-Local IPv6 116 addresses is described in "IPv6 Stateless Address Autoconfiguration" 117 [RFC2462]. 119 Link-Local communication using Link-Local IPv4 addresses is only 120 suitable for communication with other devices connected to the same 121 physical (or logical) link. Link-Local communication using Link- 122 Local IPv4 addresses is not suitable for communication with devices 123 not directly connected to the same physical (or logical) link. 125 Microsoft Windows 98 (and later) and Mac OS 8.5 (and later) already 126 support this capability. This document standardizes usage, 127 prescribing rules for how Link-Local IPv4 addresses MUST be treated 128 by hosts and routers. In particular, it describes how routers MUST 129 behave when receiving packets with IPv4 Link-Local addresses in the 130 source or destination address. With respect to hosts, it discusses 131 claiming and defending addresses, maintaining Link-Local and routable 132 IPv4 addresses on the same interface, and multihoming issues. 134 1.1. Requirements 136 In this document, several words are used to signify the requirements 137 of the specification. These words are often capitalized. The key 138 words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", 139 "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document 140 are to be interpreted as described in [RFC2119]. 142 1.2. Terminology 144 This document describes Link-Local addressing, for IPv4 communication 145 between two hosts on a single link. A set of hosts is considered to 146 be "on the same link", if: 148 - when any host A from that set sends a packet to any other 149 host B in that set, using unicast, multicast, or broadcast, 150 the entire link-layer packet payload arrives unmodified, 151 and 153 - a broadcast sent over that link by any host from that set 154 of hosts can be received by every other host in that set 156 The link-layer *header* may be modified, such as in Token Ring Source 157 Routing [802.5], but not the link-layer *payload*. In particular, if 158 any device forwarding a packet modifies any part of the IP header or 159 IP payload then the packet is no longer considered to be on the same 160 link. This means that the packet may pass through devices such as 161 repeaters, bridges, hubs or switches and still be considered to be on 162 the same link for the purpose of this document, but not through a 163 device such as an IP router that decrements the TTL or otherwise 164 modifies the IP header. 166 This document uses the term "routable address" to refer to all 167 unicast IPv4 addresses outside the 169.254/16 prefix, including 168 global addresses and private addresses such as Net 10/8 [RFC1918], 169 all of which may be forwarded via routers. 171 Wherever this document uses the term "host" when describing use of 172 Link-Local IPv4 addresses, the text applies equally to routers when 173 they are the source of or intended destination of packets containing 174 Link-Local IPv4 source or destination addresses. 176 Wherever this document uses the term "sender IP address" or "target 177 IP address" in the context of an ARP packet, it is referring to the 178 fields of the ARP packet identified in the ARP specification [RFC826] 179 as "ar$spa" (Sender Protocol Address) and "ar$tpa" (Target Protocol 180 Address) respectively. For the usage of ARP described in this 181 document, each of these fields always contains an IP address. 183 In this document, the term "ARP Probe" is used to refer to an ARP 184 Request packet, broadcast on the local link, with an all-zero 'sender 185 IP address'. The 'sender hardware address' MUST contain the hardware 186 address of the interface sending the packet. The 'target hardware 187 address' field is ignored and SHOULD be set to all zeroes. The 188 'target IP address' field MUST be set to the address being probed. 190 In this document, the term "ARP Announcement" is used to refer to an 191 ARP Request packet, broadcast on the local link, identical to the ARP 192 probe described above, except that both the sender and target IP 193 address fields contain the IP address being announced. 195 1.3. Applicability 197 This specification applies to all IEEE 802 Local Area Networks (LANs) 198 [802], including Ethernet [802.3], Token-Ring [802.5] and IEEE 802.11 199 wireless LANs [802.11], as well as to other link-layer technologies 200 that operate at data rates of at least 1 Mbps, have a round-trip 201 latency of at most one second, and support ARP [RFC826]. Wherever 202 this document uses the term "IEEE 802", the text applies equally to 203 any of these network technologies. 205 Link-layer technologies that support ARP but operate at rates below 1 206 Mbps or latencies above one second may need to specify different 207 values for the following parameters described in Sections 2.2, 2.3 208 and 2.4: 210 (a) the number of, and interval between, ARP probes, 211 (b) the number of, and interval between, ARP announcements, 212 (c) the maximum rate at which address claiming may be attempted, and 213 (d) the time interval between conflicting ARPs below which a host 214 MUST reconfigure instead of attempting to defend its address. 216 Link-layer technologies that do not support ARP may be able to use 217 other techniques for determining whether a particular IP address is 218 currently in use. However, the application of claim-and-defend 219 mechanisms to such networks is outside the scope of this document. 221 This specification is intended for use with small ad-hoc networks - a 222 single link containing only a few hosts. Although 65024 Link-Local 223 IPv4 addresses are available in principle, attempting to use all 224 those addresses on a single link would result a high probability of 225 an address conflict, requiring a host to take an inordinate amount of 226 time to find an available address. 228 Network operators with more than 1300 hosts on a single link may want 229 to consider dividing that single link into two or more subnets. A 230 host connecting to a link that already has 1300 hosts, selecting a 231 Link-Local IPv4 address at random, has a 98% chance of selecting an 232 unused Link-Local IPv4 address on the first try. A host has a 99.96% 233 chance of selecting an unused Link-Local IPv4 address within two 234 tries. The probability that it will have to try more than ten times 235 is about 1 in 10^17. 237 1.4. Application Layer Protocol Considerations 239 Link-Local IPv4 addresses and their dynamic configuration have 240 profound implications upon applications which use them. This is 241 discussed in Section 6. Many applications fundamentally assume that 242 addresses of communicating peers are routable, relatively unchanging 243 and unique. These assumptions no longer hold with Link-Local IPv4 244 addresses, or a mixture of Link-Local and routable IPv4 addresses. 245 Therefore while many applications will work properly with Link-Local 246 IPv4 addresses, or a mixture of Link-Local and routable IPv4 247 addresses, others may do so only after modification, or will exhibit 248 reduced or partial functionality. 250 In some cases it may be infeasible for the application to be modified 251 to operate under such conditions. 253 Link-Local IPv4 addresses should therefore only be used where stable, 254 routable addresses are not available (such as on ad hoc or isolated 255 networks) or in controlled situations where these limitations and 256 their impact on applications are understood and accepted. This 257 document does not recommend that Link-Local IPv4 addresses and 258 routable addresses be configured simultaneously on the same 259 interface. 261 Use of Link-Local IPv4 addresses in off-link communication is likely 262 to cause application failures. This can occur within any application 263 that includes embedded addresses, if a Link-Local IPv4 address is 264 embedded when communicating with a host that is not on the link. 265 Examples of applications that include embedded addresses are found in 266 [RFC3027]. This includes IPsec, Kerberos 4/5, X- 267 Windows/Xterm/Telnet, FTP, RSVP, SMTP, SIP, Real Audio, H.323, and 268 SNMP. 270 In order to prevent use of Link-Local IPv4 addresses in off-link 271 communication, the following cautionary measures are advised: 273 a. Routable addresses should be used within applications whenever 274 they are available. 276 b. Names that are globally resolvable to routable addresses should be 277 used within applications whenever they are available. Names that are 278 resolvable only on the local link (such as through use of protocols 279 such as Link Local Multicast Name Resolution [LLMNR]) MUST NOT be 280 used in off-link communication. IPV4 addresses and names which can 281 only be resolved on the local link SHOULD NOT be forwarded, they 282 SHOULD only be sent when a Link-Local address is used as the source 283 address. This strong advice should hinder limited scope addresses 284 and names from leaving the context in which they apply. 286 c. Link-Local IPv4 addresses MUST NOT be configured in the DNS. 288 1.5. Autoconfiguration Issues 290 Implementations of Link-Local IPv4 address autoconfiguration MUST 291 expect address collisions, and MUST be prepared to handle them 292 gracefully by automatically selecting a new address whenever a 293 collision is detected, as described in Section 2. This requirement 294 to detect and handle address collisions applies during the entire 295 period that a host is using a 169.254/16 Link-Local IPv4 address, not 296 just during initial interface configuration. For example, address 297 collisions can occur well after a host has completed booting if two 298 previously separate networks are joined, as described in Section 4. 300 1.6. Alternate Use Prohibition 302 Note that addresses in the 169.254/16 prefix SHOULD NOT be configured 303 manually or by a DHCP server. Manual or DHCP configuration may cause 304 a host to use an address in the 169.254/16 prefix without following 305 the special rules regarding duplicate detection and automatic 306 configuration that pertain to addresses in this prefix. While 307 [RFC2131] indicates that a DHCP client SHOULD probe a newly received 308 address with ARP, this is not mandatory. Similarly, while [RFC2131] 309 recommends that a DHCP server SHOULD probe an address using an ICMP 310 Echo Request before allocating it, this is also not mandatory, and 311 even if the server does this, Link-Local IPv4 addresses are not 312 routable, so a DHCP server not directly connected to a link cannot 313 detect whether a host on that link is already using the desired Link- 314 Local IPv4 address. 316 Administrators wishing to configure their own local addresses (using 317 manual configuration, a DHCP server, or any other mechanism not 318 described in this document) should use one of the existing private 319 address prefixes [RFC1918], not the 169.254/16 prefix. 321 1.7. Multiple Addresses per Interface 323 Having addresses of multiple different scopes assigned to an 324 interface, with no adequate way to determine in what circumstances 325 each address should be used, leads to complexity for applications and 326 confusion for users. A host with an address on a link can 327 communicate with all other devices on that link, whether those 328 devices use Link-Local addresses, or routable addresses. 330 For this reason, a host that obtains, or is configured with, a 331 routable address on an interface, SHOULD NOT attempt to configure a 332 Link-Local IPv4 address on the same interface. 334 Where a Link-Local IPv4 address has been configured on an interface, 335 and a routable address is later configured on the same interface, the 336 host MUST always use the routable address when initiating new 337 communications, and MUST cease advertising the availability of the 338 Link-Local IPv4 address through whatever mechanisms that address had 339 been made known to others. 341 A host SHOULD continue to use the Link-Local IPv4 address for 342 communications underway when the routable address was configured, and 343 MAY continue to accept new communications addressed to the Link-Local 344 IPv4 address. 346 1.8. Multiple Interfaces 348 Additional considerations apply to hosts that support more than one 349 active interface where one or more of these interfaces support Link- 350 Local IPv4 address configuration. These considerations are 351 discussed in Section 3. 353 1.9. Communication with Routable Addresses 355 There will be cases when devices with a configured Link-Local address 356 will need to communicate with a device with a routable address 357 configured on the same physical link, and vice versa. The rules in 358 Section 2.6 allow this communication. 360 This allows, for example, a laptop computer with only a routable 361 address to communicate with web servers world-wide using its 362 globally-routable address while at the same time printing those web 363 pages on a local printer that has only a Link-Local IPv4 address. 365 2. Address Selection, Defense and Delivery 367 The following section explains the Link-Local IPv4 address selection 368 algorithm, how Link-Local IPv4 addresses are defended, and how IPv4 369 packets with Link-Local IPv4 addresses are delivered. 371 Windows and Mac OS hosts that already implement Link-Local IPv4 372 address auto-configuration are compatible with the rules presented in 373 this section. However, should any interoperability problem be 374 discovered, this document, not any prior implementation, defines the 375 standard. 377 2.1. Link-Local Address Selection 379 When a host wishes to configure a Link-Local IPv4 address, it selects 380 an address using a pseudo-random number generator with a uniform 381 distribution in the range from 169.254.1.0 to 169.254.254.255. The 382 IPv4 prefix 169.254/16 is registered with the IANA for this purpose. 383 The first 256 and last 256 addresses in the 169.254/16 prefix are 384 reserved for future use and MUST NOT be selected by a host using this 385 dynamic configuration mechanism. 387 The pseudo-random number generation algorithm MUST be chosen so that 388 different hosts do not generate the same sequence of numbers. If the 389 host has access to persistent information that is different for each 390 host, such as its IEEE 802 MAC address, then the pseudo-random number 391 generator SHOULD be seeded using a value derived from this 392 information. This means that even without using any other persistent 393 storage, a host will usually select the same Link-Local IPv4 address 394 each time it is booted, which can be convenient for debugging and 395 other operational reasons. Seeding the pseudo-random number 396 generator using the real-time clock or any other information which is 397 (or may be) identical in every host is NOT suitable for this purpose, 398 because a group of hosts that are all powered on at the same time 399 might then all generate the same sequence, resulting in a never- 400 ending series of conflicts as the hosts move in lock-step though 401 exactly the same pseudo-random sequence, conflicting on every address 402 they probe. 404 Hosts that are equipped with persistent storage MAY, for each 405 interface, record the IPv4 address they have selected. On booting, 406 hosts with a previously recorded address SHOULD use that address as 407 their first candidate when probing. This increases the stability of 408 addresses. For example, if a group of hosts are powered off at 409 night, then when they are powered on the next morning they will all 410 resume using the same addresses, instead of picking different 411 addresses and potentially having to resolve conflicts that arise. 413 2.2. Claiming a Link-Local Address 415 After it has selected a Link-Local IPv4 address, a host MUST test to 416 see if the Link-Local IPv4 address is already in use before beginning 417 to use it. When a network interface transitions from an inactive to 418 an active state, the host does not have knowledge of what Link-Local 419 IPv4 addresses may currently be in use on that link, since the point 420 of attachment may have changed or the network interface may have been 421 inactive when a conflicting address was claimed. 423 Were the host to immediately begin using a Link-Local IPv4 address 424 which is already in use by another host, this would be disruptive to 425 that other host. Since it is possible that the host has changed its 426 point of attachment, a routable address may be obtainable on the new 427 network, and therefore it cannot be assumed that a Link-Local IPv4 428 address is to be preferred. 430 Before using the Link-Local IPv4 address (e.g. using it as the source 431 address in an IPv4 packet, or as the Sender IPv4 address in an ARP 432 packet) a host MUST perform the probing test described below to 433 achieve better confidence that using the Link-Local IPv4 address will 434 not cause disruption. 436 Examples of events that involve an interface becoming active include: 438 Reboot/startup 439 Wake from sleep (if network interface was inactive during sleep) 440 Bringing up previously inactive network interface 441 IEEE 802 hardware link-state change that indicates that a 442 cable was attached. 443 Association with a wireless base station. 445 A host MUST NOT perform this check periodically as a matter of 446 course. This would be a waste of network bandwidth, and is 447 unnecessary due to the ability of hosts to passively discover 448 conflicts, as described in Section 2.5. 450 2.2.1. Probe details 452 On a link-layer such as IEEE 802 that supports ARP, conflict 453 detection is done using ARP probes. On link-layer technologies that 454 do not support ARP other techniques may be available for determining 455 whether a particular IPv4 address is currently in use. However, the 456 application of claim-and-defend mechanisms to such networks is left 457 to a future document. 459 A host probes to see if an address is already in use by broadcasting 460 an ARP Request for the desired address. The client MUST fill in the 461 'sender hardware address' field of the ARP Request with the hardware 462 address of the interface through which it is sending the packet. The 463 'sender IP address' field MUST be set to all zeroes, to avoid 464 polluting ARP caches in other hosts on the same link in the case 465 where the address turns out to be already in use by another host. 466 The 'target hardware address' field is ignored and SHOULD be set to 467 all zeroes. The 'target IP address' field MUST be set to the address 468 being probed. An ARP Request constructed this way with an all-zero 469 'sender IP address' is referred to as an "ARP probe". 471 When ready to begin probing, the host should then wait for a random 472 time interval selected uniformly in the range PROBE_MIN to PROBE_MAX 473 seconds, and should then send three probe packets, spaced randomly, 474 PROBE_MIN to PROBE_MAX seconds apart. 476 If during this period, from the beginning of the probing process 477 until PROBE_MAX seconds after the last probe packet is sent, the host 478 receives any ARP packet (Request *or* Reply) where the packet's 479 'sender IP address' is the address being probed for, then the host 480 MUST treat this address as being in use by some other host, and MUST 481 select a new pseudo-random address and repeat the process. In 482 addition, if during this period the host receives any ARP probe where 483 the packet's 'target IP address' is the address being probed for, and 484 the packet's 'sender hardware address' is not the hardware address of 485 any of the host's interfaces, then the host MUST similarly treat this 486 as an address collision and select a new address as above. This can 487 occur if two (or more) hosts attempt to configure the same Link-Local 488 IPv4 address at the same time. 490 A host should maintain a counter of the number of address collisions 491 it has experienced in the process of trying to acquire an address, 492 and if the number of collisions exceeds ten then the host MUST limit 493 the rate at which it probes for new addresses to no more than one new 494 address per minute. This is to prevent catastrophic ARP storms in 495 pathological failure cases, such as a rogue host that answers all ARP 496 probes, causing legitimate hosts to go into an infinite loop 497 attempting to select a usable address. 499 If, by PROBE_MAX seconds after the transmission of the last ARP probe 500 no conflicting ARP Reply or ARP probe has been received, then the 501 host has successfully claimed the desired Link-Local IPv4 address. 503 2.3. Shorter timeouts 505 The time values specified above are intended for use on technologies 506 such as IEEE 802, where switches that implement Spanning Tree 507 [802.1d] often silently discard all packets for several seconds. The 508 time values specified above result in a delay of 8-10 seconds before 509 a chosen IP address may be used. For a desktop machine on an IEEE 510 802 LAN, this may not be a great problem, but for other types of 511 device, particularly portable hand-held wireless devices, a ten- 512 second delay before networking services becomes available may not be 513 acceptable. For this reason, shorter time values may be used on 514 network technologies that allow the device to determine when the link 515 has become active and can be reasonably trusted to deliver packets 516 reliably. On these network technologies the recommended time values 517 are: The host should first wait for a random time interval selected 518 uniformly in the range 0-200 milliseconds, and then send four probe 519 packets, waiting 200 milliseconds after each probe, making a total 520 delay of 800-1000 milliseconds before a chosen IPv4 address may be 521 used. 523 Should future versions of the IEEE 802 Spanning Tree Protocol be 524 enhanced to inform clients when the link is ready to begin forwarding 525 packets, then the shorter time values may be used on these networks 526 too. 528 2.4. Announcing an Address 530 The host MUST then announce its claimed address by broadcasting two 531 ARP announcements, spaced PROBE_MAX seconds apart. This time 532 interval is not modified by the shorter timeouts described above in 533 Section 2.3. An ARP announcement is identical to the ARP probe 534 described above, except that now the sender and target IP addresses 535 are both set to the host's newly selected IPv4 address. The purpose 536 of these ARP announcements is to make sure that other hosts on the 537 link do not have stale ARP cache entries left over from some other 538 host that may previously have been using the same address. 540 2.5. Conflict Detection and Defense 542 Address collision detection is not limited to the address selection 543 phase, when a host is sending ARP probes. Address collision 544 detection is an ongoing process that is in effect for as long as a 545 host is using a Link-Local IPv4 address. At any time, if a host 546 receives an ARP packet (request *or* reply) where the 'sender IP 547 address' is the host's own IP address, but the 'sender hardware 548 address' does not match any of the host's own interface addresses, 549 then this is a conflicting ARP packet, indicating an address 550 collision. A host MUST respond to a conflicting ARP packet as 551 described in either (a) or (b) below: 553 (a) Upon receiving a conflicting ARP packet, a host MAY elect to 554 immediately configure a new Link-Local IPv4 address as described 555 above, or 557 (b) If a host currently has active TCP connections or other reasons 558 to prefer to keep the same IPv4 address, and it has not seen any 559 other conflicting ARP packets recently (for IEEE 802, within the last 560 ten seconds) then it MAY elect to attempt to defend its address, by 561 recording the time that the conflicting ARP packet was received, and 562 then broadcasting one single ARP announcement, giving its own IP and 563 hardware addresses as the sender addresses of the ARP. Having done 564 this, the host can then continue to use the address normally without 565 any further special action. However, if this is not the first 566 conflicting ARP packet the host has seen, and the time recorded for 567 the previous conflicting ARP packet is recent (within ten seconds for 568 IEEE 802) then the host MUST immediately cease using this address and 569 configure a new Link-Local IPv4 address as described above. This is 570 necessary to ensure that two hosts do not get stuck in an endless 571 loop with both hosts trying to defend the same address. 573 A host MUST respond to conflicting ARP packets as described in either 574 (a) or (b) above. A host MUST NOT ignore conflicting ARP packets. 576 Forced address reconfiguration may be disruptive, causing TCP 577 connections to be broken. However, it is expected that such 578 disruptions will be rare, and if inadvertent address duplication 579 happens, then disruption of communication is inevitable, no matter 580 how the addresses were assigned. It is not possible for two 581 different hosts using the same IP address on the same network to 582 operate reliably. 584 Immediately configuring a new address as soon as the conflict is 585 detected is the best way to restore useful communication as quickly 586 as possible. The mechanism described above of broadcasting a single 587 ARP announcement to defend the address mitigates the problem 588 somewhat, by helping to improve the chance that one of the two 589 conflicting hosts may be able to retain its address. 591 All ARP packets (*replies* as well as requests) that contain a Link- 592 Local 'sender IP address' MUST be sent using link-layer broadcast 593 instead of link-layer unicast. This aids timely detection of 594 duplicate addresses. An example illustrating how this helps is given 595 in Section 4. 597 2.6. Address Usage and Forwarding Rules 599 A host implementing this specification has additional rules to 600 conform to, whether or not it has an interface configured with a 601 Link-Local IPv4 address. 603 2.6.1. Source Address Usage 605 Since each interface on a host may have a Link-Local IPv4 address in 606 addition to zero or more other addresses configured by other means 607 (e.g. manually or via a DHCP server), a host may have to make a 608 choice about what source address to use when it sends a packet or 609 initiates a TCP connection. 611 The host SHOULD use a routable address in preference to a Link-Local 612 IPv4 address except for communication to peers for which the host has 613 an existing TCP connection at the time in which the host obtained a 614 routable address configuration. For more details, see Section 1.7. 616 A multi-homed host needs to select an outgoing interface whether or 617 not the destination is a Link-Local IPv4 address. Details of that 618 process are beyond the scope of this specification. After selecting 619 an interface, the multi-homed host should send packets involving 620 Link-Local IPv4 addresses as specified in this document, as if the 621 selected interface were the host's only interface. See Section 3 for 622 further discussion of multi-homed hosts. 624 2.6.2. Forwarding Rules 626 Whichever interface is used, if the destination address is in the 627 169.254/16 prefix (including the 169.254.255.255 broadcast address), 628 then the sender MUST ARP for the destination address and then send 629 its packet directly to the destination on the same physical link. 630 This MUST be done whether the interface is configured with a Link- 631 Local or a routable IPv4 address. 633 In many network stacks, achieving this functionality may be as simple 634 as adding a routing table entry indicating that 169.254/16 is 635 directly reachable on the local link. 637 The host MUST NOT send a packet with a Link-Local IPv4 destination 638 address to any router for forwarding. 640 If the destination address is a unicast address outside the 641 169.254/16 prefix, then the host SHOULD use an appropriate routable 642 IPv4 source address, if it can. If for any reason the host chooses to 643 send the packet with a Link-Local IPv4 source address (e.g. no 644 routable address is available on the selected interface), then it 645 MUST ARP for the destination address and then send its packet, with a 646 Link-Local IPv4 source address and a routable destination IPv4 647 address, directly to its destination on the same physical link. The 648 host MUST NOT send the packet to any router for forwarding. 650 In the case of a device with a single interface and only a Link-Local 651 IPv4 address, this requirement can be paraphrased as "ARP for 652 everything". 654 In many network stacks, achieving this "ARP for everything" behaviour 655 may be as simple as having no primary IP router configured, having 656 the primary IP router address configured to 0.0.0.0, or having the 657 primary IP router address set to be the same as the host's own Link- 658 Local IPv4 address. For suggested behavior in multi-homed hosts, see 659 Section 3. 661 2.7. Link-Local Packets Are Not Forwarded 663 A sensible default for applications which are sending from a Link- 664 Local IPv4 address is to explicitly set the IPv4 TTL to 1. This is 665 not appropriate in all cases as some applications may require that 666 the IPv4 TTL be set to other values. 668 An IPv4 packet whose source and/or destination address is in the 669 169.254/16 prefix MUST NOT be sent to any router for forwarding, and 670 any network device receiving such a packet MUST NOT forward it, 671 regardless of the TTL in the IPv4 header. Similarly, a router or 672 other host MUST NOT indiscriminately answer all ARP Requests for 673 addresses in the 169.254/16 prefix. A router may of course answer 674 ARP Requests for one or more Link-Local IPv4 address(es) that it has 675 legitimately claimed for its own use according to the claim-and- 676 defend protocol described in this document. 678 This restriction also applies to multicast packets. IPv4 packets with 679 a Link-Local source address MUST NOT be forwarded off the local link 680 even if they have a multicast destination address. 682 2.8. Link-Local Packets are Local 684 The non-forwarding rule means that hosts may assume that all 685 169.254/16 destination addresses are "on-link" and directly 686 reachable. The 169.254/16 address prefix MUST NOT be subnetted. 687 This specification utilizes ARP-based address collision detection, 688 which functions by broadcasting on the local subnet. Since such 689 broadcasts are not forwarded, were subnetting to be allowed then 690 address conflicts could remain undetected. 692 The non-forwarding rule is important because it is expected that 693 Link-Local-only devices will often be simple devices of the kind that 694 currently use X10 [X10], USB [USB] or FireWire [1394]. 696 The designers of these devices currently assume that they will 697 communicate only with other local devices, and this allows them to 698 produce cost-effective devices by implementing a degree of security 699 appropriate for that expected environment. Any network gateway 700 device that blindly forwards the contents of Link-Local IPv4 packets 701 off the local link (or onto the local link) exposes simple Link- 702 Local-only devices to a much greater degree of risk than their 703 designers may have planned for. 705 This does not mean that Link-Local devices are forbidden from any 706 communication outside the local link. IP hosts that implement both 707 Link-Local and conventional routable IPv4 addresses may still use 708 their routable addresses without restriction as they do today. 710 Simple devices that implement only a Link-Local IPv4 address may also 711 communicate with hosts outside the local link, provided that such 712 communication is mediated through a device capable of enforcing 713 appropriate security controls. For example, a home heating 714 thermostat that implements only a Link-Local IPv4 address could be 715 controlled from a remote Web browser, by having an intermediary on 716 the local network which accepts incoming HTTP connections, uses 717 appropriate cryptographic methods to verify the authority of the 718 remote user, and then uses Link-Local IPv4 packets to communicate 719 with the thermostat to get status and issue commands. 721 It should be understood that this mediated communication is not 722 mandatory; it is an option afforded to designers of extremely simple 723 devices. Any designer of a device desiring unmediated communication 724 outside the local link need only implement today's conventional IP 725 host software (e.g. a DHCP client) in order to enjoy the same degree 726 of global addressability available to other conventional IPv4 hosts. 727 Such networked devices should of course implement a degree of 728 security appropriate to being connected to a global public network. 730 2.9. Higher-Layer Protocol Considerations 732 Similar considerations apply at layers above IP. 734 For example, designers of Web pages (including automatically 735 generated web pages) SHOULD NOT contain links with embedded Link- 736 Local IPv4 addresses if those pages are viewable from hosts outside 737 the local link where the addresses are valid. 739 As Link-Local IPv4 addresses may change at any time and have limited 740 scope, storing Link-Local IPv4 addresses in the DNS is not well 741 understood and is NOT RECOMMENDED. 743 2.10. Privacy Concerns 745 Another reason to restrict leakage of Link-Local IPv4 addresses 746 outside the local link is privacy concerns. If Link-Local IPv4 747 addresses are derived from a hash of the MAC address, some argue that 748 they could be indirectly associated with an individual, and thereby 749 used to track that individual's activities. Within the local link 750 the hardware addresses in the packets are all directly observable, so 751 as long as Link-Local IPv4 addresses don't leave the local link they 752 provide no more information to an intruder than could be gained by 753 direct observation of hardware addresses. 755 2.11. Transition from Link-Local to Routable Address 757 As discussed in Section 1.7, use of a routable address is preferred 758 to assignment of a Link-Local IPv4 address. A Link-Local IPv4 address 759 can be configured due to transient failures, such as incomplete link- 760 layer authentication, spanning tree convergence issues, or because a 761 DHCP server failed to respond to an initial query, or is inoperative 762 for some time. 764 Where a Link-Local IPv4 address is assigned due to a transient 765 failure, experience has shown that five minutes (see Appendix A.2) 766 may be too long an interval to wait prior to attempting to configure 767 with DHCP. This document does not specify a strategy for quickly 768 recovering a routable address in situations where a Link-Local IPv4 769 address is assigned due to a transient failure. In situations where 770 many hosts are present on a single subnet, frequent attempts to 771 contact the DHCP server could result in a heavy traffic load. Further 772 discussion of this issue is provided in [DNAv4]. 774 3. Considerations for Multiple Interfaces 776 These considerations apply whenever a host has multiple IP addresses 777 whether or not it has multiple physical interfaces. Other examples 778 of multiple interfaces include different logical endpoints (tunnels, 779 virtual private networks etc.) and multiple logical networks on the 780 same physical medium. This is often referred to as "multihoming". 782 Hosts which have more than one active interface and elect to 783 implement dynamic configuration of Link-Local IPv4 addresses on one 784 or more of those interfaces will face various problems. This section 785 lists these problems but does no more than indicate how one might 786 solve them. At the time of this writing, there is no silver bullet 787 which solves these problems in all cases, in a general way. 788 Implementors must think through these issues before implementing the 789 protocol specified in this document on a system which may have more 790 than one active interface as part of a TCP/IP stack capable of 791 multihoming. 793 3.1. Scoped addresses 795 A host may be attached to more than one network at the same time. It 796 would be nice if there was a single address space used in every 797 network, but this is not the case. Addresses used in one network, be 798 it a network behind a NAT or a link on which Link-Local IPv4 799 addresses are used, cannot be used in another network and have the 800 same effect. 802 It would also be nice if addresses were not exposed to applications, 803 but they are. Most software using TCP/IP which await messages 804 receives from any interface at a particular port number, for a 805 particular transport protocol. Applications are generally only aware 806 (and care) that they have received a message. The application knows 807 the source address of the sender to whom the application will reply. 809 The first scoped address problem is source address selection. A 810 multihomed host has more than one address. Which address should be 811 used as the source address when sending to a particular destination? 812 This answer is usually answered by referring to a routing table, 813 which expresses which interface (with which address) to send, and how 814 to send (should one forward to a router, or send directly). The 815 choice is made complicated by scoped addresses because the address 816 range in which the destination lies may be ambiguous. The table may 817 not be able to yield a good answer. This problem is bound up with 818 next-hop selection, which is discussed in Section 3.2. 820 The second scoped address problem arises from scoped parameters 821 leaking outside their scope. This is discussed in Section 7. 823 It is possible to overcome these problems. One way is to expose scope 824 information to applications such that they are always aware of what 825 scope a peer is in. This way, the correct interface could be 826 selected, and a safe procedure could be followed with respect to 827 forwarding addresses and other scoped parameters. There are other 828 possible approaches. None of these methods have been standardized for 829 IPv4 nor are they specified in this document. A good API design 830 could mitigate the problems, either by exposing address scopes to 831 'scoped-address aware' applications or by cleverly encapsulating the 832 scoping information and logic so that applications do the right thing 833 without being aware of address scoping. 835 An implementer could undertake to solve these problems, but cannot 836 simply ignore them. With sufficient experience, it is hoped that 837 specifications will emerge explaining how to overcome scoped address 838 multihoming problems. 840 3.2. Address Ambiguity 842 This is a core problem with respect to Link-Local IPv4 addresses 843 configured on more than one interface. What should a host do when it 844 needs to send to Link-Local destination L and L can be resolved using 845 ARP on more than one link? 847 One possibility is to support this only in the case where the 848 application specifically expresses which interface to send from. 850 There no standard or obvious solution to this problem. Existing 851 application software written for the Internet protocol suite is 852 largely incapable of dealing with address ambiguity. This does not 853 preclude an implementer from finding a solution, writing applications 854 which are able to use it, and providing a host which can support 855 dynamic configuration of Link-Local IPv4 addresses on more than one 856 interface. This solution will almost surely not be generally 857 applicable to existing software and transparent to higher layers, 858 however. 860 3.3. Interaction with Hosts with Routable Addresses 862 Attention is paid in this specification to transition from the use of 863 Link-Local IPv4 addresses to routable addresses (see Section 1.5). 864 The intention is to allow a host with a single interface to first 865 support Link-Local configuration then gracefully transition to the 866 use of a routable address. Since the host transitioning to the use of 867 a routable address will not advertise scoped address information, the 868 scoped address issues described in Section 3.1 will apply. A host 869 which conforms to this specification will know that a Link-Local IPv4 870 destination must be reached by forwarding to the destination, not to 871 a router, even if the host is sending from a routable address. 873 A host with a Link-Local IPv4 address may send to a destination which 874 does not have a Link-Local IPv4 address. If the host is not 875 multihomed, the procedure is simple and unambiguous: Using ARP and 876 forwarding directly to on-link destinations is the default route. If 877 the host is multihomed, however, the routing policy is more complex, 878 especially if one of the interfaces is configured with a routable 879 address and the default route is (sensibly) directed at a router 880 accessible through that interface. The following example illustrates 881 this problem and provides a common solution to it. 883 i1 +---------+ i2 i3 +-------+ 884 ROUTER-------= HOST1 =---------= HOST2 | 885 link1 +-------=-+ link2 +-------+ 887 In the figure above, HOST1 is connected to link1 and link2. Interface 888 i1 is configured with a routable address, while i2 is a Link-Local 889 IPv4 address. HOST1 has its default route set to ROUTER's address, 890 through i1. HOST1 will route to destinations in 169.254/16 to i2, 891 sending directly to the destination. 893 HOST2 has a configured (non-Link-Local) IPv4 address assigned to i3. 895 Using a name resolution or service discovery protocol HOST1 can 896 discover HOST2's address. Since HOST2's address is not in 169.254/16, 897 HOST1's routing policy will send datagrams to HOST2 via i1, to the 898 ROUTER. Unless there is a route from ROUTER to HOST2, the datagrams 899 sent from HOST1 to HOST2 will not reach it. 901 One solution to this problem is for a host to attempt to reach any 902 host locally (using ARP) for which it receives an unreachable ICMP 903 error message (ICMP message codes 0, 1, 6 or 7, see [RFC792]). The 904 host tries all its attached links in a round robin fashion. This has 905 been implemented successfully for some IPv6 hosts, to circumvent 906 exactly this problem. In terms of this example, HOST1 upon failing to 907 reach HOST2 via the ROUTER, will attempt to forward to HOST2 via i2 908 and succeed. 910 It may also be possible to overcome this problem using techniques 911 described in section 3.2, or other means not discussed here. This 912 specification does not provide a standard solution, nor does it 913 preclude implementers from supporting multihomed configurations, 914 provided that they address the concerns in this section for the 915 applications which will be supported on the host. 917 3.4. Unintentional Autoimmunity 919 Care must be taken if a multihomed host can support more than one 920 interface on the same link, all of which support Link-Local IPv4 921 autoconfiguration. If these interfaces attempt to allocate the same 922 address, they will defend the host against itself - causing the 923 claiming algorithm to fail. The simplest solution to this problem is 924 to run the algorithm independently on each interface configured with 925 Link-Local IPv4 addresses. 927 In particular, ARP packets which appear to claim an address which is 928 assigned to a specific interface, indicate conflict only if they are 929 received on that interface and their hardware address is of some 930 other interface. 932 If a host has two interfaces on the same network, then claiming and 933 defending on those interfaces must ensure that they end up with 934 different addresses just as if they were on different hosts. 936 4. Healing of Network Partitions 938 Hosts on disjoint network links may configure the same Link-Local 939 IPv4 address. If these separate network links are later joined or 940 bridged together, then there may be two hosts which are now on the 941 same link, trying to use the same address. When either host attempts 942 to communicate with any other host on the network, it will at some 943 point broadcast an ARP packet which will enable the hosts in question 944 to detect that there is an address conflict. 946 When these address conflicts are detected, the subsequent forced 947 reconfiguration may be disruptive, causing TCP connections to be 948 broken. However, it is expected that such disruptions will be rare. 949 It should be relatively uncommon for networks to be joined while 950 hosts on those networks are active. Also, 65024 addresses are 951 available for Link-Local IPv4 use, so even when two small networks 952 are joined, the chance of collision for any given host is fairly 953 small. 955 When joining two large networks (defined as networks with a 956 substantial number of hosts per segment) there is a greater chance of 957 collision. In such networks, it is likely that the joining of 958 previously separated segments will result in one or more hosts 959 needing to change their Link-Local IPv4 address, with subsequent loss 960 of TCP connections. In cases where separation and re-joining is 961 frequent, as in remotely bridged networks, this could prove 962 disruptive. However, unless the number of hosts on the joined 963 segments is very large, the traffic resulting from the join and 964 subsequent address conflict resolution will be small. 966 Sending ARP replies that have Link-Local sender IPv4 addresses via 967 broadcast instead of unicast ensures that these conflicts can be 968 detected as soon as they become potential problems, but no sooner. 969 For example, if two disjoint network links are joined, where hosts A 970 and B have both configured the same Link-Local address, X, they can 971 remain in this state until A, B or some other host attempts to 972 initiate communication. If some other host C now sends an ARP request 973 for address X, and hosts A and B were to both reply with conventional 974 unicast ARP replies, then host C might be confused, but A and B still 975 wouldn't know there is a problem because neither would have seen the 976 other's packet. Sending these replies via broadcast allows A and B 977 see each other's conflicting ARP packets and respond accordingly. 979 Note that sending periodic gratuitous ARPs in an attempt to detect 980 these conflicts sooner is not necessary, wastes network bandwidth, 981 and may actually be detrimental. For example, if the network links 982 were joined only briefly, and were separated again before any new 983 communication involving A or B were initiated, then the temporary 984 conflict would have been benign and no forced reconfiguration would 985 have been required. Triggering an unnecessary forced reconfiguration 986 in this case would not serve any useful purpose. Hosts SHOULD NOT 987 send periodic gratuitous ARPs. 989 5. Security Considerations 991 The use of IPv4 Link-Local Addresses may open a network host to new 992 attacks. In particular, a host that previously did not have an IP 993 address, and no IP stack running, was not susceptible to IP-based 994 attacks. By configuring a working address, the host may now be 995 vulnerable to IP-based attacks. 997 The ARP protocol [RFC826] is insecure. A malicious host may send 998 fraudulent ARP packets on the network, interfering with the correct 999 operation of other hosts. For example, it is easy for a host to 1000 answer all ARP requests with replies giving its own hardware address, 1001 thereby claiming ownership of every address on the network. 1003 NOTE: The existence of local links without physical security, such as 1004 LANs with attached wireless base stations, means that expecting all 1005 local links to be secure enough that normal precautions can be 1006 dispensed with is an extremely dangerous practice, which will expose 1007 users to considerable risks. 1009 A host implementing Link-Local IPv4 configuration has the additional 1010 vulnerability to selective reconfiguration and disruption. It is 1011 possible for an on-link attacker to issue ARP packets which would 1012 cause a host to break all its connections by switching to a new 1013 address. The attacker could force the host implementing Link-Local 1014 IPv4 configuration to select certain addresses, or prevent it from 1015 ever completing address selection. This is a distinct threat from 1016 that posed by spoofed ARPs, described in the preceding paragraph. 1018 Implementations and users should also note that a node that gives up 1019 an address and reconfigures, as required by section 2.5, allows the 1020 possibility that another node can easily successfully hijack existing 1021 TCP connections. Before abandoning an address due to a conflict, 1022 hosts SHOULD actively attempt to reset any existing connections using 1023 that address. 1025 Implementers are advised that the Internet Protocol architecture 1026 expects every networked device or host must implement security which 1027 is adequate to protect the resources to which the device or host has 1028 access, including the network itself, against known or credible 1029 threats. Even though use of Link-Local IPv4 addresses may reduce the 1030 number of threats to which a device is exposed, implementers of 1031 devices supporting the Internet Protocol must not assume that a 1032 customer's local network is free from security risks. 1034 While there may be particular kinds of devices, or particular 1035 environments, for which the security provided by the network is 1036 adequate to protect the resources that are accessible by the device, 1037 it would be misleading to make a general statement to the effect that 1038 the requirement to provide security is reduced for devices using 1039 Link-Local IPv4 addresses as a sole means of access. 1041 In all cases, whether or not Link-Local IPv4 addresses are used, it 1042 is necessary for implementers of devices supporting the Internet 1043 Protocol to analyze the known and credible threats to which a 1044 specific host or device might be subjected, and to the extent that it 1045 is feasible, to provide security mechanisms which ameliorate or 1046 reduce the risks associated with such threats. 1048 6. Application Programming Considerations 1050 Use of Link-Local IPv4 autoconfigured addresses presents additional 1051 challenges to writers of applications and may result in existing 1052 application software failing. 1054 6.1. Address Changes, Failure and Recovery 1056 Link-Local IPv4 addresses used by an application may change over 1057 time. Some application software encountering an address change will 1058 completely fail. For example, client TCP connections will fail, 1059 servers whose addresses change will have to be rediscovered, blocked 1060 reads and writes will exit with an error condition, and so on. 1062 Vendors producing application software which will be used on IP 1063 implementations supporting Link-Local IPv4 address configuration 1064 SHOULD detect and cope with address change events. Vendors producing 1065 IPv4 implementations supporting Link-Local IPv4 address configuration 1066 SHOULD expose address change events to applications. 1068 6.2. Limited Forwarding of Locators 1070 Link-Local IPv4 addresses MUST NOT be forwarded via an application 1071 protocol (for example in a URL), to a destination which is not Link- 1072 Local, on the same link. This is discussed further in Section 2.9 and 1073 3. 1075 Existing distributed application software which forwards address 1076 information may fail. For example, FTP [RFC 959] passive mode 1077 transmits the IPv4 address of the client. Assume a client starts up 1078 and obtains its *passive* IPv4 configuration at a time when the host 1079 has only a Link-Local address. Later, the host gets a global IP 1080 address configuration (for one of its interfaces). The client uses 1081 this global IPv4 address to contact an FTP server off of the local 1082 link for which it had (or still has) a Link-Local IPv4 address 1083 configured. If the FTP client transmits its passive IPv4 1084 configuration to the FTP server, the FTP server will be unable to 1085 reach the FTP client. The passive FTP operation will fail. 1087 6.3. Address Ambiguity 1089 Application software run on a multihomed host which supports Link- 1090 Local IPv4 address configuration on more than one interface may fail. 1091 This is because application software assumes that an IPv4 address is 1092 unambiguous, that it can refer to only one host. Link-Local IPv4 1093 addresses are unique only on a single link. A host attached to 1094 multiple links can easily encounter a situation where the same 1095 address is present on more than one interface, or first on one 1096 interface, later on another; in any case associated with more than 1097 one host. Most existing software is not prepared for this ambiguity. 1098 In the future, application programming interfaces could be developed 1099 to prevent this problem. This issue is discussed in Section 3. 1101 7. Router Considerations 1103 A router MUST NOT forward a packet with a Link-Local IPv4 source or 1104 destination address, irrespective of the router's default route 1105 configuration or routes obtained from dynamic routing protocols. 1107 A router which receives a packet with a Link-Local IPv4 destination 1108 address on an interface which either has no Link-Local IPv4 address 1109 configured or is configured with a different address than the 1110 destination of the packet MUST NOT forward the packet. This prevents 1111 forwarding of packets back onto the network segment from which they 1112 originated, or to any other segment. 1114 8. IANA Considerations 1116 The IANA has allocated the prefix 169.254/16 for the use described in 1117 this document. The first and last 256 addresses in this range 1118 (169.254.0.x and 169.254.255.x) are allocated by Standards Action, as 1119 defined in BCP 26. No other IANA services are required by this 1120 document. 1122 9. Constants 1124 The following timing constants are used in this protocol. 1126 PROBE_MIN 1 second 1127 PROBE_MAX 2 seconds 1129 10. References 1131 10.1. Normative References 1133 [RFC792] Postel, J., "Internet Control Message Protocol", RFC 792, 1134 September 1981. 1136 [RFC826] D. Plummer, "An Ethernet Address Resolution Protocol -or- 1137 Converting Network Addresses to 48-bit Ethernet Address for 1138 Transmission on Ethernet Hardware", STD 37, RFC 826, November 1139 1982. 1141 [RFC2119] S. Bradner, "Key words for use in RFCs to Indicate Requirement 1142 Levels", RFC 2119, March 1997. 1144 [RFC2434] Alvestrand, H. and T. Narten, "Guidelines for Writing an IANA 1145 Considerations Section in RFCs", BCP 26, RFC 2434, October 1146 1998. 1148 10.2. Informative References 1150 [802] IEEE Standards for Local and Metropolitan Area Networks: 1151 Overview and Architecture, ANSI/IEEE Std 802, 1990. 1153 [802.1d] ISO/IEC 15802-3 Information technology - Telecommunications 1154 and information exchange between systems - Local and 1155 metropolitan area networks - Common specifications - Part 3: 1156 Media access Control (MAC) Bridges, (also ANSI/IEEE Std 1157 802.1D-1998), 1998. 1159 [802.3] ISO/IEC 8802-3 Information technology - Telecommunications and 1160 information exchange between systems - Local and metropolitan 1161 area networks - Common specifications - Part 3: Carrier Sense 1162 Multiple Access with Collision Detection (CSMA/CD) Access 1163 Method and Physical Layer Specifications, (also ANSI/IEEE Std 1164 802.3- 1996), 1996. 1166 [802.5] ISO/IEC 8802-5 Information technology - Telecommunications and 1167 information exchange between systems - Local and metropolitan 1168 area networks - Common specifications - Part 5: Token ring 1169 access method and physical layer specifications, (also 1170 ANSI/IEEE Std 802.5-1998), 1998. 1172 [802.11] Information technology - Telecommunications and information 1173 exchange between systems - Local and metropolitan area 1174 networks - Specific Requirements Part 11: Wireless LAN Medium 1175 Access Control (MAC) and Physical Layer (PHY) Specifications, 1176 IEEE Std. 802.11-1999, 1999. 1178 [1394] Standard for a High Performance Serial Bus. Institute of 1179 Electrical and Electronic Engineers, IEEE Standard 1394-1995, 1180 1995. 1182 [RFC1918] Y. Rekhter et.al., "Address Allocation for Private Internets", 1183 RFC 1918, February 1996. 1185 [RFC2131] R. Droms, "Dynamic Host Configuration Protocol", RFC 2131, 1186 March 1997. 1188 [RFC2462] S. Thomson and T. Narten, "IPv6 Stateless Address 1189 Autoconfiguration", RFC 2462, December 1998. 1191 [RFC3027] Holdrege, M. and P. Srisuresh, "Protocol Complications with 1192 the IP Network Address Translator", RFC 3027, January 2001. 1194 [DNAv4] Aboba, B., "Detection of Network Attachment (DNA) in IPv4", 1195 draft-ietf-dhc-dna-ipv4-01.txt, Internet draft (work in 1196 progress), September 2003. 1198 [LLMNR] Esibov, L., Aboba, B. and D. Thaler, "Linklocal Multicast Name 1199 Resolution (LLMNR)", draft-ietf-dnsext-mdns-23.txt, Internet 1200 draft (work in progress), August 2003. 1202 [USB] Universal Serial Bus Implementers Forum 1204 [X10] X10 Ltd. 1206 Acknowledgments 1208 We would like to thank (in alphabetical order) Jim Busse, Pavani 1209 Diwanji, Donald Eastlake 3rd, Robert Elz, Peter Ford, Spencer 1210 Giacalone, Josh Graessley, Myron Hattig, Hugh Holbrook, Christian 1211 Huitema, Richard Johnson, Kim Yong-Woon, Mika Liljeberg, Rod Lopez, 1212 Keith Moore, Satish Mundra, Thomas Narten, Erik Nordmark, Philip Nye, 1213 Howard Ridenour, Daniel Senie, Dieter Siegmund, Valery Smyslov and 1214 Ryan Troll for their contributions. 1216 Authors' Addresses 1218 Stuart Cheshire 1219 Apple Computer, Inc. 1220 1 Infinite Loop 1221 Cupertino 1222 California 95014, USA 1224 Phone: +1 408 974 3207 1225 EMail: rfc@stuartcheshire.org 1227 Bernard Aboba 1228 Microsoft Corporation 1229 One Microsoft Way 1230 Redmond, WA 98052 1232 Phone: +1 425 706 6605 1233 EMail: bernarda@microsoft.com 1235 Erik Guttman 1236 Sun Microsystems 1237 Eichhoelzelstr. 7 1238 74915 Waibstadt Germany 1240 Phone: +49 7263 911 701 1241 Email: erik.guttman@sun.com 1243 Appendix A - Prior Implementations 1245 A.1. Apple Mac OS 8.x and 9.x. 1247 Mac OS chooses the IP address on a pseudo-random basis. The selected 1248 address is saved in persistent storage for continued use after 1249 reboot, when possible. 1251 Mac OS sends nine DHCPDISCOVER packets, with an interval of two 1252 seconds between packets. If no response is received from any of these 1253 requests (18 seconds), it will autoconfigure. 1255 Upon finding that a selected address is in use, Mac OS will select a 1256 new random address and try again, at a rate limited to no more than 1257 one attempt every two seconds. 1259 Autoconfigured Mac OS systems check for the presence of a DHCP server 1260 every five minutes. If a DHCP server is found but Mac OS is not 1261 successful in obtaining a new lease, it keeps the existing 1262 autoconfigured IP address. If Mac OS is successful at obtaining a 1263 new lease, it drops all existing connections without warning. This 1264 may cause users to lose sessions in progress. Once a new lease is 1265 obtained, Mac OS will not allocate further connections using the 1266 autoconfigured IP address. 1268 Mac OS systems do not send packets addressed to a Link-Local address 1269 to the default gateway if one is present; these addresses are always 1270 resolved on the local segment. 1272 Mac OS systems by default send all outgoing unicast packets with a 1273 TTL of 255. All multicast and broadcast packets are also sent with a 1274 TTL of 255 if they have a source address in the 169.254/16 prefix. 1276 Mac OS implements media sense where the hardware (and driver 1277 software) supports this. As soon as network connectivity is 1278 detected, a DHCPDISCOVER will be sent on the interface. This means 1279 that systems will immediately transition out of autoconfigured mode 1280 as soon as connectivity is restored. 1282 A.2. Apple Mac OS X Version 10.2 1284 Mac OS X chooses the IP address on a pseudo-random basis. The 1285 selected address is saved in memory so that it can be re-used during 1286 subsequent autoconfiguration attempts during a single boot of the 1287 system. 1289 Autoconfiguration of a Link-Local address depends on the results of 1290 the DHCP process. DHCP sends two packets, with timeouts of one and 1291 two seconds. If no response is received (three seconds), it begins 1292 autoconfiguration. DHCP continues sending packets in parallel for a 1293 total time of 60 seconds. 1295 At the start of autoconfiguration, it generates 10 unique random IP 1296 addresses, and probes each one in turn for 2 seconds. It stops 1297 probing after finding an address that is not in use, or the list of 1298 addresses is exhausted. 1300 If DHCP is not successful, it waits five minutes before starting over 1301 again. Once DHCP is successful, the autoconfigured Link-Local 1302 address is given up. The Link-Local subnet, however, remains 1303 configured. 1305 Autoconfiguration is only attempted on a single interface at any 1306 given moment in time. 1308 Mac OS X ensures that the connected interface with the highest 1309 priority is associated with the Link-Local subnet. Packets addressed 1310 to a Link-Local address are never sent to the default gateway, if one 1311 is present. Link-local addresses are always resolved on the local 1312 segment. 1314 Mac OS X implements media sense where the hardware and driver support 1315 it. When the network media indicates that it has been connected, the 1316 autoconfiguration process begins again, and attempts to re-use the 1317 previously assigned Link-Local address. When the network media 1318 indicates that it has been disconnected, the system waits four 1319 seconds before de-configuring the Link-Local address and subnet. If 1320 the connection is restored before that time, the autoconfiguration 1321 process begins again. If the connection is not restored before that 1322 time, the system chooses another interface to autoconfigure. 1324 Mac OS X by default sends all outgoing unicast packets with a TTL of 1325 255. All multicast and broadcast packets are also sent with a TTL of 1326 255 if they have a source address in the 169.254/16 prefix. 1328 A.3. Microsoft Windows 98/98SE 1330 Windows 98/98SE systems choose their Link-Local IPv4 address on a 1331 pseudo-random basis. This ensures that systems rebooting will obtain 1332 the same autoconfigured address, unless a conflict is detected. The 1333 address selection algorithm is based on computing a hash on the 1334 interface's MAC address, so that a large collection of hosts should 1335 obey the uniform probability distribution in choosing addresses 1336 within the 169.254/16 address space. 1338 When in INIT state, the Windows 98/98SE DHCP Client sends out a total 1339 of 4 DHCPDISCOVERs, with an inter-packet interval of 6 seconds. When 1340 no response is received after all 4 packets (24 seconds), it will 1341 autoconfigure an address. 1343 The autoconfigure retry count for Windows 98/98SE systems is 10. 1344 After trying 10 autoconfigured IPv4 addresses, and finding all are 1345 taken, the host will boot without an IPv4 address. 1347 Autoconfigured Windows 98/98SE systems check for the presence of a 1348 DHCP server every five minutes. If a DHCP server is found but 1349 Windows 98 is not successful in obtaining a new lease, it keeps the 1350 existing autoconfigured Link-Local IPv4 address. If Windows 98/98SE 1351 is successful at obtaining a new lease, it drops all existing 1352 connections without warning. This may cause users to lose sessions in 1353 progress. Once a new lease is obtained, Windows 98/98SE will not 1354 allocate further connections using the autoconfigured Link-Local IPv4 1355 address. 1357 Windows 98/98SE systems with a Link-Local IPv4 address do not send 1358 packets addressed to a Link-Local IPv4 address to the default gateway 1359 if one is present; these addresses are always resolved on the local 1360 segment. 1362 Windows 98/98SE systems by default send all outgoing unicast packets 1363 with a TTL of 128. TTL configuration is performed by setting the 1364 Windows Registry Key 1365 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services:\Tcpip\ 1366 Parameters\DefaultTTL of type REG_DWORD to the appropriate value. 1367 However, this default TTL will apply to all packets. While this 1368 facility could be used to set the default TTL to 255, it cannot be 1369 used to set the default TTL of Link-Local IPv4 packets to one (1), 1370 while allowing other packets to be sent with a TTL larger than one. 1372 Windows 98/98SE systems do not implement media sense. This means that 1373 network connectivity issues (such as a loose cable) may prevent a 1374 system from contacting the DHCP server, thereby causing it to auto- 1375 configure. When the connectivity problem is fixed (such as when the 1376 cable is re-connected) the situation will not immediately correct 1377 itself. Since the system will not sense the re-connection, it will 1378 remain in autoconfigured mode until an attempt is made to reach the 1379 DHCP server. 1381 The DHCP server included with Windows 98SE Internet Connection 1382 Sharing (ICS) (a NAT implementation) allocates out of the 192.168/16 1383 private address space by default. 1385 However, it is possible to change the allocation prefix via a 1386 registry key, and no checks are made to prevent allocation out of the 1387 Link-Local IPv4 prefix. When configured to do so, Windows 98SE ICS 1388 will NAT packets from the Link-Local IPv4 prefix off the local link. 1389 Windows 98SE ICS does not automatically route for the Link-Local IPv4 1390 prefix, so that hosts obtaining addresses via DHCP cannot communicate 1391 with autoconfigured-only devices. 1393 Other home gateways exist that allocate addresses out of the Link- 1394 Local IPv4 prefix by default. Windows 98/98SE systems can use a 1395 169.254/16 Link-Local IPv4 address as the source address when 1396 communicating with non-Link-Local hosts. However, Windows 98/98SE 1397 does not support router solicitation/advertisement. This means that 1398 Windows 98/98SE systems will typically not be able to discover a 1399 default gateway when in autoconfigured mode. 1401 A.4. Windows XP, 2000 and ME 1403 The autoconfiguration behavior of Windows XP, Windows 2000 and 1404 Windows ME systems is identical to Windows 98/98SE except in the 1405 following respects: 1407 Media Sense 1408 Router Discovery 1409 Silent RIP 1411 Windows XP, 2000 and ME implement media sense. As soon as network 1412 connectivity is detected, a DHCPREQUEST or DHCPDISCOVER will be sent 1413 on the interface. This means that systems will immediately 1414 transition out of autoconfigured mode as soon as connectivity is 1415 restored. 1417 Windows XP, 2000 and ME also support router discovery, although it is 1418 turned off by default. Windows XP and 2000 also support a RIP 1419 listener. This means that it is possible to discover a default 1420 gateway while in autoconfigured mode. 1422 ICS on Windows XP/2000/ME behaves identically to Windows 98SE with 1423 respect to address allocation and NATing of Link-Local prefixes. 1425 Intellectual Property Statement 1427 The IETF has been notified of intellectual property rights claimed in 1428 regard to some or all of the specification contained in this 1429 document. For more information consult the online list of claimed 1430 rights. 1432 The IETF takes no position regarding the validity or scope of any 1433 intellectual property or other rights that might be claimed to 1434 pertain to the implementation or use of the technology described in 1435 this document or the extent to which any license under such rights 1436 might or might not be available; neither does it represent that it 1437 has made any effort to identify any such rights. Information on the 1438 IETF's procedures with respect to rights in standards-track and 1439 standards-related documentation can be found in BCP-11. Copies of 1440 claims of rights made available for publication and any assurances of 1441 licenses to be made available, or the result of an attempt made to 1442 obtain a general license or permission for the use of such 1443 proprietary rights by implementers or users of this specification can 1444 be obtained from the IETF Secretariat. 1446 The IETF invites any interested party to bring to its attention any 1447 copyrights, patents or patent applications, or other proprietary 1448 rights which may cover technology that may be required to practice 1449 this standard. Please address the information to the IETF Executive 1450 Director. 1452 Full Copyright Statement 1454 Copyright (C) The Internet Society (2003). All Rights Reserved. 1455 This document and translations of it may be copied and furnished to 1456 others, and derivative works that comment on or otherwise explain it 1457 or assist in its implementation may be prepared, copied, published 1458 and distributed, in whole or in part, without restriction of any 1459 kind, provided that the above copyright notice and this paragraph are 1460 included on all such copies and derivative works. However, this 1461 document itself may not be modified in any way, such as by removing 1462 the copyright notice or references to the Internet Society or other 1463 Internet organizations, except as needed for the purpose of 1464 developing Internet standards in which case the procedures for 1465 copyrights defined in the Internet Standards process must be 1466 followed, or as required to translate it into languages other than 1467 English. The limited permissions granted above are perpetual and 1468 will not be revoked by the Internet Society or its successors or 1469 assigns. This document and the information contained herein is 1470 provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE 1471 INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR 1472 IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF 1473 THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 1474 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 1476 Open Issues 1478 Open issues with this specification are tracked on the following web 1479 site: 1481 http://www.drizzle.com/~aboba/ZEROCONF/issues.html 1483 Expiration Date 1485 This memo is filed as , and 1486 expires February 22, 2004.