Route maps support both IPv4 and IPv6 protocols, which includes RIP, RIPng, BGP, OSPFv2, and OSPFv3. You can only define BGP-4 Multiprotocol Extensions policy with route maps. For the other protocols, you can use route maps or the Route Redistribution and Inbound Route Filters features that you configure on the Portal.
Each route map includes a list of criteria and statements. You can apply route maps to inbound, outbound, or redistribution routes. Routes are compared to the match criteria, and all the actions defined in the criteria are applied to those routes which match all the criteria. You can set the match criteria in any order. If you do not define match criteria in a route map, the route map matches all routes.
You define route maps, then assign them to protocols for export or import policy for that protocol. Route maps override Portal based configuration.
To create a route map, use CLI commands to define a set of criteria that must be matched for the command to run. If the criteria are matched, then the system runs the actions you define. A route map is identified by a name and a number, an Allow or Restrict clause, and a collection of match and set statements.
There can be more than one instance of a route map (same name, different ID). The lowest numbered instance of a route map is checked first. Route map processing stops when all the criteria of a route map instance are matched, or all the instances of a route map are exhausted. If the criteria are matched, the actions in the section are run.
Routing protocols can use more than one route map when you set clear preference values for each. The applicable route map with lowest preference value is checked first.
To set a route map:
set routemap <rm_name> id {default | <1-65535>}
{on | off}
allow
inactive
restrict
Parameter |
Description |
---|---|
|
The name of the route map. |
|
Route map ID:
|
|
|
|
Allow routes that match the route map.
|
|
Temporarily disable a route map. To activate the route map, use the allow or restrict arguments. |
|
Do not allow routes that match the route map.
|
To configure actions for a routemap:
Note - Some statements have an effect on some protocols only.
The same parameter cannot appear both as a match and as an action statement in a route map. These include Community, Metric, and Nexthop.
set routemap <rm_name> id {default | <1-65535>} action
aspath-prepend-count <1-25>
community {append | replace | delete} {on | off}
community <1-65535> as <1-65535> {on | off}
community no-export {on | off}
community no-advertise {on | off}
community no-export-subconfed {on | off}
community none {on | off}
localpref <0-65535>
metric {add | subtract} <1-4294967295>
metric igp {add | subtract} <1-4294967295>
metric value <1-4294967295>
nexthop ip <ipv4_address>
nexthop ipv6 <ipv6_address>
precedence <0-65535>
preference <0-65535>
route-type {type-1 | type-2}
remove <action_name>
ospfautomatictag <0-4095>
ospfmanualtag <1-4294967295>
riptag <1-65535>
Parameter |
Description |
---|---|
|
Name of route map. |
|
Route map ID:
|
|
The number of times the local AS number is added to the beginning of the AS path. The number is added when routes which match the route map are advertised through BGP. Only applicable to BGP and export of routes with |
|
Operates on a BGP community string. You can form a community string with these community action statements: append, replace, or delete. The default operation is append. BGP only. If the action is set to If the action is set to append, then the given Community ID and AS number are added to the Communities attribute. See also:
|
|
A BGP community value. |
|
This also applies to Standalone Autonomous Systems that are not part of a Confederation. Only Applicable to BGP and export of routes with the |
|
This action only applies to BGP, and only to export of routes through the |
|
This action only applies to BGP and export of routes through the |
|
In action statement, this statement makes sense only if used with replace. This deletes all communities associated with a route so that the route has no communities associated with it. If is it used with append or delete, there is no operation. The CLI returns an error if you turn |
|
Set the local preference for BGP routes which match the route map. This action only applies to the BGP protocol, and only to route maps with the |
|
Increments the metric of matching routes by the given amount. This action only applies to:
This action otherwise has no effect. For example, in the import of OSPF/OSPFv3 routes from other routers. In export of routes to BGP, the range of the resulting values is 0-4294967295. In import of routes from RIP, the range of the resulting values is 1-65535. If the value is 16 or higher, the route is treated as unreachable and it is not installed in the kernel routing table. In import of routes from OSPF, the range of the resulting values is 0-65535. |
|
This action only applies in export of OSPF/OSPFv3 or RIP/RIPng routes to BGP with |
|
Sets the metric of matching routes to the given value. For RIP the metric is metric, for OSPF the metric is cost, and for BGP the metric is MED. The actual range is different for each protocol. In export to RIP or IPv6 RIP (RIPng), this action sets the RIP metric. The range of values is 1 - 65535, where 16 or larger shows that the route is unreachable. In export to OSPF or IPv6 OSPF (OSPFv3), this action sets the OSPF route cost. The range of values is 0 - 65535. In export to BGP, this action affects the BGP MED. The range of values is 0 - 4294967295. This action only applies to route maps with the |
|
Sets the IPv4 next hop address for routes that match this Route Map ID. This action only applies to import or export of BGP routes.
|
|
Sets the priority of the routes which match the route map ID. Use this setting to give priority to routes of one protocol over the other. The route with the lower value has priority. The other routes are shown as inactive and are not installed in the kernel. This action only applies to the See also:
|
|
Applies only to routes received through BGP advertisements. This is equivalent to the bgp weight (in Cisco terms) of the route. However, unlike Cisco, the route with the lower value has precedence. This value only applies to the local router. |
|
Type of OSPF external route. The metric type of AS External route is set to the specified value. Only applies when used with |
|
Remove the specified action from the route map. For community, it removes all community statements. Permitted values:
|
|
Creates an automatic tag for OSPF external routes that match the route map. This action only applies to export of non-OSPF routes into OSPF with |
|
Creates a manual tag for OSPF external routes that match the route map. This action only applies to export of non-OSPF routes into OSPF with |
|
Creates a RIP tag for external routes that match the given Route Map ID. This action only applies to export of non-RIP routes into RIP with |
To configure the route map criteria:
Note - Some statements have an effect on some protocols only. |
---|
set routemap <
rm_name> id {default | <1-65535>} match
as <1-65535> {on | off}
aspath-regex {regular_expression} | empty} origin {any | egp | igp | incomplete}
community
<1-65535> as <1-65535> {on | off}
exact {on | off}
no-export {on | off}
no-advertise {on | off}
no-export-subconfed {on | off}
none {on | off}
ifaddress <
interface_address> {on | off}
interface <
interface_name> {on | off}
metric value <0-4294967295>
neighbor <
ip_address> {on | off}
network <
network>/<
mask_length>
all [restrict]
exact [restrict]
refines [restrict]
between <
mask_length> and <
mask_length>[restrict]
off
nexthop <
ip_address> {on | off}
protocol <
protocol_name>
route-type {type-1 | type-2 | inter-area | intra-area} {on | off}
remove <
match condition name>
tag <
tag_name>
Parameter |
Description |
---|---|
|
Configures the route map to only match routes which are received from or advertised to the given BGP AS number. Applies to BGP only. You can configure multiple AS match conditions for a given route map ID. A match occurs when one of the AS conditions matches a given route. This match condition applies to both the |
|
Match the specified aspath regular expression. For BGP only. The regular expression can have only digits, metacharacters and Gaia Clish special characters.
Configures the route origin type for the match condition. This match condition applies to both |
|
Configures the route map to match the given BGP Community ID and Community AS number. This match condition applies to both If you configure multiple community match conditions under a given route map ID, then a given BGP route must match each condition to match the route map. |
|
Matches the communities in the route to the communities in the route map. If there is no exact clause, the route can have other community values related to it in addition to the ones in the route map. You can have multiple community statements in a route map to form a community string. The Community String(s) to be matched must be added to this Route Map ID with this command: set routemap <Route Map Name> id <Route Map ID> match\ community <Community-ID> as <AS-Number> on This match condition applies only to BGP, both for |
|
This option also applies to Standalone Autonomous Systems that are not part of a Confederation. This match condition applies only to BGP, both for |
|
This match condition applies only to BGP, both for |
|
For Confederations, routes with this value are not advertised to peers with a different Routing Domain Identifier. This match condition applies only to BGP, both for |
|
Matches an empty community string, namely, a route with no communities related to it. The CLI returns an error if you turn none on and other community values are already defined, or if none is defined and you add some other community value. This match condition applies only to BGP, both for |
|
Configures the route map to match the specified interface address. Value: an IPv4 or IPv6 interface address For example: 192.168.2.14 The given IP address is matched against the address of the interface which received the route. There can be multiple match conditions for interface address under the same route map ID. This type of match condition applies to route maps which are used with |
|
Match the route if the nexthop lies on the specified interface name. There can be multiple interface statements. |
|
Configures the route map to match routes with a specified metric. This match condition applies RIP, BGP, and OSPF. For RIP and IPv6 RIP (RIPng), this matches the RIP metric. The valid range of values is 1-65535. If the value is 16 or higher, the route is unreachable. For OSPF and IPv6 OSPF (OSPFv3), this value matches the route cost. The valid range of values is 0 - 65535. For BGP, this value matches the MED. The valid range of values is 0 - 4294967295. |
|
Configures the Route Map to match routes from the given neighbor. Value: an IPv4 or IPv6 network address For example: 192.168.2.14 This match rule only applies to BGP or RIP and only with You can configure multiple neighbor match conditions for a given route map ID. |
|
Configures the route map to match all routes which are equal to or contained within the specified IPv4 or IPv6 subnet. The subnet is expressed by CIDR notation. Examples: 192.168.2.0/24, fc00:1:2:3::/64 If restrict is specified, it prevents import or export of matching routes. |
|
Configures the route map to only match routes with the same prefix and mask length as the given IPv4 or IPv6 subnet. The subnet is expressed by CIDR notation. Examples: 192.168.2.0/24, fc00:1:2:3::/64 If restrict is specified, it prevents import or export of matching routes. |
|
Configures the route map to match routes which are contained within the given IPv4 or IPv6 subnet. Routes which match the given subnet exactly (namely, which have the same mask length) are excluded from the match. The subnet is expressed by CIDR notation. Examples: 192.168.2.0/24, fc00:1:2:3::/64 If restrict is specified, it prevents import or export of matching routes. |
|
Configures the Route Map to match routes that are within the given IPv4 or IPv6 subnet and which have a mask length that is between the given range of values. The subnet is expressed by CIDR notation Examples: 192.168.2.0/24, fc00:1:2:3::/64 If restrict is specified, it prevents import or export of matching routes. |
|
Deletes the network match statement. |
|
Configures the route map to match routes with a given IPv4 or IPv6 next hop gateway address. For example: 192.168.2.14 You can configure multiple next hop match conditions for a given route map ID. A match occurs if a next hop value matches a given route. This match only applies to BGP and only with |
|
Configures the route map to match routes of the given protocol type. Use this for route redistribution between protocols. <protocol_name>:
This match condition only applies to |
|
Configures the route map to match the given route type. This match condition applies only to If you define a route type of inter-area or intra-area, set the protocol match condition to ospf2. If you define a route type of type-1 or type-2, set the protocol match condition to ospf2ase. In the export of OSPF ASE routes to other protocols, if the metric match condition is set but the route type match condition is not set, it will try to match the metric value for both type-1 and type-2 routes. There can be multiple route type match conditions. Best Practice - Do not use this match condition simultaneously with the |
|
Removes the specified match condition from the routemap. If a match condition has multiple match statements (such as network, neighbor), this argument removes all of them. Permitted values:
|
tag <tag_name> |
Matches OSPF external routes with the given tag value. Value: 1 - 4294967295 You can add multiple tag match conditions to a given route map ID to broaden the range of matched tag values. Currently, you can only use this feature to export OSPF routes to BGP. |