Say for example I have set 172.31.0.0/16 for the VPC, can I have 172.31.1.0/24 for a subnet within this VPC?
Asked
Active
Viewed 485 times
0
-
Yes. That's exactly how it works. Did you try it and run into any problems? – Oscar De León Oct 24 '21 at 17:33
2 Answers
0
You can set block size between a /28 netmask and /netmask, but the CIDR block must not overlap with any existing CIDR block.
It's good practice not use a block that overlap with any CIDR block of other VPC in case you need connect both VPCs.

Roid
- 184
- 7
-1
172.31.0.0/16 means the first 16 bits cannot change which are the right most 16 bits. Rest you can use anyway you want. So 172.31.1.0/24 would be still valid since 172.31.1.0/24 is under the 172.31.0.0/16 range.