An administrator is configuring a virtual network named `vnet-prod` in a resource group named `rg-prod`. The virtual network is assigned the address space of . The administrator needs to create a new subnet to host a database cluster that requires a minimum of usable IP addresses. Which of the following is the smallest subnet mask that meets this requirement in Azure?
- /27Answer
- B/28
- C/29
- D/26
Answer
The correct subnet mask is /27 because it is the smallest prefix that provides at least 12 usable IP addresses after accounting for the 5 IP addresses reserved by Azure.
The correct subnet mask is /27. A subnet has total IP addresses. Azure always reserves the first four and the last IP addresses in any subnet (a total of addresses). Therefore, a subnet provides usable IP addresses, which is sufficient to meet the requirement of hosts. A subnet only provides usable IP addresses (), which is not enough, making /27 the smallest viable subnet mask.
Step-by-Step Solution
Key Concept
Azure Virtual Network Subnet IP Allocation and Reservations