Visual lab

Learn subnetting visually

11 short lessons, from binary to IPv6. Change the inputs and watch every value update.

Lesson 10 of 11Advanced

/31, /32 and special cases

Where the normal rules bend
Most subnets lose two addresses to the network and broadcast. A few prefixes and ranges behave differently, and knowing them is what turns a correct answer into a working network.

/31 point-to-point link

255.255.255.254

A link between two routers needs exactly two addresses. The usual rule (block − 2) would leave zero, so RFC 3021 allows a /31 to use both addresses. There is no network or broadcast address on a /31.

Block
10.0.0.0/31
Usable
2 hosts
Addresses
10.0.0.0 and 10.0.0.1

/32 host route and loopback

255.255.255.255

A /32 is a single address: 1 host, no network or broadcast address. Routers use it for loopback interfaces (a stable router ID that never goes down) and for host routes that point at exactly one device.

Block
10.255.0.1/32
Usable
1 host
Addresses
10.255.0.1

Ranges with a special meaning

Recognize these on sight. Each one tells you something about the host or the route.

0.0.0.0/0Default route

Matches every address. Used when no more specific route exists.

0.0.0.0/8This network

0.0.0.0 means "no address yet", e.g. a host asking DHCP for one. Never a host address.

255.255.255.255/32Limited broadcast

Reaches every host on the local link. Routers never forward it.

127.0.0.0/8Loopback

Traffic never leaves the host. 127.0.0.1 is "this machine".

169.254.0.0/16Link-local (APIPA)

Self-assigned when DHCP fails. A host with one usually cannot reach the gateway.

10.0.0.0/8Private (RFC 1918)

Free to use inside any network. Not routed on the internet.

172.16.0.0/12Private (RFC 1918)

172.16.0.0 to 172.31.255.255. Not 172.32.x.x.

192.168.0.0/16Private (RFC 1918)

Common on home and small office networks.

100.64.0.0/10Shared / CGNAT (RFC 6598)

Used by ISPs between their carrier-grade NAT and customers.

224.0.0.0/4Multicast

One-to-many groups. Never a host address.

169.254.12.7 is in 169.254.0.0/16: Link-local (APIPA).

Troubleshooting checklist

Most 'cannot reach anything' tickets come down to one of these. Enter a host's settings and check them.

Host subnet 192.168.1.128/25 · usable 192.168.1.129 – 192.168.1.254 · broadcast 192.168.1.255

  • Both addresses are valid IPv4
  • Host is not the network address
  • Host is not the broadcast address
  • Gateway is in the same subnet
  • Gateway is a usable address and not the host
  • Every device on the segment uses the same mask
    Check the router interface and the other hosts. A mismatched mask makes hosts disagree about who is local.
Problems found
  • The gateway is outside the host's subnet.

Lock it in

Drill the “Troubleshooting” skill until it is automatic.

Lesson 10 of 11
Next: IPv6 basics