Action clauses are used to set actions or route attributes for the routes that match condition clauses. This section describes different types of action clauses.
The parameters in action clauses can be specific values or global variables referenced using $+global variable name. The parameters in a route-filter with pre-defined variables can be those defined in this route-filter.
Global variables cannot be referenced by the route attribute sets in the format of {element, element...}.
Action clauses (excluding approve, refuse, finish, call route-filter route-filter-name, and break) must follow apply.
Action Clauses |
Function |
Parameters |
---|---|---|
approve |
Further filters the routes that meet the matching rules of the current if condition branch against the next if condition branch. If the current if condition branch is the last one, these routes match the route-filter. |
- |
refuse |
Denies routes that meet matching rules of a route-filter. |
- |
finish |
Completes route filtering and indicates that the route matches the route-filter. |
- |
call route-filter route-filter-name |
References another route-filter. |
The value is a string of 1 to 200 case-sensitive characters, spaces and question marks are not supported. If parameters are included in the referenced route-filter, specify values for them in the format of (var1, var2, ...var8) behind the route-filter name. A maximum of eight parameters can be specified, and each value ranges from 1 to 200 characters. |
break |
Enables the device to exit from the current route-filter. If the current route-filter is referenced by a parent route-filter, the device keeps implementing remaining condition and action clauses of the parent route-filter. |
– |
Action Clauses |
Function |
Parameters |
Commands Used to Apply Action Clauses |
---|---|---|---|
ip next-hop { ipv4-address | peer-address } |
Sets a next hop IPv4 address. |
ipv4-address: indicates an IPv4 address in dotted decimal notation. peer-address: sets the next hop of a BGP route to the IPv4 address of a peer. The IP address is in dotted decimal notation. |
The ipv4-address and peer-address parameters are invalid in the following commands: |
ipv6 next-hop { ipv6-address | peer-address } |
Sets a next hop IPv6 address. |
ipv6-address: indicates an IPv6 address. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X. peer-address: sets the next hop of a BGP route to the IPv4 address of a peer. |
The ipv6-address and peer-address parameters are invalid in the following commands: |
preference preference |
Sets a priority for a routing protocol. When multiple dynamic routing protocols run on a device and they discover multiple routes to the same destination, the priorities specified for the protocols can be used for route selection. The route discovered by the protocol with the highest priority (smallest priority value) is selected for IP packet forwarding. |
preference: indicates the route priority. The value is an integer ranging from 1 to 255. The smaller the value, the higher the priority. |
|
rib-cost [ + | - | inherit ] rib-cost |
Sets a cost for routes in the IP routing table. |
+: increases the cost value. -: decreases the cost value. inherit-cost: inherits the costs of the routes. rib-cost: indicates an IP route cost which is an integer ranging from 0 to 4294967295. |
|
aigp { cost | inherit-cost } |
Sets the AIGP value. |
cost: indicates the AIGP value. inherit-cost: inherits the costs of the routes to which the BGP routes recurse as AIGP values. |
The inherit-cost parameter is invalid in following commands:
|
mpls-label |
Enables MPLS to allocate labels to routes. |
- |
|
cost-type cost-type |
Sets the cost type. |
cost-type can be any of the following items:
|
|
gateway-ip { origin-nexthop | ip-address } |
Sets a gateway IP address for a route. |
origin-nexthop: sets the gateway IP address to the next-hop address of the route. ip-address: sets the gateway IPv4 address to a specified IPv4 address. |
|
ipv6 gateway-ip { origin-nexthop | ipv6-address } |
Sets a gateway IPv6 address for a route. |
origin-nexthop: sets the gateway IPv6 address to the next-hop IPv6 address of the route. ipv6-address: sets the gateway IPv6 address to a specified IPv6 address. |
|
Action Clauses |
Function |
Parameters |
Commands Used to Apply Action Clauses |
---|---|---|---|
community { community-list-name | community-list } overwrite |
Overwrites the original community attribute with the specified community set. |
community-list-name: indicates the name of a community set. The value is a string of 1 to 200 case-sensitive characters, spaces and question marks are not supported. The string can contain letters, digits, underscores (_), hyphens (-), and dots (.). It must start with a letter or digit. community-list: indicates the community set in the format of {element A, element B...}, in which the elements are in the format of aa:nn, a community number, or a known community (internet, no-export-subconfed, no-advertise, or no-export). |
|
community { community-list-name | community-list } additive |
Adds the specified community set to the original community attribute. |
community-list-name: indicates the name of a community set. The value is a string of 1 to 200 case-sensitive characters, spaces and question marks are not supported. The string can contain letters, digits, underscores (_), hyphens (-), and dots (.). It must start with a letter or digit. community-list: indicates the community set in the format of {element A, element B...}, in which the elements are in the format of aa:nn, a community number, or a known community (internet, no-export-subconfed, no-advertise, or no-export). |
|
community in { community-list-name | community-list } delete |
Deletes the communities specified in the community set from the original community attribute. |
community-list-name: indicates the name of a community set. The value is a string of 1 to 200 case-sensitive characters, spaces and question marks are not supported. The string can contain letters, digits, underscores (_), hyphens (-), and dots (.). It must start with a letter or digit. community-list: indicates the community set in the format of {element A, element B...}, in which the elements are in the format of aa:nn, a community number, or a known community (internet, no-export-subconfed, no-advertise, or no-export). |
|
community not in { community-list-name | community-list } delete |
Deletes the communities that are beyond the community set from the original community attribute. |
community-list-name: indicates the name of a community set. The value is a string of 1 to 200 case-sensitive characters, spaces and question marks are not supported. The string can contain letters, digits, underscores (_), hyphens (-), and dots (.). It must start with a letter or digit. community-list: indicates the community set in the format of {element A, element B...}, in which the elements are in the format of aa:nn, a community number, or a known community (internet, no-export-subconfed, no-advertise, or no-export). |
|
community none |
Deletes all the communities from the original community attribute of the BGP route. |
- |
|
Action Clauses |
Function |
Parameters |
Commands Used to Apply Action Clauses |
---|---|---|---|
as-path as-path overwrite |
Sets the AS_Path attribute for BGP routes. |
as-path: indicates the AS_Path, enclosed in single quotation marks, with every two neighboring AS numbers separated with a space. |
|
as-path { as-number-plain | as-number-dot } [ count ] additive |
Adds an AS number to the AS_Path attribute of BGP routes. |
as-number-plain: indicates an AS number which is an integer ranging from 1 to 4294967295. as-number-dot: indicates an AS number in the format of x.y, where x and y are integers ranging from 1 to 65535 and from 0 to 65535, respectively. count: indicates the number of times that an AS number is added to the AS_Path attribute of BGP routes. |
|
as-path as-path substitute |
Replaces the AS number of the peer specified in the AS_Path attribute with the local AS number. |
as-path: indicates the AS_Path, enclosed in single quotation marks, with every two neighboring AS numbers separated with a space. An AS_Path can include an AS number range enclosed in brackets, such as [12..23], which indicates any number from 12 to 23. |
|
as-path as-path substitute whole-match |
Replaces the AS number of the peer specified in the AS_Path attribute with the local AS number in the case of whole-match. |
as-path: indicates the AS_Path, enclosed in single quotation marks, with every two neighboring AS numbers separated with a space. An AS_Path can include an AS number range enclosed in brackets, such as [12..23], which indicates any number from 12 to 23. |
|
Action Clauses |
Function |
Parameters |
Commands Used to Apply Action Clauses |
---|---|---|---|
med { [ + | - ] med | igp-cost } |
Sets a value for the MED attribute of BGP routes. |
+: increases the MED value. -: decreases the MED value. med: indicates an integer ranging from 0 to 4294967295. When + or - is specified, med indicates the value to be increased or reduced by. igp-cost: enables a device to use the cost of each received IGP route as the MED of the BGP route to be advertised to BGP peers. |
The igp-cost parameter is invalid in following commands:
|
local-preference [ + | - ] local-preference |
Sets the Local_Pref attribute for BGP routes. The larger the value, the higher the priority. |
local-preference: indicates the BGP route Local_Pref value, which is an integer ranging from 0 to 4294967295. +: increases the BGP route Local_Pref value. -: decreases the BGP route Local_Pref value. |
|
preferred-value preferred-value |
Sets the PrefVal attribute for BGP routes. During route selection, the BGP route with the largest PrefVal is preferred. |
preferred-value: indicates the BGP PrefVal attribute. The value is an integer ranging from 0 to 65535. |
|
origin origin-type |
Sets the origin type for BGP routes. |
origin-type indicates the BGP route origin, which can be any of the following items:
|
|
Action Clauses |
Function |
Parameters |
Commands Used to Apply Action Clauses |
---|---|---|---|
dampening half-life reuse suppress max-suppress |
Sets dampening parameters for BGP routes. |
half-life: indicates the half life of reachable routes. The value is an integer ranging from 1 to 45, in minutes. reuse: indicates a threshold for the routes to be unsuppressed. The threshold is an integer ranging from 1 to 20000. When the penalty value of a route falls below the threshold, the route is reused. suppress: indicates the threshold for the routes to be suppressed. The threshold is an integer ranging from 1 to 20000 and must be greater than reuse. When the penalty value of a route exceeds the threshold, the route is suppressed. max-suppress: indicates the maximum penalty value. The value is an integer ranging from 1001 to 20000 and must be greater than suppress. |
|
group group-name |
Sets a QPPB configuration group for the BGP route. |
group-name: indicates the name of a QPPB configuration group. The value is a string of 1 to 200 case-sensitive characters, spaces and question marks are not supported. The string can contain letters, digits, underscores (_), hyphens (-), and dots (.). It must start with a letter or digit. |
Action Clauses |
Function |
Parameters |
Commands Used to Apply Action Clauses |
---|---|---|---|
ospf-cost [ + | - | inherit ] ospf-cost |
Sets a value for the cost of OSPF routes. |
+: increases the cost value. -: decreases the cost value. inherit-cost: inherits the costs of the routes. ospf-cost: indicates an integer ranging from 0 to 4294967295. |
|
isis-cost [ + | - | inherit ] isis-cost |
Sets a value for the cost of IS-IS routes. |
+: increases the cost value. -: decreases the cost value. inherit-cost: inherits the costs of the routes. isis-cost: indicates an integer ranging from 0 to 4294967295. |
|
rip-cost [ + | - ] rip-cost |
Sets a value for the cost of RIP routes. |
+: increases the cost value. -: decreases the cost value. rip-cost: indicates the cost of RIP routes. The value is an integer ranging from 0 to 16. |
|
isis isis-level-type |
Sets the level of the routes imported by IS-IS. |
isis-level-type can be any of the following items:
|
|
ospf ospf-sub-type |
Imports routes to a specified OSPF area. |
ospf-sub-type can be either of the following items:
|
None |
tag tag |
Sets a tag for IGP routes. |
tag: indicates the tag of IGP routes. The value is an integer ranging from 0 to 4294967295. |
|
rip-tag rip-tag |
Sets a tag for RIP routes. |
rip-tag: indicates the tag of RIP routes. The value is an integer ranging from 0 to 65535. |
Action Clauses |
Function |
Parameters |
Commands Used to Apply Action Clauses |
---|---|---|---|
extcommunity rt { rt-list-name | rt-list } overwrite |
Overwrites the original RT with the specified RT. |
rt-list-name: indicates the name of a route target set. The value is a string of 1 to 200 case-sensitive characters, spaces and question marks are not supported. The string can contain letters, digits, underscores (_), hyphens (-), and dots (.). It must start with a letter or digit. rt-list: indicates the route target set in the format of {element, element...}. The elements can be expressed in any of the following formats:
|
|
extcommunity rt { rt-list-name | rt-list } additive |
Adds the specified RT to the original RT. |
rt-list-name: indicates the name of a route target set. The value is a string of 1 to 200 case-sensitive characters, spaces and question marks are not supported. The string can contain letters, digits, underscores (_), hyphens (-), and dots (.). It must start with a letter or digit. rt-list: indicates the route target set in the format of {element, element...}. The elements can be expressed in any of the following formats:
|
|
extcommunity rt in { rt-list-name | rt-list } delete |
Deletes the RTs that are contained in the specified route target set. |
rt-list-name: indicates the name of a route target set. The value is a string of 1 to 200 case-sensitive characters, spaces and question marks are not supported. The string can contain letters, digits, underscores (_), hyphens (-), and dots (.). It must start with a letter or digit. rt-list: indicates the route target set in the format of {element, element...}. The elements can be expressed in any of the following formats:
|
None |
extcommunity rt not in { rt-list-name | rt-list } delete |
Deletes the RTs that are not contained in the specified route target set. |
rt-list-name: indicates the name of a route target set. The value is a string of 1 to 200 case-sensitive characters, spaces and question marks are not supported. The string can contain letters, digits, underscores (_), hyphens (-), and dots (.). It must start with a letter or digit. rt-list: indicates the route target set in the format of {element, element...}. The elements can be expressed in any of the following formats:
|
None |
extcommunity rt none |
Deletes all RTs from VPN routes. |
- |
None |
Action Clauses |
Function |
Parameters |
Commands Used to Apply Action Clauses |
---|---|---|---|
extcommunity soo { soo-list-name | soo-list } overwrite |
Overwrites the original SoO with the specified SoO. |
soo-list-name: indicates the name of an SoO set. The value is a string of 1 to 200 case-sensitive characters, spaces and question marks are not supported. The string can contain letters, digits, underscores (_), hyphens (-), and dots (.). It must start with a letter or digit. soo-list: indicates the SoO set in the format of {element A, element B...}. The elements can be expressed in any of the following formats:
|
|
extcommunity soo { soo-list-name | soo-list } additive |
Adds the specified SoO to the original SoO. |
soo-list-name: indicates the name of an SoO set. The value is a string of 1 to 200 case-sensitive characters, spaces and question marks are not supported. The string can contain letters, digits, underscores (_), hyphens (-), and dots (.). It must start with a letter or digit. soo-list: indicates the SoO set in the format of {element A, element B...}. The elements can be expressed in any of the following formats:
|
|
extcommunity soo in { soo-list-name | soo-list } delete |
Deletes the SoOs that are contained in the specified SoO set. |
soo-list-name: indicates the name of an SoO set. The value is a string of 1 to 200 case-sensitive characters, spaces and question marks are not supported. The string can contain letters, digits, underscores (_), hyphens (-), and dots (.). It must start with a letter or digit. soo-list: indicates the SoO set in the format of {element A, element B...}. The elements can be expressed in any of the following formats:
|
NOTE:
The preceding commands can be run, but their configurations do not take effect. |
extcommunity soo not in { soo-list-name | soo-list } delete |
Deletes the SoOs that are not contained in the specified SoO set. |
soo-list-name: indicates the name of an SoO set. The value is a string of 1 to 200 case-sensitive characters, spaces and question marks are not supported. The string can contain letters, digits, underscores (_), hyphens (-), and dots (.). It must start with a letter or digit. soo-list: indicates the SoO set in the format of {element A, element B...}. The elements can be expressed in any of the following formats:
|
NOTE:
The preceding commands can be run, but their configurations do not take effect. |
extcommunity soo none |
Deletes all SoOs from VPN routes. |
- |
NOTE:
The preceding commands can be run, but their configurations do not take effect. |
Action Clauses |
Function |
Parameters |
Commands Used to Apply Action Clauses |
---|---|---|---|
extcommunity redirect ip ip-extcommunity-value |
Sets the IP redirection extended community attribute for BGP routes. |
ip-extcommunity-value: indicates the IP redirection extended community attribute in the format of ip-address:nn, in which ip-address is in dotted decimal notation and nn is 0 or 1. |
|
extcommunity redirect vpn-target vpnrt-extcommunity-value |
Sets the VPN redirection extended community attribute for BGP routes. |
vpnrt-extcommunity-value: indicates the VPN redirection extended community attribute in the format of as-number:nn, in which as-number is an AS number with the value being an integer ranging from 0 to 65535 and nn is an integer ranging from 0 to 4294967295. |
|
Action Clauses |
Function |
Parameters |
Commands Used to Apply Action Clauses |
---|---|---|---|
extcommunity color extcommunityvalue |
Sets a color extended community attribute for BGP routes matching specified filtering rules. |
extcommunityvalue: The value is in the format of color flag:4-byte user-defined number. For example, the value can be set to 0:100. Currently, the color flag can only be 0, and the user-defined number ranges from 1 to 4294967295. |
Action Clauses |
Function |
Parameters |
Commands Used to Apply Action Clauses |
---|---|---|---|
extcommunity bandwidth bandwidth-extcommunity-value overwrite |
Sets a link bandwidth extended community attribute for BGP routes. |
bandwidth-extcommunity-value: The value is in the format of 2-byte AS number:4-byte user-defined number, for example, 1:100. The 2-byte AS number ranges from 1 to 65535. You can also enter the special value as-trans, which indicates that the 2-byte AS number is 23456. The user-defined number indicates the link bandwidth and ranges from 1 to 4294967295, in kbit/s. |
|
extcommunity bandwidth none |
Deletes the link bandwidth extended community attribute set for BGP routes. |
- |
|
extcommunity bandwidth aggregate limit bandwidth-value |
Specifies the maximum value of the bandwidth extended community attribute. |
bandwidth-value: specifies the link bandwidth. The value is an integer that ranges from 1 to 4294967295, in kbit/s. |
|
extcommunity bandwidth aggregate |
Specifies the aggregated bandwidth extended community attribute for BGP routes. |
- |
|