Question

Difficulty: MediumIPv4 Addressing and Subnetting

A network administrator needs to assign an IPv4 subnet for a database cluster requiring static IP addresses for 110110 physical node interfaces, 22 virtual load balancer IP addresses, and 22 redundant default gateway interfaces. Which CIDR prefix length represents the smallest subnet mask that will accommodate all required host addresses?

  1. /25Answer
  2. B
    /26
  3. C
    /24
  4. D
    /27

Answer

The smallest subnet mask in CIDR notation that accommodates all required addresses is /25.
The scenario requires allocating 114 usable IP addresses (110+2+2=114110 + 2 + 2 = 114). A /25 subnet allocates 7 host bits, giving 27=1282^7 = 128 total IP addresses. Subtracting 2 for the network ID and broadcast address results in 126 usable host IP addresses. This satisfies the 114 required addresses while using the smallest possible subnet block.

Step-by-Step Solution

1
Calculate total host IP addresses required
110 physical interfaces+2 load balancer virtual IPs+2 gateway interfaces=114 host IP addresses110 \text{ physical interfaces} + 2 \text{ load balancer virtual IPs} + 2 \text{ gateway interfaces} = 114 \text{ host IP addresses}.
Every active physical interface, redundant gateway, and virtual IP assigned on the local subnet requires a unique usable IPv4 host address.
2
Determine required host bits (n) using formula 2^n - 2 >= required usable hosts
For n=6n = 6, 262=622^6 - 2 = 62 usable host IPs (insufficient). For n=7n = 7, 272=1262^7 - 2 = 126 usable host IPs (sufficient for 114).
Subnet calculations must subtract 2 addresses (the Network ID and the Broadcast address) from the total pool of 2n2^n addresses.
3
Calculate the CIDR prefix length
32 total IPv4 bits7 host bits=/25 prefix length32 \text{ total IPv4 bits} - 7 \text{ host bits} = /25 \text{ prefix length}.
Subtracting the number of host bits from the 32-bit total IPv4 address space yields the subnet prefix length.

Key Concept

Calculating usable IPv4 host capacity and determining optimal CIDR subnet mask allocation.
Estimated Time:1m 30s
Rate this question