Basic vs Standard pricing tiers
Public IP addresses are available at two pricing tiers (or SKUs): Basic or Standard. All public IP addresses created before the introduction of these tiers are mapped to the Basic tier.
Standard tier public IP addresses support zone-redundant deployment, allowing you to use availability zones to protect your deployments against potential outages caused by data center-level failures (such as fire, power failure, or cooling failure). There are a number of other important differences between the two tiers, as summarized in Table 4-3.
TABLE 4-3 Comparison of public IP address Basic and Standard tiers
Feature | Basic Tier | Standard Tier |
Allocation method | Supports both static and dynamic allocation methods. | Supports static allocation only. |
Traffic restrictions | Open by default for inbound traffic. Use NSGs to restrict inbound or outbound traffic. | Closed by default for inbound traffic. Use NSGs to allow inbound traffic and restrict outbound traffic. |
Redundancy | Not zone-redundant and doesn’t support availability zone. | Zone-redundant by default, or it can instead be assigned to a specific availability zone. |
Public IP prefixes | Does not support public IP prefixes (discussed later). | Supports public IP prefixes, allowing IP addresses to be assigned from a contiguous IP address block. |
Public IP address allocation
As with private IP addresses, public IP addresses support both dynamic and static IP allocation. The Basic tier supports both static and dynamic allocation, with the default being dynamic. The Standard tier supports only static allocation.
Under dynamic allocation, an actual IP address is allocated to the public IP address resource only when the resource is in use—that is, when it is associated with a resource such as a run- ning virtual machine. If the virtual machine is stopped (deallocated) or deleted, the IP address assigned to the public IP address resource is released and returned to the pool of available IP addresses managed by Azure. When you restart the virtual machine, a different IP address will most likely be assigned.
If you want to retain the IP address, the public IP address resource should be configured to use static IP allocation. An IP address will be assigned immediately (if one was not already dynamically assigned). This IP address will never change, regardless of whether the associated virtual machine is stopped or deleted.
Typically, static public IP addresses are used in scenarios where a dependency is defined by a particular IP address. For example, static IP addresses are commonly used in the following scenarios:
- Where firewall rules specify an IP address
- Where a DNS record would need to be updated when an IP address changes
- Where the source IP address is used as a (weak) form of authentication of the traffic source
- Where an SSL certificate specifies an explicit IP address rather than a domain name
With private IP addresses, static allocation allows you to specify the IP address to use from the available subnet address range. In contrast, static allocation of public IP addresses does not allow you to specify which public IP address to use. Azure assigns the IP address from a pool of IP addresses in the Azure region where the resource is located.