You have a Class B IPv4 network and need at least 29 subnets. What subnet mask should you use to satisfy this requirement?

Difficulty: Medium

Correct Answer: 255.255.248.0

Explanation:


Introduction / Context:
Subnetting a classful network such as a Class B network is an important skill for network design and Cisco certification exams. When you know how many subnets are required, you must decide how many bits to borrow from the host portion and then determine the resulting subnet mask. This question asks you to find the correct mask for a Class B network that must support at least 29 subnets.


Given Data / Assumptions:

    We start with a Class B network, which has a default mask of 255.255.0.0 or /16.
    We need at least 29 subnets, so the subnet count must be at least 29.
    We assume modern practice that uses all subnets, so the number of subnets equals 2^s, where s is the number of borrowed bits.


Concept / Approach:
For a Class B network, the default prefix length is /16. To create subnets, we borrow bits from the host portion in the third octet. Two to the power of s, 2^s, must be at least 29. Calculating powers of 2, 2^4 equals 16 (too small), and 2^5 equals 32, which is enough. Therefore, we need to borrow 5 bits. That means the new prefix length is 16 plus 5, or /21. A /21 prefix corresponds to the subnet mask 255.255.248.0. The 248 in the third octet comes from the binary pattern 11111000, representing 5 network bits and 3 host bits in that octet.


Step-by-Step Solution:
Step 1: Start with the default Class B prefix /16 (mask 255.255.0.0).Step 2: Determine the smallest s such that 2^s is greater than or equal to 29. 2^4 is 16, 2^5 is 32, so s equals 5.Step 3: Add the 5 borrowed bits to the default prefix length: 16 plus 5 equals 21, so the new prefix is /21.Step 4: Convert /21 to a dotted decimal mask. In binary, the third octet has 5 ones followed by 3 zeros, which is 11111000, equal to 248 in decimal. The mask is 255.255.248.0.Step 5: Select 255.255.248.0 as the correct subnet mask for at least 29 subnets.


Verification / Alternative check:
As a verification, you can write the mask as 255.255.248.0 and count the total network bits. The first two octets are both 255, giving 16 bits. The third octet 248 corresponds to 11111000 in binary, adding 5 more network bits, for a total of 21 network or subnet bits. The remaining 11 bits are host bits, so the number of subnets is 2^5 equals 32 and the number of hosts per subnet is 2^11 minus 2 equals 2046, which is consistent for a /21 mask on a Class B network.


Why Other Options Are Wrong:
Option A, 255.255.224.0, is wrong because it corresponds to a /19 prefix, which uses only 3 borrowed bits, giving 8 subnets, not at least 29.
Option C, 255.255.255.224, and Option D, 255.255.255.248, are masks that assume a Class C style prefix and do not start from a Class B default /16. They produce many more subnets but radically different host counts and would not normally be associated with the original Class B network in this question.


Common Pitfalls:
Students often forget to use all subnets and subtract two from the subnet count, which can lead to choosing too large a mask. Another pitfall is mixing Class B and Class C default masks and not starting calculations from the correct base prefix. Always compute how many bits to borrow using the inequality 2^s greater than or equal to required_subnets and then add s to the default prefix length.


Final Answer:
255.255.248.0

More Questions from CISCO Certification

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion