Difficulty: Medium
Correct Answer: 255.255.255.224
Explanation:
Introduction / Context:
Subnet design is a core topic in Cisco certification and practical networking. Network designers often have to balance the number of subnets against the number of hosts per subnet. This question asks for a single classful subnet mask that produces at least five subnets, each with at least sixteen usable host addresses. Understanding the host and network bit trade off, as well as the formula for usable hosts per subnet, is essential for correct design and troubleshooting of IPv4 networks.
Given Data / Assumptions:
Concept / Approach:
The number of usable hosts in a subnet is calculated as 2^h - 2, where h is the number of host bits and the minus two accounts for the network and broadcast addresses. To obtain at least 16 hosts, we set 2^h - 2 greater than or equal to 16. We also know that subnetting a Class C network uses host bits from the last octet. Each additional network bit doubles the number of subnets while reducing host bits. We must therefore find a mask that has enough host bits left, but also creates at least five subnets, which requires at least three subnet bits (2^3 = 8 subnets).
Step-by-Step Solution:
1. For at least 16 hosts per subnet, find h such that 2^h - 2 ≥ 16.
2. Try h = 4: 2^4 - 2 = 16 - 2 = 14, which is too small.
3. Try h = 5: 2^5 - 2 = 32 - 2 = 30, which is enough to support 16 hosts.
4. If 5 bits are used for hosts in the last octet, then 3 bits are used for subnetting that octet, because an octet has 8 bits.
5. Three subnet bits yield 2^3 = 8 subnets, which is more than the required 5 subnets.
6. A mask that uses 3 subnet bits in the last octet of a Class C network is /27, which corresponds to 255.255.255.224.
7. Therefore, 255.255.255.224 meets both constraints: at least 5 subnets and at least 16 hosts per subnet.
Verification / Alternative check:
We can verify by listing the host count for each candidate mask. For 255.255.255.192 (prefix /26) there are 6 host bits, so 2^6 - 2 = 62 usable hosts, which is more than enough, and 2 subnet bits provide 4 subnets which is fewer than the required 5. For 255.255.255.224 (prefix /27) there are 5 host bits, giving 30 usable hosts, and 3 subnet bits provide 8 subnets which satisfies the requirement. For 255.255.255.240 (prefix /28), there are 4 host bits and 2^4 - 2 = 14 usable hosts, which is insufficient. For 255.255.255.248 (prefix /29) there are 3 host bits, only 6 usable hosts. Thus only the /27 mask satisfies both constraints.
Why Other Options Are Wrong:
255.255.255.192: Provides enough hosts but only 4 subnets, which is less than the required 5 subnets.
255.255.255.240: Provides only 14 usable hosts, so it fails the requirement of at least 16 hosts per subnet.
255.255.255.248: Provides only 6 usable hosts, which is much too small for the requirement.
255.255.255.128: This mask yields 126 hosts but only 2 subnets, so it also fails the subnet requirement.
Common Pitfalls:
A common mistake is to focus only on the host count and forget the minimum number of subnets, or to focus only on subnets and ignore the host requirement. Some learners forget to subtract 2 for the network and broadcast addresses when calculating usable hosts. Others confuse prefix length and dotted decimal masks. To avoid these issues, always apply the formula hosts = 2^h - 2 and subnets = 2^s, and carefully check both conditions before finalising your choice.
Final Answer:
255.255.255.224
Discussion & Comments