Classify twelve addresses on sight

short · 25 min · Objective 1.7

Task

Sort twelve addresses into public, private, loopback, APIPA, multicast, carrier-grade NAT and reserved, then justify each from the range rather than from memory of the individual address. Recognising an address class instantly is worth real marks, and it is the first step in most troubleshooting.

Steps

  1. Classify each of these, and for each write the range that decides it: 10.200.14.3, 172.15.0.9, 172.20.5.1, 192.168.100.4, 169.254.13.200, 127.0.0.1, 100.80.0.7, 224.0.0.251, 8.8.8.8, 198.51.100.22, 192.0.2.1, 203.0.113.9.
  2. Two of those are designed to catch you. 172.15.0.9 looks private and is not — the private range is 172.16 to 172.31 inclusive. And 100.80.0.7 is inside 100.64.0.0/10, which is carrier-grade NAT, not public and not RFC 1918.
  3. Note which three are documentation ranges reserved by RFC 5737. You will see them constantly in exam questions and vendor examples.
  4. For the APIPA address, write down in one sentence what its presence tells you about a host, and what you would check first.
  5. Check your answers, then re-derive any you missed from the range boundaries rather than memorising the specific address.

Verify

python3 -c "
import ipaddress
addrs = ['10.200.14.3','172.15.0.9','172.20.5.1','192.168.100.4','169.254.13.200','127.0.0.1','100.80.0.7','224.0.0.251','8.8.8.8','198.51.100.22','192.0.2.1','203.0.113.9']
doc = [ipaddress.ip_network(n) for n in ('192.0.2.0/24','198.51.100.0/24','203.0.113.0/24')]
cgn = ipaddress.ip_network('100.64.0.0/10')
for a in addrs:
    i = ipaddress.ip_address(a)
    k = ('loopback' if i.is_loopback else 'APIPA/link-local' if i.is_link_local
         else 'multicast' if i.is_multicast else 'carrier-grade NAT' if i in cgn
         else 'documentation' if any(i in d for d in doc)
         else 'private' if i.is_private else 'public')
    print(f'{a:<16}{k}')
"

Twelve lines. Any you got wrong, go back to the range — the boundary is the thing being examined, not the address.

Notes

The ranges worth knowing cold: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 for private; 169.254.0.0/16 for APIPA; 127.0.0.0/8 for loopback; 224.0.0.0/4 for multicast; 100.64.0.0/10 for carrier-grade NAT.

The one with diagnostic value is APIPA. A host with a 169.254 address did not get a DHCP reply, which means the DHCP server, the relay, the VLAN or the link — and lesson 41 works through which.