Link-Local & APIPA Addresses
Quick guide to IPv4 APIPA (169.254/16) and IPv6 link-local (fe80::/10) addresses - when they appear and what they mean.
What are Link-Local Addresses?
Link-local addresses are special IP addresses that only work on the local network segment. They're automatically assigned when normal IP configuration fails or isn't available. These addresses allow basic network communication even when DHCP servers are down or network configuration is missing.
IPv4 APIPA (Automatic Private IP Addressing)
169.254.0.0/16
169.254.0.1 to 169.254.255.254
169.254.1.0 to 169.254.254.255
APIPA addresses are automatically assigned by Windows, macOS, and Linux when DHCP fails
When APIPA is Used
- DHCP server is unreachable or down
- Network cable unplugged then reconnected
- DHCP lease expires and can't be renewed
- Static IP conflicts with another device
- Network interface enabled without configuration
How APIPA Works
- Device requests IP address from DHCP server
- No DHCP response received after multiple attempts
- Device randomly selects address in 169.254.x.x range
- Device sends ARP probe to check if address is already used
- If no conflict, device assigns itself the address
- Device continues trying to find DHCP server periodically
APIPA Characteristics
- Only works on local network segment (not routed)
- Subnet mask is always 255.255.0.0 (/16)
- No default gateway assigned
- Cannot reach internet or other subnets
- Devices can communicate with other APIPA devices
Troubleshooting APIPA Issues
Meaning: DHCP assignment failed
Solution: Check DHCP server, network cables, switch ports
Meaning: APIPA addresses are not routed
Solution: Fix DHCP server or configure static IP
Meaning: Inconsistent DHCP server response
Solution: Check DHCP server capacity and network connectivity
IPv6 Link-Local Addresses
fe80::/10
fe80:: to febf:ffff:ffff:ffff:ffff:ffff:ffff:ffff
fe80::xxxx:xxxx:xxxx:xxxx
Every IPv6-enabled interface automatically gets a link-local address
Address Formation
- Start with fe80::/64 prefix
- Interface identifier from MAC address (EUI-64) or random
- Example: MAC 00:1a:2b:3c:4d:5e becomes fe80::21a:2bff:fe3c:4d5e
- Modified EUI-64: flip universal/local bit, insert fffe
When IPv6 Link-Local is Used
- Neighbor Discovery Protocol (NDP)
- Router Solicitation and Advertisement
- Initial IPv6 communication before global addresses
- DHCPv6 communication
- Network troubleshooting and diagnostics
- Always present on IPv6 interfaces
IPv6 Link-Local Characteristics
- Automatically assigned to every IPv6 interface
- Only valid on local network segment
- Cannot be routed beyond local link
- Required for IPv6 to function properly
- Used for Neighbor Discovery Protocol
- Subnet prefix is always /64
Types of IPv6 Link-Local Addresses
fe80::21a:2bff:fe3c:4d5e
fe80::a1b2:c3d4:e5f6:7890
fe80::1
IPv4 APIPA vs IPv6 Link-Local Comparison
Aspect | IPv4 APIPA | IPv6 Link-Local |
---|---|---|
Address Range | 169.254.0.0/16 | fe80::/10 (commonly fe80::/64) |
Assignment Method | Random selection with conflict detection | Automatic from interface MAC or random |
When Assigned | Only when DHCP fails | Always assigned to every interface |
Scope | Local subnet only | Local link only |
Internet Access | No (requires NAT/gateway) | No (link-local only) |
Protocol Integration | Fallback mechanism | Essential for IPv6 operation |
Practical Examples
Troubleshooting Commands
Purpose | Windows | Linux | macOS |
---|---|---|---|
View APIPA/Link-Local Addresses | ipconfig /all | ip addr show | ifconfig |
Test Link-Local Connectivity | ping 169.254.x.x or ping fe80::x%interface | ping 169.254.x.x or ping6 fe80::x%eth0 | ping 169.254.x.x or ping6 fe80::x%en0 |
Force DHCP Renewal | ipconfig /release && ipconfig /renew | dhclient -r && dhclient | sudo ipconfig set en0 DHCP |
View IPv6 Link-Local | netsh interface ipv6 show addresses | ip -6 addr show scope link | ifconfig | grep fe80 |
When to Worry
Best Practices
- Don't block link-local addresses in firewalls
- Monitor for widespread APIPA addresses (indicates DHCP issues)
- Use link-local addresses for IPv6 router access
- Understand that APIPA indicates network configuration problems
- Test connectivity using link-local addresses for troubleshooting
- Document link-local addresses of critical infrastructure
Common Mistakes
- Thinking APIPA addresses provide internet access
- Blocking fe80::/10 addresses in IPv6 firewalls
- Not recognizing APIPA as a symptom of DHCP failure
- Trying to route link-local addresses between subnets
- Forgetting to specify interface when pinging IPv6 link-local
- Assuming IPv6 is broken when only seeing link-local addresses