Packet.School
HomeLevelsSandboxPricingAbout
XP1,240
L5 · Advanced Topics
Level 5
6 lessons
  • 01Subnetting Basics
  • 02Subnet Calculation
  • 03What is NAT?
  • 04VPN
  • 05Terminal Commands
  • 06Final Quiz
Levels/L5 · Advanced Topics/Lesson 02
Simulation · 02

Subnet Calculation

Now let's practice subnetting calculations!

Duration
2min
Level
L5
Type
Simulation
Progress
2/ 6

01Step by Step Calculation

Example: 192.168.10.0/26

Step 1: Find the mask

code
/26 = 26 bits 1, 6 bits 0
11111111.11111111.11111111.11000000
= 255.255.255.192

Step 2: Find block size

code
256 - 192 = 64
Each subnet contains 64 addresses

Step 3: List subnets

code
Subnet 1: 192.168.10.0   - .63
Subnet 2: 192.168.10.64  - .127
Subnet 3: 192.168.10.128 - .191
Subnet 4: 192.168.10.192 - .255

02Quick Reference Table

CIDRMaskBlock SizeSubnetsHosts/Subnet
/24255.255.255.02561254
/25255.255.255.1281282126
/26255.255.255.19264462
/27255.255.255.22432830
/28255.255.255.240161614
/29255.255.255.2488326
/30255.255.255.2524642

03Practice Questions

Question 1:

How many hosts can be in the 10.0.0.0/8 network?

Solution:

code
32 - 8 = 24 host bits
2^24 - 2 = 16,777,214 hosts

Question 2:

What is the broadcast address of 172.16.0.0/12?

Solution:

code
/12 = first 12 bits are network
172.16.0.0 - 172.31.255.255 range
Broadcast: 172.31.255.255

Question 3:

Which subnet is 192.168.1.130/25 in?

Solution:

code
/25 = 128 block size
0-127: Subnet 1
128-255: Subnet 2
130 is in Subnet 2: 192.168.1.128/25

04Which Subnet is an IP in?

Method:

  1. Find block size
  2. Divide IP by block size
  3. Drop remainder, result is subnet address

Example: Which subnet is 192.168.1.200/26 in?

code
Block size = 64
200 ÷ 64 = 3.125
3 × 64 = 192
Subnet: 192.168.1.192/26

05VLSM (Variable Length Subnet Mask)

Creating subnets of different sizes:

code
Network: 192.168.1.0/24

Department A: 100 hosts needed → /25 (126 hosts)
Department B: 50 hosts needed  → /26 (62 hosts)
Department C: 20 hosts needed  → /27 (30 hosts)
Links: 2 hosts needed          → /30 (2 hosts)

06Summary

  • Block size = 256 - Last octet
  • Subnet address = IP's nearest lower multiple
  • Broadcast = Next subnet - 1
  • VLSM for efficient IP usage
Previous
Subnetting Basics
Next
What is NAT?
On this page
  • Step by Step Calculation
  • Quick Reference Table
  • Practice Questions
  • Which Subnet is an IP in?
  • VLSM (Variable Length Subnet Mask)
  • Summary
Packet.School

An open, interactive curriculum for computer networking.

v3.0 · MIT22 lessons live

Learn

  • Lessons
  • Sandbox
  • Levels
  • Pricing
  • About

Simulations

  • Packet Journey
  • DNS Lookup
  • DHCP Simulator
  • Subnet Calc
  • Network Builder
  • Terminal

Project

  • About
  • Changelog
  • GitHub
  • Contributing
  • Style guide

Newsletter

One short email when a new level ships. No tracking pixels.

© 2026 Packet.School — MIT licensed☕ Support with a coffeebuilt in the open · last updated 2026.05.14