Updating the Base Advertised Route Priority

When Cloud Router advertises routes, it uses route metrics to set route priorities. Route metrics include the base advertised route priority and a regional cost. The lower the metric, the more a route is preferred. For existing BGP sessions, you can update the base advertised route priority to tweak these route metrics. All routes for the BGP session use the same base advertised route priority.

With global dynamic routing, Cloud Router can advertise routes from regions other than its own. When it does, it adds a regional cost that can range from 201 to 9,999, affecting how routes are prioritized. To account for these regional costs, use the following guidelines when setting base advertised route priorities:

  • To adjust priorities between routes in a single region, use values less than 201. This guarantees that regional costs won't impact route priorities. A route from another region (a remote region) can't have a priority lower than 201. If you use higher values, regional costs might impact your route priorities. For example, suppose you have a primary and backup connection. If you set the backup connection's base priority too high, you might unintentionally prefer routes from other regions.
  • To deprioritize a route globally in a VPC network, use values higher than 10,200. This ensures that all other routes lower than 201 have priority regardless of regional costs.

In cases where all routes in a region are equally preferred, you can use the default value of 100. For more information about regional costs and examples, see Route metrics.

To update the base advertised route priority for an existing BGP session:

Console

For Cloud VPN tunnels using dynamic routing, including HA VPN tunnels, complete the following steps:

  1. Go to the Cloud VPN page in the Google Cloud Platform Console.
    Go to the VPN tunnels page
  2. From the list of tunnels in the Name column, select the the tunnel that you want to modify.
  3. On the VPN tunnel details screen, select Modify BGP session.
  4. Modify the Advertised route priority value.
  5. Click Save and continue.

For Dedicated Interconnect or Partner Interconnect, complete the following steps:

  1. Go to the Cloud Interconnect page in the Google Cloud Platform Console.
    Go to the interconnect attachments (VLANs) page
  2. From the list of attachments in the Name column, select the the attachment that you want to modify.
  3. On the VLAN attachment details screen, select the name of the BGP session.
  4. Modify the Advertised route priority value.
  5. Click Save and continue.

gcloud


Run the update-bgp-peer command, specifying the name of the Cloud Router and BGP session that correspond to the appropriate VPN tunnel or interconnect attachment (VLAN). Use the --advertised-route-priority flag to update the base advertised route priority.

gcloud compute routers update-bgp-peer ROUTER_NAME \
    --peer-name NAME_OF_BGP_SESSION \
    --advertised-route-priority BASE_PRIORITY_VALUE

What's next?

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

Send feedback about...

Cloud Router