0

In AWS have created VPC which CIDR is 10.0.0.24.I want to creates its two subnet.its public-subnet is in us-west-1a - IPv4 CIDR 10.0.0.0/24 thenwhen I create private subnet is in us-west-1b - IPv4 CIDR=10.0.20.0/24.

I have tried IPv4 CIDR=10.0.20.0/24 not working.

enter image description here

2 Answers 2

1

You created your VPC as 10.0.0.0/24, which means all IP addresses must be 10.0.0.x (first 3 parts are 10.0.0, with only the last part changing).

Your first subnet is also 10.0.0.0/24, which means your single subnet has now occupied your entire VPC. So you have 2 problems:

  1. There's no room for another subnet, and
  2. The subnet mask you are using for your second subnet is not in your VPC (10.0.20.x is not inside 10.0.0.x). This is actually what the error message is telling you.

Change your VPC to be 10.0.0.0/16 instead. This means only the first 2 parts are constant (10.0.x.x). Then you can start making your multiple /24 subnets (10.0.0.0/24, 10.0.20.0/24, etc.)

1

You have used the entire VPC CIDR (10.0.0.0/24) for the first subnet .. no more space left in the VPC.

You must log in to answer this question.

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