- APIPA – автоматическая частная IP-адресация
- APIPA служит отказоустойчивым при проблемах DHCP
- Как работает APIPA
- Ограничения APIPA
- What is windows apipa
- History
- Automatic Configuration and Service Checks
- Characteristics
- Advantages
- Disadvantages
- Limitations
- APIPA — Automatic Private IP Addressing
- APIPA serves as a fail-safe during DHCP problems
- How APIPA Works
- Limitations of APIPA
- How to use automatic TCP/IP addressing without a DHCP server
- More Information
- Examples of Where APIPA may be useful
- Example 1: No Previous IP Address and no DHCP Server
- Example 2: Previous IP Address and no DHCP Server
- Example 3: Lease Expires and no DHCP Server
APIPA – автоматическая частная IP-адресация
APIPA служит отказоустойчивым при проблемах DHCP
Автоматическая частная IP-адресация (APIPA) – это отказоустойчивый DHCP-сервер, который защищает компьютерную систему от сбоев, вызывая резервный механизм для локальных сетей Интернет-протокола версии 4 (IPv4), поддерживаемых Microsoft Windows. С помощью APIPA клиенты DHCP могут получать IP-адреса, даже если серверы DHCP не работают. APIPA существует во всех современных версиях Windows, включая Windows 10.
Как работает APIPA
Сети, настроенные для динамической адресации, полагаются на DHCP-сервер для управления пулом доступных локальных IP-адресов. Когда клиентское устройство Windows пытается подключиться к локальной сети, оно связывается с сервером DHCP, чтобы запросить его IP-адрес. Если сервер DHCP перестает функционировать, сбой сети мешает выполнению запроса или возникает проблема на устройстве Windows, этот процесс может завершиться неудачно.
При сбое процесса DHCP Windows автоматически назначает IP-адрес из частного диапазона, который 169.254.0.1 , 169.254.254.255 . Используя протокол разрешения адресов (ARP), клиенты проверяют, что выбранный адрес APIPA является уникальным в сети, прежде чем использовать его. Затем клиенты периодически проверяют DHCP-сервер, обычно каждые пять минут, и автоматически обновляют свои адреса, когда DHCP-сервер может обслуживать запросы.
Например, при запуске компьютера под управлением Windows 10 он несколько секунд ждет DHCP-сервер, прежде чем использовать IP-адрес из диапазона APIPA. Более ранние версии Windows ищут DHCP-сервер в течение трех минут.
Все устройства APIPA используют маску сети по умолчанию 255.255.0.0 и все находятся в одной подсети.
APIPA включается по умолчанию в Windows всякий раз, когда сетевой интерфейс ПК настроен для DHCP. Эта опция называется автоконфигурацией в утилитах Windows, таких как ipconfig. Администратор компьютера может отключить эту функцию, отредактировав реестр Windows и установив для следующего значения ключа значение 0:
Если вы не видите IPAutoconfiguration Enabled в списке, по умолчанию он равен 1. Вам нужно будет добавить новый REG_DWORD и установить его в 0.
Сетевые администраторы и опытные пользователи компьютеров признают, что сбои в процессе DHCP указывают на то, что устранение неполадок в сети необходимо для выявления и устранения проблем, мешающих работе DHCP должным образом.
Ограничения APIPA
Адреса APIPA не попадают ни в один из частных диапазонов IP-адресов, определенных стандартом Интернет-протокола, и ограничены для использования только в локальных сетях. Как и частные IP-адреса, тесты ping или любые другие запросы на подключение из Интернета и других внешних сетей не могут быть направлены непосредственно на устройства APIPA.
Устройства, настроенные APIPA, могут взаимодействовать с одноранговыми устройствами в своей локальной сети, но не могут взаимодействовать вне ее. Хотя APIPA предоставляет клиентам Windows пригодный для использования IP-адрес, он не предоставляет клиенту адреса сервера имен (DNS или WINS) и сетевого шлюза, как это делает DHCP.
Локальные сети не должны пытаться вручную назначать адреса в диапазоне APIPA, так как это приведет к конфликтам IP-адресов. Чтобы сохранить преимущество APIPA, связанное с указанием отказов DHCP, администраторы должны избегать использования этих адресов для каких-либо других целей и вместо этого ограничивают свои сети использованием стандартных диапазонов IP-адресов.
What is windows apipa
APIPA stands for Automatic Private IP Addressing (APIPA). It is a feature or characteristic in operating systems (eg. Windows) which enables computers to self-configure an IP address and subnet mask automatically when their DHCP(Dynamic Host Configuration Protocol) server isn’t reachable. The IP address range for APIPA is (169.254.0.1 to 169.254.255.254) having 65, 534 usable IP addresses, with the subnet mask of 255.255.0.0.
History
Initially, 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. Due to the simultaneous use of IPv4 addresses of different scopes, traffic overload becomes high. The link-local addresses are allocated to interface i.e., stateless in nature such that communication will be established when not getting a response from DHCP Server. After that Microsoft refers to this address autoconfiguration method as “Automatic Private IP Addressing (APIPA)”.
Automatic Configuration and Service Checks
It starts with when the user(client) is unable to find the data/information, then uses APIPA to configure the system with an IP address automatically(ipconfig). The APIPA provides the configuration to check for the presence of a DHCP server(in every five minutes, stated by Microsoft). If APIPA detects a DHCP server on the network configuration area, it stops, and let run the DHCP server that replaces APIPA with dynamically allocated addresses.
Note: To Know the given IP address is provided by which addressing, just run the following command:
Characteristics
- Communication can be established properly if not getting response from DHCP Server.
- APIPA regulates the service, by which always checking response and status of the main DHCP server in a specific period of time.
Advantages
- It can be used as a backup of DHCP because when DHCP stops working then APIPA has the ability to assign IP to the networking hosts.
- It stops unwanted broadcasting.
- It uses ARP(Address Resolution Protocol) to confirm the address isn’t currently in use.
Disadvantages
- APIPA ip addresses can slow you network.
- APIPA doesnot provide network gateway as DHCP does.
Limitations
- APIPA addresses are restricted for use in local area network.
- APIPA configured devices follow the peer to peer communication rule.
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
APIPA — Automatic Private IP Addressing
APIPA serves as a fail-safe during DHCP problems
Aping Vision / STS / Photodisc / Getty Images
Automatic Private IP Addressing (APIPA) is a DHCP fail-safe that protects a computer system from failure by invoking a standby mechanism for local Internet Protocol version 4 (IPv4) networks supported by Microsoft Windows. With APIPA, DHCP clients can obtain IP addresses even when DHCP servers are not functional. APIPA exists in all modern versions of Windows, including Windows 10.
How APIPA Works
Networks that are set up for dynamic addressing rely on a DHCP server to manage the pool of available local IP addresses. When a Windows client device attempts to join the local network, it contacts the DHCP server to request its IP address. If the DHCP server stops functioning, a network glitch interferes with the request, or some issue occurs on the Windows device, this process can fail.
When the DHCP process fails, Windows automatically assigns an IP address from the private range, which is 169.254.0.1 to 169.254.254.255. Using Address Resolution Protocol (ARP), clients verify that the chosen APIPA address is unique on the network before they use it. Clients then check back with the DHCP server at periodic intervals — usually every five minutes — and update their addresses automatically when the DHCP server is able to service requests.
When you start a computer that has Windows 10 installed, for example, it waits for a few seconds for a DHCP server before using an IP from the APIPA range. Earlier versions of Windows look for a DHCP server for as long as three minutes.
All APIPA devices use the default network mask 255.255.0.0, and all reside on the same subnet.
APIPA is enabled by default in Windows whenever the PC network interface is configured for DHCP. This option is called autoconfiguration in Windows utilities such as ipconfig. A computer administrator can disable the feature by editing the Windows Registry and setting the following key value to 0:
If IPAutoconfiguration Enabled isn’t listed, then it is by default set to 1. Instead, add a new REG_DWORD and set it to 0.
Failures in the DHCP process indicate network troubleshooting is needed to identify and resolve the issues that prevent DHCP from working properly.
Limitations of APIPA
APIPA addresses do not fall into any of the private IP address ranges defined by the Internet Protocol standard and are restricted for use on local networks only. Like private IP addresses, ping tests or other connection requests from the internet and other outside networks cannot be made to APIPA devices directly.
APIPA-configured devices can communicate with peer devices on their local network but cannot communicate outside of it. While APIPA provides Windows clients a usable IP address, it does not provide the client with nameserver (DNS or WINS) and network gateway addresses as DHCP does.
Local networks should not attempt to manually assign addresses in the APIPA range because IP address conflicts will result. To maintain the benefit APIPA has of indicating DHCP failures, avoid using those addresses for any other purpose and instead limit networks to use the standard IP address ranges.
How to use automatic TCP/IP addressing without a DHCP server
This article describes how to use automatic Transmission Control Protocol/Internet Protocol (TCP/IP) addressing without a Dynamic Host Configuration Protocol (DHCP) server being present on the network. The operating system versions listed in the «Applies to» section of this article have a feature called Automatic Private IP Addressing (APIPA). With this feature, a Windows computer can assign itself an Internet Protocol (IP) address in the event that a DHCP server is not available or does not exist on the network. This feature makes configuring and supporting a small Local Area Network (LAN) running TCP/IP less difficult.
More Information
Follow the steps in this section carefully. Serious problems might occur if you modify the registry incorrectly. Before you modify it, back up the registry for restoration in case problems occur.
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\
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.
Examples of Where APIPA may be useful
Example 1: No Previous IP Address and no DHCP Server
When your Windows-based computer (configured for DHCP) is initializing, it broadcasts three or more «discover» messages. If a DHCP server does not respond after several discover messages are broadcast, the Windows computer assigns itself a Class B (APIPA) address. Then the Windows computer will display an error message to the user of the computer (providing it has never been assigned an IP address from a DHCP server in the past). The Windows computer will then send out a Discover message every three minutes in an attempt to establish communications with a DHCP server.
Example 2: Previous IP Address and no DHCP Server
The computer checks for the DHCP server and if none are found, an attempt is made to contact the default gateway. If the default gateway replies, then the Windows computer retains the previously-leased IP address. However, if the computer does not receive a response from the default gateway or if none are assigned, then it uses the automatic private IP addressing feature to assign itself an IP address. An error message is presented to the user and discover messages are transmitted every 3 minutes. Once a DHCP server comes on line, a message is generated stating communications have been re-established with a DHCP Server.
Example 3: Lease Expires and no DHCP Server
The Windows-based computer tries to re-establish the lease of the IP address. If the Windows computer does not find a DCHP server, it assigns itself an IP address after generating an error message. The computer then broadcasts four discover messages, and after every 5 minutes it repeats the whole procedure until a DHCP server comes on line. A message is then generated stating that communications have been re-established with the DHCP Server.