cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
709
Views
0
Helpful
8
Replies

route-map

rajivrajan1
Level 3
Level 3

Is there any way to match same criteria and achieve a "AND" functionality in route-map?

like this

route-map xxx permit 10

match ip address prefix-list EQ

match ip address prefix-list BQ

when i do this it will go to same line like "match ip address prefix-list EQ BQ" and will do a "OR" operation.

Is there any other way i can achieve a "AND" ?

I found in a old post( link given below) as its impossible -

is there anyone using this ?

http://forum.cisco.com/eforum/servlet/NetProf?page=netprof&forum=Network%20Infrastructure&topic=WAN,%20Routing%20and%20Switching&CommCmd=MB%3Fcmd%3Dpass_through%26location%3Doutline@^1@@.2cd24c12

8 Replies 8

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Rajeev,

you can have an AND for match of different fields / attributes not for the same type of match

you could easily build impossible and conditions like

match ip prec 0 and match ip prec 5

so the IOS logic aggregates similar in one single entry with or of refenced ACLs.

create a new prefix-list that makes all the checks you want to do and use it

Hope to help

Giuseppe

hi Giuseppe ,

thnx a lot but can u pls explain how to do

" match ip prec 0 and match ip prec 5 "

is it posible to match ip prefix-list 1 & 2 ?

thnx a lot but can u pls explain how to do

" match ip prec 0 and match ip prec 5 "

How can a packet have both values within the 'ip precedence' field ?

__

Edison.

Hello Rajeev,

>> how to do

" match ip prec 0 and match ip prec 5 "

this is the point: it is impossible for an IP packet to satisfy both conditions

this was an example to explain why IOS behaves in this way

Hope to help

Giuseppe

jpoplawski
Level 1
Level 1

And operation should be done as follows:

route-map test permit 10

match ip add prefix-list test1 test2

set tag=13

What this means is the route-map can either match test1 or test2. Doing it the stacked way as you mentioned would mean it has to match both criteria.

If that's not working as expected, add another line in the sequence...IE

route-map test permit 10

match ip add prefix-list test1

set tag=13

route-map test permit 20

match ip add prefix-list test2

set tag=13

This way you're not confusing the and/or logic.

Hope this helps, rate if it does!

JB

hi JB and friends,

Thanks for the reply and support.

But JB,

when route-map matches the first sequence , it will exit ( or it will no more process the other sequences exactly like a access-list)

My requirement is an AND process of prefix-lists, like test 1 and test 2 should be matched and some advertisement should be done based on that in bgp.

if its what ur trying to explain ... can u please tell me how the above example will do that ..

it will be of great help if this solves my issue.

From what you described, you want one route to match both access-list/prefix-list? That should be the following:

route-map test permit 10

match ip add prefix-list test1

match tag 20

set tag=13

That should have the route-map match test1 and test2. It has to match both conditions before setting the tag of 13.

Hope this helps, rate if it does,

JB

hi,

Thnx JB for replying.

Requirement is like this:

For bgp conditional advertisement,i.e exist-map and advertise-map, I have to match multiple prefixes availability in bgp table.

So route map has to match multiple prefix lists ( either prefix list or access-list it has to match more than 5 networks in bgp table before start advertising to neighbor)

now route-map has to match multiple prefixes ( availability in bgp table).So i need a "AND" process of prefixes in a single route-map.

Hope u got the requirement.pls let me know in case of any confusions.

Review Cisco Networking for a $25 gift card