06-01-2017
08:01 PM
- last edited on
03-05-2019
08:38 AM
by
NikolaIvanov
Greetings!
I'm stumped and it's probably something really simple. Is it possible to send a community for ONLY the 199.199.199.1/32 subnet in the BGP update to R2?

When R2 receives the update with the community, it applies the set to the attribute. Using Wireshark I see that the community field comes before the advertised networks. For example, I want to set local pref for 199.199.199.1/32 to be 200. I look at R2 and see that the local pref for both 199.199.199.1/32 and 200.200.200.1/32 is 200. I understand that when the device looks at the ACL and the Route Map it goes top down and it continues with the first match it sees then applies that community to the whole update.
Is there a way to either send multiple communities to a peer OR apply the community to just one subnet?
Thanks!
Mike
06-01-2017 08:17 PM
Hi
Yes you can, you could use route-map
for example
ip prefix-list TEST seq 5 permit 199.199.199.1/32
route-map COMMUNITY permit 5
match ip address prefix TEST
set community local-as
route-map COMMUNITY permit 100
router bgp 100
neighbor 10.1.1.2 remote 200
neighbor 10.1.1.2 route-map COMMUNITY out
neighbor 10.1.1.2 send-community both
06-01-2017 08:17 PM
Wow, that was fast! This is a great.... wait for it..... community! hahaha I crack myself up.
I don't think I've used ip prefix before. Let me research that and give it a shot. Thanks Julio!
06-01-2017 08:33 PM
Lol :-)
You are welcome, if you want to add a local preference you can use the similar config or add it to the current route-map
route-map COMMUNITY permit 5
match ip address prefix TEST
set community local-as
set local-preference 200 <-- it could be advertised to an iBGP peer
route-map COMMUNITY permit 100
Note: remember have an empty route-map because if you dont configure that everything could be blocked because the route-map has an implicit deny at the bottom.
:-)
06-01-2017 08:38 PM
*buries face in hands*
I knew it was something simple. I forgot about the implicit deny!!! GRRRRR!!!!!! Julio, I owe you dinner. Come to CO and beers are on me! Thanks again man! I owe ya!
Mike
06-01-2017 08:48 PM
yeahh!!
It was a pleasure my friend, have a great day!
If you have any doubt or need any assistance please don't hesitate to contact me.
cheers
:-)
06-01-2017 08:33 PM
oops
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide