How APIPA works
APIPA, short for Automatic Private IP Addressing, is the name Microsoft gives to IPv4 link-local addressing, the fallback a device uses when it is set to get its address from DHCP and no DHCP server replies. The standard behind it is RFC 3927. Apple calls the same thing a self-assigned IP address.
When the DHCP request times out, the device picks an address at random from 169.254.1.0 to 169.254.254.255, with a subnet mask of 255.255.0.0. Before using it, the device sends ARP probes asking whether anyone else already has that address. If another device answers, it picks a new one and tries again. Once the address is clear, it announces it and starts communicating.
The result is a working address with no default gateway. The device can reach any other device on the same network segment that also has a 169.254 address, but nothing beyond a router. Windows keeps asking for a DHCP address in the background, around every five minutes, and switches over as soon as a server answers. Our guide to the TCP/IP model explains where IP addresses fit in the wider stack.
APIPA vs DHCP vs static IP
A device can get an IPv4 address three ways. On an industrial network the choice affects whether the SCADA server, HMI and engineering laptop can still find a device after a power cut.
| Method | Where the address comes from | Default gateway | Routable | Same address after restart | Best use |
|---|---|---|---|---|---|
| APIPA | The device picks one in 169.254.0.0/16 | None | No | Not guaranteed | Fallback and first connection on the bench |
| DHCP | A DHCP server leases one | Supplied by the server | Yes | Only with a reservation | PCs, laptops, cameras with reservations |
| Static | Set by hand on the device | Set by hand | Yes | Yes | PLCs, HMIs, switches, servers |
Most control networks use static addresses for anything another device needs to find, such as PLCs, HMIs and switch management interfaces, and keep DHCP for laptops and other transient devices. APIPA is a safety net, not a design choice.
APIPA when commissioning industrial devices
Link-local addressing is useful on the bench. Connect a laptop directly to a new industrial panel PC, camera or switch with no DHCP server present and, if both are set to DHCP, both fall back to 169.254 addresses and can see each other. Discovery tools that use multicast DNS (zeroconf) can then find the device by name without anyone typing an address.
Many industrial devices do not rely on it, though. Plenty ship with a fixed default address such as 192.168.0.1 or 192.168.1.x, and many EtherNet/IP devices start in BOOTP or DHCP mode and wait for a commissioning tool to assign an address. Check the manual before assuming a new device will appear on 169.254.
On a production network, a device sitting on a 169.254 address is a fault, not a feature. A PLC, HMI or gateway that falls back to APIPA after a restart is unreachable from the SCADA server on another subnet, because routers never forward link-local traffic. If an address must survive a power cut, set it statically or reserve it on the DHCP server.
Why a device ends up on 169.254
A 169.254 address tells you the device asked for DHCP and heard nothing back. The usual causes, roughly in order of how often they turn up on site:
-
//
No path to the DHCP server. A damaged cable, a port that is down or a switch port in the wrong VLAN keeps the request from reaching the server.
-
//
DHCP server down or out of addresses. The scope is full, or the server or its relay on the router has stopped.
-
//
Switch security blocking the request. 802.1X, port security or DHCP snooping on a managed switch can drop requests from a port that is not yet authorised.
-
//
Device came up before the network. After a site power cut, devices that boot faster than the DHCP server time out and fall back. Most recover on their next retry; some need a restart.
-
//
Wrong setting on the device. The device was meant to have a static address but was left on DHCP.
Planning addresses on a plant network
Give fixed devices static addresses from a documented plan, keep DHCP for laptops and roaming devices, and use reservations for anything in between. On larger sites, managed industrial switches that support DHCP Option 82 can make a DHCP server hand out an address based on the switch port a device is plugged into, so a replacement device gets the same address as the one it replaced. The IPv6 equivalent of APIPA, a link-local address in fe80::/10, is always present on an IPv6 interface and is used for neighbour discovery, so seeing one is normal.
Quick answers on APIPA
APIPA: common questions
What does APIPA stand for?
Automatic Private IP Addressing. It is Microsoft’s name for IPv4 link-local addressing, standardised in RFC 3927.
How can you tell this is an APIPA address?
It starts with 169.254. The mask is 255.255.0.0 and there is no default gateway. Any address from 169.254.1.0 to 169.254.254.255 is a valid APIPA address.
Can an APIPA address reach the internet?
No. Link-local addresses are never routed, so the device can only reach others on the same segment.
What is the difference between APIPA and DHCP?
DHCP is a server handing out addresses; APIPA is the fallback when it does not. A DHCP lease includes a gateway and DNS servers. An APIPA address includes neither.
How do I fix a 169.254 address?
Restore the path to DHCP, or set a static address. Check the cable, the switch port and VLAN, and the DHCP server, then renew the lease with ipconfig /renew on Windows.
We supply panel PCs, edge computers and managed switches with IP addresses, VLANs and DHCP settings set to your address plan as standard, so each device comes up where your SCADA system expects it.