A subnet is created with CIDR block 10.0.1.0/27, which provides 32 IP addresses in total. How many of those addresses are actually available to be assigned to resources such as EC2 instances?
- 32 (every address in the block is usable, since AWS subnets don't reserve any addresses the way traditional on-premises networks do)
- 30 (AWS reserves only the first address for the network and the last address for broadcast, exactly like a traditional network/broadcast address pair)
- 27 (AWS reserves the first four addresses in the block plus the last address, for the network address, the VPC router, DNS, future use, and network broadcast)
- 24 (AWS reserves the first eight addresses in every subnet for its own internal management traffic)
Why C? And why not the others?
Correct answer: C. 27 (AWS reserves the first four addresses in the block plus the last address, for the network address, the VPC router, DNS, future use, and network broadcast)
In every AWS subnet CIDR block, the first four addresses and the last address are reserved and cannot be assigned to a resource: the very first address is the network address, the next is reserved for the VPC router, the next is reserved for the Amazon-provided DNS server, the next is reserved by AWS for future use, and the last address is reserved as the network broadcast address (even though VPCs don't support broadcast traffic). For a /27 block, which contains 32 total addresses, subtracting those five reserved addresses leaves 27 usable addresses. The '32, no reservations' option is wrong because AWS explicitly documents these five reserved addresses for every subnet regardless of size. The '30, only network and broadcast reserved' option is wrong because it ignores the three additional AWS-specific reservations (VPC router, DNS, and future use) beyond the traditional two. The '24, eight reserved' option is wrong because it overstates the reservation; AWS reserves exactly five addresses per subnet, not eight, regardless of the subnet's size.
Source: AWS VPC User Guide: Subnet sizing for IPv4 — 'The first four IP addresses and the last IP address in each subnet CIDR block are not available for your use.'