GSEC · Question #266
A VPC is created with a CIDR block of 10.22.0.0/16, which of the following private subnets could be Included?
The correct answer is B. 10.22.12.0/24. A valid subnet must be entirely contained within the parent VPC CIDR block; 10.22.12.0/24 is the only choice that falls within the 10.22.0.0/16 address space.
Question
A VPC is created with a CIDR block of 10.22.0.0/16, which of the following private subnets could be Included?
Options
- A10.23.0.0/16
- B10.22.12.0/24
- C10.23.12.0/26
- D10.10.10.0/24
How the community answered
(50 responses)- A8% (4)
- B78% (39)
- C10% (5)
- D4% (2)
Why each option
A valid subnet must be entirely contained within the parent VPC CIDR block; 10.22.12.0/24 is the only choice that falls within the 10.22.0.0/16 address space.
10.23.0.0/16 uses the second octet 23, placing its entire address range outside the 10.22.0.0/16 space.
The VPC CIDR 10.22.0.0/16 covers all addresses from 10.22.0.0 through 10.22.255.255. The subnet 10.22.12.0/24 spans 10.22.12.0 to 10.22.12.255, which is fully contained within that range and uses a longer prefix (/24 is more specific than /16), satisfying both requirements for a valid subnet allocation within the parent block.
10.23.12.0/26 also uses the second octet 23 and therefore lies entirely outside the 10.22.0.0/16 block.
10.10.10.0/24 resides in the 10.10.x.x range, which has no overlap whatsoever with 10.22.0.0/16.
Concept tested: VPC subnet CIDR containment within parent block
Source: https://docs.aws.amazon.com/vpc/latest/userguide/subnet-sizing.html
Topics
Community Discussion
No community discussion yet for this question.