Home › Studies › AZ-700 › Core Networking › IP Addressing

IP Addressing

Address spaces · subnets · service subnets · delegation · public IPs · public IP prefixes · custom IP prefixes (BYOIP)

By the tools4free.dev team · Last reviewed November 13, 2026

Practice questions for this topic →

Virtual network and address space

TopicWhat the page says
ScopeA VNet is scoped to one region and one subscription. Peering connects VNets in different regions or subscriptions. VNets and subnets span all availability zones of the region.
Address spaceOne or more non-overlapping ranges in CIDR notation. The range can be public or private (RFC 1918), but Microsoft recommends 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. The RFC 6598 range 100.64.0.0/10 is treated as private in Azure.
Ranges you can't add224.0.0.0/4 (multicast), 255.255.255.255/32 (broadcast), 127.0.0.0/8 (loopback), 169.254.0.0/16 (link local), 168.63.129.16/32 (internal DNS).
OverlapVNets with ranges that overlap another VNet or an on-premises network can't be connected. Plan the ranges before you build.
Change laterYou can add, remove and modify the CIDR blocks. You can shrink a range only while it still includes every subnet. You can't remove a range that contains a subnet. On a peered or connected VNet the new range can't overlap the peer or on-premises range.
NamesYou can't change the name of a VNet or of a subnet after creation.
CostThere's no charge for Azure Virtual Network itself.

Limits per region and subscription

ResourceLimit
Virtual networks1,000
Subnets per virtual network3,000
Private IP addresses per virtual network65,536
DNS servers per virtual network20

Subnet rules

RuleDetail
SizeSmallest IPv4 subnet /29, largest /2.
Reserved addressesAzure reserves 5 per subnet: the first four and the last. In 192.168.1.0/24: .0 network, .1 default gateway, .2 and .3 map the Azure DNS IPs, .255 broadcast. A /29 gives 3 usable addresses.
Add a subnetAt any time, if the range doesn't overlap another subnet and there's space left in the VNet range.
Resize or change the rangeOnly while no resource is deployed in the subnet.
DeleteOnly when the subnet contains no resources.
Delegation changeIf a resource of the service is already in the subnet, you can't add or remove delegations until all resources of that service are removed.
NSG, route table, NAT gatewayEach must exist in the same subscription and location as the VNet. You can add them after the subnet exists.
Service endpoint on an existing subnetRoutes switch on every NIC in the subnet. Open TCP connections might be terminated, so don't do it while critical tasks run.

A subnet name must be unique in the VNet. Use a letter as the first character: Application Gateway can't deploy into a subnet whose name starts with a number.

Subnets for Azure services

ServiceSubnet requirement
VPN or ExpressRoute gatewaySubnet named exactly GatewaySubnet. /27 or larger (as small as /29 for the Basic SKU only). Deploy nothing else in it. NSGs and a 0.0.0.0/0 UDR on it aren't supported. One VPN gateway and one ExpressRoute gateway per VNet.
Azure FirewallAzureFirewallSubnet, size /26; enough for all scaling. Subnet-level NSGs are disabled on it.
Azure Firewall management NICSeparate AzureFirewallManagementSubnet, minimum /26, with its own public IP. Needed for forced tunneling. Basic firewalls and Secured Hub firewalls always have it.
Azure BastionDedicated subnet named AzureBastionSubnet, /26 or larger, in the same VNet. This applies to every SKU except Bastion Developer.
Application GatewayDedicated subnet; no other resource type and no mix of v1 and v2. One private IP per instance, one more for a private frontend, plus the 5 reserved. v2 supports up to 125 instances: /24 recommended. v1 (Standard or WAF) up to 32 instances: /26 recommended. GatewaySubnet is reserved for VPN gateways.
App Service VNet integrationDedicated subnet, delegated. One IP per App Service plan instance, and the count temporarily doubles during scale up or down. Size can't change after assignment. Minimum /28 (portal creates /27 or larger); /26 covers the maximum scale of a plan.
Private endpointA NIC with a private IP from the subnet. The endpoint must be in the same region and subscription as the VNet. The target resource can be in another region.
Azure DNS Private Resolver endpointOwn subnet, /28 to /24, delegated only to Microsoft.Network/dnsResolvers. One endpoint per subnet.

Private endpoint or service endpoint

Private endpointService endpoint
What it isA network interface with a private IP in your subnet.A setting on a subnet that extends the VNet identity to the service.
DNSNeeds DNS that resolves the name to the private IP.DNS names keep resolving to the service's public IPs.
Source IP seen by the serviceTraffic goes to the private IP of the endpoint NIC.Switches from public IPv4 to the VNet private IPv4 address.
On-premisesReachable over VPN or ExpressRoute.Can't be used for traffic from on-premises.
Microsoft guidanceMicrosoft recommends Private Link and private endpoints for secure, private access to Azure services.Same page points readers to private endpoints.

Subnet delegation, shared and dedicated subnets

