[ Web Proxy ]
URL:
Viewing: https://docs.cloud.google.com/vpc/docs/create-pap [Back]  [Original]

Create a public advertised prefix  |  Virtual Private Cloud  |  Google Cloud Documentation Skip to main content
Google Cloud Documentation [Google Cloud Documentation]
Send feedback Stay organized with collections Save and categorize content based on your preferences.

Create a public advertised prefix

You can bring your own IP addresses (BYOIP) to Google Cloud. After we validate that you own the IP range, and the IP addresses are imported to Google Cloud, you can assign them to supported resources.

The first step in using bring your own IP is to create a public advertised prefix. The following options are available:

Note: Public advertised prefixes created before July 2023 can contain both regional and global public delegated prefixes. Any public advertised prefixes created after this date can be used to create either global or regional public delegated prefixes.

Configuration Regional (v2) Regional internal (v2) Regional (v1) Global (v1)
Availability Recommended regional configuration Used for internal IPv6 addresses Not recommended for new regional configurations Must request adding your project to an allowlist
Public advertised prefix provisioning time Approximately 2 weeks Immediate Approximately 4 weeks Approximately 4 weeks
Public delegated prefix provisioning time A few minutes Immediate 4 weeks

Can overlap with public advertised prefix provisioning time

4 weeks

Can overlap with public advertised prefix provisioning time

Sub-prefix provisioning time A few minutes Immediate A few minutes A few minutes
BGP announcement The public advertised prefix is not automatically announced when it is provisioned. You decide when to announce or withdraw advertisement. Not announced The public advertised prefix is automatically announced after provisioning completes. The public advertised prefix is automatically announced after provisioning completes.
Access type External Internal External External
Network Service Tiers
  • Premium Tier
  • Standard Tier (Preview)
Premium Tier Premium Tier Premium Tier
IP stack
  • Premium Tier: IPv4, IPv6 (only for external passthrough Network Load Balancers and subnets that exclusively host VMs)
  • Standard Tier: IPv4
IPv6 IPv4 IPv4

Before you begin

Roles

To get the permissions that you need to complete the tasks in this guide, ask your administrator to grant you the Compute Public IP Admin (roles/compute.publicIpAdmin) IAM role on your project. For more information about granting roles, see Manage access to projects, folders, and organizations.

You might also be able to get the required permissions through custom roles or other predefined roles.

Create and validate a public advertised prefix

When you create a public advertised prefix, you must validate ownership of the prefix. The details of these validation tasks are outlined in the following sections. The validation process depends on the access type of the prefix:

Create a ROA request

To prove that you have ownership of a prefix, create a Route Origin Authorization (ROA) request.

Submit the ROA request with your regional registry for the prefix that you want Google Cloud to advertise. When you create a public advertised prefix, the ROA for that prefix must exist and point to the ASN for Google Cloud, remaining in effect for some time after you delete the public advertised prefix. For more information, see Remove a ROA.

The values that you include in the ROA request depend on the network tier of the prefix.

Premium Tier ROA requirements

For Premium Tier, create a ROA request that includes the public advertised prefix, its prefix length, and the Premium Tier ASN for Google Cloud: 396982.

Standard Tier ROA requirements

For Standard Tier (Preview), do one of the following:

Create a ROA for your own ASN

We recommend that you submit another ROA request for your public advertised prefix. Use the same details as the ROA you submitted with Google's ASN, but substitute your own ASN as the origin. If you ever need to advertise the prefix, the ROA with your ASN prevents networks that use Resource Public Key Infrastructure (RPKI) from considering the prefix to be invalid because it is also advertised with the origin ASN for Google Cloud.

Regional internet registries

Your local regional internet registry processes ROA requests. For more information, see the link for your location:

Renew a ROA

To let Google Cloud advertise your public advertised prefixes, you must actively maintain a valid ROA with your regional internet registry. ROAs expire periodically and must be renewed before expiration.

If your ROA expires and you fail to renew it within four weeks of receiving a renewal notification, Google Cloud stops advertising the public advertised prefix to the internet, which might result in connectivity disruptions for resources that use IP addresses from the prefix.

To renew your ROA, consult your local regional internet registry for specific instructions. For more information, see Create a ROA request.

Create a public advertised prefix

Warning: Google Cloud does not support overlapping BYOIP route announcements. For example, importing 203.0.112.0/23 is not supported if 203.0.112.0/23 or a subset of this prefix, such as 203.0.112.0/24, is advertised outside Google Cloud. If Google Cloud and another network advertise the same route with matching or mismatched prefix lengths, you might experience unexpected routing and packet loss.

