Update BGP route policies

This guide describes how to do the following updates to BGP route policies for Cloud Router:

Remove a BGP route policy

Run the following:

gcloud compute routers remove-route-policy ROUTER_NAME 
\
    --policy-name= BGP_ROUTE_POLICY_NAME 

Replace the following:

  • ROUTER_NAME : the name of your Cloud Router
  • BGP_ROUTE_POLICY_NAME : the name of the BGP route policy that you want to remove

Add a BGP route policy term

Run the following:

gcloud compute routers add-route-policy-term ROUTER_NAME 
\
    --policy-name= BGP_ROUTE_POLICY_NAME 
\
    --priority= PRIORITY 
\
    --match=" CEL_MATCH_EXPRESSION 
" \
    --actions=" CEL_ACTIONS_EXPRESSION 
"
    --region= REGION 

Replace the following:

  • ROUTER_NAME : the name of your Cloud Router
  • BGP_ROUTE_POLICY_NAME : the name of the BGP route policy that you want to export
  • PRIORITY : the order of this term within the BGP route policy, where lower values indicate higher priority. The accepted range is [0, 2^31).
  • CEL_MATCH_EXPRESSION : a Common Expression Language (CEL) element that matches routes that this term applies to
  • CEL_ACTIONS_EXPRESSION : a semicolon separated CEL expression for actions to take for items that match this rule
  • REGION : the region that the Cloud Router is located in

Update a BGP route policy term

Run the following:

gcloud compute routers update-route-policy-term ROUTER_NAME 
\
    --policy-name= BGP_ROUTE_POLICY_NAME 
\
    --priority= PRIORITY 
\
    --match=" CEL_MATCH_EXPRESSION 
" \
    --actions=" CEL_ACTIONS_EXPRESSION 
" \
    --region= REGION 

Replace the following:

  • ROUTER_NAME : the name of your Cloud Router
  • BGP_ROUTE_POLICY_NAME : the name of the BGP route policy that you want to export
  • PRIORITY : The order of this term within the BGP route policy, where lower values indicate higher priority. The accepted range is [0, 2^31).
  • CEL_MATCH_EXPRESSION : a CEL element that matches routes that this term applies to
  • CEL_ACTIONS_EXPRESSION : a semicolon separated CEL expression for actions to take for items that match this rule
  • REGION : the region that the Cloud Router is located in

Remove a BGP route policy term

Run the following:

gcloud compute routers remove-route-policy-term ROUTER_NAME 
\
    --policy-name= BGP_ROUTE_POLICY_NAME 
\
    --priority= PRIORITY 
--region= REGION 

Replace the following:

  • ROUTER_NAME : the name of your Cloud Router
  • BGP_ROUTE_POLICY_NAME : the name of the BGP route policy that you want to export
  • PRIORITY : the order of this term within the BGP route policy, where lower values indicate higher priority. The accepted range is [0, 2^31).
  • REGION : the region that the Cloud Router is located in

Add and update named sets

You can add named sets —named groups of literal values of either prefix or community types—and add or remove individual named set elements.

Create a Mobile Website
View Site in Mobile | Classic
Share by: