Using CIDR notation in Cloud Networks

  • Last updated on: 2016-06-06
  • Authored by: David Hendler

What is CIDR?

Classless Inter-Domain Routing (CIDR), is a range of IP addresses used by a network. A CIDR address looks like a normal IP address except that it ends with a slash followed by a number. The number after the slash represents the number of addresses in the range.

Here’s an example CIDR IP address in IPv4:

Since IPv4 has a 32-bit address space the 24-bit prefix above means that the address range is the 8 bits (256 addresses) after

And here’s an example in IPv6:


IPv6 has a 128-bit address range so the 32-bit network prefix means it refers to 96 bits’ worth of addresses following 2001:db8::, about 76 octillion addresses.

CIDR Notation in the Cloud Control Panel

If you’re using the Cloud Control Panel to create a Cloud Network you won’t need to worry about calculating the IP address. The CIDR field is automatically populated with an IP block on the Rackspace Network. You only need to supply a name for the network and click Create Network.

For complete instructions on how to create a Cloud Network using the Cloud Control Panel see Create an Isolated Cloud Network and attach it to a server.

CIDR Notation in the Cloud Networks API

If you’re using the Cloud Networks API to create a network you must specify the CIDR and a name for the new network.

The nova client command looks like this:

nova network-create <network_label> <cidr>

Where network_label is the name of the network, such as my_new_network, and cidr is the IP block to allocate from, such as or 2001:DB8::/64.

The following example shows a cURL command that creates the network:

curl -s <br>
         -X POST -H "X-Auth-Project-Id: 010101" -H "Content-Type: application/json" <br>
         -H "Accept: application/json" <br>
         -H "X-Auth-Token: 574c5763-86ab-431e-8b6c-5f7cf84c30ca" <br>
         -d '{"network": {"cidr": "", "label": "superprivate"}}' | python -m json.tool

The JSON-format response would look similar to this:

 "network": {
 "cidr": "",
 "id": "aaa77608-bae2-4eed-840e-896a7dd345d4",
 "label": "superprivate"

Note: To help calculate a subnet, you might use a tool like this:

For more information on using the Cloud Networks API see the Rackspace Cloud Networks API Developers Guide.

More Information on Cloud Networks

Attach an Isolated Network to a New Cloud Server

Attach an Isolated Network to an Existing Cloud Server

Removing Networks from a Cloud Server

Cloud Networks Developer Guide

Share this information: