Choose Subnet Masks 1
This post presents questions that ask you to analyze design data about a network and then choose the one subnet mask to use for all subnets. If a company uses one subnet mask for all subnets of one classful network, before deploying the first subnet, you can predict the number of subnets and the number of hosts per subnet. You can also list the subnet IDs and the range of addresses in each subnet.
For those who care to pass Cisco certifications, you should strive to get the answer to each problem in about 15 seconds. This post gives you five problems. Get a stopwatch or clock app open and get ready to practice!
Videos: How to and More Practice
The left video discusses the design approach to subnet masks, which begins with the choice to use only one subnet mask within the entire classful network. Then, you consider the number of subnets the design requires, plus the size needed for each subnet, to determine which masks will work—and then choose among those masks.
The right video provides some practice with the process.
Practice Problems (Hidden)
You may make the following assumptions:
- By choice, the design should use a single subnet mask for all subnets within the network.
- All subnets can be used, including the zero subnet and broadcast subnet.
Each problem supplies a classful network (a class A, B, or C network). It also states the number of subnets and the number of hosts needed in the largest subnet. Your job:
- Plan the address structure with:
- The number of network bits based on the network class.
- The minimum number of subnet bits that provides enough subnets per the requirements.
- The minimum number of hosts bits that provides enough hosts/subnet per the requirements.
- Determine if no mask, exactly one mask, or many masks meets the requirements.
- If many masks meet the requirements, note the range of prefix mask values, and note which maximizes the number of subnets, and which maximizes the number of hosts/subnet.
Problem | Class | Maximum Hosts/Subnet to Support | Maximum Subnets to Support |
1 | A | 287 | 187 |
2 | B | 87 | 147 |
3 | C | 9 | 9 |
4 | B | 1200 | 40 |
The following table supplies the powers of 2 and their decimal equivalents.
2^x | Decimal | 2^x | Decimal |
---|---|---|---|
2^0 | 1 | 2^9 | 512 |
2^1 | 2 | 2^10 | 1024 |
2^2 | 4 | 2^11 | 2048 |
2^3 | 8 | 2^12 | 4096 |
2^4 | 16 | 2^13 | 8192 |
2^5 | 32 | 2^14 | 16,384 |
2^6 | 64 | 2^15 | 32,768 |
2^7 | 128 | 2^16 | 65,536 |
2^8 | 256 | 2^17 | 131,072 |
Answers and Explanations for Each Problem
Class | Minimum Subnet Bits | Minimum Host Bits | Valid Mask(s) | Maximizes Subnets | Maximizes Hosts | |
1 | A | 8 | 9 | /16 – /23 | /23 | /16 |
2 | B | 8 | 7 | /24 – /25 | /25 | /23 |
3 | C | 4 | 4 | /28 | N/A | N/A |
4 | B | 6 | 11 | None | N/A | N/A |
Table 1: Mask Design Problems: Answers
Class | Minimum Subnet Bits | Minimum Host Bits | Valid Mask(s) | |
1 | A | 8 | 9 | /16 – /23 |
Table 1: Mask Design Problems: Answers
This problem results in multiple of valid masks. The mask requires 8 network bits (due to a class A network). It also requires a minimum of 8 subnet and 9 host bits. As a result, 7 bits remain, with a design choice of using those as subnet or host bits.
Figure 1 shows the comparison of the edge cases for the final mask choice. The top of the figure depicts the mask based on the minimum number of subnet bits, which maximizes the number host bits and the number of hosts/subnet. The bottom part of the figure shows the other edge case, which depicts the case with the minimum number of host bits, which therefore maximizes the number of subnets.
Figure 1: Concepts Behind Problem 1
Class | Minimum Subnet Bits | Minimum Host Bits | Valid Mask(s) | |
2 | B | 8 | 7 | /24 – /25 |
Table 1: Mask Design Problems: Answers
This problem results in multiple of valid masks. The mask requires 16 network bits (due to a class B network). It also requires a minimum of 8 subnet and 7 host bits. As a result, 1 bits remain, with a design choice of using that bit as a subnet or host bit.
Figure 2 shows the comparison of the edge cases for the final mask choice. The top of the figure depicts the mask based on the minimum number of subnet bits, which maximizes the number host bits and the number of hosts/subnet. The bottom part of the figure shows the other edge case, which depicts the case with the minimum number of host bits, which therefore maximizes the number of subnets.
Figure 2: Concepts Behind Problem 2
Class | Minimum Subnet Bits | Minimum Host Bits | Valid Mask(s) | |
3 | C | 4 | 4 | /28 |
Table 1: Mask Design Problems: Answers
This problem results in one valid mask. The mask requires 24 network bits (due to a class C network). It also requires a minimum of 4 subnet and 4 host bits. Those fields total 32 bits, with 0 additional bits. The only design choice is to use the one mask that matches that structure (/28). The figure shows the structure of this single case.
Figure 3: Concepts Behind Problem 3
Class | Minimum Subnet Bits | Minimum Host Bits | Valid Mask(s) | |
4 | B | 6 | 11 | None |
Table 1: Mask Design Problems: Answers
This problem results in no viable masks. The mask requires 16 network bits (due to a class B network). It also requires a minimum of 6 subnet and 11 host bits. Added together, those fields total 33 bits, which do not fit into the 32-bit IPv4 subnet mask. So no mask can provide enough bits in each field. The figure notes the field sizes needed per the design requirements.
I have a question on the IP Addressing and Configuring lab from Chapter 15 of the First Edition book. I am still using the CCNA 200-301 First Edition. I do plan to order the new edition and pick up with Chapter 15 and move forward.
Trying to complete Table 1 in this lab has been a challenge and I’ve had to watch many of Wendell’s videos and reread parts of the text book.
There is one thing I cannot figure out, how and why the number in the last octet of Subnets 3 through 7 was determined?
Looking at Table 3, starting with Subnet 2’s highest IP address 10.0.1.126, the next subnet, Subnet 3, the value of the last octet is 2 more than the highest IP in Subnet 2. This pattern continues as the value of the last octet increases by two from the highest IP address in the previous subnet.
Why is the value in the last octet of the next subnet increased by two?
Why is this IP used as the subnet ID for the next sequential subnet?
How is this increase by two determined?
I have been working for hours to figure this out but cannot. I hope you can help.
v/r
Scott
Hi Scott,
Two answers.
First, I’m lost. You’re referring to a lab here at the blog? With a title of “IP Addressing and Configuring”? I can’t find it. Could you leave a comment on that page, and tell me that’s the one?
Second, I can guess what the mystery is. I don’t know what mask that lab uses, but:
Did that unlock the question?
Hi Wendell,
Sorry for the confusion, I should have been more specific. The lab I’m working on comes from the Chapter 15 labs in the Pearson CCNA 200-301 Network Simulator, Version 1.0.0. I could not find any other place to send this question, so I sent it here, although I did send the same question using the ‘Report’ function in the simulator.
Ok, I am tracking now. I should have done the math and found the broadcast, highest and lowest IPs as in other labs, I just did that and I completely understand now.
Thank you for answering my question so quickly. I’m studying and preparing all on my own and I can’t say enough good about all the resources you make available, they are outstanding and so well done, it makes teaching yourself totally possible.
Thank you again!
Scott