From: JOSE ANGEL MARTINEZ DE LA VARA (jamartinez@xxxxxxxxxxxxxxxx)
Date: Wed Feb 13 2002 - 14:20:04 GMT-3
Yes, I wass telling you the theory knowing that the ANd is implicit for
matches on different things. Looks like the AND only appears with matches on
different arguments (community and ip address, for example). Perhaps the
only way is the ip community-list. Try
http://www.cisco.com/univercd/cc/td/doc/product/software/ios121/121cgcr/ip_r
/iprprt2/1rdbgp.htm#xtocid30. In the example there you can find something
that could help you.
-----Mensaje original-----
De: Przemyslaw Karwasiecki [mailto:karwas@ifxcorp.com]
Enviado el: miircoles, 13 de febrero de 2002 18:01
Para: JOSE ANGEL MARTINEZ DE LA VARA
Cc: 'CCIELAB mailing list'
Asunto: RE: route-map logic
Look:
GTGUANOC7206x1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
GTGUANOC7206x1(config)#route-map test permit 10
GTGUANOC720(config-route-map)#match community IFX-5080-610
GTGUANOC720(config-route-map)#match community IFX-5080-620
GTGUANOC720(config-route-map)#^Z
GTGUANOC7206x1#sh run | beg route-map test
route-map test permit 10
match community IFX-5080-610 IFX-5080-620
!
And this is implied "OR"
:-(
Sorry, I have tried it already -- doesn't do "AND"
Przemek
On Wed, 2002-02-13 at 12:07, JOSE ANGEL MARTINEZ DE LA VARA wrote:
> Just use two match statements to get the AND.
>
> -----Mensaje original-----
> De: Przemyslaw Karwasiecki [mailto:karwas@ifxcorp.com]
> Enviado el: miircoles, 13 de febrero de 2002 17:52
> Para: JOSE ANGEL MARTINEZ DE LA VARA
> Cc: ccielab@groupstudy.com
> Asunto: RE: route-map logic
>
>
> This is true, but it yields to another question:
>
> How to use match community with "AND" operator?
>
> When you add "match community comm_name1 comm_name2"
> it implies "OR" operator between them.
>
> Do you know how to use "AND"?
>
> Or the only way is to build new set of communties lists
> which practically will be a product of both communities type....
>
> I have communities grouped into several classes:
> 1) Type of prefix -- (ours, customers, private peers, etc...)
> 2) Country of origin -- (geographical region)
> 3) Advertisment ctrl -- (how many times prepend to specific eBGP)
> 4) others... :-)
>
> I am just looking to find elegant way to build route map
> controlling advertisments to BGP peers, based on those
> communities.
>
> Przemek
>
> On Wed, 2002-02-13 at 11:34, JOSE ANGEL MARTINEZ DE LA VARA wrote:
> > Hi,
> >
> > I've never seen that and I can say many books asset when a match is
found
> > the route-map stops (completely with no continues available) for that
> match.
> > You can read it in the Documentation CD about IOS12.1 under ip routing
> > independent features where describes route-map behavior.
> >
> > Those things that make our route-maps impossible to write can be rebuilt
> in
> > such a way so it can be done. For example, you want to...:
> >
> > '... reject all routes not matching
> > some community, and continue execution of route map
> > for only those routes which hasn't been rejected.'
> >
> > But instead of rejecting the non-matching at the beginning (impossible
to
> > do), you can add the community match to the matches in the following
lines
> > of your route map. Then all routes not matching your community will be
> > denied at the end of your route-map.
> >
> > Sometimes looks tricky, but you have to think about 'the other way of
> doing
> > things'.
> >
> > Yaw.
> >
> > Jose Angel
> >
> > -----Mensaje original-----
> > De: Przemyslaw Karwasiecki [mailto:karwas@ifxcorp.com]
> > Enviado el: miircoles, 13 de febrero de 2002 16:53
> > Para: ccielab@groupstudy.com; cisco-nsp@puck.nether.net
> > Cc: Daniel Salama
> > Asunto: route-map logic
> >
> >
> > All,
> >
> > I am confused with Parkhust Appendix C (route-maps)
> >
> > Is it possible to build route-map which will do following:
> >
> > Select only routes matching certain communities, then
> > (only for those routes)
> > based on another comunity, do some route modifications?
> >
> >
> > In other words, how to reject all routes not matching
> > some community, and continue execution of route map
> > for only those routes which hasn't been rejected.
> >
> > Something like:
> >
> >
> > route-map eBGP_PROVIDER_X-OUT permit 10
> > description Prefixes from customers
> > match community CUSTOMERS_OR_OURS
> > continue with route map
> >
> > route-map eBGP_PROVIDER_X-OUT permit 20
> > description Do AS_PREPEND based on community
> > match communnity PROVIDER_X_1
> > set as-path prepend 65000
> >
> > route-map eBGP_PROVIDER_X-OUT permit 30
> > description Do AS_PREPEND based on community
> > match communnity PROVIDER_X_2
> > set as-path prepend 65000 65000
> >
> > ...
> >
> > Of course there is no "continue with route map" statement in IOS,
> > at least I don't know any statement like this.
> >
> > Any suggestions?
> > Am I totally spoiled with JunOS?
> >
> > Thanks,
> >
> > Przemek
> >
> > Sorry for crossposting, but I belive this problem is in scope
> > of both lists
This archive was generated by hypermail 2.1.4 : Thu Jun 20 2002 - 13:46:21 GMT-3