Skip to content

2. IP Addressing

Every device on a network needs an address, the same way every house needs a street address. IPv4 addresses are four numbers 0-255, separated by dots — like 192.168.137.2.

Subnet masks: where does "local" end?

An IP address alone doesn't say which other addresses are on the same local network. A subnet mask answers that. The most common shorthand is CIDR notation — a slash and a number, like /24:

CIDR Subnet mask Addresses in the network
/24 255.255.255.0 256 (254 usable)
/16 255.255.0.0 65,536
/8 255.0.0.0 16,777,216

A /24 network means the first three numbers must match for two devices to be "local" to each other — 192.168.137.2 and 192.168.137.200 are on the same /24 network; 192.168.138.2 is not.

Private vs. public addresses

Three ranges are reserved for private networks — the internet's routers will never forward traffic to them directly:

  • 10.0.0.0 – 10.255.255.255
  • 172.16.0.0 – 172.31.255.255
  • 192.168.0.0 – 192.168.255.255

If you've ever wondered why the lab's network is 192.168.137.x — that's exactly this: a private range, not reachable directly from the internet, which is why pve1 has to NAT its wifi connection to actually reach anywhere beyond the lab.

Try it

Write down the subnet mask for a /24 network, and figure out whether 192.168.1.50 and 192.168.1.200 would be considered "local" to each other on one. Then check whether 192.168.1.50 and 192.168.2.50 would be.

Tip

IPv6 exists to solve the fact that IPv4 only has about 4.3 billion possible addresses — not enough for every device on earth. IPv6 addresses are longer (written in hex, separated by colons) specifically to make that number vastly larger.

Play it

Try the IP Addressing Lab for hands-on practice with subnet masks and address ranges.

Watch along

From the CompTIA A+ 220-1201 Full Course: IP addressing (2:12:30)

Next: DNS and DHCP →