Treat every prefix as a bundle of six facts
CIDR practice becomes much faster when you stop treating /24, /26, or /29 as isolated labels. Every prefix tells you the subnet mask, number of host bits, total address count, block size, subnet boundaries, and how the host classifies destinations as local or remote.
The number after the slash tells you how many bits belong to the network
A /24 has 24 network bits and 8 host bits. A /27 has 27 network bits and 5 host bits. A /30 has 30 network bits and only 2 host bits. Each time the prefix grows by one bit, the host space is cut in half.
Memorize the common prefix-to-mask ladder
| Prefix | Subnet mask | Host bits | Total addresses |
|---|---|---|---|
| /24 | 255.255.255.0 | 8 | 256 |
| /25 | 255.255.255.128 | 7 | 128 |
| /26 | 255.255.255.192 | 6 | 64 |
| /27 | 255.255.255.224 | 5 | 32 |
| /28 | 255.255.255.240 | 4 | 16 |
| /29 | 255.255.255.248 | 3 | 8 |
| /30 | 255.255.255.252 | 2 | 4 |
Swipe horizontally to see the full prefix table.
Use 256 minus the interesting mask octet
When the prefix boundary falls inside an octet, subtract the mask value from 256. For /26, the interesting octet is 192, so the block size is 64. For /27, 256 − 224 = 32.
Write the legal subnet starts before placing the host
A powerful practice habit is to list boundaries first. For /27, subnet starts in the fourth octet are 0, 32, 64, 96, 128, 160, 192, and 224. Then place the host value into the correct block.
The next subnet boundary gives you the broadcast
After you identify the current network, find the next subnet start and subtract one. That is the traditional broadcast address.
For ordinary subnets, network + 1 through broadcast − 1 gives the host range
Traditional IPv4 subnetting reserves the first address as the network address and the last as the broadcast. The usable range sits between them. Special cases such as /31 and /32 should be treated separately when specifically introduced.
/17 through /23 move the interesting boundary into the third octet
For /20, the mask is 255.255.240.0, so the third-octet block size is 16. For /22, the mask is 255.255.252.0, so the third-octet block size is 4.
CIDR directly controls whether the host uses ARP for the destination or the gateway
Two addresses can share the first three decimal octets and still be in different subnets. A host at 192.168.10.130/26 treats 192.168.10.150 as local because both belong to 192.168.10.128/26. It treats 192.168.10.200 as remote because that address belongs to a different /26 block.
The host address can stay constant while its local network changes
| Address/prefix | Network | Broadcast |
|---|---|---|
| 192.168.10.140/24 | 192.168.10.0 | 192.168.10.255 |
| 192.168.10.140/26 | 192.168.10.128 | 192.168.10.191 |
| 192.168.10.140/27 | 192.168.10.128 | 192.168.10.159 |
Swipe horizontally to compare how CIDR changes the local network.
CIDR prefixes also drive routing-table selection
Routers compare matching route prefixes and choose the most specific match. A /24 wins over a /16 for a destination inside both. A /16 wins over the default /0. This makes CIDR important not only for subnetting but also for routing behavior.
A wrong CIDR prefix can create selective failures rather than total failure
If the prefix is too broad, a host may treat a remote destination as local and ARP for it directly. If the prefix is too narrow, it may send local traffic to the gateway unnecessarily. Some destinations can still work, which makes wrong-prefix problems easy to misdiagnose.
Convert prefix to mask, host bits, and total addresses
/25
Mask? Host bits? Total addresses?
/27
Mask? Host bits? Total addresses?
/29
Mask? Host bits? Total addresses?
Show answers
/25: 255.255.255.128, 7 host bits, 128 addresses.
/27: 255.255.255.224, 5 host bits, 32 addresses.
/29: 255.255.255.248, 3 host bits, 8 addresses.
Find network, broadcast, and usable range
192.168.44.77/27
Find network, broadcast, and host range.
10.4.8.201/28
Find current block and next boundary.
172.20.37.10/20
Find third-octet block and broadcast.
Show answers
192.168.44.77/27: network 192.168.44.64, broadcast .95, usable .65–.94.
10.4.8.201/28: network 10.4.8.192, broadcast .207, usable .193–.206.
172.20.37.10/20: network 172.20.32.0, broadcast 172.20.47.255.
Check a prefix quickly
Use this mini tool to review the common /24–/30 prefixes. It is a study aid, not an official exam feature.
Use three checks to catch arithmetic mistakes
A strong CIDR answer can be checked three ways: the original IP lies inside the calculated network-to-broadcast range, the range contains the expected number of addresses, and broadcast + 1 equals the next legal subnet boundary.
Use CIDR math to verify whether the default gateway is actually local
For a normal endpoint, the gateway needs to be reachable on the local link. If a host is 192.168.10.130/26, then 192.168.10.129 is local while 192.168.10.1 is outside that /26.
CIDR can reveal that a valid-looking lease belongs to the wrong network
A client can receive a complete IP configuration from DHCP and still be on the wrong VLAN or wrong scope. Compare the prefix and gateway with a known-good peer. The values should form a coherent local subnet and match the intended segment.
The prefix creates the connected route that competes with other routes
On an endpoint or router, an interface prefix creates a directly connected route. That route can outrank the default route for matching destinations. A wrong prefix therefore changes both subnet math and route selection.
Eight CIDR practice errors to eliminate
- Forgetting that prefix length counts network bits, not host bits.
- Adding block size to the host value instead of the current network boundary.
- Assuming every broadcast ends in .255.
- Assuming same first three octets means same subnet.
- Forgetting earlier-octet subnetting for /17–/23.
- Using the default route when a more-specific route matches.
- Assuming a valid DHCP lease must be the correct subnet.
- Stopping after arithmetic without explaining local-vs.-remote behavior.
Use one repeatable seven-step method
This turns CIDR from memorization into a reusable network-analysis process.
See the prefix boundary instead of memorizing only decimal masks
A /27 means the first 27 bits are network bits and the last 5 are host bits. In the final octet, the mask is 11100000. That leaves five host-bit positions that can vary from 00000 through 11111, producing a 32-address block.
If you understand that pattern, /25 through /30 become a simple progression: each additional network bit cuts the block size in half.
A larger slash number means a smaller subnet
Students sometimes reverse this relationship. Moving from /24 to /25 adds one network bit and removes one host bit. The result is twice as many subnets of half the size. Moving from /27 to /28 does the same thing again.
| Prefix | Total addresses | Relative size |
|---|---|---|
| /24 | 256 | Largest in this set |
| /25 | 128 | Half of /24 |
| /26 | 64 | Half of /25 |
| /27 | 32 | Half of /26 |
| /28 | 16 | Half of /27 |
| /29 | 8 | Half of /28 |
| /30 | 4 | Half of /29 |
Swipe horizontally to see the prefix-size pattern.
Choose the smallest prefix that can satisfy the host requirement
CIDR practice is more useful when you connect prefixes to design. If a LAN needs 25 traditional usable host addresses, /27 provides 30 usable addresses and is a reasonable fit. /28 provides only 14, so it is too small. /26 provides 62, which works but wastes more space.
This is the basic logic behind variable-length subnetting: assign prefix sizes according to actual host needs instead of forcing every segment to use the same mask.
Prefix length changes route priority as well as subnet size
In a routing table, a longer matching prefix is more specific. That means 10.20.30.0/24 wins over 10.20.0.0/16 for destination 10.20.30.50. Both routes match, but /24 describes a smaller and more exact destination range.
/31 and /32 should not be forced into the ordinary usable-host formula
Most classroom subnetting drills use conventional subnets where the first address is network and the last is broadcast. Point-to-point /31 networks and host /32 routes are special cases. A /31 can be used on point-to-point links without the traditional network/broadcast host loss, while /32 identifies one exact IPv4 address.
A client with /16 ARPs for a server that should be remote
Observed: client 10.10.10.50/16 repeatedly ARPs for 10.10.20.8 instead of sending to its gateway.
Interpretation: under /16, the destination appears local. If the intended design is /24, the wrong prefix is the first failed dependency.
A gateway looks familiar but is outside the actual /27
Observed: 192.168.50.70/27 is configured with gateway 192.168.50.1.
Calculation: .70 belongs to the .64–.95 block. A normal local gateway should therefore be inside that subnet.
Interpretation: the addressing plan is invalid before any Internet troubleshooting begins.
Two clients have the same IP pattern but different prefixes
Observed: Client A is 192.168.80.130/24 and Client B is 192.168.80.130/27 in two separate lab scenarios. Both try to reach 192.168.80.200.
Interpretation: under /24, .200 is local; under /27, .200 is remote. The destination address did not change—the prefix changed the forwarding decision.
Work from one address all the way to forwarding behavior
This one example connects prefix conversion, block size, earlier-octet subnetting, network and broadcast calculation, usable range, and the local-versus-remote forwarding decision.
24 CIDR Prefix Practice digital flashcards
Practice prefix conversion, host bits, block sizes, network and broadcast boundaries, earlier-octet subnetting, local-vs.-remote behavior, routing, and troubleshooting.