Configure Route Maps
You can use route maps for a variety of purposes, with some routing protocols supporting more uses than others. The most typical use is to fine-tune route redistribution into another routing protocol.
Route Map Permit and Deny Clauses
A route map consists of one or more permit or deny clauses. The sequence of these clauses matter: routes are evaluated against the map top-down, first match wins. If a route does not match any clause, it is considered to not match the route map.
Each permit clause can contain zero or more match and set statements. The match statement determines which routes match the clause, whereas the set statements modify some characteristic of the routes, such as the route metric. You do not need any set statements: you can match a route for redistribution (or another service) without changing the routes in any way.
Each deny clause can contain zero or more match statements. But, because “denied” routes simply do not match the route map, it is pointless to include set clauses, because the set action cannot be applied.
Route Map Match and Set Statements
Each route map clause has two types of values:
-
A match value selects routes to which this clause should be applied.
-
A set value modifies some attribute of the routes.
For example, for each route that is being redistributed, the router first evaluates the match criteria of a clause in the route map. If the route matches the criteria, then the route is redistributed or rejected as dictated by the permit or deny clause. For matches to permit clauses, some of the route's attributes might be modified by the values from the set commands. If the route does not match the criteria, then this clause is not applicable to the route, and the system proceeds to evaluate the route against the next clause in the route map. Scanning of the route map continues until a clause is found that matches the route or until the end of the route map is reached. If there are no matches, the route is considered to not match the route map (equivalent to a deny action).
For the match and set statements in a single clause:
-
Multiple match statements are ANDed. That is, a route must satisfy each statement to match the clause.
-
Multiple values within a single match statement are ORed. That is, if a route matches any value within that match statement, it is considered to match the statement as a whole.
-
If there are no match statements, all routes match the clause.
-
If there are no set statements in a route map permit clause, then the feature (such as redistribution) is applied to the route without modification of the route's current attributes.
-
Any set statements in a deny clause are ignored. “Denied” routes simply do not match the route map, so it is pointless to include set clauses, because the set action cannot be applied.
-
An empty clause, one with no match or set statements, matches any routes that have not been matched by earlier clauses. For example:
-
An empty permit clause allows the redistribution of the remaining routes without modification.
-
An empty deny clause does not allow the redistribution of the remaining routes. This is the default action if a route map is completely scanned, but no explicit match is found.
-
Configure a Route Map
You can use route maps for a variety of purposes, with some routing protocols supporting more uses than others. The most typical use is to fine-tune route redistribution into another routing protocol.
A route map consists of one or more permit or deny clauses. The sequence of these clauses matter: routes are evaluated against the map top-down, first match wins. If a route does not match any clause, it is considered to not match the route map.
Each permit clause can contain zero or more match and set statements. The match statement determines which routes match the clause, whereas the set statements modify some characteristic of the routes, such as the route metric. You do not need any set statements: you can match a route for redistribution (or another service) without changing the routes in any way.
Each deny clause can contain zero or more match statements. But, because “denied” routes simply do not match the route map, it is pointless to include set clauses, because the set action cannot be applied.
For a detailed explanation of how match and set statements are evaluated, carefully read Route Map Match and Set Statements.
始める前に
You can use a variety of other objects in a route map to define match criteria, such as access lists, AS path access lists, community lists, policy lists, and prefix lists. You must create these objects before you create the route map.
For ACL matching, you can use standard or extended ACLs for IPv4 addresses, but extended ACLs only for IPv6. Because the match clauses are based on IPv4 or IPv6 only, ensure your ACLs have the correct address scheme for the match statements.
Also note that the match and set criteria are different for BGP compared to the other routing protocols. Ensure you select the correct match/set criteria for the routing process that will use the route map.
手順
ステップ 1 |
Click View Configuration in . |
ステップ 2 |
Select in the table of contents. |
ステップ 3 |
次のいずれかを実行します。
参照されていないオブジェクトを削除するには、オブジェクトの [ごみ箱(trash can)] アイコン()をクリックします。 |
ステップ 4 |
Select Route Map as the CLI Template. |
ステップ 5 |
Enter a Name for the Smart CLI object. Note that this name is also entered as the route map name in the first line of the CLI template (in the route-map command). |
ステップ 6 |
Create the first clause: |
ステップ 7 |
Click Show Disabled and configure the match statements for the clause. |
ステップ 8 |
(Optional, permit clauses only.) For permitted, that is, matched routes, you can configure set statements to modify the route attributes. You do not need to modify routes; for example, you can redistribute them unchanged. |
ステップ 9 |
Add permit/deny clauses to complete the route map. To add a clause, click permit or deny line. A new redistribution sequence-number clause is added immediately after the clause for which you click the Duplicate command. to the left of aAlthough route map clauses are evaluated in the order of the sequence number rather than the order the appear in the object, it is easier to edit your object if you insert new clauses in sequential order. You cannot move the clauses within the object. Note that duplicating a clause simply inserts a new, empty clause, with no pre-configured characteristics. After creating the “duplicate,” proceed as explained above to configure it for your needs. |
ステップ 10 |
Click OK to save the object. You can now use the object in a routing process configuration, or in a FlexConfig object, for a feature that requires a route map. |