By the end of this guide, you will be able to convert a prefix to a mask, find a block's boundaries, and decide whether routes can be combined safely. For 192.0.2.130/26, you will find the block 192.0.2.128–192.0.2.191; in practical terms, the entered host address belongs to network 192.0.2.128/26. CIDR means Classless Inter-Domain Routing. It replaced fixed class A, B, and C boundaries with an explicit prefix length. RFC 4632 is a Best Current Practice covering allocation, prefix notation, and aggregation: combining specific routes into a shorter shared prefix.
Prefix, mask, and capacity
Every complete prefix octet contributes 255. In a partial octet, successive bit values are 128, 64, 32, 16, 8, 4, 2, and 1. Therefore /21 = 8 + 8 + 5 and its mask is 255.255.248.0. To reverse the conversion, count the one bits. A non-contiguous mask with a one after the first zero has no single CIDR prefix.
An IPv4 block contains 2^(32 − prefix) addresses, so /26 contains 64. The CIDR converter also shows the binary mask and wildcard.
Worked example: 192.0.2.130/26
- The /26 mask is
255.255.255.192, giving an increment of 64. - Last-octet boundaries are 0, 64, 128, and 192.
- 130 falls within 128–191.
- The canonical block is
192.0.2.128/26, broadcast is192.0.2.191, conventional hosts are.129–.190, and wildcard is0.0.0.63.
RFC 5737 reserves 192.0.2.0/24 for documentation. In 10.20.37.200/20, the mask is 255.255.240.0, the third-octet increment is 16, and the block spans 10.20.32.0–10.20.47.255.
Splitting into equal subnets
Splitting 192.0.2.0/24 into /26s borrows 2 bits and creates 2^2 = 4 blocks: .0/26, .64/26, .128/26, and .192/26. Each has 64 addresses. Generate the table with the equal-subnet tool; use VLSM when sizes differ.
Aggregation and alignment
Those four /26s exactly cover 192.0.2.0/24. Two blocks combine into a prefix one bit shorter only if they have equal size, are adjacent, and the pair begins on the larger block's boundary. 192.0.2.64/26 and 192.0.2.128/26 touch but do not form a /25; their common /24 also covers additional addresses.
RFC 4632 calls for a discard route for an advertised aggregate so traffic to a missing more-specific route does not loop through a less-specific route. The route summary tool distinguishes exact coverage from a common supernet that contains gaps.
Longest-prefix match
For 192.0.2.140, routes 0.0.0.0/0, 192.0.2.0/24, and 192.0.2.128/25 all match. The router selects /25 because it has the most matching leading bits. Other protocol and routing-table rules decide between routes of equal prefix length.
Wildcards and special prefixes
For a contiguous subnet mask, the wildcard is its bitwise complement; /26 yields 0.0.0.63. ACL syntaxes may also accept non-contiguous wildcards that do not describe one CIDR block. /0 covers every IPv4 value and serves as a default route, /31 provides two point-to-point endpoints under RFC 3021, and /32 describes one address.
Checklist before using the result
- Normalize a host address to the real block boundary before writing a route.
- Check mask continuity and alignment before aggregation; adjacency alone is insufficient.
- Treat capacity as the number of values in a block, not a promise of reachable devices.
- Check the address purpose in the IANA registry independently of prefix length.