AWS Certified Advanced Networking - Specialty Exam: Splitting VPC into Subnets

How to Split a VPC into Subnets with 10.0.0.0/24 CIDR Block

Prev Question Next Question

Question

You have created a VPC with CIDR block 10.0.0.0/24, which supports 256 IP addresses.

You want to now split this into two subnets, each supporting 128 IP addresses.

Can this be done and if so how will the allocation of IP addresses be configured? Choose the correct answer from the options below.

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer - C.

This is clearly given in the aws documentation.

For more information on VPC and subnets please see the below link:

http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html
For example, if you create a VPC with CIDR block 10.0.0.0/24, it supports 256 IP addresses. You can break
this CIDR block into two subnets, each supporting 128 IP addresses. One subnet uses CIDR block
10.0.0.0/25 (for addresses 10.0.0.0-10.0.0.127) and the other uses CIDR block 10.0.0.128/25 (for
addresses 10.0.0.128-10.0.0.255).

The CIDR block 10.0.0.0/24 supports 256 IP addresses, where the first three octets (10.0.0) represent the network portion and the last octet (0) represents the host portion.

To split this into two subnets, each supporting 128 IP addresses, we need to increase the size of the host portion by one bit, which will create two subnets, each with 128 IP addresses.

The smallest CIDR block that can support 128 IP addresses is /25. In a /25 CIDR block, the first three octets (10.0.0) represent the network portion, and the last octet has 7 bits for the host portion, which can support 128 IP addresses.

Option A suggests using CIDR blocks 10.0.0.0/127 and 10.0.0.128/255. However, a /127 CIDR block only has two IP addresses (one for the network address and one for the broadcast address), so it cannot be used to create a subnet with 128 IP addresses. Additionally, a /255 CIDR block has no available host addresses, so it cannot be used for a subnet either.

Option B suggests using CIDR blocks 10.0.0.0/25 and 10.0.1.0/25. This configuration would work, but it creates subnets in different network addresses (10.0.0.0 and 10.0.1.0), which may not be desirable depending on the specific use case.

Option C suggests using CIDR blocks 10.0.0.0/25 and 10.0.0.128/25. This configuration would work and create two subnets within the same network address (10.0.0.0), each with 128 IP addresses.

Therefore, the correct answer is option C: One subnet will use CIDR block 10.0.0.0/25 (for addresses 10.0.0.0 - 10.0.0.127) and the other will use CIDR block 10.0.0.128/25 (for addresses 10.0.0.128 - 10.0.0.255).