Cisco & Networking · Lesson 04
Subnetting for Competition
Turn subnetting into a repeatable process for calculating block sizes, host capacity, subnet boundaries, equal-size networks, and VLSM plans without relying on guesswork.
In competition work, subnetting affects router interfaces, VLAN gateways, routes, ACLs, DHCP scopes, and endpoint configuration. A single wrong prefix can make an otherwise correct network fail.
Lesson Snapshot
Learning objectives
Build subnet plans you can defend and verify
Use subnetting to design or verify IPv4 network boundaries instead of relying on memorized guesses.
Calculate subnet count, addresses per subnet, traditional usable hosts, network addresses, and broadcast addresses.
Choose an appropriate prefix length for a required number of hosts.
Use the block-size method to identify subnet boundaries quickly.
Compare equal-size subnetting with variable-length subnetting and explain when each is useful.
Recognize common subnetting mistakes that cause overlap, wasted space, or unreachable hosts.
Core idea
Subnetting is address-space planning
You are deciding where one network ends and the next begins. Every interface, gateway, route, and policy rule must agree with those boundaries.
Competition warning
A wrong prefix can look like many different problems
Hosts may disagree about local traffic, routers may install the wrong connected route, and ACLs may match the wrong address range. Calculate first, then troubleshoot the rest.
Core concepts
Six ideas behind every subnet calculation
Subnetting
Subnetting divides a larger IPv4 network into smaller logical networks so addressing, routing, security, and broadcast scope can be controlled.
Prefix length
The prefix length tells you how many IPv4 bits belong to the network portion. A longer prefix creates smaller subnets.
Host bits
The remaining bits define the size of each subnet. More host bits means a larger address block.
Block size
The number of addresses in one subnet. In the changing octet, block size can be found with 256 minus the subnet-mask value.
Subnet boundary
The starting network address of each block. Correct boundaries prevent overlap and invalid host assignments.
VLSM
Variable Length Subnet Masking uses different prefix lengths inside one addressing plan so each network receives an appropriately sized block.
Core formulas
Use a small number of formulas consistently
Total addresses in a subnet
2^(host bits)/27 leaves 5 host bits, so 2^5 = 32 total addresses
Traditional usable host addresses
2^(host bits) - 2/27 gives 32 total addresses and 30 traditional usable hosts
Number of equal-size subnets
2^(borrowed bits)Borrowing 3 bits from a /24 creates 2^3 = 8 equal-size /27 subnets
Block size in the changing octet
256 - mask value255.255.255.224 -> 256 - 224 = 32
Prefix from host requirement
Choose host bits where 2^h - 2 >= required hostsFor 50 hosts, 6 host bits gives 62 usable, so use /26
Prefix reference
Common subnet sizes to know quickly
| Prefix | Mask | Total addresses | Traditional usable | Block size |
|---|---|---|---|---|
| /24 | 255.255.255.0 | 256 | 254 | 256 |
| /25 | 255.255.255.128 | 128 | 126 | 128 |
| /26 | 255.255.255.192 | 64 | 62 | 64 |
| /27 | 255.255.255.224 | 32 | 30 | 32 |
| /28 | 255.255.255.240 | 16 | 14 | 16 |
| /29 | 255.255.255.248 | 8 | 6 | 8 |
| /30 | 255.255.255.252 | 4 | 2 | 4 |
Block boundaries
Find valid network starts before assigning addresses
255.255.255.128Boundaries: 0, 128
192.168.10.0/25 covers .0-.127 and 192.168.10.128/25 covers .128-.255.
255.255.255.192Boundaries: 0, 64, 128, 192
An address ending in .150 belongs to the .128-.191 block.
255.255.255.224Boundaries: 0, 32, 64, 96, 128, 160, 192, 224
An address ending in .94 belongs to the .64-.95 block.
255.255.255.240Boundaries: 0, 16, 32, 48, 64, 80, 96, 112, ...
An address ending in .118 belongs to the .112-.127 block.
255.255.255.248Boundaries: 0, 8, 16, 24, 32, 40, ...
An address ending in .42 belongs to the .40-.47 block.
255.255.255.252Boundaries: 0, 4, 8, 12, 16, 20, ...
An address ending in .22 belongs to the .20-.23 block.
Competition workflow
Eight stages for safe subnet planning
Read the requirement
Identify how many networks are needed and how many hosts each network must support.
Start from the available address block
Confirm the parent network and prefix before dividing it.
Choose the needed subnet size
Find the smallest block that still provides enough usable host addresses.
Calculate block boundaries
Use the prefix and mask to determine valid network starts.
Assign network, host range, and broadcast
Document all three for every subnet instead of recording only the prefix.
Check for overlap
Make sure no subnet consumes addresses already assigned to another subnet.
Verify gateway and endpoint fit
Confirm every assigned interface or host address lies inside the intended usable range.
Test routing and reachability
After configuration, verify local gateways, routes, and end-to-end traffic.
Host requirements
Choose the smallest subnet that still fits
Requirement
100 hosts
7 host bits gives 126 traditional usable hosts.
Requirement
50 hosts
6 host bits gives 62 traditional usable hosts.
Requirement
25 hosts
5 host bits gives 30 traditional usable hosts.
Requirement
12 hosts
4 host bits gives 14 traditional usable hosts.
Requirement
5 hosts
3 host bits gives 6 traditional usable hosts.
Requirement
2 hosts
2 host bits gives 2 traditional usable hosts.
Equal-size example
Divide one /24 into four equal networks
Parent network
192.168.50.0/24
Goal
Create 4 equal-size subnets
Borrowed bits
2 bits because 2^2 = 4 subnets
New prefix
/26
Mask
255.255.255.192
Block size
64 addresses
Result
Four non-overlapping /26 subnets
Subnet 1
192.168.50.0/26Usable: 192.168.50.1 - 192.168.50.62
Broadcast: 192.168.50.63
Subnet 2
192.168.50.64/26Usable: 192.168.50.65 - 192.168.50.126
Broadcast: 192.168.50.127
Subnet 3
192.168.50.128/26Usable: 192.168.50.129 - 192.168.50.190
Broadcast: 192.168.50.191
Subnet 4
192.168.50.192/26Usable: 192.168.50.193 - 192.168.50.254
Broadcast: 192.168.50.255
VLSM
Different network sizes from one parent block
Requirements
Staff
100 hostsMinimum /25 · 128 addresses
Students
50 hostsMinimum /26 · 64 addresses
Servers
20 hostsMinimum /27 · 32 addresses
Management
10 hostsMinimum /28 · 16 addresses
Valid allocation
Staff
10.10.0.0/25Usable: 10.10.0.1 - 10.10.0.126
Broadcast: 10.10.0.127
Students
10.10.0.128/26Usable: 10.10.0.129 - 10.10.0.190
Broadcast: 10.10.0.191
Servers
10.10.0.192/27Usable: 10.10.0.193 - 10.10.0.222
Broadcast: 10.10.0.223
Management
10.10.0.224/28Usable: 10.10.0.225 - 10.10.0.238
Broadcast: 10.10.0.239
Allocate largest first
Start with the network that requires the most addresses so large blocks do not become fragmented by smaller assignments.
Use valid boundaries
A /26 cannot begin at any random address. It must begin on a 64-address boundary in the changing octet.
Do not overlap
Every address can belong to only one assigned subnet in a valid VLSM plan.
Leave room intentionally
Unused address space is not automatically a mistake. It can be reserved for growth or future networks.
Document the whole plan
Record each network, prefix, gateway, usable range, and broadcast so troubleshooting is not based on memory.
Verify actual need
Do not make a subnet larger or smaller than required without understanding the design reason.
Overlap detection
Make sure every address belongs to only one assigned subnet
192.168.1.0/25192.168.1.64/26Overlap
The /25 covers .0-.127, so the /26 beginning at .64 sits inside the first subnet.
192.168.1.0/26192.168.1.64/26No overlap
The first block is .0-.63 and the second is .64-.127.
10.0.0.0/2710.0.0.32/28No overlap
The first ends at .31; the second starts at .32.
10.0.0.32/2710.0.0.48/28Overlap
The /27 covers .32-.63, so the /28 starting at .48 is inside it.
Competition checks
Subnet math must match the running network
Does the host address belong to the documented subnet?
A numerically similar address can still fall outside the valid block.
Is the prefix consistent on both ends?
Different masks can cause two hosts to disagree about whether traffic is local or routed.
Is the gateway inside the same subnet as the host?
The host must reach its next hop locally.
Does the router interface use the intended subnet?
An incorrect router prefix can create missing, overlapping, or unexpected connected routes.
Do route entries match the actual subnet size?
A route that is too broad or too narrow can send traffic incorrectly.
Do ACL entries use the intended network range?
Later policy work depends on accurate network boundaries.
Cisco inspection
Compare the subnet plan with actual device state
show ip interface briefCheck interface addressing and whether required interfaces are operational.
show running-config | section interfaceReview configured IPv4 addresses and masks on interfaces.
show ip route connectedConfirm which connected networks the router currently recognizes.
show ip routeCompare connected, static, and learned routes against the subnet plan.
show arpCheck local IPv4-to-MAC mappings where supported.
ping <gateway-or-host>Test IPv4 reachability after validating the address plan.
Evidence-based reasoning
Subnet first, configure second
A /26 network is documented as starting at 192.168.1.96
Weak response
Use it because .96 looks evenly spaced.
Better reasoning
A /26 has block size 64, so valid boundaries are .0, .64, .128, and .192. .96 is not a valid /26 network boundary.
A department needs 30 hosts
Weak response
Use /28 because 28 is close to 30.
Better reasoning
A /28 provides only 14 traditional usable hosts. A /27 provides 30 and exactly meets the requirement.
Two subnet entries use 10.0.0.0/25 and 10.0.0.64/26
Weak response
They are different prefixes, so they are separate.
Better reasoning
The /26 lies inside the /25 range. Different prefix lengths do not prevent overlap.
A network needs 33 hosts
Weak response
Use /27 because it provides about 32 addresses.
Better reasoning
A /27 provides only 30 traditional usable hosts. The next appropriate size is /26 with 62 usable hosts.
A /24 is split into eight equal subnets
Weak response
The new prefix is /27 because eight subnets sounds like 27.
Better reasoning
Eight subnets requires borrowing 3 bits because 2^3 = 8. /24 + 3 = /27.
A host is 192.168.1.127/26
Weak response
It is usable because 127 is not 255.
Better reasoning
For the 192.168.1.64/26 block, .127 is the broadcast address and not a traditional usable host address.
Common mistakes
Subnetting errors that create larger network problems
Using decimal closeness instead of block boundaries
Can place hosts in the wrong subnet or create invalid network starts.
Forgetting network and broadcast addresses
Causes overestimation of traditional usable host capacity.
Choosing a subnet that is exactly one total address count too small
A block with 32 total addresses does not provide 32 ordinary host addresses.
Assigning smaller VLSM blocks first
Can fragment the available space and make later large allocations difficult or impossible.
Ignoring overlapping subnets
Creates ambiguous routing and inconsistent host behavior.
Changing addressing without updating routes or ACLs
Other parts of the network can continue referencing the old subnet boundaries.
Quick mental reference
Six subnet sizes worth recognizing instantly
/25
128-address blocks, 126 traditional usable hosts.
/26
64-address blocks, 62 traditional usable hosts.
/27
32-address blocks, 30 traditional usable hosts.
/28
16-address blocks, 14 traditional usable hosts.
/29
8-address blocks, 6 traditional usable hosts.
/30
4-address blocks, 2 traditional usable hosts.
Practice
Work through competition-style subnet questions
Create 8 equal subnets from 192.168.100.0/24
Borrow 3 bits, producing /27 subnets with 32 addresses and 30 traditional usable hosts each.
What subnet contains 192.168.20.77/27?
192.168.20.64/27, broadcast .95, usable .65-.94.
What subnet contains 10.0.0.201/28?
10.0.0.192/28, broadcast .207, usable .193-.206.
Smallest traditional subnet for 14 hosts?
/28, because it provides 14 traditional usable host addresses.
Smallest traditional subnet for 15 hosts?
/27, because /28 provides only 14 usable addresses.
Do 172.16.1.0/26 and 172.16.1.64/27 overlap?
No. The /26 covers .0-.63 and the /27 begins at .64.
Verification
Validate the math against the network
Parent block
Every child subnet stays within the original network range.
Boundary
Every subnet begins on a valid boundary for its prefix length.
Capacity
Each subnet provides enough traditional usable addresses for the stated requirement.
No overlap
No two assigned subnets consume the same IPv4 address space.
Gateway fit
Each gateway is inside its subnet's usable range.
Router state
Connected routes match the intended network IDs and prefixes.
Defensive lab
Build and verify a fictional VLSM plan
Use fictional parent network 10.50.0.0/24 for a small CyberPatriot practice environment.
Requirements: Staff 60 hosts, Students 28 hosts, Servers 12 hosts, Management 6 hosts.
Choose the smallest traditional subnet for each requirement and order the allocations from largest to smallest.
Create a valid VLSM plan beginning at 10.50.0.0 and document network, prefix, usable range, and broadcast for every segment.
Choose one valid gateway address inside each subnet and explain why it is valid.
Compare the plan with a fictional router configuration and identify one incorrect interface mask.
Correct only the confirmed mask error, then verify connected routes and gateway reachability.
Check that the resulting plan has no overlap and that all required host counts still fit.
Lesson checklist
Before moving on
I can calculate total addresses from the number of host bits.
I can calculate traditional usable hosts for common subnet sizes.
I can find block size using 256 minus the changing mask octet.
I can identify valid subnet boundaries for /25 through /30.
I can choose a prefix based on a required host count.
I can split a /24 into equal-size subnets.
I understand why VLSM allocates different block sizes to different networks.
I allocate larger VLSM requirements before smaller ones.
I can recognize overlapping subnet assignments.
I remember that gateway addresses must fall inside the usable host range.
I verify routes and interface masks after subnet changes.
I document network, prefix, usable range, and broadcast for each subnet.
Reflection
Check your reasoning
Question 1
Why does a /27 provide 30 traditional usable hosts instead of 32?
Question 2
How do you determine whether .96 is a valid /26 network boundary?
Question 3
Why should VLSM normally allocate the largest requirement first?
Question 4
What is the difference between a subnet boundary and a usable host address?
Question 5
Why can overlapping subnets create routing problems?
Question 6
What other configurations should be reviewed when an existing subnet prefix changes?
Carry this forward
Subnetting is not separate from configuration. Every route, gateway, VLAN interface, ACL, and endpoint depends on the same network boundaries. Calculate them once, document them clearly, and verify that the running devices match.