Question

Difficulty: MediumIPv4 Addressing and Subnetting

A network administrator is designing a dedicated VLAN for a warehouse automation system that requires static IPv4 addresses for 1515 smart sensor nodes. To conserve network address space, the administrator must select the smallest possible CIDR subnet prefix that accommodates all required host nodes. Which prefix length should be configured for this subnet?

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

Answer

The prefix /27 is the correct choice because it provides 30 usable host IP addresses, satisfying the 15-node requirement while minimizing wasted address space.
To calculate usable IPv4 addresses, the formula 2n22^n - 2 must be used, where nn is the number of host bits. For 1515 devices, a /28 mask provides 24=162^4 = 16 total addresses, but only 162=1416 - 2 = 14 usable host addresses, which is insufficient. Moving to a /27 mask provides n=5n = 5 host bits, yielding 252=302^5 - 2 = 30 usable host addresses. This is the smallest prefix length that satisfies the requirement of 15 hosts.

Step-by-Step Solution

1
Determine host bits required using the formula 2n2required hosts2^n - 2 \ge \text{required hosts}
For 15 hosts: 2n215    2n172^n - 2 \ge 15 \implies 2^n \ge 17. The smallest integer nn satisfying this is n=5n = 5 host bits (25=322^5 = 32).
Two IP addresses in every standard IPv4 subnet are reserved for the Network ID (all host bits 0) and Broadcast address (all host bits 1).
2
Calculate the CIDR prefix length from the host bits
Prefix length =325=27= 32 - 5 = 27 (written as /27).
An IPv4 address consists of 32 bits total. Subtracting host bits yields network prefix bits.
3
Verify usable host count for /27
252=302^5 - 2 = 30 usable addresses. Since 301530 \ge 15, /27 is the smallest valid subnet mask.
A /28 prefix only yields 242=142^4 - 2 = 14 usable host addresses, failing to support 15 nodes.

Key Concept

Subnet Usable Host Calculation
Rate this question