Link-Local Addressing: Who Backs Down With No Server to Ask
Networking
An address a host assigned to itself has no authority behind it. Nothing granted it, nothing recorded it, and nothing can be appealed to when a second host picks the same number. Two specifications set out what happens instead, and a good deal of both is taken up with telling a host when to stop.
A host draws its own number, and draws the same one again
RFC 3927, a Standards Track document published in May 2005, describes how a host configures one of these addresses for itself. Its first step is a draw rather than a choice. The host picks a number pseudo-randomly from the block, with the first 256 and the last 256 addresses excluded, which the specification elsewhere totals as “65024 addresses are available for IPv4 Link-Local use”.
Which generator a host uses matters more than the draw itself. The algorithm “MUST be chosen so that different hosts do not generate the same sequence of numbers”, and the document says where to find that difference: seed it from something persistent that differs per machine, such as the hardware address of the interface. What follows from that is the useful part. Seeded that way, “a host will usually select the same IPv4 Link-Local address each time it is booted, which can be convenient for debugging and other operational reasons”.
So a number with no record behind it still comes back after a reboot. Not because anything remembered it, but because the same seed produces the same first guess.
Seeding it from the clock is ruled out, and the reason is a crowd. Anything that may be identical on every machine is unsuitable, because “a group of hosts that are all powered on at the same time might then all generate the same sequence”. A cupboard of devices switched on together would march through the same numbers in step, colliding on each one in turn.
Where this block sits among the others is covered by the blocks set aside for particular jobs.
Asking once, and the rule against asking again
Before using the number it has drawn, the host first finds out whether anything on this link already has it. It puts out a request for that address three times, each spaced randomly a second or two apart, using the Address Resolution Protocol that machines on a shared link use to match addresses to hardware.
Zeroing one field is what keeps the question from leaving a trace. The slot that would normally carry the sender’s own address is filled with zeroes instead, “to avoid polluting ARP caches in other hosts on the same link in the case where the address turns out to be already in use by another host”. A machine that is only enquiring does not want its neighbours filing the answer.
Then the first stopping rule, and it is a prohibition. Having probed, a host may not keep probing: “A host MUST NOT perform this check periodically as a matter of course.” The reason is given alongside it, that doing so “would be a waste of network bandwidth, and is unnecessary due to the ability of hosts to passively discover conflicts”. The asking is spent once, and the burden moves to paying attention.
A single reading describes the moment it was taken. Three probes over a couple of seconds establish only that nothing answered while they were in flight. Our own page of download, upload and ping figures makes that concession in plainer words, saying that one run promises nothing about the next, which is the honest limit of any one reading.
Second comes a speed limit. A host counts the conflicts it meets while trying to settle on a number, and once that count passes ten it must slow to one new address a minute. The purpose is stated as “to prevent catastrophic ARP storms in pathological failure cases, such as a rogue host that answers all ARP probes, causing legitimate hosts to go into an infinite loop attempting to select a usable address”. These figures sit in a short table of their own, and of them the document says “they are not intended to be user configurable”.
A device that does have somewhere to ask runs a different conversation altogether, which is the exchange a machine runs when there is a server on the link.
Ten seconds is what stops the argument
Checking at startup and then forgetting about it would be the easy version. RFC 3927 refuses it: “Address conflict detection is an ongoing process that is in effect for as long as a host is using an IPv4 Link-Local address.” Any packet that claims the host’s own address while giving somebody else’s hardware is a conflict, whenever it turns up.
What a host may do about one is bounded on both sides. It may drop the address at once and draw another. Or, if it has live connections it would rather keep, it may defend, by broadcasting one single announcement that pairs the address with its own hardware, then carrying on as normal. One announcement, not a stream.
Third comes the ten seconds. A host may defend only if it has seen no other conflict in the previous ten seconds. If a second one arrives inside that window, it must give the address up immediately and start again. The document explains itself in a sentence that is really about how long a quarrel may run: “This is necessary to ensure that two hosts do not get stuck in an endless loop with both hosts trying to defend the same address.”
Even equipment told never to surrender is silenced by the same clock. RFC 5227, from July 2008, adds a case for a machine that has to keep a well-known address, a link’s default router or a name server, and permits it to defend indefinitely. A second conflict inside the window still means “the host MUST NOT send another defensive ARP Announcement”. It keeps the number and drops out of the argument, because two machines broadcasting at each other flood the link whichever one is right.
Doing nothing is not among the options, and neither is muddling along. The older document closes both off in turn, first with “A host MUST NOT ignore conflicting ARP packets.” and then with the plainer “It is not possible for two different hosts using the same IP address on the same network to operate reliably.”
One design decision falls out of that. Replies carrying an address of this kind go to the whole link instead of to the machine that asked, so two hosts holding the same number hear each other directly, which means such conflicts “can be detected as soon as they become potential problems, but no sooner”.
Where those figures were finally specified
RFC 5227 exists because the figures above had nowhere else to live. Its introduction names the specification for the Dynamic Host Configuration Protocol, which “does not give any guidance to implementers concerning the number of ARP packets to send, the interval between packets, the total time to wait before concluding that an address may safely be used”. It names the larger omission too, that the same specification “leaves unspecified the action a host should take if, after concluding that an address may safely be used, it subsequently discovers that it was wrong”.
So the machinery was specified properly for the case where nobody is in charge, and then lifted straight back out. RFC 5227 states its own reach in a line: “The utility of IPv4 Address Conflict Detection (ACD) is not limited to DHCP clients.” It then widens that to every route by which an address can arrive, because “No matter how an address was configured, whether via manual entry by a human user, via information received from a DHCP server, or via any other source of configuration information, detecting conflicts is useful.” The same rules cover a number somebody typed in by hand. That arrangement has its own paperwork, set out in fixing an address on purpose.
Its historical note shows what the alternative looked like. Older practice sent a single announcement when an interface came up, with the result that “the victim (the existing address holder) logs an error, and the offender continues operation, often without even detecting any problem”. The error landed on the machine that had done nothing wrong.
One of our own pages reports what a machine found on its own interfaces rather than what a remote server sent back. It counts the connection candidates gathered locally, lists the private addresses among them apart from the address a visited site would be given, and grades those local rows at a different level of exposure. An address that never leaves the link belongs in that first group by definition, so the useful evidence there is a reading taken on the machine’s own side.
A number nobody handed out belongs to whoever is still answering for it. What the two documents add is not authority but a set of limits on how long a disagreement may run: ask once, defend once, and slow down when the link is already busy arguing.