Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

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

Hello,

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?

Thanks,

Paresh.

4 REPLIES
Cisco Employee

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

Paresh,

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".

Regards

Harold Ritter
Sr. Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México
New Member

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

Hello,

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,

Paresh.

Cisco Employee

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

Paresh,

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.1.1.1 (1 match)

Standard IP access list test2

permit 2.2.2.2

PE1#sh runn | beg router bgp

router bgp 4

no synchronization

bgp log-neighbor-changes

neighbor 192.168.14.1 remote-as 1

neighbor 192.168.14.1 route-map test in

no auto-summary

!

!

ip access-list standard test1

permit 1.1.1.1

ip access-list standard test2

permit 2.2.2.2

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 4.4.4.4

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

*> 1.1.1.1/32 192.168.14.1 0 0 1 i

PE1#

Regards

Harold Ritter
Sr. Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México
New Member

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

Hello Mr. Hitter,

You are correct. I stand corrected.

Thanks for your help with this,

Paresh.

128
Views
0
Helpful
4
Replies
CreatePlease to create content