Subnetting Lesson (Easy Step-by-Step Method)
Lesson Title
Introduction to IPv4 Subnetting
Learning Outcomes
By the end of this lesson, students will be able to:
- Explain what subnetting is.
- Identify Network ID and Host ID.
- Calculate subnet masks.
- Determine the number of subnets.
- Determine the number of hosts per subnet.
- Find the network address, first host, last host, and broadcast address.
1. What is Subnetting?
Subnetting is the process of dividing one large network into smaller networks (subnets).
Why do we use subnetting?
✅ Reduces network traffic
✅ Improves security
✅ Makes network management easier
✅ Uses IP addresses efficiently
Real-World Example
Imagine a school with 300 computers.
Instead of one large network:
| Department | Subnet |
|---|---|
| Administration | Subnet 1 |
| Computer Lab | Subnet 2 |
| Library | Subnet 3 |
| Staff Room | Subnet 4 |
Each department becomes a separate subnet.
2. IPv4 Address Structure
An IPv4 address contains 32 bits.
Example:
192.168.1.10
Binary form:
11000000.10101000.00000001.00001010
32 bits = 4 octets × 8 bits
192 168 1 10
11000000 10101000 00000001 00001010
3. Network Portion and Host Portion
Example:
192.168.1.10/24
The "/24" means:
24 bits = Network
8 bits = Host
192.168.1 .10
Network Host
4. Understanding CIDR Notation
| CIDR | Subnet Mask |
|---|---|
| /8 | 255.0.0.0 |
| /16 | 255.255.0.0 |
| /24 | 255.255.255.0 |
| /25 | 255.255.255.128 |
| /26 | 255.255.255.192 |
| /27 | 255.255.255.224 |
| /28 | 255.255.255.240 |
| /29 | 255.255.255.248 |
| /30 | 255.255.255.252 |
5. Easy 4-Step Subnetting Method
Step 1 – Identify CIDR
Example:
192.168.1.0/26
CIDR = 26
Step 2 – Find Block Size
Formula:
Block Size = 256 − Last Octet of Subnet Mask
For /26:
Subnet Mask = 255.255.255.192
256 - 192 = 64
Block size = 64
Step 3 – Create Network Ranges
Start at 0 and count by block size.
0
64
128
192
256
Subnets:
| Subnet |
|---|
| 192.168.1.0 |
| 192.168.1.64 |
| 192.168.1.128 |
| 192.168.1.192 |
Step 4 – Find Host Range and Broadcast
First Subnet
Network:
192.168.1.0
Next subnet:
192.168.1.64
Broadcast:
64 - 1 = 63
Broadcast = 192.168.1.63
Host range:
192.168.1.1
to
192.168.1.62
Quick Formula
Network Address = First Address
Broadcast Address = Last Address
First Host = Network + 1
Last Host = Broadcast - 1
6. Host Calculation
Formula:
Hosts = 2^(Host Bits) - 2
Example 1
Network:
/24
Host bits:
32 - 24 = 8
Calculation:
2^8 - 2
256 - 2
254 Hosts
Example 2
Network:
/26
Host bits:
32 - 26 = 6
Calculation:
2^6 - 2
64 - 2
62 Hosts
7. Subnet Calculation
Formula:
Subnets = 2^(Borrowed Bits)
Example:
Default Class C:
/24
New subnet:
/27
Borrowed bits:
27 - 24 = 3
Calculation:
2^3
8 Subnets
Easy Reference Table
| CIDR | Hosts |
|---|---|
| /24 | 254 |
| /25 | 126 |
| /26 | 62 |
| /27 | 30 |
| /28 | 14 |
| /29 | 6 |
| /30 | 2 |
8. Complete Example
Find subnet information for:
192.168.10.0/27
Step 1
Subnet mask:
255.255.255.224
Step 2
Block size:
256 - 224
32
Step 3
Subnets
0
32
64
96
128
160
192
224
Step 4
First subnet:
Network:
192.168.10.0
Broadcast:
192.168.10.31
Host range:
192.168.10.1
to
192.168.10.30
Hosts:
30
Classroom Activity 1
Complete the table.
| CIDR | Subnet Mask | Hosts |
|---|---|---|
| /25 | ? | ? |
| /26 | ? | ? |
| /27 | ? | ? |
| /28 | ? | ? |
Answers
| CIDR | Subnet Mask | Hosts |
|---|---|---|
| /25 | 255.255.255.128 | 126 |
| /26 | 255.255.255.192 | 62 |
| /27 | 255.255.255.224 | 30 |
| /28 | 255.255.255.240 | 14 |
Classroom Activity 2
Find:
192.168.5.0/28
- Network Address
- Broadcast Address
- First Host
- Last Host
- Number of Hosts
Answer
Network:
192.168.5.0
Broadcast:
192.168.5.15
First Host:
192.168.5.1
Last Host:
192.168.5.14
Hosts:
14
Memory Trick for Students
1. Find the mask
/27 = 255.255.255.224
2. Find block size
256 - 224 = 32
3. Count by block size
0, 32, 64, 96, 128...
4. Use the range
Network = Start
Broadcast = End
Hosts = Middle
Golden Rule:
Network Address = First IP
Broadcast Address = Last IP
Usable Hosts = Everything in between
This method allows most Class C subnetting questions (/25 to /30) to be solved in less than one minute without converting IP addresses to binary.

Post a Comment