route-map

Unanswered Question
Mar 26th, 2009
User Badges:
  • Bronze, 100 points or more

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


  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Giuseppe Larosa Thu, 03/26/2009 - 02:46
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

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


rajivrajan1 Thu, 03/26/2009 - 02:54
User Badges:
  • Bronze, 100 points or more

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 ?

Edison Ortiz Thu, 03/26/2009 - 07:07
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

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.

Giuseppe Larosa Thu, 03/26/2009 - 07:24
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

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 Thu, 03/26/2009 - 15:33
User Badges:
  • Bronze, 100 points or more

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

rajivrajan1 Fri, 03/27/2009 - 22:46
User Badges:
  • Bronze, 100 points or more

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.




jpoplawski Sat, 03/28/2009 - 08:36
User Badges:
  • Bronze, 100 points or more

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

rajivrajan1 Mon, 03/30/2009 - 04:39
User Badges:
  • Bronze, 100 points or more

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.



Actions

This Discussion