Removing Route Advertisements

Stop advertising existing IP ranges to prevent clients in your on-premises network from discovering subnets or custom IP ranges in your VPC network. You can only remove existing advertisements. You can't blacklist IP ranges.

To remove advertisements on a Cloud Router:

Console


  1. Go to the Cloud Router page in the Google Cloud Platform Console.
    Cloud Router list
  2. Select the Cloud Router to update.
  3. In the Cloud Router's detail page, select Edit.
  4. Find the advertised routes to delete, and then select the delete icon next to each route.
  5. After you're done deleting routes, select Save.

gcloud


Run the update command, using the --remove-advertisement-groups or --remove-advertisement-ranges flags to remove existing advertisements.

  • Use the --remove-advertisement-groups flag to remove Google-defined advertisement groups. Advertisement groups are Google-defined IP ranges that Cloud Router dynamically advertises. For a list of all advertisements groups, see the set-advertisement-groups flag in the Google SDK documentation. The following example removes the ALL_SUBNETS advertisement group:

    gcloud compute routers update my-router \
        --remove-advertisement-groups all_subnets
    

  • Use the --remove-advertisement-ranges flag to remove existing IP ranges that are being advertised, such as static external IP addresses or subnet IP ranges. The following example removes the existing 10.0.10.0/24 subnet IP range:

    gcloud compute routers update my-router \
        --remove-advertisement-ranges 10.0.10.0/24
    

To remove advertisements on a BGP session:

Console


  1. Go to the Cloud Router page in the Google Cloud Platform Console.
    Cloud Router list
  2. Select the Cloud Router that contains the BGP session to update.
  3. In the Cloud Router's detail page, select the BGP session to update.
  4. In the BGP session details page, select Edit.
  5. Find the advertised routes to delete, and then select the delete icon next to each route.
  6. After you're done deleting routes, select Save.

gcloud


Run the update-bgp-peer command with the --remove-advertisement-groups or --remove-advertisement-ranges flags to remove existing advertisements.

  • Use the --remove-advertisement-groups flag to remove Google-defined advertisement groups. Advertisement groups are Google-defined IP ranges that Cloud Router dynamically advertises. For a list of all advertisements groups, see the set-advertisement-groups flag in the Google SDK documentation. The following example removes the ALL_SUBNETS advertisement group:

    gcloud compute routers update-bgp-peer my-router \
        --peer-name my-bgp-session \
        --remove-advertisement-groups all_subnets
    

  • Use the --remove-advertisement-ranges flag to remove existing IP ranges, such as static external IP addresses or subnet IP ranges. The following example removes the existing 10.0.10.0/24 subnet IP range:

    gcloud compute routers update my-router \
        --peer-name my-bgp-session \
        --remove-advertisement-ranges 10.0.10.0/24
    

What's next

Was this page helpful? Let us know how we did:

Send feedback about...

Cloud Router