[c-nsp] (BGP)Route-maps: Matching several communities, all of
them must be fulfilled *at the same time*
Pete Templin
petelists at templin.org
Sun Aug 28 17:53:40 EDT 2005
Gunther Stammwitz wrote:
> The problem is that I have to combine both: only announce *my* routes to the
> upstreams but allow the customer to prepend at the same time. How can this
> be done?
> What is the best solution here (I don't want to use prefix lists at this
> stage)
> Maybe a community-list where I say
> ip community-list myownroutes-and-upstream-prepend1 seq 5 permit 123:40100
> ip community-list myownroutes-and-upstream-prepend1 seq 10 permit 123:32011
> and
> ip community-list myownroutes-and-upstream-prepend2 seq 5 permit 123:40100
> ip community-list myownroutes-and-upstream-prepend2 seq 10 permit 123:32012
> ... But does this really mean that *both conditions are met at the same
> time* or does it simply mean either one of the listed communities is set?
You'd have to do "permit 123:40100 123:32011" to accomplish your goal of
ANDing them together.
However, there's an easier way, assuming you have enough unique
communities that covering all potential combinations would be a
challenge. BGP policy-lists allow you to write the individual community
lists (i.e. "myownroutes", "prepend1", etc.), put each one into a
policy-list, then require multiple policy lists in a route map clause.
This creates an effective "AND" of the communities. This has helped me
get around the lack of outbound route-map continue support in the IOS
I'm using (many thanks to Jared for pointing me in this direction!).
pt
More information about the cisco-nsp
mailing list