Mega Menu

Friday, May 08, 2020

Networks - Subnet Ranges From VPC or Virtual Network Range

How do I compute subnet ranges from a VPC (AWS) or Virtual Network (Azure) IP ranges?

Example:
    If a virtual network or VPC has a IP range of 10.0.0.0/16, and if you would like to provision 256 IPs per subnet,
    you have a potential to create 256 subnets.
            i.e.  Subnet1        10.0.0.1/24
                  Subnet2        10.0.0.2/24
                  Subnet3        10.0.0.3/24
                  Subnet4        10.0.0.4/24 and so on.....

        This is as explained in the other post of ip range computation logic.
        As the VPC range is 2^16 there can be 65536 IPs, which when split into groups of 256,
        there can be 65536/256 = 256 groups i.e. 256 subnets.

        Hope this helps!!