Azure Documentation

Your comprehensive guide to Microsoft Azure services.

Public IP Addresses in Azure

A public IP address is a resource that is associated with a virtual machine, load balancer, or other Azure resource to provide connectivity from the internet to that resource.

Understanding Public IP Addresses

Public IP addresses allow resources in Azure to communicate with the internet and allow the internet to communicate with those resources. They are assigned from a pool of Azure-owned IP address ranges. You can have either dynamic or static public IP addresses.

Types of Public IP Addresses

SKUs for Public IP Addresses

Azure offers two SKUs for public IP addresses, each with different capabilities and features:

Key Features and Benefits

Common Scenarios

Pricing

The cost of public IP addresses depends on the SKU (Basic or Standard) and whether the IP address is associated with a running resource or is idle. Static IP addresses that are not associated with a running resource may incur charges.

Note: For detailed pricing information, please refer to the official Azure IP Addresses pricing page.

Creating a Public IP Address

You can create a public IP address using the Azure portal, Azure CLI, Azure PowerShell, or ARM templates.

Azure CLI Example (Standard SKU, Static Assignment)


az network public-ip create \
  --resource-group MyResourceGroup \
  --name MyPublicIP \
  --allocation-method Static \
  --sku Standard \
  --location eastus
            

Azure PowerShell Example (Basic SKU, Dynamic Assignment)


New-AzPublicIpAddress -Name "MyBasicPublicIP" -ResourceGroupName "MyResourceGroup" -Location "eastus" -AllocationMethod Dynamic -Sku Basic
            

Managing Public IP Addresses

You can view, associate, disassociate, and delete public IP addresses through the Azure portal or management tools. When associating a public IP with a resource like a virtual machine, you typically do so during the resource creation process or by updating the resource's network interface.

Important: Ensure you understand the implications of dynamic versus static IP allocation and the differences between Basic and Standard SKUs to choose the most appropriate option for your needs.

Further Reading