Question

Difficulty: HardCreate and Configure Virtual Networks and Subnets

An administrator is configuring a new virtual network named `vnet-shared` in an Azure subscription. The virtual network is assigned the address space 172.16.100.0/24172.16.100.0/24. The administrator must create three subnets within this virtual network:

- `subnet-app`: Must host a backend API service that requires a minimum of 2828 usable IP addresses for virtual machines.
- `AzureBastionSubnet`: Must support the deployment of Azure Bastion using the minimum possible address space.
- `GatewaySubnet`: Must connect to an on-premises network via a VPN Gateway, using a prefix size of exactly /27/27.

The administrator wants to define the subnets sequentially starting from the beginning of the virtual network's address space without leaving any unassigned gaps or overlapping ranges. Which of the following subnet configurations should the administrator deploy?

  1. A
    `subnet-app`: 172.16.100.0/27172.16.100.0/27
    `GatewaySubnet`: 172.16.100.32/27172.16.100.32/27
    `AzureBastionSubnet`: 172.16.100.64/26172.16.100.64/26
  2. `subnet-app`: 172.16.100.0/26172.16.100.0/26
    `AzureBastionSubnet`: 172.16.100.64/26172.16.100.64/26
    `GatewaySubnet`: 172.16.100.128/27172.16.100.128/27
    Answer
  3. C
    `GatewaySubnet`: 172.16.100.0/27172.16.100.0/27
    `AzureBastionSubnet`: 172.16.100.32/26172.16.100.32/26
    `subnet-app`: 172.16.100.128/26172.16.100.128/26
  4. D
    `subnet-app`: 172.16.100.0/26172.16.100.0/26
    `AzureBastionSubnet`: 172.16.100.64/27172.16.100.64/27
    `GatewaySubnet`: 172.16.100.96/27172.16.100.96/27

Answer

The correct subnet configuration assigns 172.16.100.0/26172.16.100.0/26 to `subnet-app`, 172.16.100.64/26172.16.100.64/26 to `AzureBastionSubnet`, and 172.16.100.128/27172.16.100.128/27 to `GatewaySubnet`.
To support 2828 virtual machines, `subnet-app` needs a minimum of 3333 IP addresses after adding the 55 Azure-reserved IP addresses. The smallest CIDR block that fits this is /26/26 (6464 addresses). A /27/27 block only provides 2727 usable addresses (325=2732 - 5 = 27), which is too small. `AzureBastionSubnet` requires a minimum subnet size of /26/26. In order to align sequentially without gaps or overlaps, `subnet-app` is assigned 172.16.100.0/26172.16.100.0/26 (covering .0.0 to .63.63), `AzureBastionSubnet` is assigned 172.16.100.64/26172.16.100.64/26 (covering .64.64 to .127.127), and `GatewaySubnet` is assigned 172.16.100.128/27172.16.100.128/27 (covering .128.128 to .159.159). All starting addresses are correctly aligned to their respective block boundaries.

Step-by-Step Solution

1
Determine the required IP address capacity for the application subnet.
2828 VM host addresses + 55 Azure-reserved addresses = 3333 total IP addresses.
Azure reserves the first four IP addresses and the last IP address of every subnet for internal networking services.
2
Determine the minimum prefix size for the application subnet and the Bastion subnet.
Both `subnet-app` and `AzureBastionSubnet` require a minimum prefix size of /26/26.
A /27/27 subnet only provides 2727 usable IP addresses (32532 - 5), which is insufficient for 2828 VMs. Azure Bastion has a hard requirement for a minimum subnet prefix of /26/26.
3
Map the subnets sequentially and align them to valid CIDR block boundaries.
`subnet-app` starts at .0/26.0/26 (range: .0.0-.63.63). `AzureBastionSubnet` starts at .64/26.64/26 (range: .64.64-.127.127). `GatewaySubnet` starts at .128/27.128/27 (range: .128.128-.159.159).
Each subnet's starting address must be a multiple of its size to align correctly under CIDR subnet rules and avoid overlapping errors in Azure.

Key Concept

Azure subnet sizing, reserved IP addresses, service-specific prefix requirements, and CIDR block alignment.
Estimated Time:2m 30s
Rate this question