Route Map Operation

• A list of statements constitutes a route map.

• The list is processed top-down like an access list.

• The first match found for a route is applied.

• The sequence number is used for inserting or deleting specific route map statements.

route-map my_bgp permit 10 { match statements } { match statements } { set statements } { set statements } route-map my_bgp deny 20

route-map my_bgp permit 30

Route maps operate in a manner similar to ACLs. When determining which routes will be redistributed from one protocol to the next, the router checks each route against the route map, beginning with the top line.

Each line is sequence-numbered, both for top-down processing purposes and for editing purposes. Lines can be added or removed from a route map as changes are required.

Each line has a permit or deny statement. If a route is matched in the matching statements and the line statement is "permit," then the router sets the metrics or other defined conditions and permits the redistribution of that route. The route map stops processing at the first match.

If the packet is matched and the route map line is "deny," then the router stops at the matched line in the map and does not redistribute that route. Routes are filtered by this method.

Routes are checked from line to line looking for a match. If there is no match and the bottom of the route map is reached, then the router denies the route from being redistributed. There is always an implicit deny at the end of a route map.

© 2006 Cisco Systems, Inc. Manipulating Routing Updates 5-49

Matching statements in a route map can be complex. Multiple match criteria in the same line are processed with OR logic. Separate match criteria can also be applied vertically under a route map line. In this case, each match uses AND logic.

A route map may consist of multiple route map statements. The statements are processed top down, like an ACL. The first match found for a route is applied. The sequence number is used for inserting or deleting specific route map statements in a specific place in the route map.

The match route map configuration commands define the conditions to be checked. The set route map configuration commands define the actions that you should follow if there is a match.

The single-match statement may contain multiple conditions. At least one condition in the match statement must be true to consider the statement a match (logical OR). A route map statement may contain multiple-match statements. All match statements in the route map statement must be true to consider the route map statement a match (logical AND).

The sequence number specifies the order in which conditions are checked. For example, if there are two statements in a route map named MYMAP, one with sequence 10 and the other with sequence 20, sequence 10 is checked first. If the match conditions in sequence 10 are not met, then sequence 20 is checked.

Like an ACL, there is an implicit deny any at the end of a route map. The consequences of this deny depend on how the route map is used.

5-50

Building Scalable Cisco Internetworks (BSCI) v3.0

© 2006 Cisco Systems, Inc.

Was this article helpful?

0 0

Post a comment