Quickstart: Create a public IP address prefix using the Azure portal

Learn about a public IP address prefix and how to create, change, and delete one. A public IP address prefix is a contiguous range of standard SKU public IP addresses.

When you create a public IP address resource, you can assign a static public IP address from the prefix and associate the address to virtual machines, load balancers, or other resources. For more information, see Public IP address prefix overview.

Prerequisites

Sign in to Azure

Sign in to the Azure portal.

Create a public IP address prefix

IPv4

In this section, you create a public IP prefix using the Azure portal. Use the following examples to create a IPv4 public IP prefix. To create a IPv6 public IP prefix, see IPv6.

  1. In the search box at the top of the portal, enter Public IP.

  2. In the search results, select Public IP Prefixes.

  3. Select + Create.

  4. In Create public IP prefix, enter, or select the following information in the Basics tab:

Setting Value
Project details
Resource group Select Create new and enter test-rg.
Select OK.
Instance details
Name Enter public-ip-prefix.
Region Select China North 3.
IP version Select IPv4.
Prefix size Select your prefix size.
Routing preference Leave the default of Microsoft network.
Availability zone Leave the default of Zone-redundant.

Screenshot of create public IP address prefix with default settings in the Azure portal.

  1. Select the Review + create tab or the blue Review + create button at the bottom of the page.

  2. Select Create.

IPv6

In this section, you create a public IP prefix using the Azure portal. Use the following examples to create a IPv6 public IP prefix.

  1. In the search box at the top of the portal, enter Public IP.

  2. In the search results, select Public IP Prefixes.

  3. Select + Create.

  4. In Create public IP prefix, enter, or select the following information in the Basics tab:

    Setting Value
    Project details
    Resource group Select Create new and enter test-rg.
    Select OK.
    Instance details
    Name Enter public-ip-prefix.
    Region Select China North 3.
    IP version Select IPv6.
    Prefix size Select your prefix size.
    Availability zone Leave the default of Zone-redundant.

    Screenshot of create IPv6 public IP address prefix in the Azure portal.

  5. Select the Review + create tab or the blue Review + create button at the bottom of the page.

  6. Select Create.

Create a static public IP address from a prefix

Once you create a prefix, you must create static IP addresses from the prefix. In this section, you create a static IP address from the prefix you created earlier.

  1. In the search box at the top of the portal, enter Public IP.

  2. In the search results, select Public IP Prefixes.

  3. In Public IP Prefixes, select public-ip-prefix.

  4. In Overview of public-ip-prefix, select + Add IP address.

    Screenshot of add an IP address to public IP address prefix in the Azure portal.

  5. Enter public-ip-1 in Name.

  6. Leave the rest of the selections at the default.

  7. Select Add.

    Note

    Only static public IP addresses created with the standard SKU can be assigned from the prefix's range. To learn more about public IP address SKUs, see public IP address.

  8. Select Public IP addresses in Settings to view the created IP address.

Delete a prefix

In this section, you learn how to view or delete a prefix.

  1. In the search box at the top of the portal, enter Public IP.

  2. In the search results, select Public IP Prefixes.

  3. In Public IP Prefixes, select public-ip-prefix.

  4. Select Delete in the Overview section.

    Note

    If addresses within the prefix are associated to public IP address resources, you must first delete the public IP address resources. See delete a public IP address.

Clean up resources

In this article, you created a public IP prefix and a public IP from that prefix.

When you're done with the public IP prefix, delete the resource group and all of the resources it contains:

  1. Search for and select test-rg.

  2. Select Delete resource group.

  3. Enter test-rg in Enter resource group name to confirm deletion and select Delete.

Next steps

Advance to the next article to learn how to create a public IP address: