AWS Certified Advanced Networking - Specialty Exam Question | IP Address Validation

IP Address Validation | AWS Certified Advanced Networking - Specialty

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 that the VPC can accommodate up to 256 IP addresses ranging from 20.0.0.0 to 20.0.0.255. 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 CIDR notation /25 means that the subnet mask is 255.255.255.128, which leaves 128 IP addresses available for hosts in each subnet. Therefore, the IP address range for the public subnet is 20.0.0.0 to 20.0.0.127, and the IP address range for the private subnet is 20.0.0.128 to 20.0.0.255.

The user has launched one instance each in the private and public subnets. Let's consider the IP addresses given in the options and see which of them cannot be the correct IP address assigned to an instance in the public or private subnet.

A. 20.0.0.255 - This IP address is in the VPC address range, but it cannot be assigned to an instance in either the public or private subnet because it is the broadcast address for the VPC and cannot be used for host addresses.

B. 20.0.0.132 - This IP address is in the private subnet address range and can be assigned to an instance in the private subnet.

C. 20.0.0.122 - This IP address is in the public subnet address range and can be assigned to an instance in the public subnet.

D. 20.0.0.55 - This IP address is in the public subnet address range and can be assigned to an instance in the public subnet.

Therefore, the answer is A. 20.0.0.255, because it is the broadcast address for the VPC and cannot be assigned to an instance in either the public or private subnet.