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

Core formulas5
Common prefixes7
Workflow stages8
Main goalFast, accurate subnet design

Learning objectives

Build subnet plans you can defend and verify

01

Use subnetting to design or verify IPv4 network boundaries instead of relying on memorized guesses.

02

Calculate subnet count, addresses per subnet, traditional usable hosts, network addresses, and broadcast addresses.

03

Choose an appropriate prefix length for a required number of hosts.

04

Use the block-size method to identify subnet boundaries quickly.

05

Compare equal-size subnetting with variable-length subnetting and explain when each is useful.

06

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 value

255.255.255.224 -> 256 - 224 = 32

Prefix from host requirement

Choose host bits where 2^h - 2 >= required hosts

For 50 hosts, 6 host bits gives 62 usable, so use /26

Prefix reference

Common subnet sizes to know quickly

PrefixMaskTotal addressesTraditional usableBlock size
/24255.255.255.0256254256
/25255.255.255.128128126128
/26255.255.255.192646264
/27255.255.255.224323032
/28255.255.255.240161416
/29255.255.255.248868
/30255.255.255.252424

Block boundaries

Find valid network starts before assigning addresses

/25255.255.255.128

Boundaries: 0, 128

192.168.10.0/25 covers .0-.127 and 192.168.10.128/25 covers .128-.255.

/26255.255.255.192

Boundaries: 0, 64, 128, 192

An address ending in .150 belongs to the .128-.191 block.

/27255.255.255.224

Boundaries: 0, 32, 64, 96, 128, 160, 192, 224

An address ending in .94 belongs to the .64-.95 block.

/28255.255.255.240

Boundaries: 0, 16, 32, 48, 64, 80, 96, 112, ...

An address ending in .118 belongs to the .112-.127 block.

/29255.255.255.248

Boundaries: 0, 8, 16, 24, 32, 40, ...

An address ending in .42 belongs to the .40-.47 block.

/30255.255.255.252

Boundaries: 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

01

Read the requirement

Identify how many networks are needed and how many hosts each network must support.

02

Start from the available address block

Confirm the parent network and prefix before dividing it.

03

Choose the needed subnet size

Find the smallest block that still provides enough usable host addresses.

04

Calculate block boundaries

Use the prefix and mask to determine valid network starts.

05

Assign network, host range, and broadcast

Document all three for every subnet instead of recording only the prefix.

06

Check for overlap

Make sure no subnet consumes addresses already assigned to another subnet.

07

Verify gateway and endpoint fit

Confirm every assigned interface or host address lies inside the intended usable range.

08

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.

/25128 addresses

Requirement

50 hosts

6 host bits gives 62 traditional usable hosts.

/2664 addresses

Requirement

25 hosts

5 host bits gives 30 traditional usable hosts.

/2732 addresses

Requirement

12 hosts

4 host bits gives 14 traditional usable hosts.

/2816 addresses

Requirement

5 hosts

3 host bits gives 6 traditional usable hosts.

/298 addresses

Requirement

2 hosts

2 host bits gives 2 traditional usable hosts.

/304 addresses

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/26

Usable: 192.168.50.1 - 192.168.50.62

Broadcast: 192.168.50.63

Subnet 2

192.168.50.64/26

Usable: 192.168.50.65 - 192.168.50.126

Broadcast: 192.168.50.127

Subnet 3

192.168.50.128/26

Usable: 192.168.50.129 - 192.168.50.190

Broadcast: 192.168.50.191

Subnet 4

192.168.50.192/26

Usable: 192.168.50.193 - 192.168.50.254

Broadcast: 192.168.50.255

VLSM

Different network sizes from one parent block

Requirements

Staff

100 hosts

Minimum /25 · 128 addresses

Students

50 hosts

Minimum /26 · 64 addresses

Servers

20 hosts

Minimum /27 · 32 addresses

Management

10 hosts

Minimum /28 · 16 addresses

Valid allocation

Staff

10.10.0.0/25

Usable: 10.10.0.1 - 10.10.0.126

Broadcast: 10.10.0.127

Students

10.10.0.128/26

Usable: 10.10.0.129 - 10.10.0.190

Broadcast: 10.10.0.191

Servers

10.10.0.192/27

Usable: 10.10.0.193 - 10.10.0.222

Broadcast: 10.10.0.223

Management

10.10.0.224/28

Usable: 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/26

Overlap

The /25 covers .0-.127, so the /26 beginning at .64 sits inside the first subnet.

192.168.1.0/26192.168.1.64/26

No overlap

The first block is .0-.63 and the second is .64-.127.

10.0.0.0/2710.0.0.32/28

No overlap

The first ends at .31; the second starts at .32.

10.0.0.32/2710.0.0.48/28

Overlap

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 brief

Check interface addressing and whether required interfaces are operational.

show running-config | section interface

Review configured IPv4 addresses and masks on interfaces.

show ip route connected

Confirm which connected networks the router currently recognizes.

show ip route

Compare connected, static, and learned routes against the subnet plan.

show arp

Check 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

01

Use fictional parent network 10.50.0.0/24 for a small CyberPatriot practice environment.

02

Requirements: Staff 60 hosts, Students 28 hosts, Servers 12 hosts, Management 6 hosts.

03

Choose the smallest traditional subnet for each requirement and order the allocations from largest to smallest.

04

Create a valid VLSM plan beginning at 10.50.0.0 and document network, prefix, usable range, and broadcast for every segment.

05

Choose one valid gateway address inside each subnet and explain why it is valid.

06

Compare the plan with a fictional router configuration and identify one incorrect interface mask.

07

Correct only the confirmed mask error, then verify connected routes and gateway reachability.

08

Check that the resulting plan has no overlap and that all required host counts still fit.

Lesson checklist

Before moving on

01

I can calculate total addresses from the number of host bits.

02

I can calculate traditional usable hosts for common subnet sizes.

03

I can find block size using 256 minus the changing mask octet.

04

I can identify valid subnet boundaries for /25 through /30.

05

I can choose a prefix based on a required host count.

06

I can split a /24 into equal-size subnets.

07

I understand why VLSM allocates different block sizes to different networks.

08

I allocate larger VLSM requirements before smaller ones.

09

I can recognize overlapping subnet assignments.

10

I remember that gateway addresses must fall inside the usable host range.

11

I verify routes and interface masks after subnet changes.

12

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.