Soru

Zorluk: OrtaCreate and Configure Virtual Networks and Subnets

An administrator is configuring a new virtual network named `vnet-retail` with an address space of 192.168.1.0/24192.168.1.0/24. The administrator needs to configure two subnets within this virtual network:

1. A workload subnet that must support exactly 2727 virtual machines, each requiring a dynamic private IP address. The subnet must be configured with the minimum possible address space to satisfy this requirement.
2. A subnet named `AzureBastionSubnet` to deploy Azure Bastion.

What is the maximum number of usable IP addresses that can be allocated to `AzureBastionSubnet`?

  1. 123Cevap
  2. B
    126
  3. C
    59
  4. D
    62

Cevap

123 usable IP addresses
To support exactly 27 virtual machines, the workload subnet requires 32 total IP addresses because Azure reserves 5 IP addresses in every subnet (the first four and the last one). A /27 prefix provides exactly 32 IP addresses, which is the minimum size that satisfies this requirement. The virtual network has a /24 address space (256 IP addresses). Subtracting the 32 addresses used by the workload subnet leaves 224 IP addresses. Azure Bastion requires a subnet named AzureBastionSubnet with a prefix of at least /26. To maximize the usable addresses, we can allocate a /25 subnet (128 IP addresses) from the remaining space, as a /24 subnet would require 256 addresses and cause an overlap. Subtracting the 5 Azure-reserved IP addresses from the 128 addresses in a /25 subnet yields 123 usable IP addresses.

Adım Adım Çözüm

1
Calculate the minimum prefix size for the workload subnet
A /27 subnet containing 32 IP addresses
The workload subnet requires 27 usable IP addresses. Since Azure reserves 5 IP addresses in every subnet, the subnet must have a total capacity of at least 32 IP addresses (27+5=3227 + 5 = 32). The minimum CIDR block that fits this is a /27.
2
Determine the maximum prefix size for the Azure Bastion subnet
A /25 subnet containing 128 IP addresses
The virtual network has a /24 prefix (256 addresses). After allocating 32 addresses for the workload subnet, 224 addresses remain. Azure Bastion requires a /26 prefix or larger. The largest power-of-two subnet that fits within the remaining 224 addresses without overlapping the workload subnet is a /25 (128 addresses).
3
Calculate the usable IP addresses in the /25 Azure Bastion subnet
123 usable IP addresses
Subtract the 5 Azure-reserved IP addresses from the total of 128 IP addresses provided by the /25 subnet (1285=123128 - 5 = 123).

Anahtar Kavram

Azure Virtual Network subnet sizing constraints and reserved IP addresses
Bu soruyu puanla