Subnetting Made Easy: A Step-by-Step Guide for CCNA Beginners
Learn IPv4 subnetting step by step with simple examples: CIDR, subnet masks, block size, network and broadcast addresses, and a quick method you can use in the CCNA exam.
Subnetting scares many beginners, but it is just simple maths with a pattern. Once you see the pattern, you can solve most CCNA subnetting questions in under a minute.
What is subnetting?
Subnetting means splitting one large network into smaller networks (subnets). Companies do it to keep departments separate, reduce broadcast traffic and use IP addresses efficiently.
An IPv4 address has 32 bits, written as four numbers (octets) from 0 to 255, for example 192.168.10.25. The subnet mask tells you which part is the network and which part is the host.
CIDR notation
Instead of writing the full mask, we use CIDR: a slash and the number of network bits.
| CIDR | Subnet mask | Usable hosts |
|---|---|---|
| /24 | 255.255.255.0 | 254 |
| /25 | 255.255.255.128 | 126 |
| /26 | 255.255.255.192 | 62 |
| /27 | 255.255.255.224 | 30 |
| /28 | 255.255.255.240 | 14 |
| /29 | 255.255.255.248 | 6 |
| /30 | 255.255.255.252 | 2 |
Usable hosts = 2host bits − 2. We subtract two because the first address is the network address and the last is the broadcast address.
The block-size method
This is the fastest way to subnet in your head.
- Find the interesting octet: the one where the mask is not 255 or 0.
- Work out the block size: 256 − (mask value in that octet).
- Subnets start at multiples of the block size.
Example: 192.168.10.75/27
- Mask: 255.255.255.224, so the interesting octet is the 4th.
- Block size: 256 − 224 = 32.
- Subnets in the 4th octet: 0, 32, 64, 96, 128 …
- 75 falls between 64 and 95.
So:
- Network address: 192.168.10.64
- First usable host: 192.168.10.65
- Last usable host: 192.168.10.94
- Broadcast address: 192.168.10.95
Example: how many subnets and hosts?
You have 10.1.1.0/24 and need subnets of at least 50 hosts each.
- 50 hosts needs 6 host bits (26 − 2 = 62).
- 32 − 6 = /26.
- A /24 split into /26 gives 22 = 4 subnets: .0, .64, .128 and .192.
Common mistakes to avoid
- Forgetting to subtract 2 for the network and broadcast addresses
- Using the wrong octet when the mask is /17–/23 (the interesting octet is the 3rd)
- Treating the broadcast address as a usable host
Practise until it is automatic
Do 10 questions a day for a week and subnetting becomes second nature. In our CCNA course we drill subnetting live and then use it to build real VLAN and routing labs in Scholar Labs.
Next step: see where subnetting fits in the bigger picture on our Network Engineer Roadmap.
Comments
Private: only you and our mentors can see what you write here.
Loading…