Maximum VMs in Azure Subnet /25

AZ-104 Last updated

Short answer

C 123 virtual machines can connect to Subnet1 after subtracting 5 reserved IPs from the 128 total addresses in a /25 subnet.

Question

You have an Azure virtual network named VNet1 that contains the following settings: • IPv4 address space: 172.16.10.0/24 • Subnet name: Subnet1 • Subnet address range: 172.16.10.0/25 What is the maximum number of virtual machines that can connect to Subnet1?

  1. 24
  2. 25
  3. 123 Correct Answer
  4. 128
  5. 251

Key Takeaways

The core concept is subtracting reserved addresses from the total host capacity, but candidates often forget Azure-specific reservations like the Service Tag or Gateway.

This question tests the calculation of usable IP addresses in a subnet to determine the maximum number of virtual machines. The correct answer is C (123) based on the exam's specific assumptions about reserved IPs.

Common mistake: Candidates often select D (128) by calculating 2^7 without subtracting any reserved addresses, or B (25) by misinterpreting the CIDR notation.

Expert Analysis

Why the Answer Is Correct

In Azure, a /25 subnet provides 2^(32-25) = 2^7 = 128 total IP addresses. However, not all are available for VMs. Microsoft reserves the first 4 IPs (e.g.,.0,.1,.2,.3) and typically the last IP (.254) for gateway purposes. This leaves 128 - 5 = 123 usable addresses for VMs. While standard networking might suggest fewer reservations, Azure's specific implementation often accounts for these five non-assignable addresses in certification contexts.

Why the Other Options Are Wrong

Option A (24) and B (25) are too low, likely resulting from miscalculating the host bits or confusing /25 with /26 or other subnets. Option D (128) represents the total address count without subtracting any reserved IPs, which is incorrect because Azure does not allow assigning the network broadcast or gateway IPs to VMs. Option E (251) corresponds to a /24 subnet (256 - 5), which does not match the /25 configuration in the question.

Community Comment Notes

Community comments generally align with the calculation of 128 total addresses minus reserved ones. One user noted that 'A /25 CIDR notation means... 7 bits are used to define individual hosts... 2^7 = 128 total addresses. However, 5 addresses' are reserved, leading to 123. Another user mentioned '125 free IP address numbers' but failed to account for all Azure-specific reservations, highlighting the difficulty in knowing exact reservation counts.

Exam Strategy

Memorize the formula for usable IPs: Total Addresses - Reserved Addresses. For Azure, assume at least 5 reserved IPs per subnet (first 4 + last 1 for gateway). Always check the CIDR mask to calculate total hosts first using 2^n.

Frequently Asked Questions

Why is the answer 123 and not 128?

Azure reserves the first 4 IPs and the last IP (gateway) in every subnet, leaving 123 usable IPs out of 128 total.

How many bits are for hosts in a /25 subnet?

A /25 subnet uses 7 bits for hosts (32-25), resulting in 2^7 = 128 total addresses.

More AZ-104 FAQ →

Community Votes

C
100%

100% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.

Discussion 3 contributions

Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded.

From public community threads 3

  1. Dankho 👍 10 Answered C
    A /25 CIDR notation means that 25 bits are used for the network portion of the address, and the remaining 7 bits are available for the host portion. An IPv4 address has 32 bits in total. With /25, the first 25 bits define the network. The remaining 7 bits are used to define individual hosts within that network. With 7 bits for the host, you can have 2^7 = 128 total addresses. However, 5 addresses are reserved (network address, broadcast address, and 3 by Azure), leaving you with 123 usable addresses for VMs and other resources.
  2. arunyadav09 👍 7
    There are 32 bits available, under IP4, If you want to use 25 bits to define the network address, 32 - 25 means 7 bits are left for hosts and other stuff and 7 bits can represent 127 hosts, (64 + 32+16+8+4+2+1= 127.) but since you can't use the top and the bottom ones as they are used for other purposes, that leaves 125 free IP address numbers for hosts. There is usually a Gateway address in there somewhere as well as the network address so (125-2 =123) 123VM can be connect to /25 subnet.
  3. siheom 👍 2 Answered C
    vote C

Reader comments & corrections

No reader corrections yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Practice All AZ-104 Questions

Access 100 questions with complete answers and detailed explanations.

View Full AZ-104 Practice Test →

← Back to AZ-104 Study Guide