CNPA study materials
CNPA study resources

CNPA: IP Addressing and Subnetting

CNPA · Work through your exam, one topic at a time.

All guide sections

IP Addressing and Subnetting

This domain tests subnet math fluency: masks, block sizes, host ranges, VLSM, private addressing and IPv6 essentials. Most items are solvable in under a minute with block-size arithmetic, so practise that instead of binary conversion.

Core rules

  • IPv4 is 32 bits; /n leaves 32-n host bits. Total addresses 2^(32-n); usable hosts 2^h - 2.
  • Private ranges: 10.0.0.0/8, 172.16.0.0/12 (172.16-172.31), 192.168.0.0/16. Loopback 127.0.0.0/8; link-local 169.254.0.0/16 (APIPA); multicast 224.0.0.0/4; reserved 240.0.0.0/4.
  • /31 gives two usable addresses on point-to-point links (RFC 3021); /32 is a single host route. Both break the "minus two" rule.
  • Block size = 256 minus the mask value in the interesting octet; subnets begin at multiples of the block size.
  • VLSM: allocate the largest requirement first so smaller blocks fit the remaining space.
  • IPv6: 128 bits, eight hex groups, "::" used once per address. Standard LAN is /64; link-local fe80::/10; unique local fc00::/7; global unicast 2000::/3. No broadcast; neighbour discovery replaces ARP; SLAAC relies on router advertisements.

Worked example

Which subnet contains 172.16.35.200/20, and what is the host range? The /20 mask is 255.255.240.0. The third octet is the interesting one: 256 - 240 = 16, so subnets start at 0, 16, 32, 48 and so on. The value 35 falls inside the 32 block.

  • Network: 172.16.32.0
  • Broadcast: 172.16.47.255
  • Host range: 172.16.32.1 to 172.16.47.254
  • Size: 2^12 - 2 = 4,094 usable addresses

Traps

  • Listing the broadcast address as usable, or forgetting the minus two on any mask wider than /31.
  • Assuming classful defaults; a 10.x address is not automatically /8 in a design question.
  • Overlapping VLSM blocks, usually caused by allocating small subnets before large ones.
  • Writing "::" twice in an IPv6 address, such as 2001:db8::1::2, which is invalid.
  • Confusing 169.254.x.x (no DHCP server reached) with a deliberately assigned address.