What is CIDR Notation?
CIDR (Classless Inter-Domain Routing) is the standard method used for IP address allocation and routing across both IPv4 and IPv6 networks. It replaced the older class-based system and allows network sizes to be defined more precisely, reducing waste and improving routing efficiency.
CIDR notation
In CIDR notation, an IP address is followed by a forward slash and a number that indicates how many leading bits of the address represent the network portion. The remaining bits identify individual hosts within that network.
For example, 192.0.2.0/24 means the first 24 bits identify the network, leaving 8 bits for host addresses — giving a range of 256 addresses (192.0.2.0 to 192.0.2.255).
A smaller prefix number means a larger network. 10.0.0.0/8 covers over 16 million addresses, while 10.0.0.0/30 covers just 4.
IPv4
IPv4 addresses are 32-bit numbers written in dotted decimal notation (for example, 192.0.2.0). CIDR allows any prefix length from /0 (the entire internet) to /32 (a single host), giving network operators precise control over how address space is allocated and announced.
IPv6
IPv6 addresses are 128-bit numbers written in hexadecimal notation (for example, 2001:0db8:85a3::/48). CIDR notation works identically — the number after the slash indicates how many bits define the network. IPv6's vast address space means prefix lengths are typically larger, with /48 commonly allocated to organisations and /128 representing a single interface.
Why CIDR matters for IP geolocation and routing
Routing protocols like BGP use CIDR blocks rather than individual IP addresses to exchange routing information. An autonomous system announces the CIDR prefixes it is responsible for, allowing the rest of the internet to route traffic to the right network.
For IP geolocation, CIDR prefixes are a key unit of analysis. Understanding which AS announces a given prefix, and where that AS's infrastructure is located, is central to determining where an IP address is in use. BigDataCloud's APIs work with CIDR notation throughout — for example, the Networks by CIDR API returns all BGP-announced networks within a specified prefix range.