2

I'm just beginning with AWS and started looking and trying out how VPC, Subnets, RT and other networking stuff works. Unfortunately my networking knowledge is limited so I'm encountering issues.

Having assigned the following IPv4 CIDR block 192.168.0.0/24 to a VPC. What I want to know is if I can create 3 subnets, and if so I'm looking for the actual calculus and formulas for the 3 subnets IPv4 CIDR blocks

  • [CIDR notation explained: CIDR format,CIDR table and examples - IONOS](https://www.ionos.com/digitalguide/server/know-how/cidr-classless-inter-domain-routing/) – John Rotenstein Jan 24 '20 at 21:12
  • [networking - CIDR for Dummies - Server Fault](https://serverfault.com/questions/12854/cidr-for-dummies) – John Rotenstein Jan 24 '20 at 21:12
  • One typically starts with a known prefix length from /32 or smaller as in [this table](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#IPv4_CIDR_blocks), noting the number of decimal IP addresses it will approximately provide. – Asclepius Dec 18 '20 at 21:37

3 Answers3

3

I built a tool to help myself calculating CIDR ranges for complex VPC designs: https://houqp.github.io/vpcstudio. The default example comes with 3 subnet setup already, you can use that as a starting point to tweak the config to your liking.

Asclepius
  • 57,944
  • 17
  • 167
  • 143
houqp
  • 761
  • 1
  • 8
  • 12
1

if I can create 3 subnets

Yes.

I'm looking for the actual calculus and formulas for the 3 subnets IPv4 CIDR blocks

There are no specific formulas.
AWS says "When you create a subnet, you specify the CIDR block for the subnet, which is a subset of the VPC CIDR block"

0/24 covers 256 IPs. You can calculate this number by 2 ^ (32 - 24).
The first 4 IPs and the last IP in subnet CIDR are reserved by AWS and you cannot use them.

nickolay.laptev
  • 2,253
  • 1
  • 21
  • 31
1

Answer of this question CIDR Address is not within CIDR Address from VPC will help you in understanding CIDR ranges.

You can read in detail here AWS VPC and Subnet CIDR calculation and allocation

Manmohan Bohara
  • 916
  • 8
  • 8