12. One click Calculate VPC and Subnet CIDR Ranges 🕸💻🧮

While I worked at AWS during the publishing of this post / video, the views expressed here are my own and may not reflect those of my employer. Only publicly available material is used to put together the content of this article and video. The website and the Youtube videos are NOT monetized.

You can directly scroll down for the Youtube Video for instructions or click here for vpc-helper !

The Problem

The first step in creating your VPC in AWS (or other cloud providers) is to decide the size of your VPC (and subnets).

When you have to design the VPC, one of two things can happen

  1. You pick up your favorite (😀) 10.0.0.0/16 for VPC and 10.0.1.0/24, 10.0.2.0/24 etc. for your subnets
  2. You can calculate how many total hosts (ip addresses) you are going to need for your VPC and each of your subnets and carefully calculate the ranges for the same.

Approach 2 while cumbersome requiring more work 👷‍♂️ and time, it is is always recommended. It saves a lot of time in rearchitecting (which may not even be possible) at later time, especially if you want to peer your VPCs !

However more often than not approach 1 is taken for its ease only to later realize its pitfalls.

Many of my students and customers would struggle doing this and I was surprised that no one had solved this!

So I came up with VPC helper, which in 3 short steps provides you VPC and subnet CIDR ranges. And with single click you can get next network blocks as well.

Here’s how it works

The Solution

  1. Open 👉👉 vpc-helper
  2. Enter the number of subnets your VPC has
  3. Enter the number of hosts per subnet
  4. Select whether you want the range from the big, medium and small RFC 1918 range (A,B or C class previously)
  5. Click Calculate - and boom the tool provides you with VPC CIDR and Subnet list with details (block)
  6. You can click next block if you have already used this block
  7. It also allows you to copy the data from the table to a csv (click Copy CSV To Clipboard)

The tool provides you with the most optimal VPCs (without wasting IP range space). And while this is meant to be used with AWS VPCs. It should work for other cloud provider’s VPC (or VNETs 😀).

You can follow the steps above or check out the quick youtube video below for instructions


DEMO | One Click Calculate AWS VPC and Subnet Ranges

Please watch in full screen or on youtube directly



Thank you for reading through, Please share if it’s useful to someone.

Do let me know in comments how do you like it!

-Nikhil

comments powered by Disqus