Azure Public IP Addresses

Public IP addresses allow internet resources to communicate with your Azure resources. They are essential for making your services accessible from the public internet.

Introduction
Types
DNS Integration
Pricing

Understanding Public IP Addresses

An Azure Public IP address is a resource that provides an IPv4 or IPv6 address from Azure's pool of addresses to your Azure resources. This IP address is routable over the internet.

Key characteristics:

  • Global Uniqueness: Each public IP address assigned to a resource is unique globally.
  • Dynamic vs. Static: You can assign a public IP address dynamically (reassigned on VM restart or scale-out) or statically (remains the same until explicitly disassociated).
  • Association: Public IP addresses can be associated with various Azure resources like Virtual Machines, Load Balancers, Application Gateways, VPN Gateways, and more.
Important: For production workloads, it is highly recommended to use static public IP addresses to ensure consistent accessibility.

Types of Public IP Addresses

Azure offers two main types of public IP addresses:

1. Standard SKU

The Standard SKU is the recommended SKU for most production scenarios. It offers:

  • Availability Zones: Supports zonal and zone-redundant configurations for high availability.
  • Security: Provides Network Security Group (NSG) association by default.
  • Advanced Features: Includes features like IP prefix, UDR, and BGP.
  • Association: Can be associated with most Azure resources.

2. Basic SKU

The Basic SKU is a legacy SKU and is not recommended for new deployments. It has limitations:

  • No Availability Zones: Does not support Availability Zones.
  • NSG Association: NSG association is optional and not enforced.
  • Limited Features: Lacks advanced features.
  • Association: Primarily associated with Virtual Machines.

SKU Comparison

Here's a quick comparison:

Feature Standard SKU Basic SKU
Availability Zones Yes No
NSG Association Required Optional
Recommended For Production Workloads Legacy/Testing

Public IP Addresses and DNS Integration

You can configure a DNS reverse lookup for your public IP addresses, which maps the IP address back to a hostname. This is often used for compliance or logging purposes.

You can also associate a DNS label with your public IP address. This creates a fully qualified domain name (FQDN) that points to your public IP address. For example, if you set a DNS label to mywebapp, it will create an FQDN like mywebapp.westus.cloudapp.azure.com (the domain suffix depends on the region).

This FQDN can then be used to access your resource:

ping mywebapp.westus.cloudapp.azure.com

Note: When using a DNS label, Azure automatically creates an A record (for IPv4) or AAAA record (for IPv6) in Azure DNS that points to your public IP address.

Public IP Address Pricing

Azure Public IP addresses have associated costs. Pricing varies based on:

  • SKU: Standard SKU addresses generally have a higher cost than Basic SKU addresses.
  • Type: Static IP addresses incur a cost per hour, whereas Dynamic IP addresses are free when associated with a running resource but incur a cost when the resource is deallocated.
  • Region: Pricing can vary slightly between Azure regions.
  • Data Transfer: Standard data transfer rates apply for traffic flowing through public IP addresses.

It's important to review the official Azure pricing page for the most up-to-date information.

Tip: Deallocating VMs with dynamic Public IPs can lead to IP address changes. If you need a consistent IP, use static allocation or a Standard SKU with Availability Zone resilience.