A user's PC shows a 169.254.x.x address. How do you troubleshoot it?
Show the answer
Say this first
169.254.0.0/16 is link-local (APIPA, RFC 3927). Windows picked it itself because no DHCP server answered. Either the DISCOVER never reached a server or the reply never came back. I follow the packet: the access port and VLAN, then the relay on the gateway, then the path and return route to the server, then the scope, then the server.
Go deeper
In the order the packet travels
- Access port: up, in the right VLAN, not err-disabled.
show interfaces status,show vlan brief. - Spanning tree: a port without PortFast spends 30 seconds in listening and learning. The client
can give up before the port forwards. Access ports get
spanning-tree portfast. - DHCP snooping: if the uplink is not trusted, the switch drops the OFFER. Check the trusted
ports in
show ip dhcp snooping. - Relay:
show ip interface Vlan20 | include Helpermust show the server. - Path to the server:
ping 10.0.12.1 source Vlan20from the gateway tests the route there and the server's route back to the client subnet in one go. - Scope: exists for that subnet and is not full.
show ip dhcp poolon IOS, scope statistics on Windows. - Capture:
debug ip dhcp server packeton an IOS server, orudp port 67 or udp port 68in tcpdump. In Wireshark the display filter isdhcp.
On Linux there is usually no 169.254 address at all, just no IPv4 address, unless the network manager is set to fall back to link-local.
They will ask next
Why can the PC still reach some devices with a 169.254 address?
Link-local works between hosts on the same segment that also have 169.254 addresses. It never crosses a router, so nothing beyond the VLAN is reachable.
What does a capture at the client show when the server never answers?
Repeated DISCOVERs with the
secsfield climbing and no OFFER. The next capture point is the relay: if DISCOVERs leave the relay toward the server and nothing returns, look at the server and its return route.
Traps
- Rebooting the PC first. It retries the same failing exchange and tells you nothing about where it breaks.
- Forgetting PortFast on access ports. It shows up as DHCP failures after every link flap.