Question

Difficulty: MediumIPv4 Addressing and Subnetting

A network administrator is configuring a dedicated IPv4 subnet for a high-availability database cluster. The cluster requires static IP address assignments for 14 active database nodes, 2 redundant monitoring interfaces, and 1 default gateway router interface. Which subnet mask provides the minimum host capacity required to accommodate all devices while conserving IP address space?

  1. A
    255.255.255.240
  2. 255.255.255.224Answer
  3. C
    255.255.255.192
  4. D
    255.255.255.248

Answer

The subnet mask 255.255.255.224 provides the smallest usable host capacity (30 host addresses) that accommodates the 17 required host IP assignments.
The scenario requires 17 usable IP addresses (14 nodes + 2 monitoring + 1 default gateway). The formula for usable hosts in a subnet is 2^(32 - prefix length) - 2. A /27 subnet mask (255.255.255.224) has 5 host bits, providing 2^5 - 2 = 30 usable host IP addresses, which is the smallest standard IPv4 block capable of holding 17 hosts.

Step-by-Step Solution

1
Calculate the total number of usable host IP addresses required for the cluster.
14 database nodes + 2 monitoring interfaces + 1 gateway interface = 17 usable host IP addresses required.
Every active host and interface requiring an IP on the subnet must be counted towards the total host address requirement.
2
Determine the minimum block size needed by accounting for network and broadcast addresses.
Total IP addresses needed = 17 hosts + 1 network address + 1 broadcast address = 19 IP addresses minimum.
IPv4 subnets require 2 unassignable addresses: the network ID (all host bits 0) and the broadcast address (all host bits 1).
3
Find the smallest power of 2 greater than or equal to the total required IP addresses.
2^5 = 32 total IP addresses (which allows 32 - 2 = 30 usable hosts).
Block sizes in IPv4 CIDR subnetting must be powers of 2. A block of 16 (2^4) yields only 14 usable hosts, which is insufficient.
4
Convert the required block size to a dotted-decimal subnet mask.
32 - 5 host bits = 27 network bits (/27 prefix). In dotted-decimal format, 255.255.255.224.
A prefix length of /27 leaves 5 host bits, corresponding to a last octet value of 256 - 32 = 224.

Key Concept

IPv4 Subnet Mask Capacity and Usable Host Calculation
Rate this question