You can create a public advertised prefix for the prefix that you want to bring to Google Cloud.

A public advertised prefix name can't be changed without deleting and recreating the resource. For this reason, we recommend that you create generic names that won't need to change—for example, pap-203-0-113-0-24, where pap denotes the resource type and 203-0-113-0-24 denotes the specific prefix and prefix length.

If you want to use the public advertised prefix to create global public delegated prefixes, your project must be added to an allowlist. For more information, see Global public delegated prefixes.

For external access prefixes, choose an unused IP address for DNS validation. Verification requires that you configure a new PTR record for this IP address, and you don't know the hostname until after you create the public advertised prefix.

To create a Standard Tier public advertised prefix (Preview), use the Google Cloud CLI.

Console

  1. In the Google Cloud console, go to Bring your own IP.

    Go to Bring your own IP

  2. Click Add PAP.

  3. For Name, enter a name for the public advertised prefix.

  4. For Description, enter an optional description for the public advertised prefix.

  5. For IP version, select IPv4 or IPv6.

  6. Enter the prefix that you want to import.

  7. If you're importing an IPv4 prefix, select a Scope for the public advertised prefix: Regional or Global.

    Note: if the Global option is not available, you are not part of the allowlist for global public advertised prefixes.
  8. If you're importing an IPv6 prefix, select an access type.

  9. Click Next.

  10. Review the information that you entered. To confirm that you own this prefix, click Confirm.

  11. If you're adding a PAP with external access, for IP address, enter an unused IP address from the prefix that you are adding. This address is used for DNS validation, and in a later step, you must create a PTR record for it that uses a hostname provided by Google Cloud.

  12. Click Create. The Validation screen shows you the validation status of this request.

gcloud

Use the public-advertised-prefixes create command.

Except where noted, the commands in this section create Premium Tier prefixes.

Replace the following:

Validate ownership with DNS

If you created an external access public advertised prefix, complete the steps in the following sections to verify that you own the prefix. If you created an internal access public advertised prefix, you don't need to validate ownership with DNS.

Find the name to use for the PTR record

When you create an external access public advertised prefix, Google Cloud generates a name for you to use as a hostname for the PTR validation step.

Console

  1. In the Google Cloud console, go to Bring your own IP.

    Go to Bring your own IP

  2. Click Check status for the prefix that you want to check.

  3. The name and IP address to use for PTR validation are displayed in the DNS validation section.

gcloud

  1. To get the name from the sharedSecret field, use the public-advertised-prefixes describe command.

    gcloud compute public-advertised-prefixes describe \
        PAP_NAME --format='value(sharedSecret)'
    
  2. If needed, you can retrieve the IP address you provided for DNS validation.

    gcloud compute public-advertised-prefixes describe \
        PAP_NAME --format='value(dnsVerificationIp)'
    

In both commands, replace PAP_NAME with the name of the public advertised prefix.

Create the PTR record

To verify that you own the IP address range that you are importing to Google Cloud, you must create a public PTR record in the DNS zone that is used for the IP address range that you are importing.

Use the following values in the PTR record:

Examples:

Validate the PTR record

After you have created the PTR record, update the public advertised prefix to trigger validation of the PTR record.

Console

  1. In the Google Cloud console, go to Bring your own IP.

    Go to Bring your own IP

  2. Click Check status for the prefix that you want to update.

  3. In the DNS validation section, select the I have created this PTR record checkbox and click Validate.

gcloud

To change the status of the public advertised prefix to PTR-CONFIGURED, use the public-advertised-prefixes update command.

The status change triggers validation of the PTR record. If it is successful, the status changes to VALIDATED. If it fails, the status changes to REVERSE_DNS_LOOKUP_FAILED.

gcloud compute public-advertised-prefixes update PAP_NAME --status=PTR-CONFIGURED

Replace PAP_NAME with the public advertised prefix that you have created a PTR record for.

Check the status of a public advertised prefix

It takes approximately four weeks for Google Cloud to provision the public advertised prefix. You can check the status to see if provisioning is complete.

Console

  1. In the Google Cloud console, go to Bring your own IP.

    Go to Bring your own IP

  2. Click Check status for the prefix that you want to check.

  3. View the Validation section.

gcloud

To describe the public advertised prefix and get its status, use the public-advertised-prefixes describe command.

gcloud compute public-advertised-prefixes describe PAP_NAME --format='value(status)'

Replace PAP_NAME with the public advertised prefix that you want to get status information for.

After the prefix is validated, the status field changes from VALIDATED to PREFIX_CONFIGURATION_COMPLETE.

What's next

Send feedback

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-09-18 UTC.

Need to tell us more? [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-09-18 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page