3.3 Subnet Masks, CIDR, and Prefix Lengths
Key Takeaways
- CIDR notation writes the subnet mask as a slash prefix length, such as /24 or /30.
- The prefix length counts the number of network bits in the address.
- Longer prefixes create smaller subnets with fewer host addresses.
- Common masks should be recognized in both dotted decimal and CIDR notation.
From subnet masks to CIDR
CIDR stands for Classless Inter-Domain Routing. In everyday support work, CIDR notation means writing an address or network with a slash and a prefix length. 192.168.10.25/24 means the first 24 bits are network bits. The dotted decimal mask for /24 is 255.255.255.0. CIDR is shorter, easier to place in diagrams, and works for both IPv4 and IPv6.
A prefix length is a count of mask bits set to 1 from left to right. /8 means 8 network bits; /16 means 16 network bits; /24 means 24 network bits. In IPv4, the total address length is 32 bits, so host bits equal 32 minus the prefix length. A /24 leaves 8 host bits. A /26 leaves 6 host bits. A /30 leaves 2 host bits. As the prefix number gets larger, the subnet gets smaller.
Common IPv4 masks are worth memorizing because they appear in client settings, router interfaces, DHCP scopes, tickets, and diagrams. /8 is 255.0.0.0; /16 is 255.255.0.0; /24 is 255.255.255.0; /25 is 255.255.255.128; /26 is 255.255.255.192; /27 is 255.255.255.224; /28 is 255.255.255.240; /29 is 255.255.255.248; /30 is 255.255.255.252. You do not need to recite every possible mask instantly, but recognizing these makes address troubleshooting faster.
The host count comes from the host bits. In traditional IPv4 LAN subnets, usable hosts are usually 2^host_bits - 2 because one address is the network address and one is the broadcast address. A /24 has 8 host bits, so 256 total addresses and 254 usable host addresses. A /30 has 2 host bits, so 4 total addresses and 2 usable host addresses, which is why /30 was common on point-to-point IPv4 links. Some modern point-to-point designs use /31, but for CCST fundamentals, know the normal network and broadcast rule first.
CIDR also replaced old classful thinking. You may still hear Class A, B, and C in casual conversation, but modern networks use explicit prefixes. Do not assume every 10.x.x.x address automatically uses /8 or every 192.168.x.x address uses /24. An enterprise might use 10.20.30.0/24 for a user VLAN or 10.20.30.128/25 for a smaller server subnet. The mask is the authority.
Prefix length also affects planning. If a help desk team is asked whether a subnet can support 60 endpoints, /26 is tight because it normally has 62 usable host addresses before accounting for the gateway, printers, access points, cameras, or growth. A /25 gives 126 usable addresses. You may not be the engineer designing the subnet, but recognizing when an address pool is too small helps you escalate with useful evidence instead of only saying that DHCP is out of addresses.
When reviewing a diagram, read CIDR labels as boundaries. 192.168.50.0/24 describes the subnet. 192.168.50.1/24 describes a host interface, often a gateway. 0.0.0.0/0 is the default IPv4 route, meaning any destination not matched by a more specific route. The phrase more specific means a longer matching prefix. A router prefers 10.1.2.0/24 over 10.0.0.0/8 for destination 10.1.2.55 because /24 matches more network bits.
A common technician mistake is mixing mask formats incorrectly. 255.255.255.0/24 is redundant but understandable in notes; 192.168.1.10/255.255.255.0 is not standard CIDR notation; /255 is not a valid prefix. Use either address plus dotted mask in configuration fields that request it, or address plus slash prefix where CIDR is expected.
Study Checkpoint
- Topic: 3.3 Subnet Masks, CIDR, and Prefix Lengths.
- Verify the official Cisco concept before memorizing a shortcut.
- Practice the technician action: observe, document, test, fix when supported, or escalate.
What dotted decimal mask matches IPv4 prefix /24?
Which IPv4 prefix normally provides fewer usable host addresses?
What does the prefix length in 10.1.2.3/24 represent?