When estimating how large an ASN is, a common shortcut is to count the number of IP ranges (CIDRs) it holds in a database, geofeed, or WHOIS record. This number can be misleading. The count of ranges depends on how an ASN’s address space happens to be fragmented, not on how many IP addresses it actually controls.
A Simple Comparison
Consider two networks with different allocation sizes.
Network A holds a /23 (512 IP addresses). It splits this into two /24 blocks, one assigned to Amsterdam and one to New York City.
| Range | City |
|---|---|
| x.x.x.0/24 | Amsterdam |
| x.x.x.128/24 | New York City |
Network A — /23 total (512 IPs), fragmented into two /24 blocks
Result: 2 rows in the database, 512 total IP addresses.
Network B holds a /22 (1,024 IP addresses), entirely allocated to Denver with no geographic split.
| Range | City |
|---|---|
| y.y.y.0/22 | Denver |
Network B — /22 total (1,024 IPs), one unfragmented block
Result: 1 row in the database, 1,024 total IP addresses.
Network B has twice the address space of Network A, but half the number of database rows. Counting rows would suggest Network A is larger. It is not.
Why This Happens: CIDR Structure
A CIDR block’s prefix length determines its address count:
| Prefix | IPv4 Addresses |
|---|---|
| /24 | 256 |
| /23 | 512 |
| /22 | 1,024 |
| /16 | 65,536 |
| /8 | 16,777,216 |
A single /24 can also be represented as 256 individual /32 entries if the data source lists addresses at that granularity. Same address count, very different row count. This is why fragmentation, not size, drives how many rows appear.
Fragmentation happens for a few reasons:
- Geolocation splits a block across multiple cities or facilities
- Routing announcements break a block into smaller advertised prefixes
- Non-contiguous address assignment prevents blocks from being combined into one larger CIDR
Blocks also cannot always be aggregated back into a larger CIDR. Aggregation only works when the ranges are contiguous and align on a power-of-two boundary. An odd-shaped or non-contiguous allocation stays fragmented into multiple rows no matter how it is counted.
A Real-World Example: DoD /8 Blocks
The US Department of Defense holds several /8 allocations, each containing 16,777,216 IP addresses. Where a /8 is used as a single unfragmented block, it appears as one row in a range-based dataset. A much smaller organization with a handful of scattered /24 blocks could show up with more rows, despite controlling a tiny fraction of the address space. This is the same pattern as the Amsterdam/Denver example, just at a much larger scale.
The DoD /8 produces fewer rows than the small organization, yet holds thousands of times more address space. Row count and address count point in opposite directions here.
The Correct Way to Measure ASN Size
Convert every range to its address count and sum the total, rather than counting rows.
- IPv4: address count = 2^(32 − prefix length)
- IPv6: address count = 2^(128 − prefix length)
Summing this across all ranges for an ASN gives the actual number of IP addresses it holds, regardless of how fragmented the data source represents it.



