Score:0

Can the IPv4 CIDRs of the VPC and subnets within be different? (Or they should be within that range)?

cn flag

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?

Oscar De León avatar
la flag
Yes. That's exactly how it works. Did you try it and run into any problems?
Score:0
cg flag

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.

Offical Documentation

Score:-1
br flag

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.

br flag
Why did I get a downvote on the answer?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.