"AND" and "OR" operations in a route-map

Unanswered Question
Mar 2nd, 2009


The single match statement creates “OR” condition. For “AND”, it requires two separate commands.

route-map L3andVZB-Down permit 10

match ip address L3-FE-IP

match ip address VZ-DS3

The above will show up as single line when you do show run but “AND” operation will be used for match.

sh run


route-map L3andVZB-Down permit 10

match ip address L3-FE-IP VZ-DS3


So, in start up config, the route-map above will be listed as...

route-map L3andVZB-Down permit 10

match ip address L3-FE-IP VZ-DS3


...even though it was entered with two separate match statements.

My question is, when router reloads, how will it determine that it is suppose to perform "AND" operation on the route-map?



I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Harold Ritter Mon, 03/02/2009 - 10:40


Two matches of the same type create a OR condition. Two matches of different types create a AND condition.

So in your case, you can't have a AND condition if both matches are "ip address".


pkpatel Mon, 03/02/2009 - 10:44


Thanks for your comment. Actually, Cisco as well as I implimented and verified that the router was performing AND. The router I have is in production and cannot be re-loaded. Cisco TAC should be working on behavior after reload.

Thanks again,


Harold Ritter Tue, 03/03/2009 - 06:36


The normal behavior should definitely be a logical OR not a AND. Here is a simple example.

PE1#sh route-map

route-map test, permit, sequence 10

Match clauses:

ip address (access-lists): test1 test2

Set clauses:

Policy routing matches: 0 packets, 0 bytes

PE1#sh access-lists

Standard IP access list test1

permit (1 match)

Standard IP access list test2


PE1#sh runn | beg router bgp

router bgp 4

no synchronization

bgp log-neighbor-changes

neighbor remote-as 1

neighbor route-map test in

no auto-summary



ip access-list standard test1


ip access-list standard test2


route-map test permit 10

match ip address test1 test2

PE1#clear ip bgp * soft in

PE1#sh ip bgp

BGP table version is 2, local router ID is

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

r RIB-failure, S Stale

Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path

*> 0 0 1 i



pkpatel Tue, 03/03/2009 - 07:22

Hello Mr. Hitter,

You are correct. I stand corrected.

Thanks for your help with this,



This Discussion