idnits 2.17.1 draft-cheshire-ipv4-acd-04.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 17. -- Found old boilerplate from RFC 3978, Section 5.5 on line 758. ** 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. ** The document seems to lack an RFC 3979 Section 5, para. 2 IPR Disclosure Acknowledgement. ** The document seems to lack an RFC 3979 Section 5, para. 3 IPR Disclosure Invitation. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** Missing document type: Expected "INTERNET-DRAFT" in the upper left hand corner of the first page ** The document is more than 15 pages and seems to lack a Table of Contents. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- == There are 1 instance of lines with private range IPv4 addresses in the document. If these are generic example addresses, they should be changed to use any of the ranges defined in RFC 6890 (or successor): 192.0.2.x, 198.51.100.x or 203.0.113.x. -- The draft header indicates that this document updates RFC11th, but the abstract doesn't seem to mention this, which it should. -- The draft header indicates that this document updates RFC826, but the abstract doesn't seem to mention this, which it should. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the RFC 3978 Section 5.4 Copyright Line does not match the current year == 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. (Using the creation date from RFC826, updated by this document, for RFC5378 checks: 1982-11-01) -- 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.) -- The document date (January 2006) is 6673 days in the past. Is this intentional? 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: 'RFC1918' is mentioned on line 310, but not defined Summary: 8 errors (**), 0 flaws (~~), 4 warnings (==), 6 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 Document: draft-cheshire-ipv4-acd-04.txt Stuart Cheshire 2 Category: Standards Track Apple Computer 3 Updates: 826 11th July 2005 4 Expires 11th January 2006 6 IPv4 Address Conflict Detection 7 9 Status of this Memo 11 By submitting this Internet-Draft, each author represents that any 12 applicable patent or other IPR claims of which he or she is aware 13 have been or will be disclosed, and any of which he or she becomes 14 aware will be disclosed, in accordance with Section 6 of BCP 79. 15 For the purposes of this document, the term "BCP 79" refers 16 exclusively to RFC 3979, "Intellectual Property Rights in IETF 17 Technology", published March 2005. 19 Internet-Drafts are working documents of the Internet Engineering 20 Task Force (IETF), its areas, and its working groups. Note that 21 other groups may also distribute working documents as Internet- 22 Drafts. 24 Internet-Drafts are draft documents valid for a maximum of six months 25 and may be updated, replaced, or obsoleted by other documents at any 26 time. It is inappropriate to use Internet-Drafts as reference 27 material or to cite them other than as "work in progress." 29 The list of current Internet-Drafts can be accessed at 30 http://www.ietf.org/1id-abstracts.html 32 The list of Internet-Draft Shadow Directories can be accessed at 33 http://www.ietf.org/shadow.html 35 Abstract 37 When two hosts on the same link attempt to use the same IPv4 address 38 at the same time (except in rare special cases where this has been 39 arranged by prior coordination) problems ensue for one or both hosts. 40 This document describes (i) a simple precaution that a host can take 41 in advance to help prevent this misconfiguration from happening, and 42 (ii) if this misconfiguration does occur, a simple mechanism by which 43 a host can passively detect after-the-fact that it has happened, so 44 that the host or administrator may respond to rectify the problem. 46 1. Introduction 48 Historically, accidentally configuring two Internet hosts with the 49 same IP address has often been an annoying and hard-to-diagnose 50 problem. 52 This is unfortunate, because the existing ARP protocol provides 53 an easy way for a host to detect this kind of misconfiguration and 54 report it to the user. The DHCP specification [RFC2131] briefly 55 mentions the role of ARP in detecting misconfiguration, as 56 illustrated in the following three excerpts from RFC 2131: 58 o the client SHOULD probe the newly received address, 59 e.g., with ARP. 61 o The client SHOULD perform a final check on the parameters 62 (e.g., ARP for allocated network address) 64 o If the client detects that the address is already in use 65 (e.g., through the use of ARP), the client MUST send 66 a DHCPDECLINE message to the server 68 Unfortunately, the DHCP specification does not give any guidance to 69 implementers concerning the number of ARP packets to send, the 70 interval between packets, the total time to wait before concluding 71 that an address may safely be used, or indeed even which kinds of 72 packets a host should be listening for, in order to make this 73 determination. It leaves unspecified the action a host should take 74 if, after concluding that an address may safely be used, it 75 subsequently discovers that it was wrong. It also fails to specify 76 what precautions a DHCP client should take to guard against 77 pathological failure cases, such as DHCP server that repeatedly 78 OFFERs the same address, even though it has been DECLINEd multiple 79 times. 81 The authors of the DHCP specification may have have been justified 82 in thinking at the time that the answers to these questions seemed 83 too simple, obvious and straightforward to be worth mentioning, but 84 unfortunately this left some of the burden of protocol design to each 85 individual implementer. This document seeks to remedy this omission 86 by clearly specifying the required actions for: 88 1. Determining whether use of an address is likely to lead to an 89 addressing conflict. This includes (a) the case where the address 90 is already actively in use by another host on the same link, and 91 (b) the case where two hosts are inadvertently about to begin 92 using the same address, and both are simultaneously in the process 93 of probing to determine whether the address may safely be used. 94 (Section 2.1.) 96 2. Subsequent passive detection that another host on the network is 97 inadvertently using the same address. Even if all hosts observe 98 precautions to avoid using an address that is already in use, 99 conflicts can still occur if two hosts are out of communication at 100 the time of initial interface configuration. This could occur 101 with wireless network interfaces if the hosts are temporarily out 102 of range, or with Ethernet interfaces if the link between two 103 Ethernet hubs is not functioning at the time of address 104 configuration. A well-designed host will handle not only 105 conflicts detected during interface configuration, but also 106 conflicts detected later, for the entire duration of the time 107 that the host is using the address. (Section 2.4.) 109 3. Rate-limiting of address acquisition attempts in the case of 110 an excessive number of repeated conflicts. (Section 2.1.) 112 The utility of IPv4 Address Conflict Detection (ADC) is not limited 113 to DHCP clients. No matter how an address was configured, whether 114 via manual entry by a human user, via information received from a 115 DHCP server, or via any other source of configuration information, 116 detecting conflicts is useful. Upon detecting a conflict, the 117 configuring agent should be notified of the error. In the case where 118 the configuring agent is a human user, that notification may take the 119 form of an error message on a screen, an SNMP trap, or an error 120 message sent via pager. In the case of a DHCP server, that 121 notification takes the form of a DHCP DECLINE message sent to the 122 server. In the case of configuration by some other kind of software, 123 that notification takes the form of an error indication to the 124 software in question, to inform it that the address it selected is 125 in conflict with some other host on the network. The configuring 126 software may choose to cease network operation, or it may 127 automatically select a new address so that the host may re-establish 128 IP connectivity as soon as possible. 130 Allocation of IPv4 Link-Local Addresses [RFC3927] can be thought of 131 as a special-case of this mechanism, where the configuring agent is 132 a pseudo-random number generator, and the action it takes upon being 133 notified of a conflict is to pick a different random number and try 134 again. In fact, this is exactly how IPv4 Link-Local Addressing was 135 implemented in Mac OS 9 back in 1998. If the DHCP client failed to 136 get a response from any DHCP server, it would simply make up a fake 137 response containing a random 169.254.x.x address. If the ARP module 138 reported a conflict for that address, then the DHCP client would try 139 again, making up a new random 169.254.x.x address as many times as 140 was necessary until it succeeded. Implementing ACD as a standard 141 feature of the networking stack has the side-effect that it means 142 that half the work for IPv4 Link-Local Addressing is already done. 144 1.1. Conventions and Terminology Used in this Document 146 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 147 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 148 document are to be interpreted as described in "Key words for use in 149 RFCs to Indicate Requirement Levels" [RFC2119]. 151 Wherever this document uses the term "sender IP address" or "target 152 IP address" in the context of an ARP packet, it is referring to the 153 fields of the ARP packet identified in the ARP specification [RFC826] 154 as "ar$spa" (Sender Protocol Address) and "ar$tpa" (Target Protocol 155 Address) respectively. For the usage of ARP described in this 156 document, each of these fields always contains an IPv4 address. 158 In this document, the term "ARP Probe" is used to refer to an ARP 159 Request packet, broadcast on the local link, with an all-zero 'sender 160 IP address'. The 'sender hardware address' MUST contain the hardware 161 address of the interface sending the packet. The 'sender IP address' 162 field MUST be set to all zeroes, to avoid polluting ARP caches in 163 other hosts on the same link in the case where the address turns out 164 to be already in use by another host. The 'target hardware address' 165 field is ignored and SHOULD be set to all zeroes. The 'target IP 166 address' field MUST be set to the address being probed. An "ARP 167 Probe" conveys both a question ("Is anyone using this address?") 168 and an implied statement ("This is the address I intend to use."). 170 In this document, the term "ARP Announcement" is used to refer to 171 an ARP Request packet, broadcast on the local link, identical to 172 the ARP probe described above, except that both the sender and 173 target IP address fields contain the IP address being announced. 174 It conveys a stronger statement than an "ARP Probe", namely, 175 "This is the address I am now using." 177 The following timing constants are used in this protocol; they are 178 not intended to be user-configurable. These constants are referenced 179 in Section 2, which describes the operation of the protocol in 180 detail. 182 PROBE_WAIT 1 second (initial random delay) 183 PROBE_NUM 3 (number of probe packets) 184 PROBE_MIN 1 second (minimum delay until repeated probe) 185 PROBE_MAX 2 seconds (maximum delay until repeated probe) 186 ANNOUNCE_WAIT 2 seconds (delay before announcing) 187 ANNOUNCE_NUM 2 (number of announcement packets) 188 ANNOUNCE_INTERVAL 2 seconds (time between announcement packets) 189 MAX_CONFLICTS 10 (max conflicts before rate limiting) 190 RATE_LIMIT_INTERVAL 60 seconds (delay between successive attempts) 191 DEFEND_INTERVAL 10 seconds (minimum interval between defensive 192 ARPs). 194 1.2 Relationship to RFC 826 196 This document does not modify any of the protocol rules in RFC 826. 197 It does not modify the packet format, or the meaning of any 198 of the fields. The existing rules for "Packet Generation" and 199 "Packet Reception" still apply exactly as specified in RFC 826. 201 This document expands on RFC 826 by specifying: 203 (1) that a specific ARP Request should be generated when an interface 204 is configured, to discover if the address is already in use, and 206 (2) an additional trivial test that should be performed on each 207 received ARP packet, to facilitate passive ongoing conflict 208 detection. This additional test creates no additional packet 209 overhead on the network (no additional packets are sent) and 210 negligible additional CPU burden on hosts, since every host 211 implementing ARP is *already* required to process every received 212 ARP packet according to the "Packet Reception" rules specified in 213 RFC 826. These rules already include checking to see if the 214 sender IP address of the ARP packet appears in any of the entries 215 in the host's ARP cache; the additional test is simply to check 216 to see if the sender IP address is the host's *own* IP address, 217 potentially as little as a single additional machine instruction 218 on many architectures. 220 As already specified in RFC 826, an ARP Request packet serves two 221 functions, an assertion and a question: 223 * Assertion: 224 The fields "ar$sha" (Sender Hardware Address) and "ar$spa" (Sender 225 Protocol Address) together serve as an assertion of a fact, that 226 the stated Protocol Address is mapped to the stated Hardware 227 Address. 229 * Question: 230 The fields "ar$tha" (Target Hardware Address, zero) and "ar$tpa" 231 (Target Protocol Address) serve as a question, asking, for the 232 stated Protocol Address, to which Hardware Address it is mapped. 234 This document clarifies what it means to have one without the other. 236 1.2.1 Broadcast Replies 238 In some applications of IPv4 Address Conflict Detection (ACD), it 239 may be advantageous to deliver ARP Replies using broadcast instead of 240 unicast because this allows address conflicts to be detected sooner 241 than might otherwise happen. For example, "Dynamic Configuration of 242 IPv4 Link-Local Addresses" [RFC3927] uses ACD exactly as specified 243 here, but additionally specifies that ARP Replies should be sent 244 using broadcast, because in that context the trade-off of increased 245 broadcast traffic in exchange for improved reliability and 246 fault-tolerance was deemed to be an appropriate one. There may be 247 other future specifications where the same trade-off is appropriate. 249 RFC 826 implies that replies to ARP Requests are usually delivered 250 using unicast, but it is also acceptable to deliver ARP Replies using 251 broadcast. The "Packet Reception" rules in RFC 826 specify that the 252 content of the "ar$spa" field should be processed *before* examining 253 the "ar$op" field, so any host that correctly implements the Packet 254 Reception algorithm specified in RFC 826 will correctly handle ARP 255 Replies delivered via link-layer broadcast. 257 1.3. Applicability 259 This specification applies to all IEEE 802 Local Area Networks (LANs) 260 [802], including Ethernet [802.3], Token-Ring [802.5] and IEEE 802.11 261 wireless LANs [802.11], as well as to other link-layer technologies 262 that operate at data rates of at least 1 Mbps, have a round-trip 263 latency of at most one second, and use ARP [RFC826] to map from IP 264 addresses to link-layer hardware addresses. Wherever this document 265 uses the term "IEEE 802", the text applies equally to any of these 266 network technologies. 268 Link-layer technologies that support ARP but operate at rates below 269 1 Mbps or latencies above one second will still work correctly with 270 this protocol, but more often may have to handle late conflicts 271 detected after the Probing phase has completed. On these kinds 272 of link, it may be desirable to specify different values for the 273 following parameters: 275 (a) PROBE_NUM, PROBE_MIN, and PROBE_MAX, the number of, and interval 276 between, ARP probes, explained in Section 2.1.1. 278 (b) ANNOUNCE_NUM and ANNOUNCE_INTERVAL, the number of, and interval 279 between, ARP announcements, explained in Section 2.3. 281 (c) RATE_LIMIT_INTERVAL and MAX_CONFLICTS, controlling the maximum 282 rate at which address claiming may be attempted, explained in 283 Section 2.1.1. 285 (d) DEFEND_INTERVAL, the time interval between conflicting ARPs below 286 which a host MUST NOT attempt to defend its address, explained in 287 Section 2.4. 289 Link-layer technologies that do not support ARP may be able to use 290 other techniques for determining whether a particular IP address is 291 currently in use. However, implementing Address Conflict Detection 292 for such networks is outside the scope of this document. 294 For the protocol specified in this document to be effective, 295 it is not necessary that every host on the link implements it. 296 For a given host implementing this specification to be protected 297 against accidental address conflicts, all that is required is that 298 the peers on the same link correctly implement the ARP protocol as 299 given in RFC 826. To be specific, when a peer host receives an ARP 300 Request where the Target Protocol Address of the ARP Request matches 301 (one of) that host's IP address(es) configured on that interface, 302 then as long as it properly responds with a correctly-formatted ARP 303 Reply, the querying host will be able to detect that the address is 304 already in use. 306 The specifications in this document allow hosts to detect conflicts 307 between two hosts using the same address on the same physical link. 308 ACD does not detect conflicts between two hosts using the same 309 address on different physical links, and indeed it should not. 310 For example, the address 10.0.0.1 [RFC1918] is in use by countless 311 devices on countless private networks throughout the world, and this 312 is not a conflict, because they are on different links. It would 313 only be a conflict if two such devices were to be connected to the 314 same link, and when this happens (as it sometimes does), this is a 315 perfect example of a situation where ACD is extremely useful to 316 detect and report (and/or automatically correct) this error. 318 For the purposes of this document, a set of hosts is considered to 319 be "on the same link" if: 321 - when any host A from that set sends a packet to any other host B 322 in that set, using unicast, multicast, or broadcast, the entire 323 link-layer packet payload arrives unmodified, and 325 - a broadcast sent over that link by any host from that set of hosts 326 can be received by every other host in that set 328 The link-layer *header* may be modified, such as in Token Ring Source 329 Routing [802.5], but not the link-layer *payload*. In particular, if 330 any device forwarding a packet modifies any part of the IP header or 331 IP payload then the packet is no longer considered to be on the same 332 link. This means that the packet may pass through devices such as 333 repeaters, bridges, hubs or switches and still be considered to be on 334 the same link for the purpose of this document, but not through a 335 device such as an IP router that decrements the TTL or otherwise 336 modifies the IP header. 338 2. Address Probing, Announcing, Conflict Detection and Defense 340 This section describes initial probing to safely determine whether an 341 address is already in use, announcing the chosen address, ongoing 342 conflict checking, and optional use of broadcast ARP Replies to 343 provide faster conflict detection. 345 2.1 Probing an Address 347 Before beginning to use an IPv4 address (whether received from manual 348 configuration, DHCP, or some other means), a host implementing this 349 specification MUST test to see if the address is already in use, by 350 broadcasting ARP Probe packets. This also applies when when a 351 network interface transitions from an inactive to an active state, 352 when a computer awakes from sleep, when a link-state change signals 353 that an Ethernet cable has been connected, when an 802.11 wireless 354 interface associates with a new base station, or any other change in 355 connectivity where a host becomes actively connected to a logical 356 link. 358 A host MUST NOT perform this check periodically as a matter of 359 course. This would be a waste of network bandwidth, and is 360 unnecessary due to the ability of hosts to passively discover 361 conflicts, as described in Section 2.4. 363 2.1.1. Probe Details 365 A host probes to see if an address is already in use by broadcasting 366 an ARP Request for the desired address. The client MUST fill in the 367 'sender hardware address' field of the ARP Request with the hardware 368 address of the interface through which it is sending the packet. The 369 'sender IP address' field MUST be set to all zeroes, to avoid 370 polluting ARP caches in other hosts on the same link in the case 371 where the address turns out to be already in use by another host. 372 The 'target hardware address' field is ignored and SHOULD be set to 373 all zeroes. The 'target IP address' field MUST be set to the address 374 being probed. An ARP Request constructed this way with an all-zero 375 'sender IP address' is referred to as an "ARP Probe". 377 When ready to begin probing, the host should then wait for a random 378 time interval selected uniformly in the range zero to PROBE_WAIT 379 seconds, and should then send PROBE_NUM probe packets, each of these 380 probe packets spaced randomly, PROBE_MIN to PROBE_MAX seconds apart. 381 This initial random delay helps ensure that a large number of hosts 382 powered on at the same time do not all send their initial probe 383 packets simultaneously. 385 If during this period, from the beginning of the probing process 386 until ANNOUNCE_WAIT seconds after the last probe packet is sent, the 387 host receives any ARP packet (Request *or* Reply) on the interface 388 where the probe is being performed where the packet's 'sender IP 389 address' is the address being probed for, then the host MUST treat 390 this address as being in use by some other host, and should indicate 391 to the configuring agent (human operator, DHCP server, etc.) that the 392 proposed address is not acceptable. 394 In addition, if during this period the host receives any ARP Probe 395 where the packet's 'target IP address' is the address being probed 396 for, and the packet's 'sender hardware address' is not the hardware 397 address of the interface the host is attempting to configure, then 398 the host MUST similarly treat this as an address conflict and signal 399 an error to the configuring agent as above. This can occur if two 400 (or more) hosts have, for whatever reason, been inadvertently 401 configured with the same address, and both are simultaneously in the 402 process of probing that address to see if it can safely be used. 404 NOTE: The check that the packet's 'sender hardware address' is not 405 the hardware address of any of the host's interfaces is important. 406 Some kinds of Ethernet hub (often called a "buffered repeater") and 407 many wireless access points may "rebroadcast" any received broadcast 408 packets to all recipients, including the original sender itself. For 409 this reason, the precaution described above is necessary to ensure 410 that a host is not confused when it sees its own ARP packets echoed 411 back. 413 A host implementing this specification MUST take precautions to limit 414 the rate at which it probes for new candidate addresses: If the host 415 experiences MAX_CONFLICTS or more address conflicts on a given 416 interface, then the host MUST limit the rate at which it probes for 417 new addresses on this interface to no more than one per 418 RATE_LIMIT_INTERVAL. This is to prevent catastrophic ARP storms in 419 pathological failure cases, such as a defective DHCP server that 420 repeatedly assigns the same address to every host that asks for one. 421 This rate limiting rule applies not only to conflicts experienced 422 during the initial probing phase, but also to conflicts experienced 423 later, as described in Section 2.4 "Ongoing Address Conflict 424 Detection and Address Defense". 426 If, by ANNOUNCE_WAIT seconds after the transmission of the last ARP 427 Probe no conflicting ARP Reply or ARP Probe has been received, then 428 the host has successfully determined that the desired address may be 429 used safely. 431 2.2 Shorter Timeouts on Appropriate Network Technologies 433 Network technologies may emerge for which shorter delays are 434 appropriate than those required by this document. A subsequent IETF 435 publication may be produced providing guidelines for different values 436 for PROBE_WAIT, PROBE_NUM, PROBE_MIN and PROBE_MAX on those 437 technologies. 439 If the situation arises where different hosts on a link are using 440 different timing parameters, this does not cause any problems. This 441 protocol is not dependent on all hosts on a link implementing the 442 same version of the protocol; indeed, this protocol is not dependent 443 on all hosts on a link implementing the protocol at all. All that is 444 required is that all hosts implement ARP as specified in RFC 826, and 445 correctly answer ARP Requests they receive. In the situation where 446 different hosts are using different timing parameters, all that will 447 happen is that some hosts will configure their interfaces quicker 448 than others. In the unlikely event that an address conflict is not 449 detected during the address probing phase, the conflict will still be 450 detected by the Ongoing Address Conflict Detection described below in 451 Section 2.4. 453 2.3 Announcing an Address 455 Having probed to determine that a desired address may be used safely, 456 a host implementing this specification MUST then announce that it 457 is commencing to use this address by broadcasting ANNOUNCE_NUM ARP 458 announcements, spaced ANNOUNCE_INTERVAL seconds apart. An ARP 459 announcement is identical to the ARP Probe described above, except 460 that now the sender and target IP addresses are both set to the 461 host's newly selected IPv4 address. The purpose of these ARP 462 announcements is to make sure that other hosts on the link do not 463 have stale ARP cache entries left over from some other host that may 464 previously have been using the same address. The host may begin 465 legitimately using the IP address immediately after sending the first 466 of the two ARP announcements, and the sending of the second ARP 467 announcement may be completed asynchronously, concurrent with other 468 networking operations the host may wish to perform. 470 2.4 Ongoing Address Conflict Detection and Address Defense 472 Address conflict detection is not limited to only the time of initial 473 interface configuration, when a host is sending ARP probes. Address 474 conflict detection is an ongoing process that is in effect for as 475 long as a host is using an address. At any time, if a host receives 476 an ARP packet (Request *or* Reply) where the 'sender IP address' is 477 (one of) the host's own IP address(es) configured on that interface, 478 but the 'sender hardware address' does not match any of the host's 479 own interface addresses, then this is a conflicting ARP packet, 480 indicating some other host also thinks it is validly using this 481 address. To resolve the address conflict, a host MUST respond to a 482 conflicting ARP packet as described in either (a), (b) or (c) below: 484 (a) Upon receiving a conflicting ARP packet, a host MAY elect to 485 immediately cease using the address, and signal an error to the 486 configuring agent as described above, or 488 (b) If a host currently has active TCP connections or other reasons 489 to prefer to keep the same IPv4 address, and it has not seen any 490 other conflicting ARP packets within the last DEFEND_INTERVAL 491 seconds, then it MAY elect to attempt to defend its address by 492 recording the time that the conflicting ARP packet was received, and 493 then broadcasting one single ARP announcement, giving its own IP and 494 hardware addresses as the sender addresses of the ARP. Having done 495 this, the host can then continue to use the address normally without 496 any further special action. However, if this is not the first 497 conflicting ARP packet the host has seen, and the time recorded for 498 the previous conflicting ARP packet is recent, within DEFEND_INTERVAL 499 seconds, then the host MUST immediately cease using this address and 500 signal an error to the configuring agent as described above. This is 501 necessary to ensure that two hosts do not get stuck in an endless 502 loop with both hosts trying to defend the same address. 504 (c) If a host has been configured such that it should not give up its 505 address under any circumstances (perhaps because it is the kind of 506 device that needs to have a well-known stable IP address, such as a 507 link's default router, or a DNS server) then it MAY elect to defend 508 its address indefinitely. If such a host receives a conflicting ARP 509 packet, then it should take appropriate steps to log useful 510 information such as source Ethernet address from the ARP packet, and 511 inform an administrator of the problem. The number of such 512 notifications should be appropriately controlled to prevent an 513 excessive number of error reports being generated. If the host has 514 not seen any other conflicting ARP packets recently within the last 515 DEFEND_INTERVAL seconds then it MUST record the time that the 516 conflicting ARP packet was received, and then broadcast one single 517 ARP announcement, giving its own IP and hardware addresses. Having 518 done this, the host can then continue to use the address normally 519 without any further special action. However, if this is not the 520 first conflicting ARP packet the host has seen, and the time recorded 521 for the previous conflicting ARP packet is within DEFEND_INTERVAL 522 seconds then the host MUST NOT send another defensive ARP 523 announcement. This is necessary to ensure that two misconfigured 524 hosts do not get stuck in an endless loop flooding the network with 525 broadcast traffic while they both try to defend the same address. 527 A host wishing to provide reliable network operation MUST respond to 528 conflicting ARP packets as described in (a), (b) or (c) above. 529 Ignoring conflicting ARP packets results in seemingly random network 530 failures which can be hard to diagnose and very frustrating for human 531 users. 533 Forced address reconfiguration may be disruptive, causing TCP 534 connections to be broken. However, such disruptions should be 535 exceedingly rare, and if inadvertent address duplication happens, 536 then disruption of communication is inevitable. It is not possible 537 for two different hosts using the same IP address on the same network 538 to operate reliably. 540 Before abandoning an address due to a conflict, hosts SHOULD actively 541 attempt to reset any existing connections using that address. This 542 mitigates some security threats posed by address reconfiguration, as 543 discussed in Section 3. 545 For most client machines that do not need a fixed IP address, 546 immediately requesting the configuring agent (human user, DHCP 547 client, etc.) to configure a new address as soon as the conflict is 548 detected is the best way to restore useful communication as quickly 549 as possible. The mechanism described above of broadcasting a single 550 ARP announcement to defend the address mitigates the problem 551 somewhat, by helping to improve the chance that one of the two 552 conflicting hosts may be able to retain its address. 554 2.5 Broadcast ARP Replies 556 In a carefully-run network with manually-assigned addresses, or 557 a network with a reliable DHCP server and reliable DHCP clients, 558 address conflicts should occur only in rare failure scenarios, 559 so the passive monitoring described above in Section 2.4 is adequate. 560 If two hosts are using the same IP address, then sooner or later one 561 or other host will broadcast an ARP Request, which the other will 562 see, allowing the conflict to be detected and consequently resolved. 564 It is possible however, that a conflicting configuration may persist 565 for a short time before it is detected. Suppose that two hosts A and 566 B have been inadvertently assigned the same IP address X. Suppose 567 further that at the time they were both probing to determine whether 568 the address could safely be used, the communication link between them 569 was non-functional for some reason, so neither detected the conflict 570 at interface-configuration time. Suppose now that the communication 571 link is restored, and a third host C broadcasts an ARP Request for 572 address X. Unaware of any conflict, both hosts A and B will send 573 unicast ARP Replies to host C. Host C will see both Replies, and may 574 be a little confused, but neither host A nor B will see the other's 575 Reply, and neither will immediately detect that there is a conflict 576 to be resolved. Hosts A and B will continue to be unaware of the 577 conflict until one or other broadcasts an ARP Request of their own. 579 If quicker conflict detection is desired, this may be achieved by 580 having hosts send ARP Replies using link-level broadcast, instead of 581 sending only ARP Requests via broadcast, and Replies via unicast. 582 This is NOT RECOMMENDED for general use, but other specifications 583 building on IPv4 ACD may choose to specify broadcast ARP Replies if 584 appropriate. For example, "Dynamic Configuration of IPv4 Link-Local 585 Addresses" [RFC3927] specifies broadcast ARP Replies because in that 586 context, detection of address conflicts using IPv4 ACD is not merely 587 a backup precaution to detect failures of some other configuration 588 mechanism; detection of address conflicts using IPv4 ACD is the sole 589 configuration mechanism. 591 Sending ARP Replies using broadcast does increase broadcast traffic, 592 but in the worst case by no more than a factor of two. In the 593 traditional usage of ARP, a unicast ARP Reply only occurs in response 594 to a broadcast ARP Request, so sending these via broadcast instead 595 means that we generate at most one broadcast Reply in response to 596 each existing broadcast Request. On many networks, ARP traffic is 597 such an insignificant proportion of the total traffic that doubling 598 it makes no practical difference. However, this may not be true of 599 all networks, so broadcast ARP Replies SHOULD NOT be used 600 universally. Broadcast ARP Replies should be used where the benefit 601 of faster conflict detection outweighs the cost of increased 602 broadcast traffic and increased packet processing load on the 603 participant network hosts. 605 3. Security Considerations 607 IPv4 Address Conflict Detection (ACD) is based on ARP [RFC826] and 608 inherits the security vulnerabilities of this protocol. A malicious 609 host may send fraudulent ARP packets on the network, interfering with 610 the correct operation of other hosts. For example, it is easy for a 611 host to answer all ARP Requests with Replies giving its own hardware 612 address, thereby claiming ownership of every address on the network. 614 This specification makes this existing ARP vulnerability no worse, 615 and in some ways makes it better: Instead of failing silently with no 616 indication why, hosts implementing this specification either attempt 617 to reconfigure automatically, or at least inform the human user of 618 what is happening. 620 If a host willingly selects a new address in response to an ARP 621 conflict, as described in Section 2.4 subsection (a), this 622 potentially makes it easier for malicious attackers on the same link 623 to hijack TCP connections. Having a host actively reset any existing 624 connections before abandoning an address helps mitigate this risk. 626 4. Historical Note 628 A widely-known, but ineffective, duplicate address detection 629 technique called "Gratuitous ARP" is found in many deployed systems 630 [Ste94]. What Stevens describes as Gratuitous ARP is the exact same 631 packet that this document refers to by the more descriptive term "ARP 632 Announcement". This traditional Gratuitous ARP implementation sends 633 only a single ARP Announcement when an interface is first configured. 634 The result is that the victim (the existing address holder) logs 635 an error, and the offender continues operation, often without even 636 detecting any problem. Both machines then typically proceed to try 637 to use the same IP address, and fail to operate properly because they 638 are each constantly resetting the other's TCP connections. The human 639 administrator is expected to notice the log message on the victim 640 machine and repair the damage after the fact. Typically this has to 641 be done by physically going to the machines in question, since in 642 this state neither is able to keep a TCP connection open for long 643 enough to do anything useful over the network. 645 The problems caused by this ineffective duplicate address detection 646 technique are illustrated by the fact that (as of August 2004) 647 the top Google search results for the phrase "Gratuitous ARP" are 648 articles describing how to disable it. 650 However, implementers of IPv4 Address Conflict Detection should be 651 aware that, as of this writing, Gratuitous ARP is still widely 652 deployed. The steps described in Sections 2.1 and 2.4 of this 653 document help make a host robust against misconfiguration and address 654 conflicts, even when the other host is *not* playing by the same 655 rules. 657 5. Why are ARP Announcements performed using ARP Request packets 658 and not ARP Reply packets? 660 During IETF deliberation of IPv4 Address Conflict Detection from 2000 661 to 2005, a question that kept being asked repeatedly was, "Shouldn't 662 ARP Announcements be performed using gratuitous ARP Reply packets?" 664 On the face of it, this seems reasonable. A conventional ARP Reply 665 is an answer to a question. If in fact no question had been asked, 666 then it would be reasonable to describe such a reply as gratuitous. 667 This description would seem to apply perfectly to an ARP 668 Announcement: an answer to an implied question that in fact no one 669 asked. 671 However reasonable this may seem in principle, there are two reasons 672 why in practice ARP Request packets are the better choice. One is 673 historical precedent, and the other is practicality. 675 The historical precedent is that, as described above in Section 4, 676 Gratuitous ARP is described in Stevens Networking [Ste94] as using 677 ARP Request packets. BSD Unix, Windows, Mac OS 9, Mac OS X, etc. 678 all use ARP Request packets as described in Stevens. At this stage, 679 trying to mandate that they all switch to using ARP Reply packets 680 would be futile. 682 The practical reason is that ARP Request packets are more likely to 683 work correctly with more existing ARP implementations, some of which 684 may not implement RFC 826 correctly. The Packet Reception rules in 685 RFC 826 state that the opcode is the last thing to check in packet 686 processing, so it really shouldn't matter, but there may be 687 "creative" implementations that have different packet processing 688 depending on the ar$op field, and there are several reasons why these 689 are more likely to accept gratuitous ARP Requests than gratuitous ARP 690 Replies: 692 * An incorrect ARP implementation may expect that ARP Replies are 693 only sent via unicast. RFC 826 does not say this, but an incorrect 694 implementation may assume it, and the "principle of least surprise" 695 dictates that where there are two or more ways to solve a 696 networking problem that are otherwise equally good, the one with 697 the fewest unusual properties is the one likely to have the fewest 698 interoperability problems with existing implementations. An ARP 699 Announcement needs to broadcast information to all hosts on the 700 link. Since ARP Request packets are always broadcast, and ARP 701 Reply packets are not, receiving an ARP Request packet via 702 broadcast is less surprising than receiving an ARP Reply packet via 703 broadcast. 705 * An incorrect ARP implementation may expect that ARP Replies are 706 only received in response to ARP Requests that have been issued 707 recently by that implementation. Unexpected unsolicited Replies 708 may be ignored. 710 * An incorrect ARP implementation may ignore ARP Replies where 711 ar$tha doesn't match its hardware address. 713 * An incorrect ARP implementation may ignore ARP Replies where 714 ar$tpa doesn't match its IP address. 716 In summary, there are more ways that an incorrect ARP implementation 717 might plausibly reject an ARP Reply (which usually occurs as a result 718 of being solicited by the client) than an ARP Request (which is 719 already expected to occur unsolicited). 721 6. IANA Considerations 723 This specification does not request the creation of any new parameter 724 registries, nor does it require any other IANA assignments. 726 7. Acknowledgments 728 This document arose as a result of discussions on link-local 729 addressing, where it was not clear to many readers which elements of 730 link-local address management were specific to that particular 731 problem, and which elements were generic and applicable to all IPv4 732 address configuration mechanisms. The following people made valuable 733 comments in the course of that work and/or the subsequent editing 734 of this document: Bernard Aboba, Randy Bush, Jim Busse, James 735 Carlson, Alan Cox, Pavani Diwanji, Ralph Droms, Donald Eastlake 3rd, 736 Alex Elder, Peter Ford, Spencer Giacalone, Josh Graessley, Erik 737 Guttman, Myron Hattig, Hugh Holbrook, Richard Johnson, Kim Yong-Woon, 738 Marc Krochmal, Rod Lopez, Satish Mundra, Thomas Narten, Erik 739 Nordmark, Howard Ridenour, Pekka Savola, Daniel Senie, Dieter 740 Siegmund, Valery Smyslov and Ryan Troll. 742 8. Copyright Notice 744 Copyright (C) The Internet Society (2005). 746 This document is subject to the rights, licenses and restrictions 747 contained in BCP 78, and except as set forth therein, the authors 748 retain all their rights. For the purposes of this document, 749 the term "BCP 78" refers exclusively to RFC 3978, "IETF Rights 750 in Contributions", published March 2005. 752 This document and the information contained herein are provided on an 753 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 754 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET 755 ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, 756 INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE 757 INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 758 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 760 9. Normative References 762 [RFC826] D. Plummer, "An Ethernet Address Resolution Protocol -or- 763 Converting Network Addresses to 48-bit Ethernet Address 764 for Transmission on Ethernet Hardware", STD 37, RFC 826, 765 November 1982. 767 [RFC2119] S. Bradner, "Key words for use in RFCs to Indicate 768 Requirement Levels", RFC 2119, March 1997. 770 10. Informative References 772 [802] IEEE Standards for Local and Metropolitan Area Networks: 773 Overview and Architecture, ANSI/IEEE Std 802, 1990. 775 [802.3] ISO/IEC 8802-3 Information technology - Telecommunications 776 and information exchange between systems - Local and 777 metropolitan area networks - Common specifications - Part 778 3: Carrier Sense Multiple Access with Collision Detection 779 (CSMA/CD) Access Method and Physical Layer Specifications, 780 (also ANSI/IEEE Std 802.3-1996), 1996. 782 [802.5] ISO/IEC 8802-5 Information technology - Telecommunications 783 and information exchange between systems - Local and 784 metropolitan area networks - Common specifications - Part 785 5: Token ring access method and physical layer 786 specifications, (also ANSI/IEEE Std 802.5-1998), 1998. 788 [802.11] Information technology - Telecommunications and information 789 exchange between systems - Local and metropolitan area 790 networks - Specific Requirements Part 11: Wireless LAN 791 Medium Access Control (MAC) and Physical Layer (PHY) 792 Specifications, IEEE Std. 802.11-1999, 1999. 794 [RFC2131] R. Droms, "Dynamic Host Configuration Protocol", 795 RFC 2131, March 1997. 797 [RFC3927] S. Cheshire, B. Aboba, E. Guttman, 798 "Dynamic Configuration of IPv4 Link-Local Addresses", 799 RFC 3927, May 2005. 801 [Ste94] W. Stevens, "TCP/IP Illustrated, Volume 1: The Protocols", 802 Addison-Wesley, 1994. 804 11. Author's Address 806 Stuart Cheshire 807 Apple Computer, Inc. 808 1 Infinite Loop 809 Cupertino 810 California 95014 811 USA 813 Phone: +1 408 974 3207 814 EMail: rfc@stuartcheshire.org