[c-nsp] (BGP)Route-maps: Matching several communities,
all of them must be fulfilled *at the same time*
Gunther Stammwitz
gstammw at gmx.net
Sun Aug 28 17:40:19 EDT 2005
Hello colleagues,
I'm currently trying to implement a route-map where several communities at
the same time must be fulfilled in order to "fit" the match-statement.
I'm only going to announce routes to my upstreams that are from within my
network. All those routes are being tagged with the community 123:40100. At
the same time I'm allowing my customers to set communities in order to
prepend a upstream once or twice by setting 123:32001 or 123:32002.
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?
The config looks like this:
#All own routes are being tagged with 123:40100
ip community-list myownroutes seq 5 permit 123:40100
# If the customer sets 123:32001 then prepend once
ip community-list UPSTREAM-prepend1 seq 5 permit 123:32011
# If the customer sets 123:32002 then prepend twice
ip community-list UPSTREAM-prepend1 seq 5 permit 123:32012
#
# Now I'd need something like an "and"....
Route-map upstream-out permit 5
match community myownroutes & UPSTREAM-prepend1
set as-path prepend 123
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?
What are your ideas and what's the best practice?
Regards,
Gunther
More information about the cisco-nsp
mailing list