What is APIPA anyway?


Have you ever noticed your Windows machine takes an IP address such as 169.254.x.x? You probably would. When Windows can’t determine its IP address while its booting or unable to get the IP address from the DHCP server, it self-assigns an IP address in the range – This IP address is called APIPA. The intention is to provide the machine with temporary networking functionality till a valid IP address is obtained (either static or via DHCP).

APIPA stands for Automatic Private IP Address. APIPA is the Microsoft’s name to a general class of IP addresses called link-local addresses. It’s also referred to as auto-IP.

A link-local address is an IP address that’s meant to be unique only within the local network. Hence the routers don’t forward them. A link-local address can be assigned manually or automatically by the OS in scenarios such as

  1. No static IP address is assigned to the network interfaces and no external, stateful mechanism of address configuration exists such as the Dynamic Host Configuration Protocol(DHCP).
  2. In IPv6, link-local addresses are mandatory and required for the internal functioning of various protocol components.

Deeper information regarding link-local address from Wikipedia.

  • In RFC 3927, the Internet Engineering Task Force has reserved the address block through for link-local addressing in IPv4.
  • 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.
  • In the Internet Protocol Version 6 (IPv6), the address block fe80::/10 has been reserved for link-local unicast addressing. The actual link local addresses are assigned with the prefix fe80::/64. They may be assigned by automatic (stateless) or stateful (e.g. manual) mechanisms.
  • Unlike IPv4, IPv6 requires a link-local address to be assigned to every network interface on which the IPv6 protocol is enabled, even when one or more routable addresses are also assigned. Consequently, IPv6 hosts usually have more than one IPv6 address assigned to each of their IPv6-enabled network interfaces. The link-local address is required for IPv6 sublayer operations of the Neighbor Discovery Protocol, as well as for some other IPv6-based protocols, like DHCPv6.


APIPA indicates a networking problem

This might be apparent by now as APIPA is the last resort when no appropriate IP address is available for the interface. Sometimes APIPA gets stubborn and even if we assign the right IP address to the interface, it never gets off the way. This is one of the common networking problems in Windows. Here’s the troubleshooting steps (source : Windows forum).

    1. Make sure DHCP client service is up and set to automatic. Services window can be accessed by running services.msc in the run prompt.
    2. If the DHCP server is not allowing the broadcast flag, the Bcast flag needs to be disabled in the interface configuration. Inside the Windows registry hierarchy “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\ {GUID}”, a new DWORD(32-bit) object named DhcpConnEnableBcastFlagToggle should be created and set its value to 1.
    3. Disabling and enabling the interface fixes the issue most of the times.
    4. You can run the following ipconfig commands to renew the IP address
ipconfig /release   ! Releases the current APIPA address
ipconfig /renew     ! Tries to contact the DHCP server for a new IP address




About Deepak Devanand

Seeker of knowledge
This entry was posted in IP Addressing and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s