Configuring a Routing Map


A routing map can consist of multiple matching policies, multiple match rules and set-action actions.

Creating a matching-policy Clause

NOTE:

You should set at least one node to the permit mode in a routing policy; otherwise, all routes are filtered out.

The following example create a route map matching policy.

admin@Xorplus# set routing route-map GlobalMap order 1 matching-policy permit
admin@Xorplus# commit

(Optional) Configuring a match Clause

A match clause defines matching rules related to route filters and attributes in a routing policy.

If no match clause is configured for a node in a routing policy, routes match the routing policy in this node. If one or more match clauses are configured in a node, the relationship between the clauses is "AND". This means that a route matches this node only when they match all the match clauses in this node.

NOTE:

If a match clause defines a filter that is not configured, all routes match this match clause by default.

The command set routing route-map <route-map-name> order <NUMBER> match xx can be used for configure routing map match clause. PICOS supports most of the route filter parameters, for details about each match clause, see Route Map Commands.

The following commands configure a match clause in the route map to match the community list:

admin@Xorplus# set routing community-list standard COMMUNITY1 permit community 100:100
admin@Xorplus# set routing route-map GlobalMap order 10 match community COMMUNITY1
admin@Xorplus# set routing route-map GlobalMap order 10 matching-policy permit
admin@Xorplus# commit

(Optional) Configuring a set-action Clause

A set-action clause specifies the action of setting attributes for routes that have matched a routing policy node. If a node does not have a set-action clause configured, the node will only filter routes. If one or more set-action clauses are configured in a node, all the set-action clauses are applied to routes that have matched the node.

The command set routing route-map <route-map-name> order <NUMBER> set-action xx can be used for configure routing map set-action clause. PICOS supports to set most of the several route parameters, for details about each set-action clause, see Route Map Commands.

The following commands configure a match clause in the route map to match the community list and change the community value to 11:101:

admin@Xorplus# set routing community-list standard COMMUNITY1 permit community 100:100
admin@Xorplus# set routing route-map GlobalMap order 10 match community COMMUNITY1
admin@Xorplus# set routing route-map GlobalMap order 10 matching-policy permit
admin@Xorplus# set routing route-map GlobalMap order 10 set-action community 11:101
admin@Xorplus# commit

Checking the Configuration

Run the run show routing route-map command to check information about the route-policy. 

admin@Xorplus# run show routing route-map
ZEBRA:
route-map: GlobalMap Invoked: 0 Optimization: disabled Processed Change: false
 permit, sequence 10 Invoked 0
  Match clauses:
  Set clauses:
  Call clause:
  Action:
    Exit routemap
OSPF:
route-map: GlobalMap Invoked: 0 Optimization: disabled Processed Change: false
 permit, sequence 10 Invoked 0
  Match clauses:
  Set clauses:
  Call clause:
  Action:
    Exit routemap
BGP:
route-map: GlobalMap Invoked: 0 Optimization: disabled Processed Change: false
 permit, sequence 10 Invoked 0
  Match clauses:
    community COMMUNITY1
  Set clauses:
    community 11:101
  Call clause:
  Action:
    Exit routemap



Copyright © 2024 Pica8 Inc. All Rights Reserved.