ExampleAddress

CIDR Address Examples and Subnet Prefixes

CIDR adds /prefix-length to an address. The prefix length states how many leading bits identify the network prefix.

Examples at a glance

192.0.2.129/25

An IPv4 network

Network prefix
192.0.2.0/24

The first 24 bits identify the prefix.

Address range
192.0.2.0 – 192.0.2.255

256 address values; usable-host rules depend on context.

A host with a prefix

Interface notation
192.0.2.129/25

An address with a 25-bit prefix.

Containing network
192.0.2.128/25

The network begins at .128, rather than .129.

An IPv6 prefix

Documentation block
2001:db8::/32

An IPv6 example with 32 prefix bits.

Network boundary versus host address

192.0.2.129/25 falls in the network 192.0.2.128/25, whose addresses run through 192.0.2.255. Writing an interface address with /25 does not make its host bits disappear.

Valid lengths

IPv4 prefix lengths range from 0 to 32; IPv6 lengths range from 0 to 128. A /24 IPv4 prefix contains 256 address values, but usable-host conventions depend on context and are not a universal minus-two rule.

More specific routes win

A /25 matches fewer addresses than a containing /24. Routing and our registry classification use the longest matching prefix when entries overlap.

Related guides and tools

Primary sources