CCNA subnetting explained, step by step
Subnetting is the skill that trips up most CCNA candidates, and Cisco itself calls it one of the hardest parts for people new to IT. The good news: it is a fixed method you can practise until it is automatic.
What subnetting is
An IPv4 address has 32 bits, written as four decimal numbers (octets). The subnet mask (or CIDR prefix such as /26) says how many of those bits identify the network. The remaining bits identify hosts inside that network. Subnetting means borrowing host bits to split one network into several smaller ones.
The three numbers you must know
- Block size = 256 minus the interesting octet of the mask. For 255.255.255.192 it is 256 − 192 = 64.
- Total addresses = 2host bits. A /26 has 6 host bits, so 26 = 64.
- Usable hosts = 2host bits − 2 (the network and broadcast addresses are not usable). A /26 gives 62 hosts.
Quick reference table
| Prefix | Mask | Block size | Usable hosts |
|---|---|---|---|
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /29 | 255.255.255.248 | 8 | 6 |
| /30 | 255.255.255.252 | 4 | 2 |
Worked example: 192.168.10.77/26
- The prefix is /26, so the mask is 255.255.255.192 and the block size is 64.
- Subnets in the last octet start at 0, 64, 128, 192.
- 77 falls between 64 and 128, so the network address is 192.168.10.64.
- The next subnet starts at 128, so the broadcast address is 192.168.10.127.
- Usable hosts run from 192.168.10.65 to 192.168.10.126 (62 hosts).
Check your answer with the free subnet calculator, which also shows the binary view.
How to split a network for a requirement
If you need 5 subnets from 192.168.1.0/24, find the smallest power of two that is at least 5. That is 8 (23), so borrow 3 bits: /24 becomes /27. Each subnet has 32 addresses and 30 usable hosts. If you instead need 50 hosts per subnet, you need 6 host bits (26 − 2 = 62), so use /26.
VLSM in one paragraph
Variable-length subnet masking lets you use different prefix lengths inside one address block so little is wasted. Sort requirements from largest to smallest, give the largest its subnet first, then carve the next from the space that remains. Point-to-point router links usually get a /30.
Special cases CCNA likes to test
- Private ranges: 10.0.0.0/8, 172.16.0.0/12 (172.16–172.31) and 192.168.0.0/16.
- /31 and /32: a /31 is used on point-to-point links with no network or broadcast address; a /32 is a single host route.
- Wildcard masks (used in OSPF and ACLs) are the inverse of the subnet mask: 255.255.255.192 becomes 0.0.0.63.
How to practise
Do ten problems a day for two weeks and time yourself. Use the subnet trainer, watch the free Subnetting Mastery playlist by Practical Networking, then test yourself in the CCNA practice quiz.
Frequently asked questions
What is the fastest way to subnet for the CCNA?
Memorise the block sizes (128, 64, 32, 16, 8, 4) and find which multiple of the block size your address falls into. That gives the network address, and the next block minus one gives the broadcast address.
How many usable hosts are in a /27?
A /27 has 5 host bits, so 2^5 = 32 addresses and 30 usable hosts.
Do I need to know binary for the CCNA?
Yes, at least to convert octets quickly and understand masks. Most questions can then be solved with the block-size method.
Facts about the exam come from Cisco's CCNA page; always confirm there before booking.