IP addresses and subnets
Recognize special IPv4 ranges
Recognize private, loopback, and link-local IPv4 addresses and understand where each one works.
8 minute lesson
Some IPv4 ranges are reserved for special jobs. You’ll meet three of them constantly, and recognizing them on sight tells you a lot about a network before you run a single diagnostic.
Private ranges
Private IPv4 ranges are 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. They can be reused inside separate private networks and are not globally routed on the public Internet. Your home network and your office network can both use 192.168.1.0/24 without conflict, because those addresses never appear on the public Internet directly.
Check what you have right now:
ip -4 address show
# inet 192.168.1.20/24 ... scope global dynamic wlan0
An address starting with 192.168., 10., or 172.16 through 172.31 means you’re on a private network, and something — almost always NAT on your router — stands between you and the Internet.
Loopback
The 127.0.0.0/8 block is loopback. Traffic to it remains inside the local host and never touches any network hardware. 127.0.0.1 is the address you will see most often in local development.
ping -c 2 127.0.0.1
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.041 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.039 ms
Those sub-0.1ms times are the giveaway: no cable, no radio, just the kernel talking to itself. If ping 127.0.0.1 fails, your machine’s network stack itself is broken — an extremely rare and serious condition.
Link-local
The 169.254.0.0/16 range is IPv4 link-local. A host may choose one of these addresses itself when normal configuration is unavailable. It works only on the local link and no router will forward it.
These addresses are not interchangeable. Seeing 169.254.x.x when you expected DHCP is often evidence of a configuration problem:
ip -4 address show eth0
# inet 169.254.83.107/16 scope link eth0
Translation: “I asked for an address and nobody answered, so I made one up.” The machine isn’t broken — the DHCP conversation failed. Check the cable, the Wi-Fi association, or the DHCP server before touching anything else.
My advice is to memorize these ranges cold. Reading 10.0.4.7 and thinking “private, probably a cloud or office network” or reading 169.254.12.9 and thinking “DHCP failed” turns raw output into an explanation instantly.
Lesson completed