169.254.0.0/16: Link-Local Addresses

169.254.0.0/16 is the IPv4 link-local range (RFC 3927). A device gives itself an address from it when it can't get one from DHCP. Seeing 169.254.x.x on a PC almost always means "DHCP failed".

169.254.0.0/16 at a glance

Address range
169.254.0.0 – 169.254.255.255
Usable hosts
65,534
Total addresses
65,536
First usable
169.254.0.1
Last usable
169.254.255.254
Subnet mask
255.255.0.0
Wildcard mask
0.0.255.255
Type
Link-local / APIPA (RFC 3927)

Is an address inside 169.254.0.0/16?

Yes — 169.254.169.254 is inside 169.254.0.0/16. It is address number 43,518 in the block (counting from 0).

What 169.254.0.0/16 is

Link-local addresses only work on the local segment. Routers never forward them, so a device with only a 169.254 address can talk to neighbours that also have one, but nothing beyond.

Windows calls this APIPA. macOS and Linux do the same thing. The first and last /24 (169.254.0.x and 169.254.255.x) are reserved and not used for self-assignment.

Who uses it

  • Cloud metadata services

    AWS, Azure and Google Cloud all serve instance metadata at 169.254.169.254. AWS also runs a DNS resolver at 169.254.169.253.

  • VPN tunnel interfaces

    AWS Site-to-Site VPN tunnels use /30 inside addresses from 169.254.0.0/16.

  • Device setup

    Some printers and cameras use 169.254 addresses for direct cable setup with a laptop.

Conflicts and gotchas

  • A 169.254 address on your PC. Check the cable or Wi-Fi, the DHCP server, the switch port VLAN, and whether the DHCP scope is full.
  • Blocking metadata. Containers and VMs that can reach 169.254.169.254 can read cloud credentials. Use IMDSv2 on AWS and restrict pod access to the metadata endpoint.
  • Routing it. Never put 169.254.0.0/16 in a routing table or VPN as if it were a normal network.

How to split 169.254.0.0/16

Worked example: into /24s

  1. Going from /16 to /24 borrows 24 − 16 = 8 bits from the host part.
  2. Each borrowed bit doubles the number of subnets: 28 = 256 subnets.
  3. Each /24 keeps 32 − 24 = 8 host bits: 28 = 256 addresses, so 254 usable after removing network and broadcast.
  4. The new mask is 255.255.255.0, so subnets step by 1 in the third octet: 169.254.0.0/24, 169.254.1.0/24, 169.254.2.0/24 … up to 169.254.255.0/24.
Ways to split 169.254.0.0/16
Split into Subnets Usable each First blocks Good for
/24 256 254 169.254.0.0/24, 169.254.1.0/24, … 256 /24s; only 169.254.1.0 to 169.254.254.255 are used for self-assignment.
/30 16,384 2 169.254.0.0/30, 169.254.0.4/30, … 16,384 /30s, the size AWS VPN uses per tunnel.

169.254.0.0/16 FAQ

Why does my computer have a 169.254 IP address?

It asked for an address with DHCP and got no answer, so it picked a link-local address itself. Fix the connection or the DHCP server and renew the lease.

What is 169.254.169.254?

The instance metadata service address in AWS, Azure and Google Cloud. A VM queries it for its ID, network settings and temporary credentials.

Is 169.254.0.0/16 routable?

No. Link-local addresses must not be forwarded by routers.

Related tools

Other well-known networks: 10.0.0.0/24, 10.0.0.0/8, 100.64.0.0/10, 127.0.0.0/8, 172.16.0.0/12, 172.17.0.0/16, 192.168.0.0/16, 192.168.0.0/24, 192.168.1.0/24 · all networks