Need to clear a route-map topic...

Unanswered Question
Aug 7th, 2008

route-map r1 permit 10

match ip address 1

match ip address 2

set next-hop 10.1.1.1

In reading the cisco bsci book, in order for the set command to take place.

Both acl 1 and 2 must match.

But the QA example in the book shows that it takes one match to set the next-hop.

In addition, the train signal bsci cbt shows the same thing.

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
4rmorris Fri, 08/08/2008 - 05:33

The statement as you entered them is a logical "OR" statement. I.e., it only has to match one of the access lists. In fact, if you paste your commands right into a router, the router adjusts them in the config as follows:

route-map r1 permit 10

match ip address 1 2

set ip next-hop 10.1.1.1

If you match different criteria (like ip address ACL, and then next hop), then both criteria must match (logical AN).

Also note you need the 'ip' keyword in the next-hop line.

Here's the details from the Cisco Doc site:

http://www.cisco.com/en/US/docs/ios/iproute/command/reference/irp_pi1.html#wp1013725

"Like matches in the same route map subblock are filtered with "or" semantics. If any one match clause is matched in the entire route map subblock, this match is treated as a successful match. Dissimilar match clauses are filtered with "and" semantics. So dissimilar matches are filtered logically. If the first set of conditions is not met, the second match clause is filtered. This process continues until a match occurs or there are no more match clauses."

Good luck,

Ryan

Actions

This Discussion