Question

Difficulty: HardCreate and Configure Virtual Networks and Subnets

Your company has an Azure subscription containing a resource group named `rg-network-prod`. You are designing a virtual network named `vnet-shared-hub` within this resource group. The virtual network is allocated the address space 10.10.0.0/2210.10.0.0/22.

You must configure the virtual network to support the following infrastructure requirements:
- A subnet named `GatewaySubnet` to enable a VPN gateway connection to your on-premises datacenter.
- A subnet named `AzureBastionSubnet` to allow secure administrative access to your resources.
- A subnet named `subnet-compute` to host a workload of 60 virtual machines.

You need to select a subnet configuration that supports all requirements, avoids overlapping address ranges, fits within the virtual network address space, and minimizes IP address waste.

Which subnet configuration should you use?

  1. A
    GatewaySubnet: 10.10.0.0/2910.10.0.0/29; AzureBastionSubnet: 10.10.0.32/2710.10.0.32/27; subnet-compute: 10.10.0.64/2510.10.0.64/25
  2. B
    GatewaySubnet: 10.10.0.0/2910.10.0.0/29; AzureBastionSubnet: 10.10.0.64/2610.10.0.64/26; subnet-compute: 10.10.0.128/2610.10.0.128/26
  3. GatewaySubnet: 10.10.0.0/2910.10.0.0/29; AzureBastionSubnet: 10.10.0.64/2610.10.0.64/26; subnet-compute: 10.10.0.128/2510.10.0.128/25Answer
  4. D
    GatewaySubnet: 10.10.0.0/3010.10.0.0/30; AzureBastionSubnet: 10.10.0.64/2610.10.0.64/26; subnet-compute: 10.10.0.128/2510.10.0.128/25

Answer

The subnet configuration with GatewaySubnet as 10.10.0.0/2910.10.0.0/29, AzureBastionSubnet as 10.10.0.64/2610.10.0.64/26, and subnet-compute as 10.10.0.128/2510.10.0.128/25.
The correct subnet configuration allocates a /29/29 prefix for GatewaySubnet (satisfying the minimum size requirement), a /26/26 prefix for AzureBastionSubnet (satisfying the minimum size requirement), and a /25/25 prefix for subnet-compute. A /25/25 prefix is the smallest subnet size that can host 60 virtual machines because a /26/26 subnet only provides 645=5964 - 5 = 59 usable IP addresses due to Azure reserving the first 4 and the last 1 IP addresses in every subnet. All subnets are non-overlapping and reside within the parent 10.10.0.0/2210.10.0.0/22 address space.

Step-by-Step Solution

1
Analyze the size requirement for AzureBastionSubnet.
The subnet must have a prefix of /26/26 or larger.
Azure Bastion requires a minimum subnet size of /26/26 to function properly.
2
Analyze the size requirement for GatewaySubnet.
The subnet must have a prefix of /29/29 or larger.
Azure Virtual Network Gateway requires a GatewaySubnet with a minimum prefix of /29/29.
3
Calculate the required size for subnet-compute.
A /25/25 subnet is required.
To support 60 virtual machines, the subnet must have at least 60 usable IP addresses. A /26/26 subnet contains 64 total IP addresses. Since Azure reserves 5 IP addresses in every subnet (first 4 and last 1), the usable IP addresses in a /26/26 subnet is 645=5964 - 5 = 59, which is insufficient. A /25/25 subnet provides 1285=123128 - 5 = 123 usable IP addresses, which supports the 60 VMs.
4
Verify that all subnets fit within the virtual network address space without overlapping.
The configuration uses 10.10.0.0/2910.10.0.0/29, 10.10.0.64/2610.10.0.64/26, and 10.10.0.128/2510.10.0.128/25, which are completely non-overlapping and fit within the parent 10.10.0.0/2210.10.0.0/22 range.
Ensures the address allocation is valid and deployable.

Key Concept

Subnet planning and sizing constraints including minimum prefixes for GatewaySubnet and AzureBastionSubnet, and Azure reserved IP addresses.
Rate this question