BGP route policy attribute reference
This page shows example BGP route policies, using the Common Expression Language (CEL) for Cloud Router.
Match attributes
The following table describes match attributes available for BGP route policies:
Attributes |
Description |
---|---|
|
List of communities attributed to the BGP route |
|
IP range for the BGP route |
Match operations
The following table describes match operations available for BGP route policies:
Operation |
Description |
---|---|
|
Returns true if communities are a superset of the list
A community_value is a 32-bit field divided into two 16-bit sections. Conventionally, the first 16-bits of the value encode the autonomous system (AS) number of the network that the community originates from, but Cloud Router doesn't enforce this convention. The second 16-bits of the value encode a unique number assigned by the originating AS. Restricted to import only. |
|
Returns |
|
Returns |
|
Returns
Negatable with |
|
Returns a prefix object representing the CIDR range
|
|
Returns a prefix range object that's a copy of |
|
Returns a prefix range object that's a copy of |
|
Returns a prefix range object that's a copy of |
|
Returns a prefix range object that's a copy of |
|
Return x and y must be boolean expressions that use either the
|
Due to the rules for ||
(OR) operations, all conditions are
effectively zero or more destination
match operations
connected by OR.
(D0 || D1 || ... || Dm)
The following table is an example of using prefix
to build complex regular
expressions compared to some router vendors:
Cloud Router | Cisco | Juniper | Explanation |
---|---|---|---|
|
|
|
Exactly match the prefix |
|
|
|
Exactly match the prefix |
|
|
|
Match the range within |
|
|
|
Match the range within |
|
|
|
Match the range within |
|
|
|
Match the range within |
Action attributes
The following table describes action attributes available for BGP route policies:
Attribute |
Description |
Restrictions |
---|---|---|
|
The list of AS numbers the BGP route update traversed |
Export and Import |
|
The route's list of communities |
Export only |
|
The route's multipath exit discriminator (MED) |
Export and Import |
Action operations
The following table describes action operations available for BGP route policies:
Operation |
Description |
Restrictions |
---|---|---|
|
Accepts the BGP route, and stop further evaluation of BGP route policies or terms, including any actions that come after this one. |
None |
|
Filters out the BGP route, and stops further evaluation of BGP policies or terms, including any actions that come after this one. |
None |
|
Stops the execution of remaining terms in this BGP route policy (including any actions after this term), and moves on to the next applied BGP route policy (if any). |
None |
|
Prepends a list of AS numbers to the AS-PATH attribute, as a sequence.
|
None |
|
Adds the community value to the list of communities. The community value can be a single community or a list. Any community values that are private communities mapped to the following Google-owned ASNs are ignored by Cloud Router: 6432, 15169, 16550, 16591, 19448, 19527, 22859, 26910, 32381, 36039, 36384, 36385, 36492, 55023 |
Export only |
|
Removes the community value from the list of communities. The community value can be a single community or a list. Any community values that are private communities mapped to the following Google-owned ASNs are ignored by Cloud Router: 6432, 15169, 16550, 16591, 19448, 19527, 22859, 26910, 32381, 36039, 36384, 36385, 36492, 55023 |
Export only |
|
Replaces the list of communities with the community value, which can be empty. Any community values that are private communities mapped to the following Google-owned ASNs are ignored by Cloud Router: 6432, 15169, 16550, 16591, 19448, 19527, 22859, 26910, 32381, 36039, 36384, 36385, 36492, 55023 |
Export only |
|
Sets MED to |
None |