Question

Difficulty: MediumIPv4 Addressing and Subnetting

A network administrator is configuring a dedicated VLAN for a new branch office security system. The system requires static IPv4 addresses for 12 IP cameras, 2 Network Video Recorders (NVRs), and 1 router default gateway interface. Which of the following CIDR subnet masks is the smallest mask that accommodates all required host IP addresses while minimizing wasted address space?

  1. /27Answer
  2. B
    /28
  3. C
    /29
  4. D
    /26

Answer

The subnet mask /27 is the smallest CIDR prefix that accommodates all 15 required host IP addresses.
The correct option is /27. The scenario requires 15 usable IPv4 addresses (12 cameras + 2 NVRs + 1 default gateway). A /27 subnet uses 5 host bits, yielding 2^5 - 2 = 30 usable host addresses. This is the smallest prefix length (most specific mask) that accommodates all 15 hosts without shortage.

Step-by-Step Solution

1
Calculate total host IP addresses required
12 (cameras) + 2 (NVRs) + 1 (default gateway) = 15 required host IP addresses.
Every active host and gateway interface on the subnet requires a unique usable IP address.
2
Determine the required number of host bits using the formula 2^h - 2 >= required hosts
For 4 host bits (h=4): 2^4 - 2 = 14 usable host IPs (insufficient for 15 hosts). For 5 host bits (h=5): 2^5 - 2 = 30 usable host IPs (sufficient for 15 hosts).
Two addresses in every subnet are reserved for the network ID and broadcast address.
3
Calculate the CIDR prefix length
32 total IPv4 bits - 5 host bits = /27 prefix length.
Subtracting host bits from 32 gives the prefix length for the network portion.

Key Concept

IPv4 Subnet Masking and Host Allocation
Estimated Time:1m 30s
Rate this question