Networking

APIPA (Automatic Private IP Addressing)

In RFC 3927, the Internet Engineering Task Force (IETF) has reserved the IPv4 address block 169.254.0.0/16 (169.254.0.0 – 169.254.255.255) for link-local addressing. The entire range may be used for this purpose, except for the first and last 256 addresses (169.254.0.0/24 and 169.254.255.0/24), which are reserved for future use and must not be selected by a host using this dynamic configuration mechanism. Link-local addresses are assigned to interfaces by host-internal, i.e. stateless, address autoconfiguration when other means of address assignment are not available.

RFC 3927 warns against the simultaneous use of IPv4 addresses of different scope, such as configuring link-local addresses as well as globally routable addresses on the same interface. Therefore, hosts search for a DHCP server on the network before assigning link-local addresses.

In the automatic address configuration process, network hosts select a random candidate address within the reserved range and use Address Resolution Protocol (ARP) probes to ascertain that the address is not in use on the network. If a reply is received to the ARP, it indicates the candidate IP address is already in use; a new random candidate IP address is then created and the process repeated. The process ends when there is no reply to the ARP, indicating the candidate IP address is available.

When a globally routable or a private address becomes available after a link-local address has been assigned, the use of the new address should generally be preferred to the link-local address for new connections but communication via the link-local address is still possible.

Microsoft refers to this address autoconfiguration method as Automatic Private IP Addressing (APIPA). It is sometimes also casually referred to as auto-IP.

Related Articles