Difficulty: Medium
Correct Answer: 255.255.254.0 (subnet mask /23, providing about 510 usable hosts per subnet)
Explanation:
Introduction / Context:
Subnetting is a core skill in Cisco certification exams. In this scenario, you have a Class B network 172.15.0.0 and want to divide it into subnets that each support at least 500 usable hosts. The challenge is to find a subnet mask that satisfies the minimum host requirement without wasting address space.
Given Data / Assumptions:
Concept / Approach:
To support a certain number of hosts, you choose enough host bits so that 2^h - 2 is greater than or equal to the required number of hosts. Then you derive the subnet mask by allocating the remaining bits to the network portion. Here, we need to find the smallest h such that 2^h - 2 ≥ 500. After that, we calculate the prefix length and translate it into a dotted decimal subnet mask.
Step-by-Step Solution:
Compute host capacities: 2^8 - 2 = 256 - 2 = 254 hosts; 2^9 - 2 = 512 - 2 = 510 hosts.
Since 254 is less than 500, 8 host bits are not enough. With 9 host bits, we get 510 usable hosts, which satisfies the requirement of at least 500 hosts per subnet.
An IPv4 address has 32 bits, so if 9 bits are reserved for hosts, 32 - 9 = 23 bits are used for network and subnet identification.
A /23 prefix corresponds to the subnet mask 255.255.254.0 (because 254 in binary is 11111110, leaving one host bit in the last octet plus 8 host bits in the previous octet).
Check options: 255.255.254.0 is the /23 mask that gives 510 usable hosts, so it is the smallest mask that meets the requirement.
Verification / Alternative check:
We can verify by quick mental math: the last octet has 2 host bits (because /23 means 7 bits of the last octet are network bits and 1 bit is host, actually the host bits span two octets: 1 bit in the third octet and 8 bits in the fourth). Overall, 9 host bits give 2^9 = 512 total addresses and 512 - 2 = 510 usable. This matches the host requirement and confirms that 255.255.254.0 is correct. A /24 mask (255.255.255.0) would give only 254 usable hosts, which is too few.
Why Other Options Are Wrong:
Option a (255.255.0.0) does not create subnets; it leaves the entire Class B network as a single /16 with over 65,000 hosts.
Option b (255.0.0.0) is a Class A style mask and is not appropriate for this Class B network; it does not perform the required subnetting.
Option c (255.255.240.0) is a /20 mask, giving 4094 usable hosts per subnet, which meets the requirement but wastes a lot of addresses per subnet compared to /23.
Option e (255.255.255.0) is a /24 with only 254 usable hosts, which is insufficient for 500 hosts per subnet.
Common Pitfalls:
Candidates often forget the minus 2 rule for network and broadcast addresses and may wrongly accept a mask that provides exactly 500 total addresses, which would yield only 498 usable hosts. Another mistake is to choose the first mask that supports more than 500 hosts without checking if a smaller mask could also satisfy the requirement more efficiently. Practicing power of two calculations and prefix to mask conversions helps avoid these errors.
Final Answer:
The correct subnet mask is 255.255.254.0 (a /23 prefix, providing about 510 usable hosts per subnet).
Discussion & Comments