From: ying chang (ying_c@xxxxxxxxxxx)
Date: Sat May 04 2002 - 22:46:54 GMT-3
Well, not quite. When you have multiple match statements but matching the
samething, the router will combine them and results in "OR":
r5(config)#route-map match10
r5(config-route-map)#match ip addr 10 <<<<--- match ip addr
r5(config-route-map)#match ip addr 11 <<<<--- another match ip addr
r5(config-route-map)#set weigh
r5(config-route-map)#set weight 200
r5(config-route-map)#^Z
r5#sh
12:50:13: %SYS-5-CONFIG_I: Configured from console by console
r5#sb route-map match10
route-map match10 permit 10
match ip address 10 11 <<<<----- will yield to match 10 OR 11
set weight 200
!
However if you are matching different things, then they will be "AND":
r5(config)#route-map match-both
r5(config-route-map)#match ip addr 10 <<<--- match ip addr
r5(config-route-map)#match ip next-hop 20 <<<--- match ip next-hop
r5(config-route-map)#set weight 300
r5(config-route-map)#^Z
r5#sb
12:52:55: %SYS-5-CONFIG_I: Configured from console by console
12:52:55: %SYS-5-CONFIG_I: Configured from console by console
route-map match-both permit 10
match ip address 10 <<<<<---- will yeild to match ip address
match ip next-hop 20 <<<<---- AND match ip next-hop
set weight 300
!
Hope this helps.
Chang
>From: "Nick Shah" <nshah@connect.com.au>
>Reply-To: "Nick Shah" <nshah@connect.com.au>
>To: "elpingu" <elping@acedsl.com>
>CC: <ccielab@groupstudy.com>
>Subject: Re: Match Statement in Route-map
>Date: Sun, 5 May 2002 10:29:16 +1000
>
>Ok, tell me how would you interpret this route map...
>
>route-map ABC permit 10
> match ip address 101
> match ip address 102
> set as-path prepend xxxx
>route-map ABC permit 20
>
>Wont these multiple match statements cause the route-map to compare the ip
>prefix in question to *both* the access lists and only if they match is the
>as-path prepended ? Thats how I understand it (correct me if I am wrong)
>
>If in doubt check Doyle Part I, page 812.
>
>Further proof of my understanding...
>
>http://127.0.0.1:8080/cc/td/doc/product/software/ios121/121cgcr/ip_c/ipcprt2
>/1cdindep.htm#xtocid2851338
>
>//snip//
>
>The following example redistributes OSPF intra-area and interarea routes
>with next hop routers on serial interface 0 into BGP with an INTER_AS
>metric
>of 5:
>
>router bgp 109
> redistribute ospf 109 route-map 10
>!
>route-map 10 permit
> match route-type internal
> match interface serial 0
> set metric 5
>
>
>//snip//
>
>*both* conditions should match (the route type must be intra area/inter
>area
>+ next hop out to serial0)
>
>Thanks
>Nick
>-----Original Message-----
>From: elpingu <elping@acedsl.com>
>To: Nick Shah <nshah@connect.com.au>
>Cc: ccielab@groupstudy.com <ccielab@groupstudy.com>
>Date: Saturday, 4 May 2002 3:42
>Subject: Re: Match Statement in Route-map
>
>
> >hey you might want to read carefully next time
> >
> >this is what you wrote
> >
> >"so CCO says if one condition doesnt match, route is ignored, that will
>be
>an
> >AND operation."
> >
> >your statement is true and it would be an AND due to "one condition
>doesnt
> >match, route is ignored" but that is not what CCO says ..that is what
>you
> >wrote
> >
> >
> >this is what CCO says
> >"Any route that does not match at least one match clause relating to a
> >route-map command will be ignored;"
> >
> >This statement is an OR due to "at least one match"
> >
> >Ping
> >
> >
> >Nick Shah wrote:
> >
> >> well, it would certainly mean an AND operation, wont it ?
> >>
> >> for eg.
> >>
> >> if xyz matches conditionB....
> >> & xyz matches conditionB
> >> set clauses .....
> >>
> >> so CCO says if one condition doesnt match, route is ignored, that will
>be
>an
> >> AND operation.
> >>
> >> Nick
> >> ----- Original Message -----
> >> From: "elpingu" <elping@acedsl.com>
> >> To: "Krishnan Narayanan" <krishnan.narayanan@cwgoindia.com>
> >> Cc: <ccielab@groupstudy.com>
> >> Sent: Friday, May 03, 2002 12:38 PM
> >> Subject: Re: Match Statement in Route-map
> >>
> >> > you know ....always have read it as an OR clause.
> >> > read below from cco
> >> >
> >> > . Any route that does not match at least one match clause relating to
>a
> >> route-map command will be ignored;
> >> >
> >> > just to be sure i get it right .....I make two route maps to refer to
>my
> >> clauses.
> >> >
> >> > Ping
> >> >
> >> > Krishnan Narayanan wrote:
> >> >
> >> > > If I have multiple match statements in a route-map ,is an AND
>operation
> >> performed or an OR opertion done ?
> >> > >
> >> > > Thanks
> >> > > KRis.
This archive was generated by hypermail 2.1.4 : Thu Jun 13 2002 - 10:58:50 GMT-3