ServiceShared or dedicated
Application Gateway, Bastion, VPN gatewayDedicated subnet. Don't put other resources in it.
App Service VNet integrationDedicated, delegated to Microsoft.Web/serverFarms.
DNS Private ResolverDedicated; delegated only to Microsoft.Network/dnsResolvers.
Private endpointsNot allowed in a delegated subnet.

Delegation is not about who can reach the subnet. It gives the service permission to create service-specific resources in the subnet.

Public IP addresses

PropertyStandard (v1 or v2)Basic
StatusCurrentRetired on September 30, 2025
AllocationStatic onlyIPv4 dynamic or static; IPv6 dynamic
SecurityClosed to inbound traffic by default; an NSG must allow trafficOpen by default
ZonesNon-zonal, zonal or zone-redundant (v2: zone-redundant only). Formerly non-zonal IPs are now zone-redundantNot supported
Routing preference InternetSupported on Standard (not v2)Not supported
Global tier (cross-region load balancer)Supported on Standard (not v2)Not supported
Idle timeoutInbound flows 4–30 minutes, default 4; outbound fixed 4Same

What a public IP can attach to

ResourceStatic IPv4Dynamic IPv4
VM network interface, public load balancerYesYes
VPN gatewayYesYes (non-AZ only)
NAT gateway, Azure Firewall, Bastion, Route Server, API ManagementYesNo
Application GatewayYes (v2 only)Yes (v1 only)

Public IP prefixes and custom IP prefixes (BYOIP)

Public IP prefix

Use a prefix when…Detail
Partners allow-list your IPsOne firewall rule covers the whole prefix. VMs scaled out later get IPs from the same range.
Scale NAT gateway outboundA NAT gateway can have no more than 16 IPs; a /28 prefix is the largest that can be used.
Scale load balancer outboundThe prefix serves outbound connections only, not inbound.
VM Scale SetsUse a prefix to generate instance-level IPs; no separate public IP resources are created.
Azure FirewallYou can't attach the prefix itself, but the firewall can use individual Standard public IPs created from it.

Custom IP prefix (bring your own IP)

StepTime (estimate on the page)
ProvisioningAbout 30 minutes
Commissioning (unified or global)3-4 hours
Commissioning a regional prefixAbout 30 minutes
Decommissioning3-4 hours

CLI and PowerShell

TaskAzure CLIPowerShell
Create a virtual networkaz network vnet create --resource-group myResourceGroup --name myVNetNew-AzVirtualNetwork @net
Change the address spaceaz network vnet update --resource-group myResourceGroup --name myVNet --address-prefixes 10.1.0.0/16Set-AzVirtualNetwork
Add a subnetaz network vnet subnet create --name <subnetName> --resource-group <resourceGroupName> --vnet-name <virtualNetworkName>Add-AzVirtualNetworkSubnetConfig
Delegate a subnet to a serviceaz network vnet subnet update --resource-group test-rg --name subnet-1 --vnet-name vnet-1 --delegations Microsoft.Sql/managedInstancesAdd-AzDelegation
Check a subnet delegationaz network vnet subnet show --resource-group test-rg --name subnet-1 --vnet-name vnet-1 --query delegationsGet-AzDelegation
Create a zone-redundant Standard public IPaz network public-ip create --resource-group QuickStartCreateIP-rg --name myStandardPublicIP --version IPv4 --sku Standard --zone 1 2 3New-AzPublicIpAddress
Public IP with Internet routing preferenceaz network public-ip create --resource-group QuickStartCreateIP-rg --name myStandardPublicIP-RP --version IPv4 --ip-tags 'RoutingPreference=Internet' --sku Standard --zone 1 2 3-
Global tier public IPaz network public-ip create --resource-group QuickStartCreateIP-rg --name myStandardPublicIP-Global --version IPv4 --tier global --sku Standard-
Create a public IP prefixaz network public-ip prefix create --length 28 --name myPublicIpPrefix --resource-group QuickStartCreateIPPrefix-rg --sku standard --location westus2 --version IPv4 --zone 1 2 3New-AzPublicIpPrefix
Create a static public IP from a prefixaz network public-ip create --name myPublicIP --resource-group QuickStartCreateIPPrefix-rg --allocation-method Static --public-ip-prefix myPublicIpPrefix --sku Standard --version IPv4-
Delete a public IP prefixaz network public-ip prefix delete --name myPublicIpPrefix --resource-group QuickStartCreateIPPrefix-rgRemove-AzPublicIpPrefix
Provision a custom IP prefix (unified, zone-redundant)az network custom-ip prefix create --name myCustomIpPrefix --resource-group myResourceGroup --location westus2 --cidr '1.2.3.0/24' --zone 1 2 3 --authorization-message $byoipauth --signed-message $byoipauthsigned-
Commission a custom IP prefixaz network custom-ip prefix update --name myCustomIpPrefix --resource-group myResourceGroup --state commissionUpdate-AzCustomIpPrefix
Decommission a custom IP prefixaz network custom-ip prefix update ... --state decommissionUpdate-AzCustomIpPrefix ... -Decommission
Set a static private IP on a NICaz network nic ip-config update --resource-group myResourceGroup --nic-name myNic --name myIpConfig --private-ip-address 10.0.0.10Set-AzNetworkInterfaceIpConfig -Name myIpConfig -NetworkInterface $nic -Subnet $subnet -PrivateIpAddress 10.0.0.10
Add an IP configuration to a NICaz network nic ip-config create --resource-group myResourceGroup --name myIpConfig --nic-name myNic-

