In Quiz, it is said that these three
are reserved as it is the broadcast address.
I got last two, but i don’t see how the first one is the broadcast address
The wording for the explanation is a little confusing and the link provided doesn’t really address the question at hand.
I was able to find the following question in the quiz, which I believe is the one you’re referring to:
Which of these CIDR blocks and/or IP addresses are invalid for a private VPC or subnet on AWS? (Choose 3) 172.31.4.2/15 184.108.40.206/255.255.255.0 192.168.1.2/255.255.255.0 10.2.4.255/24
The problem with the answers are, only 2 of them are correct (192.168.1.2/255.255.255.0 & 10.2.4.255/24). As the explanation states, 220.127.116.11/255.255.255.0 is a well known Google DNS server IP. The address 172.31.4.2/15 is not reserved, but if the mask is 25, it would be. I think this is a typo in the quiz answer. I have notified ACG content team to review the question.
Hi, yes it is a typo. "the first 3 are reserved as it is the broadcast address", actually means the first 3 address of each VPC or Subnet are reserved and so is the last address as that one is used for broadcasting and AWS does not allow broadcasting.
There 5 reserved IP on each CIDR:
.0 is the network address ( or the base address)
.1 is for the router (or base +1)
.2 is for the DNS (or base +2) – 192.168.1.2/24 is thus invalid
.3 is reserved by AWS for future use
.255 is the broadcasting address. – 10.2.4.255/24 is thus invalid
Furthermore the valid CIDR ranges are /16 to /28 – (172.31.4.2/15 is thus invalid)
That leaves 18.104.22.168/24 as the only valid IP address. Even though this is a well known Google DNS server IP (a public IP address) , AWS allows, but does not recommend, the use of that address inside your VPC as VPC CIDR addresses are all private address.