IP Address Scenarios for AWS Certified Advanced Networking - Specialty Exam

Common Mistakes to Avoid

Prev Question Next Question

Question

A user has created a VPC with CIDR 20.0.0.0/24

The user has created a public subnet with CIDR 20.0.0.0/25 and a private subnet with CIDR 20.0.0.128/25

The user has launched one instance each in the private and public subnets.

Which of the below mentioned options cannot be the correct IP address (private IP.

assigned to an instance in the public or private subnet?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer - A.

As per the AWS documentation there is a reservation of IP addresses.

Hence option A is right because this IP address will be reserved by AWS.

The first four IP addresses and the last IP address in each subnet CIDR block are not available for you to use, and cannot be assigned to an instance.

For example, in a subnet with CIDR block 10.0.0.0/24, the following five IP addresses are reserved:

· 10.0.0.0: Network address.

· 10.0.0.1: Reserved by AWS for the VPC router.

· 10.0.0.2: Reserved by AWS.

The IP address of the DNS server is always the base of the VPC network range plus two; however, we also reserve the base of each subnet range plus two.

10.0.0.3: Reserved by AWS for future use.

· 10.0.0.255: Network broadcast address.

We do not support broadcast in a VPC, therefore we reserve this address.

For more information on IP Reservation, please visit the link:

http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html

The user has created a VPC with CIDR 20.0.0.0/24, which means the VPC can have up to 256 IP addresses (20.0.0.0 - 20.0.0.255).

The user has then created a public subnet with CIDR 20.0.0.0/25, which means the public subnet can have up to 128 IP addresses (20.0.0.0 - 20.0.0.127). The user has also created a private subnet with CIDR 20.0.0.128/25, which means the private subnet can also have up to 128 IP addresses (20.0.0.128 - 20.0.0.255).

Since the user has launched one instance each in the private and public subnets, let's assume that the user has assigned private IP addresses to these instances.

Now, let's look at the options given in the question:

A. 20.0.0.255: This IP address cannot be assigned to any instance in the VPC, as it is the broadcast address for the entire VPC.

B. 20.0.0.132: This IP address can be assigned to an instance in the private subnet, as it falls within the range of the private subnet (20.0.0.128 - 20.0.0.255).

C. 20.0.0.122: This IP address can be assigned to an instance in the private subnet, as it falls within the range of the private subnet (20.0.0.128 - 20.0.0.255).

D. 20.0.0.55: This IP address can be assigned to an instance in the public subnet, as it falls within the range of the public subnet (20.0.0.0 - 20.0.0.127).

Therefore, the option that cannot be the correct IP address assigned to an instance in the public or private subnet is A. 20.0.0.255.