Exam Tips

Tick each tip once you can answer it without looking.

“A /24 subnet: how many addresses can you assign to VMs?” → 251. Azure reserves 5 in every subnet: the first four and the last.. Trap: 256 minus 2 ignores the 5 addresses Azure reserves. A /29 gives only 3 usable addresses.

“Smallest IPv4 subnet, and IPv6 subnet size” → /29 for IPv4; IPv6 subnets must be exactly /64.. Trap: A subnet smaller than /29 isn't supported.

“Connect two VNets or a VNet and on-premises, but the ranges overlap” → They can't be connected. Re-address one side before you peer or connect.. Trap: Overlapping ranges block the connection; adding a peering or gateway doesn't change that.

“Add an address range to a VNet that is already peered” → Allowed if the new range doesn't overlap the peer or on-premises ranges. You can add, remove and modify ranges.. Trap: You can't remove a range that still contains a subnet.

“VPN gateway subnet” → Name it exactly GatewaySubnet, /27 or larger (/29 only for Basic). Put nothing else in it.. Trap: No NSG and no 0.0.0.0/0 UDR on it. Application Gateway can't use it.

“Azure Firewall and Azure Bastion subnets” → AzureFirewallSubnet /26; AzureBastionSubnet /26 or larger in the same VNet.. Trap: Bastion hosts deployed in a /27 subnet before November 2, 2021 keep working; newer ones need /26 or larger. Bastion Developer needs no AzureBastionSubnet.

“Firewall needs forced tunneling to on-premises” → Enable the management NIC: it needs AzureFirewallManagementSubnet (min /26) and its own public IP.. Trap: Basic and Secured Hub firewalls already have the management NIC.

“Size the Application Gateway v2 subnet” → /24 recommended: up to 125 instances + 1 private frontend + 5 reserved.. Trap: v1 supports 32 instances (/26 recommended). You can't mix v1 and v2 in one subnet or add other resources.

“App Service regional VNet integration subnet” → A dedicated, delegated subnet, /28 or larger; /26 covers one plan at maximum scale.. Trap: The size can't change after assignment, and scaling temporarily doubles the IPs used.

“Why can't you delete or change a subnet?” → Resources still sit in it, or a delegation is in use. Remove the resources (and the delegation) first.. Trap: Changing the address range also needs an empty subnet.

“Which subnet setting lets an Azure PaaS service create its instances in your VNet?” → Subnet delegation to the service (for example Microsoft.Sql/managedInstances).. Trap: A service endpoint doesn't deploy anything into the subnet; it extends the VNet identity to the service.

“Private endpoint in a delegated subnet; enable NSG policy there” → Not possible. A delegated subnet can't hold a private endpoint.. Trap: Private endpoint network policies are off by default and apply per subnet, to all private endpoints in it.

“Route private endpoint traffic through a firewall NVA” → Enable UDR network policy on the subnet and add a UDR with a prefix length equal to or larger than the VNet address space prefix length.. Trap: A 0.0.0.0/0 UDR covers a broader range than the VNet address space, so it doesn't override the private endpoint route.

“Public IP that must stay the same after the VM is stopped (deallocated)” → Static allocation on a Standard SKU public IP.. Trap: A dynamic address is released on stop and can change. A static address can't be chosen; Azure picks it.

“Standard public IP on a VM NIC, but nobody can connect” → Standard SKU is closed by default. Associate an NSG that allows the traffic.. Trap: Basic SKU public IPs were open by default, and they're retired.

“Change a public IP from Basic to Standard, or change its zone” → The availability zone can't change after creation. For the SKU, Microsoft's pages differ (one says you can't change it, another lists an upgrade of a disassociated Basic IP), so follow the Basic-to-Standard upgrade guidance.. Trap: Mixing Basic and Standard SKUs on one load balancer isn't allowed.

“Partner firewall must allow only one range of your outbound IPs” → Public IP prefix. One rule covers the range, and IPs for NAT gateway or load balancer outbound come from it.. Trap: A prefix can't be resized. A NAT gateway can use at most 16 IPs, so /28 is the largest prefix.

“Keep your own public IP range in Azure” → Custom IP prefix (BYOIP): validate, provision, then commission to advertise.. Trap: A custom prefix can't be attached to a resource; derive public IP prefixes or IPs from it. Provisioned means not yet advertised.

Sources

Checked against Microsoft Learn on November 13, 2026.

← Core Networking overviewName Resolution →