[c-nsp] Cisco Route Map Strangeness

Craig Whitmore lennon at orcon.net.nz
Tue Mar 3 02:40:13 EST 2015


Hi there.

 

I am trying to compare a BGP Community to Add another and filtering all the
rest before sending upstream

 

ip community-list expanded ALLOWED_COMMUNITIES_UPSTREAM deny 11111:666   #
Only Allow this Community to go out can be changed to 11111:(666|1..) etc to
allow others

ip community-list expanded ALLOWED_COMMUNITIES_UPSTREAM permit .*

ip community-list expanded ISP-RTBH permit 22222:666

 

route-map UPSTREAM-OUT permit 10

match community ISP-RTBH

continue

set community 11111:666 additive

!

Route-map UPSTREAM-OUT permit XXX # other matches on other communities.

!

route-map UPSTREAM-OUT permit 100

set comm-list ALLOWED_COMMUNITIES_UPSTREAM delete

 

 

The permit 10 works by itself and the permit 20 works by itself but it does
not seem to do both L

 

Route marked with 22222:666

Compare this and if matches add in 11111:6666

And then delete all other communities which we shouldn't be sending to an
Upstream

 


Permit 10 works by itself 22222:666 in -> 22222:666 11111:666 out 

Permit 20 works by itself 22222:666 in -> it filters it all out correctly.

 

But permit 10 and then permit 20 with the continue I get 22222:666 11111:666
out L 

 

I also have other UPSTREAM-OUT lines comparing other Communities after 10 so
I can't just do it without the additive as it will have nothing to match on
later on.

 

Am I doing something wrong or is there a better way to add a community with
a match and then delete all the rest.

 

 

 

 

 

 

 

 

 

 



More information about the cisco-nsp mailing list