[j-nsp] Modifying BGP Community
bill fumerola
billf at mu.org
Fri Apr 11 19:22:08 EDT 2008
On Mon, Mar 17, 2008 at 12:22:48PM +0530, Jyotirmay Samanta wrote:
> Is there any option in Juniper to partially modify the community in a
> routing update?
i haven't looked if there's a better way of doing this (i don't have a
juniper lying around where i'm at right now...).
> Let me just give an example. Say router A got a route from router B with a
> community string 12345:67890 and when router A want to advertise this route
> to router C it should only change the last digit to 7 so the effective
> outbound community should be 12345:67897 .... and I need to do this(like
> changing the last digit only) for hundred different communities so a delete
> and add option is not viable, I need to find some modify option.
depending on how many permutations of the right hand side you have, you could
just write a script that generates one rule per-community
if 12345:6786[0-9] then delete [ 67860 67861 .... ], add 12345:67867
if 12345:6787[0-9] then delete [ .... ] add 12345:67877
if 12345:6788[0-9] then delete [ .... ] add 12345:67887
if 12345:6789[0-9] then delete [ .... ] add 12345:67897
scripting the generation of these rules is trivial. how much it'll impact
convergence time really depends on how many of these you have floating
around in use.
--
- bill fumerola / billf at FreeBSD.org
More information about the juniper-nsp
mailing list