Does an Azure IPv4 subnet only give you 3 usable IPs even at the smallest /29? I verified this along with the rejection of /30 creation

Does an Azure IPv4 subnet only give you 3 usable IPs even at the smallest /29? I verified this along with the rejection of /30 creation

Azure's smallest IPv4 subnet is /29, but not all 8 addresses are usable. We compare /30 creation failing, /29 succeeding, and the portal's usable IP count, distinguishing reserved addresses from per-service size needs.
2026.12.04

This page has been translated by machine translation. View original

Hello! I'm Yuji Nishimura from the Operations Department!

When creating a small subnet for testing, I sometimes think, "Wouldn't a /30 be enough for just a few machines?" In Azure Virtual Network, the minimum size of an IPv4 subnet is /29. Moreover, of the 8 addresses, only 3 are usable.

This time, I used the API to confirm that creating a /30 is rejected and that a /29 can be created, and I checked the number of available IPs for the same subnet in the portal. The target was an IPv4 subnet with no resources deployed.

Subtract the 5 addresses Azure reserves from the 8 in a /29

The official FAQ explains that Azure reserves the first 4 and the last 1 IP addresses of each subnet.

For 10.43.1.0/29, it looks like this. The breakdown applies the official specification to the address range used this time; it is not the result of trying to assign each address.

Address Purpose / Handling
10.43.1.0 Reserved as the network address
10.43.1.1 Reserved as the default gateway
10.43.1.2, 10.43.1.3 Reserved to map the Azure DNS IP addresses into the VNet space
10.43.1.4 to 10.43.1.6 3 addresses available for assignment to resources
10.43.1.7 Reserved as the broadcast address. However, Azure does not support broadcast

In CIDR, /29 means that 29 of the 32 bits are the network portion, so the total number of addresses is 2^(32-29) = 8. Subtracting 5 from that leaves 3. If you subtract only 2 addresses, the network address and the broadcast address, as in a typical IPv4 subnet calculation, the result won't match the number usable in Azure.

The API rejected /30 creation, while /29 could be created

I verified this on November 18, 2026, using macOS 26.7.2, Azure CLI 2.91.0, and the Microsoft.Network REST API 2025-01-01. I ran it with a service principal that has the Contributor role on the subscription.

First, I created a resource group in Japan East and a VNet without any subnets.

RG=blog-verify-azure-subnet-minimum-size
az group create -n "$RG" -l japaneast
az network vnet create -g "$RG" -n vnet-size-test \
  -l japaneast --address-prefixes 10.43.0.0/16

Next, I specified 10.43.1.0/30 as the address range of a subnet named small. The {subscriptionId} in the URL is replaced by Azure CLI with the current subscription ID.

az rest --method put \
  --url "/subscriptions/{subscriptionId}/resourceGroups/$RG/providers/Microsoft.Network/virtualNetworks/vnet-size-test/subnets/small?api-version=2025-01-01" \
  --body '{"properties":{"addressPrefix":"10.43.1.0/30"}}' \
  --query '{name:name,prefix:properties.addressPrefix,state:properties.provisioningState}' -o json

The command exited with exit code 1 and returned the following error code.

subnet-error.txt
NetcfgInvalidIPAddressPrefix

When I changed only the --body of the same command to the following, the creation request was accepted.

subnet-body.json
{"properties":{"addressPrefix":"10.43.1.0/29"}}

The state immediately after the PUT was Updating, so I also checked with a GET.

az rest --method get \
  --url "/subscriptions/{subscriptionId}/resourceGroups/$RG/providers/Microsoft.Network/virtualNetworks/vnet-size-test/subnets?api-version=2025-01-01" \
  --query 'value[].{name:name,prefix:properties.addressPrefix,state:properties.provisioningState,ipConfigurations:properties.ipConfigurations}' -o json
subnet-result.json
[
  {
    "ipConfigurations": null,
    "name": "small",
    "prefix": "10.43.1.0/29",
    "state": "Succeeded"
  }
]

The rejection of /30 this time is consistent with the official FAQ's IPv4 minimum size of /29. Rather than generalizing the cause from the error code alone, it seems best to check the specified CIDR together with the specification.

In the portal too, an empty /29 shows 3 "available IPs"

I opened the same vnet-size-test in the Azure portal and checked "Settings" → "Subnets". The IPv4 of small was 10.43.1.0/29, and "Available IPs" was 3.

Azure portal showing the IPv4 prefix /29 of small and the available IP count of 3

The red frame was added by me. Even with no resources deployed yet, the number is 3 rather than 8, so it can be read that the number shown excludes the 5 reserved addresses. I did not try actually assigning 3 addresses to network interfaces or having a 4th one rejected.

The minimum size you can create and the size a service needs are separate

Just because a /29 could be created doesn't mean every Azure service can be deployed into it. The subnet design guide shows the required size for each service and the conditions for dedicated subnets. This time, I did not verify service deployment or delegation.

Also, the result of 3 available IPs can't be treated as a guarantee that "3 virtual machines can be deployed." You also need to consider the configuration of network interfaces that consume IPs and other resources you will deploy. It seems best to treat the minimum size as a value for understanding the boundary of the specification, and to decide the size in actual design by including the requirements of the target service and room for expansion.

Summary

In Azure, the minimum IPv4 subnet is /29, and 3 addresses are usable, which is 8 minus the 5 reserved. This time, I confirmed the API's rejection of /30 creation, the successful creation of /29, and the portal's display of 3 "available IPs."

Even for a small number of resources, you can't judge capacity by the total number of IPs in the CIDR alone. After subtracting Azure's reserved addresses, you need to factor in the requirements of the services you will deploy and future expansion.

Microsoft Azure の利用費割引・活用サポート提供中!

クラスメソッドは、Microsoft Azureのうち特に生成AI領域に強みがあります。AWSの総合支援をメインに5,000社以上支援してきた実績をベースに、特にマルチクラウドでビジネスを最大化したいお客様に引き合いを頂いております。

Microsoft Azure 請求代行・技術支援サービスを詳しく見る

Share this article