Computer Networks / Lesson 05 of 12

LESSON 05 · COMPUTER NETWORKS

IPv4, CIDR & Subnets

Compute network ranges and usable host addresses for typical IPv4 subnets.

Prefixes replace classful assumptions

An IPv4 address has 32 bits. A /24 prefix uses the first 24 bits for the network and leaves eight for addresses inside it. The network address has all host bits zero; a traditional directed broadcast address has all host bits one. In an ordinary multi-access /24, 254 addresses can be assigned to hosts.

CIDR permits variable-length prefixes. The mask for /26 is 255.255.255.192 and each /26 block spans 64 addresses.

Find the block

For 192.168.10.70/26, the last-octet blocks are 0–63, 64–127, 128–191 and 192–255. The address falls in 64–127: network 192.168.10.64, broadcast 192.168.10.127, usual host range .65–.126.

Special cases /31 for point-to-point links and /32 for a single host do not follow the usual subtract-two classroom rule.

Try an IPv4 subnet

Enter an IPv4 address and prefix from /1 through /30. This simplified tool shows the traditional network, broadcast and assignable range.

Check your understanding

What is the network address of 10.1.4.140/25?

Go deeper

Read the related protocol reference for more detail. Standards documents can be technical; finish the example before opening them.