Home > database >  AWS VPC IP Range?
AWS VPC IP Range?

Time:08-17

I'm trying to set up the AWS cloud for some VMs as an alternative for existing setups in Azure. AWS however has some limitations on the subnet that Azure does not have. With Azure I have it set up using the following IPs in the picture below, but AWS gives me the following errors when trying to create the VPC with the subnets I need.

click here for image

Would anyone have suggestions on how to use these IP ranges for a subnet on AWS? Perhaps something with AWS Cli? Any feedback is appreciated!

CodePudding user response:

Your subnets are not part of your VPC they way you set it up. That's way it errors out. Its surprising that azure would allow to do it.

It should be, for example:

  • VPC: 10.0.0.0/20
  • subnet 1: 10.0.0.0/24
  • subnet 2: 10.0.16.0/24
  • subnet 3: 10.0.32.0/24

CodePudding user response:

The subnets in AWS must be a subset in VPC Range

This means that your subnet must be within the IP Range in the VPC

In your example, you are trying to create a VPC with 10.0.0.0/20

This means that the total range of your subnet is 10.0.0.0 until 10.0.15.255

So, the first 16 bits (10.0) part of your CIDR cannot change while creating a subnet

That's why the subnets you are trying to create does not work, because it not within the range of the VPC

  • Related