APIPA - Automatic Private IP Addressing

Definition: Automatic Private Internet Protocol Addressing (APIPA) is a common alternative to the use of the Dynamic Host Configuration Protocol (DHCP) to request and retrieve an Internet Protocol (IP) address for a host. APIPA simplifies the assignment of IP address and subnet-mask configuration information to hosts in small networks. When APIPA is used, the operating system allows the assignment of a unique IP address to each station on a small local area network (LAN). This avoids the administrative overhead of running a DHCP server or manually setting IP configuration information.
APIPA is a procedure and set of guidelines for performing these configuration functions, not an actual protocol. It first appeared on the Windows platform in Windows 2000.



Determining an Interface's IP Address


To obtain configuration information such as address and network gateway for a network interface on the local computer, Windows Server 2003 does the following:
  1. Contacts a DHCP server on the network and queries for configuration settings.
  2. If no DHCP server responds, Windows Server 2003 checks for an alternate configuration that contains settings.
  3. If it does not find an alternate configuration, the operating system uses APIPA to automatically configure its network settings, assigning an IP address that is unique to the LAN.
IP addresses assigned by Windows Server 2003 APIPA are within the range 169.254.0.1 through 169.254.255.254 inclusive, in accordance with specifications created by the Internet Assigned Numbers Authority (IANA). APIPA also sets the subnet mask on the network to 255.255.255.0.

Implications for the Network Application Developer


Awareness of the range of addresses used with APIPA is useful in troubleshooting. While APIPA is employed in many small environments that consist of 100 stations or fewer and no routers, it is normally not found in larger networks. If an IP address in this range does appear during testing on a large network, verify that the host in question is properly connected to the network. Also, while a home user can employ APIPA on their network, the external network interface connected to the Internet should not have an IP address in the APIPA range, unless a proxy or Network Address Translation (NAT) device is used for the Internet connection. According to IANA rules, the private address range APIPA uses is not for use on the public Internet.
Note  Appearance of IP addresses in the APIPA range on a network that normally assigns addresses using DHCP might indicate a connectivity issue or a DHCP server configuration problem.

How to use automatic TCP/IP addressing without a DHCP server

A Windows-based computer that is configured to use DHCP can automatically assign itself an Internet Protocol (IP) address if a DHCP server is not available. For example, this could occur on a network without a DHCP server, or on a network if a DHCP server is temporarily down for maintenance.

The Internet Assigned Numbers Authority (IANA) has reserved 169.254.0.0-169.254.255.255 for Automatic Private IP Addressing. As a result, APIPA provides an address that is guaranteed not to conflict with routable addresses.

After the network adapter has been assigned an IP address, the computer can use TCP/IP to communicate with any other computer that is connected to the same LAN and that is also configured for APIPA or has the IP address manually set to the 169.254.x.y (where x.y is the client’s unique identifier) address range with a subnet mask of 255.255.0.0. Note that the computer cannot communicate with computers on other subnets, or with computers that do not use automatic private IP addressing. Automatic private IP addressing is enabled by default.

You may want to disable it in any of the following cases:

- Your network uses routers.

- Your network is connected to the Internet without a NAT or proxy server.
Unless you have disabled DHCP-related messages, DHCP messages provide you with notification when you change between DHCP addressing and automatic private IP addressing. If DHCP messaging is accidentally disabled, you can turn the DHCP messages back on by changing the value of the PopupFlag value in the following registry key from 00 to 01:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\DHCP
Note that you must restart your computer for the change to take effect. You can also determine whether your computer is using APIPA by using the Winipcfg tool in Windows Millennium Edition, Windows 98, or Windows 98 Second Edition:
Click Start, click Run, type "winipcfg" (without the quotation marks), and then click OK. Click More Info. If the IP Autoconfiguration Address box contains an IP address within the 169.254.x.x range, Automatic Private IP Addressing is enabled. If the IP Address box exists, automatic private IP addressing is not currently enabled.
For Windows 2000, Windows XP, or Windows Server 2003, you can determine whether your computer is using APIPA by using the IPconfig command at a command prompt:

Click Start, click Run, type "cmd" (without the quotation marks), and then click OK to open a MS-DOS command line window. Type "ipconfig /all" (without the quotation marks), and then hit the ENTER key. If the 'Autoconfiguration Enabled' line says "Yes", and the 'Autoconfiguration IP Address' is 169.254.x.y (where x.y is the client's unique identifier), then the computer is using APIPA. If the 'Autoconfiguration Enabled' line says "No", then the computer is not currently using APIPA.
You can disable automatic private IP addressing by using either of the following methods.

You can configure the TCP/IP information manually, which disables DHCP altogether. You can disable automatic private IP addressing (but not DHCP) by editing the registry. You can do so by adding the "IPAutoconfigurationEnabled" DWORD registry entry with a value of 0x0 to the following registry key for Windows Millennium Edition, Windows98, or Windows 98 Second Edition:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\DHCP
For Windows 2000, Windows XP, and Windows Server 2003, APIPA can be disabled by adding the "IPAutoconfigurationEnabled" DWORD registry entry with a value of 0x0 to the following registry key:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\<Adapter GUID>
Note The Adapter GUID subkey is a globally unique identifier (GUID) for the computer's LAN adapter.

Specifying a value of 1 for IPAutoconfigurationEnabled DWORD entry will enable APIPA, which is the default state when this value is omitted from the registry.


Disabling APIPA


In Windows 2000, Windows XP, and Windows Server 2003, it is possible to disable APIPA for all adapters on the system by editing the registry.
To disable APIPA
  1. From the Windows Start menu, choose Run, and then type regedit. The Registry Editor is displayed.
  2. Navigate to the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters.
  3. From the Edit menu, choose New DWORD value.
  4. Name the value IPAutoconfigurationEnabled and enter a value of 0.


Comments

Popular posts from this blog

How To Add Print Button to Blogger Posts

INSTALL CISCO VPN CLIENT ON WINDOWS 10 (32 & 64 BIT). FIX REASON 442