Question

Difficulty: MediumIPv4 Addressing and Subnetting

A network administrator needs to provision an IPv4 subnet for a new database cluster requiring a maximum of 28 usable host IP addresses. Which CIDR prefix length represents the smallest subnet that meets this requirement?

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

Answer

/27 is the smallest CIDR prefix length that provides at least 28 usable host IP addresses.
The prefix length /27 allocates 5 host bits (3227=532 - 27 = 5). Calculating 252=302^5 - 2 = 30 usable host addresses confirms that a /27 subnet is the smallest subnet capacity that safely supports 28 host devices without wasting excess address space.

Step-by-Step Solution

1
Determine the required number of usable IP addresses
The network segment requires at least 28 usable host IP addresses.
Host requirement stated in the scenario.
2
Calculate total IP addresses needed including reserved addresses
Add 2 reserved addresses (network ID and broadcast address): 28+2=3028 + 2 = 30 total IP addresses.
Every IPv4 subnet reserves the first address for the network ID and the last address for the broadcast address.
3
Find the smallest power of 2 that is greater than or equal to the total required addresses
25=322^5 = 32 total IP addresses (323032 \ge 30). Thus, 5 host bits are required.
Subnet block sizes must be powers of 2.
4
Subtract the host bits from 32 to find the CIDR prefix length
325=2732 - 5 = 27, resulting in a prefix length of /27.
An IPv4 address consists of 32 bits divided into network bits and host bits.

Key Concept

IPv4 CIDR prefix calculation and usable host address capacity
Estimated Time:1m 0s
Rate this question