Search This Blog

Friday, April 22, 2011

route-map match statement

route-map match statement

http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a008047915d.shtml

Route-Map Basics

This is a typical Open Shortest Path First to Enhanced Interior Gateway Routing Protocol (OSPF-to-EIGRP) route-map, applied in a redistribute command:
!
router eigrp 1
 redistribute ospf 1 route-map ospf-to-eigrp
 default-metric 20000 2000 255 1 1500

!--- Output suppressed.

!
route-map ospf-to-eigrp deny 10
 match tag 6
 match route-type external type-2
!
route-map ospf-to-eigrp permit 20
 match ip address prefix-list pfx
 set metric 40000 1000 255 1 1500
!
route-map ospf-to-eigrp permit 30
 set tag 8
!
There are several points to note from this example:
  • Route-map clauses are numbered. In this example, clauses have sequence numbers 10, 20, and 30. Sequence numbers allow you to do these actions:
    • Easily delete one specific clause but not affect other parts of the route-map.
    • Insert a new clause between two existing clauses.
    Cisco recommends that you number clauses in intervals of 10, to reserve numbering space in case you need to insert clauses in the future.
  • Route-maps can have permit and deny clauses. In route-map ospf-to-eigrp, there is one deny clause (with sequence number 10) and two permit clauses. The deny clause rejects route matches from redistribution. Therefore, these rules apply:
    • If you use an ACL in a route-map 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.
  • Each route-map clause has two types of commands:
    • match—Selects routes to which this clause should be applied.

No comments:

Post a Comment