cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
759
Views
10
Helpful
6
Replies

BGP community on one subnet

Not applicable

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

6 Replies 6

Julio E. Moisa
VIP Alumni
VIP Alumni

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




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

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!

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.

:-)




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

*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

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

:-)




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

Not applicable

oops