Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking for a list of CIDR blocks for "The Internet", i.e. everything from to, excluding RFC1918 address space of,, and (yes, I know there are lots of little nets in there that are special, like, but I really don't care about them). I figure this list must exist somewhere on the Internet, but my google-fu is failing me, so I figured I'd ask here before generating the range myself.

Edit: I forgot a really important part of this question: I need it in the fewest possible number of entries.

And if you want to know what I'm doing with this, we are entering static flow-mods to work around some nasty issues in an OpenFlow controlled network that currently has a significant amount of badness happening, and we need to reduce the number of flow entries temporarily so we don't exceed the available space in the flow tables and cause everything to come crashing down for a few minutes while it reestablishes a connection to the controller.

share|improve this question
up vote 21 down vote accepted

Let me show my working here...

You need a minimal number of CIDR blocks to cover:


To turn these ranges into minimal CIDR blocks, you can just use netmask (the swiss army knife of addressing), like so:

$ netmask -c
$ netmask -c
$ netmask -c
$ netmask -c

Hey presto, Bob's your Auntie's live-in lover.

share|improve this answer
Man, I wish I could give you more than a single plus one. I'll tell all my friends to plus one it. – Jed Daniels Aug 25 '11 at 6:57
I aim to please. – womble Aug 25 '11 at 7:03
Source code home for "netmask" seems to be here: – wfaulk Oct 28 '14 at 17:51
@womble . the cidrs you have calculated using netmask are the only ones that can be allocated by internet registries? – user2689877 Feb 28 '15 at 22:49

I have no idea what you're planning on using this for, but here you go:

Just a total dump of the BGP routing table.

share|improve this answer

Bogon space, and non-bogon space CIDR blocks are available in the bogon report:

share|improve this answer

Yes. You are looking for the IANA IPv4 Address Space Registry.

The IPv4 Address that are on the Internet are the ones who start of with one of the numbers what are Allocated in that table.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.