Subnetting Basics
How do we split one network into smaller ones?
- Interpret CIDR notation (/24, /25, /26)
- Calculate the number of hosts in a subnet
- Identify the network and broadcast addresses
Overview
One flat /24 network has 254 hosts. Sometimes we need smaller groups — one for staff, one for students, one for admin. Subnetting is the maths that lets us slice a network into pieces.
CIDR notation
192.168.10.0/24 means the first 24 bits are the network part. The remaining 8 bits give 256 addresses, minus two (network and broadcast) = 254 usable hosts. /25 gives 126 hosts per subnet; /26 gives 62 per subnet; /27 gives 30 per subnet.
Worked example
Subnet 192.168.10.0/26 splits the /24 into four subnets: 192.168.10.0/26 (hosts .1–.62), 192.168.10.64/26 (.65–.126), 192.168.10.128/26 (.129–.190), 192.168.10.192/26 (.193–.254). Each subnet has its own broadcast address (.63, .127, .191, .255) that nobody can use.
Why bother?
Smaller subnets reduce broadcast traffic, limit the blast radius of a security incident, and let us apply different rules to different groups (staff, students, servers, guests).
Subnetting Six
- In pairs, solve: how many hosts in /24, /25, /26, /27? List all four /26 subnets of 192.168.20.0/24. Identify the broadcast address of 192.168.20.128/26.
- Check answers with another pair; explain any disagreement.
- How many usable hosts in a /26?
Reveal answer
62.
- What is the broadcast address of 192.168.10.64/26?
Reveal answer
192.168.10.127.
- Why can't we use the network or broadcast address for a host?
Reveal answer
They are reserved to identify the subnet itself and to reach all hosts at once.
Design an IP plan for your school: staff /26, students /25, servers /28. What is the smallest CIDR you need overall?