Which of the below mentioned options cannot be the correct IP address (private IP. assigned to an instance in the public or private subnet?

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?
A . 20.0.0.255
B . 20.0.0.132
C . 20.0.0.122
D . 20.0.0.55

Answer: A

Explanation:

When the user creates a subnet in VPC, he specifies the CIDR block for the subnet. In this case the user has created a VPC with the CIDR block 20.0.0.0/24, which supports 256 IP addresses

(20.0.0.0 to 20.0.0.255. The public subnet will have IP addresses between 20.0.0.0 – 20.0.0.127 and the private subnet will have IP addresses between 20.0.0.128 – 20.0.0.255. AWS reserves the first four IP addresses and the last IP address in each subnet’s CIDR block. These are not available for the user to use. Thus, the instance cannot have an IP address of 20.0.0.255

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments