Octet

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

  1. Access port: up, in the right VLAN, not err-disabled. show interfaces status, show vlan brief.
  2. 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.
  3. DHCP snooping: if the uplink is not trusted, the switch drops the OFFER. Check the trusted ports in show ip dhcp snooping.
  4. Relay: show ip interface Vlan20 | include Helper must show the server.
  5. Path to the server: ping 10.0.12.1 source Vlan20 from the gateway tests the route there and the server's route back to the client subnet in one go.
  6. Scope: exists for that subnet and is not full. show ip dhcp pool on IOS, scope statistics on Windows.
  7. Capture: debug ip dhcp server packet on an IOS server, or udp port 67 or udp port 68 in tcpdump. In Wireshark the display filter is dhcp.

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.

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.
How did you do?Book 3.3 Internet (IP)