Search code examples
amazon-web-servicesamazon-vpcvpccidr

How do we allot the secondary CIDR to VPC in AWS?


I have a custom VPC with the CIDR block of 192.168.0.0/16. I have a use case where I need more IP's and so I added another CIDR block of range 10.0.0.0/16. Now this range wont work. Technically this should work as it falls in the range of 10.0.0.0/8. Also 172.0.0.0/16 this works. How exactly is this working?

The error shows : "Failed to add IPv4 CIDR: 10.0.0.0/16 The CIDR '10.0.0.0/16' is restricted. Use a CIDR from the same private address range as the current VPC CIDR, or use a publicly-routable CIDR. For additional restrictions, see https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html#VPC_Sizing"


Solution

  • You cannot add 10.0.0.0/16 because It's restricted CIDR for the primary CIDR 192.168.0.0/16. It allows CIDRs in the same Class (A, B, C) and public routable CIDR.

    enter image description here

    enter image description here