Route Maps
Information About Route Maps
Route maps are used when redistributing routes into an OSPF, RIP, EIGRP or BGP routing process. They are also used when generating a default route into an OSPF routing process. A route map defines which of the routes from the specified routing protocol are allowed to be redistributed into the target routing process.
Route maps have many features in common with widely known ACLs. These are some of the traits common to both:
- They are an ordered sequence of individual statements, each has a permit or deny result. Evaluation of ACL or route maps consists of a list scan, in a predetermined order, and an evaluation of the criteria of each statement that matches. A list scan is aborted once the first statement match is found and an action associated with the statement match is performed.
- They are generic mechanisms—Criteria matches and match interpretation are dictated by the way that they are applied. The same route map applied to different tasks might be interpreted differently.
These are some of the differences between route maps and ACLs:
- Route maps frequently use ACLs as matching criteria.
- The main result from the evaluation of an ACL is a yes or no answer—An ACL either permits or denies input data. Applied to redistribution, an ACL determines if a particular route can (route matches ACLs permit statement) or can not (matches deny statement) be redistributed. Typical route maps not only permit (some) redistributed routes but also modify information associated with the route, when it is redistributed into another protocol.
- Route maps are more flexible than ACLs and can verify routes based on criteria which ACLs can not verify. For example, a route map can verify if the type of route is internal.
- Each ACL ends with an implicit deny statement, by design convention; there is no similar convention for route maps. If the end of a route map is reached during matching attempts, the result depends on the specific application of the route map. Fortunately, route maps that are applied to redistribution behave the same way as ACLs: if the route does not match any clause in a route map then the route redistribution is denied, as if the route map contained deny statement at the end.
The dynamic protocol redistribute command allows you to apply a route map. In ASDM, this capability for redistribution can be found when you add or edit a new route map (see Defining a Route Map). Route maps are preferred if you intend to either modify route information during redistribution or if you need more powerful matching capability than an ACL can provide. If you simply need to selectively permit some routes based on their prefix or mask, we recommend that you use a route map to map to an ACL (or equivalent prefix list) directly in the redistribute command. If you use a route map to selectively permit some routes based on their prefix or mask, you typically use more configuration commands to achieve the same goal.
Note You must use a standard ACL as the match criterion for your route map. Using an extended ACL will not work, and your routes will never be redistributed. We recommend that you number clauses in intervals of 10 to reserve numbering space in case you need to insert clauses in the future.
This section includes the following topics:
Permit and Deny Clauses
Route maps can have permit and deny clauses. In the route-map ospf-to-eigrp command, there is one deny clause (with sequence number 10) and two permit clauses. The deny clause rejects route matches from redistribution. Therefore, the following rules apply:
- If you use an ACL in a route map using a permit clause, routes that are permitted by the ACL are redistributed.
- If you use an ACL in a route map deny clause, routes that are permitted by the ACL are not redistributed.
- If you use an ACL in a route map permit or deny clause, and the ACL denies a route, then the route map clause match is not found and the next route-map clause is evaluated.
Match and Set Clause Values
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 information that will be redistributed into the target protocol.
For each route that is being redistributed, the router first evaluates the match criteria of a clause in the route map. If the match criteria succeed, then the route is redistributed or rejected as dictated by the permit or deny clause, and some of its attributes might be modified by the values set from the Set Value tab in ASDM or from the set commands. If the match criteria fail, then this clause is not applicable to the route, and the software proceeds to evaluate the route against the next clause in the route map. Scanning of the route map continues until a clause is found whose match command(s), or Match Clause as set from the Match Clause tab in ASDM, match the route or until the end of the route map is reached.
A match or set value in each clause can be missed or repeated several times, if one of these conditions exists:
- If several match commands or Match Clause values in ASDM are present in a clause, all must succeed for a given route in order for that route to match the clause (in other words, the logical AND algorithm is applied for multiple match commands).
- If a match command or Match Clause value in ASDM refers to several objects in one command, either of them should match (the logical OR algorithm is applied). For example, in the match ip address 101 121 command, a route is permitted if ACL 101 or ACL 121 permits it.
- If a match command or Match Clause value in ASDM is not present, all routes match the clause. In the previous example, all routes that reach clause 30 match; therefore, the end of the route map is never reached.
- If a set command, or Set Value in ASDM, is not present in a route map permit clause, then the route is redistributed without modification of its current attributes.
Note Do not configure a set command in a route map deny clause because the deny clause prohibits route redistribution—there is no information to modify.
A route map clause without a match or set command, or Match or Set Value as set on the Match or Set Value tab in ASDM, performs an action. An empty permit clause allows a redistribution of the remaining routes without modification. An empty deny clause does not allows a redistribution of other routes (this is the default action if a route map is completely scanned, but no explicit match is found).
BGP Match and BGP Set Clauses
In addition to the match and set values described above, BGP provides additional match and set capabilities to route maps.
The following new route-map match clauses are now supported with BGP:
The following new route-map set clauses are now supported with BGP:
For each BGP route that is being redistributed, the ASA first evaluates the BGP match criteria of a clause in the route map. If the BGP match criteria succeeds, then the route is redistributed or rejected as dictated by the permit or deny clause, and some of its attributes might be modified by the values set from the BGP Set Clause tab in ASDM or from the set commands. If the match criteria fail, then this clause is not applicable to the route, and the software proceeds to evaluate the route against the next clause in the route map. Scanning of the route map continues until a clause is found whose match command(s), as set from the BGP Match Clause tab in ASDM, match the route or until the end of the route map is reached.
Licensing Requirements for Route Maps
|
|
---|---|
Guidelines and Limitations
This section includes the guidelines and limitations for this feature.
Supported in single context mode and multiple context mode.
Supported only in routed firewall mode. Transparent firewall mode is not supported.
Note BGP for IPv6 is not supported.
Route maps do not support ACLs that include a user, user group, or fully qualified domain name objects.
Defining a Route Map
You must define a route map when specifying which of the routes from the specified routing protocol are allowed to be redistributed into the target routing process.
To define a route map, enter the following command:
Customizing a Route Map
This section describes how to customize the route map and includes the following topics:
- Defining a Route to Match a Specific Destination Address
- Configuring the Metric Values for a Route Action
Defining a Route to Match a Specific Destination Address
To define a route to match a specified destination address, perform the following steps:
Detailed Steps
Configuring the Metric Values for a Route Action
If a route matches the match commands, then the following set commands determine the action to perform on the route before redistributing it.
To configure the metric value for a route action, perform the following steps:
Detailed Steps
Configuration Example for Route Maps
The following example shows how to redistribute routes with a hop count equal to 1 into OSPF.
The ASA redistributes these routes as external LSAs with a metric of 5 and a metric type of Type 1.
The following example shows how to redistribute the 10.1.1.0 static route into eigrp process 1 with the configured metric value:
Feature History for Route Maps
Table 28-1 lists each feature change and the platform release in which it was implemented.