0

I have created a custom VPC with CIDR of 10.0.0.0/16.

I want to create 2 subnets with 10.1.0.0/16 and 10.2.0.0/16. But I am unable to do. Getting error: CIDR is not within the CIDR ranges of VPC

Why is that?

In default CIDR of 172.31.0.0/16, we can create subnets of 172.31.32.0/16 and 172.31.16.0/16. But the same is is not happening with 10.0 series. Am I doing anything wrong? Please explain

1 Answer 1

1

First of all you can't create two subnets with /16 in one /16 range. 172.31.32.0 and 172.31.16.0 sound like /24 networks.

Since your VPC CIDR is 172.31.0.0/16 ( so ranges to 172.31.255.254) these two subnets are contained in the CIDR range.

Your other VPC CIDR is 10.0.0.0/16 ( so ranges to 10.0.255.254) - therefore 10.1.0.0 and 10.2.0.0 are not part of that CIDR range.

If you want to create two subnets they will need to be somewhere 10.0.0.0 and 10.0.255.254 - for instance 10.0.1.0/24 and 10.0.2.0/24 or even 10.0.0.0/18 and 10.0.64.0/18

1
  • I am new to this AWS. Anyways.. Can you help me in getting 2 subnets with max available ipv4 ranges? I have created VPC with 10.0 series putting in mind that 10.0 series gives more resources compared to 172.31 series Apr 22, 2020 at 14:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .