Sunday, October 1, 2017

CIDR for Dummies DBA in Cloud

For DBAs of Cloud, its imperative to learn various networking concepts and CIDR is one of them. Without going into much detail, I will just post here quick note as what CIDR is and how to use it.

A CIDR looks something like this:

The represents range of IP addresses, and no its NOT from to Here is what it is:

So in order to know how many IP address are in that IP range and from where it starts and where it ends, the formula is :

2 ^ (32 - )

So for the CIDR :

2 ^ (32 - 28) = 2 ^ 4 = 2 * 2 * 2* 2 = 16

So in CIDR range , we have 16 IP addresses in which

Start IP =
End IP  =

Also cloud providers normally reserve few IPs out of this CIDR range for different services like DNS, NAT etc. For example, AWS reserves first 4 and last IP of any CIDR range. So in our example , we would just have 10 IP addresses to work with in AWS.

So in case of AWS, we would have a region where we would have a VPC. CIDR is assigned to that VPC. In that VPC, for example we would have 2 subnets. We can distribute our 10 IPs from our CIDR to our both subnets. Below I am giving 5 IPs to each subnet. A subnet is just a logical separate network.

For example we can give:

Subnet 1: to

Subnet 2: to 

Hope that helps.

PS. And oh CIDR stands for Classless Inter-Domain Routing (or Supernetting)

1 comment:

Oskar Glauber said...

Hello there I am so thrilled I found your webpage, I really found you by error, while I was browsing on Yahoo for something else, Regardless I am here now and would just like to say thanks a lot for a fantastic post and a all round interesting blog (I also love the theme/design), I don't have time to go through it all at the minute but I have book-marked it and also added your RSS feeds, so when I have time I will be back to read a lot more, Please do keep up the great job. netflix sign in