Public IP Addresses
Basic vs Standard · static vs dynamic · zones · prefixes · upgrade · outbound without a public IP
By the tools4free.dev team · Last reviewed November 13, 2026
Practice questions for this topic →
SKUs
| Basic | Standard | |
|---|---|---|
| Allocation | IPv4: Dynamic or Static. IPv6: Dynamic only | Always Static |
| Inbound traffic | Open by default; NSG optional | Closed by default: an NSG must allow traffic (for example on the NIC of a VM with a Standard public IP) |
| Zones | None | Non-zonal, zonal or zone-redundant (Standard v2: zone-redundant only) |
| Global tier and Routing Preference Internet | No | Yes (not for Standard v2) |
| Status | Retired on Sep 30, 2025. Still operational, but unsupported and not covered by an SLA | Current |
A public IP can't change its zone after creation. Standard IPs that were non-zonal are now zone-redundant in zone-enabled regions.
Allocation and naming
- A public IP is its own Azure Resource Manager resource. It can attach to VM NICs, scale sets, public load balancers, VPN and ExpressRoute gateways, NAT gateways, Application Gateways, Azure Firewalls, Bastion hosts, Route Servers and API Management.
- Dynamic: the address is assigned when the IP is associated with a resource and released when you stop (deallocate) or delete that resource.
- Static: assigned at creation and released only when the resource is deleted. It can't be recovered, and you can't choose the actual address. Use it for firewall allow lists, DNS A records, IP-based security and TLS bound to an IP.
- A resource with no public IP can still go outbound through a dynamic, non-dedicated address that can change.
- Domain name label gives
<label>.<location>.cloudapp.azure.com. It must be unique in the location and works for IPv4 (A) and IPv6 (AAAA). - Idle timeout: inbound-originated flows are adjustable from 4 to 30 minutes (default 4). Outbound-originated flows are fixed at 4 minutes.
- SKUs must match between a public IP and a load balancer. You can't mix Basic and Standard resources, and a VM, availability set or scale set can't attach to both SKUs.
- Global tier (Standard only) is for cross-region load balancer frontends.
- IPv6: public IPv6 has no charge, public IPv4 does. A VPN gateway can't be used in an IPv6-enabled vnet. There are no IPv6-only VMs (each NIC needs IPv4).
Public IP prefixes
- A prefix is a reserved, contiguous range. IPv4 sizes: /28 (16), /29 (8), /30 (4), /31 (2). IPv6 uses /124 to /127.
- The size can't change after creation, and you can't pick the addresses.
- Only Standard static IPs can be assigned from a prefix. The IPs must be in the same region and subscription as the prefix.
- Deleting an individual IP returns it to the prefix. You can't delete a prefix while any of its IPs is associated with a resource. The whole prefix counts against the regional quota even if no IPs are created.
- Uses: one firewall rule for a range, scale set instance-level IPs, load balancer outbound (not inbound), and NAT gateway (maximum 16 IPs, /28 is the largest prefix). Azure Firewall can't attach the prefix itself but can use individual IPs from it.
- Order of work: create the prefix, create static Standard IPs from it, then associate them to a NIC, load balancer or gateway.
Upgrade a Basic IP
- Disassociated IP: upgrade in the portal, PowerShell or CLI. VM-attached IP: use the upgrade scripts, or detach and upgrade (plan for downtime).
- If you need zone redundancy, create a new Standard IP. For a Standard load balancer, the IP tier must align with the load balancer tier.
- Scale-set per-instance IPs aren't public IP resources and can't be upgraded. Replace them.
- A Standard IP is closed by default, so after the upgrade add an NSG that allows the inbound traffic you need.
Outbound without a public IP
- Default outbound access gives a Microsoft-owned IP that can change. For vnets created with the API released after March 31, 2026, subnets are private by default, so a VM needs an explicit method: NAT gateway (recommended), a Standard public IP on its NIC, or Standard load balancer outbound rules.
- A public IP on the VM's NIC uses 1:1 stateless NAT, with no SNAT and all ephemeral ports. Only a NAT gateway takes precedence over it.
Limits
| Item | Value |
|---|---|
| Standard and Basic public IPs per subscription per region (default) | 10 for most offers (Enterprise Agreement 1,000; pay-as-you-go 20). More through support |
| Public IPs per NIC / per VM | 256 / 256 |
| Public IP prefix length (default maximum) | /28 |
| NAT gateway public IPs | 16 maximum |
CLI and PowerShell
| Task | Command |
|---|---|
| Standard zone-redundant IPv4 (CLI) | az network public-ip create -g rg -n myStandardPublicIP --version IPv4 --sku Standard --zone 1 2 3 |
| Zonal IP (CLI) | az network public-ip create ... --zone 2 |
| IPv6 (CLI) | az network public-ip create ... --version IPv6 |
| Global tier (CLI) | az network public-ip create ... --tier global --sku Standard |
| Routing preference Internet (CLI) | az network public-ip create ... --ip-tags 'RoutingPreference=Internet' |
| Show the address (CLI) | az network public-ip show -g rg -n lb-frontend-ip --query ipAddress -o tsv |
| Static IP with a DNS label (PowerShell) | New-AzPublicIpAddress -Name $publicIpName -ResourceGroupName $rgName -AllocationMethod Static -DomainNameLabel $dnsPrefix -Location $location |
| Standard IP from a prefix (PowerShell) | New-AzPublicIpAddress ... -AllocationMethod Static -PublicIpPrefix $publicIpPrefix -Sku Standard |
| Global tier (PowerShell) | New-AzPublicIpAddress ... -AllocationMethod Static -Sku Standard -Tier Global |
-AllocationMethod, -Location and -ResourceGroupName are mandatory for New-AzPublicIpAddress. With Static the address is allocated immediately; with Dynamic it is allocated when you start or create the associated resource.
Exam Tips
Tick each tip once you can answer it without looking.
“Public IP must survive a VM stop and start” → Static allocation (Standard is always static). Trap: Dynamic with a DNS label. The address is still released when you stop (deallocate) the VM.
“Standard public IP on a VM, RDP times out, no NSG” → Standard is closed by default: add an NSG that allows 3389 on the NIC or subnet. Trap: Changing the IP to Dynamic.
“Public load balancer is Standard; can it use a Basic public IP” → No: SKUs must match. Trap: Believing Basic IPs work with any load balancer.
“Which public IP SKU supports availability zones” → Standard. Trap: Basic with a zone parameter.
“Change a zonal public IP to zone 3” → Not possible: a public IP can't change zone after creation. Create a new one. Trap: Editing the zone in the portal.
“Allow-list 8 contiguous outbound IPs at a partner's firewall” → Create a /29 public IP prefix and assign IPs from it. Trap: Choosing /28. It gives 16 addresses, not 8.
“Resize a public IP prefix from /30 to /29” → Not possible: the size is fixed. Create a new prefix. Trap: Looking for an edit-size option.
“Public IP prefix with Basic SKU IPs” → Not allowed: only Standard static IPs come from a prefix. Trap: Assigning Basic dynamic IPs.
“Prefix on a load balancer for inbound rules” → Not for inbound: a prefix is used for load balancer outbound. Trap: Using the prefix for inbound frontends.
“Delete a prefix whose IPs are in use” → Blocked: dissociate the IPs first. Trap: Expecting the prefix delete to remove the IPs.
“Cross-region load balancer frontend” → Standard public IP in the Global tier. Trap: A regional Standard IP.
“Basic public IP retirement date” → Sep 30, 2025: still running but unsupported and not covered by an SLA. Trap: Assuming the IPs stopped working that day.
“Upgrade a Basic IP on a standalone VM” → Use the upgrade script, or detach and upgrade, and plan for downtime. Trap: Changing the SKU in place while attached.
“Public IP DNS label "contoso" in West US” → contoso.westus.cloudapp.azure.com. Trap: Leaving out the location.
“VPN gateway on an IPv6-enabled vnet” → Not supported. Trap: Assuming dual stack is fine.
“Subnet has a NAT gateway; a VM in it also has a Standard public IP” → The NAT gateway carries outbound traffic. Trap: The VM's own public IP. NAT gateway takes precedence over instance-level IPs, load balancers and Azure Firewall.
“VM has no public IP in a subnet of a vnet created after March 31, 2026, and no NAT gateway” → No outbound internet: add a NAT gateway, Standard public IP or load balancer outbound rules. Trap: Expecting the default outbound IP to keep working.
“After upgrading to Standard, inbound traffic to the VM stops” → Add an NSG that allows the traffic: Standard is closed by default. Trap: Reverting to Basic.
Sources
- Public IP addresses in Azure
- Upgrade Basic public IP to Standard
- Azure public IP address prefix
- Quickstart: create a public IP (CLI)
- Azure Load Balancer SKUs
- Default outbound access in Azure
- SNAT for outbound connections
- New-AzPublicIpAddress
- How network security groups filter network traffic
- Azure subscription and service limits
Checked against Microsoft Learn on November 13, 2026.