Thinakaran Chelliah
Thinakaran Chelliah

Reputation: 21

Unable to create subnet in VPC - getting "Not with in Range error"

I have VPC with subnet 172.16.0.0/28 in AWS.

I am getting error while creating 2nd Subnet for our NAT instance.

Eg, Getting Error if i try this subnet "172.16.0.0/24 is not within the range of 172.16.0.0/28"

and getting this error if i try "CIDR block 172.16.0.6/28 overlaps with pre-existing CIDR block 172.16.0.0/28"

Isn't possible to create subnet for this /28 range. I am not as good in Subnetting- Network.

Upvotes: 2

Views: 2947

Answers (1)

Dusan Bajic
Dusan Bajic

Reputation: 10899

/24 subnet is larger than /28 so it certainly is not within the range.

If you are not familiar with subnetting, I suggest you stick with /16 VPC CIDR and /24 subnets.

For example, create a VPC with CIDR block 172.16.0.0/16, and than add your subnets like:

subnet0 CIDR: 172.16.0.0/24
subnet1 CIDR: 172.16.1.0/24
subnet2 CIDR: 172.16.2.0/24
...

Or just "Contact your system administrator" :)

Upvotes: 4

Related Questions