[j-nsp] BGP route origination with communities

Tech Zone techz0n3 at yahoo.com
Sun Aug 15 22:16:41 EDT 2004


Hi David,
 
You missed out the route-filter or protocol static at your policy statement.
Try this :-
 
policy-options {
policy-statement set-local-community {
term 1 {
from {
  protocol static;
}
then {
community set my-180;
community add my-800;
}
}
}
community my-180 members 1234:180;
community my-800 members 1234:800;
}

or
 
policy-options {
policy-statement set-local-community {
term 1 {
from {
route-filter route 192.168.224.0/23 exact;
}
then {
community set my-180;
community add my-800;
}
}
}
community my-180 members 1234:180;
community my-800 members 1234:800;
}

or combine them together.
Hope this help.
 
Regards,
TechZone.
 


David Gethings <davidg at pipex.net> wrote:
On 15 Aug 2004, at 09:34, Mark Johnson wrote:

> Hi,
>
> Switching from Cisco to Juniper and I'm stuggling to originate BGP
> routes with community tags. On a Cisco I use:
>
> router bgp 1234
> network 192.168.224.0 mask 255.255.224.0 route-map 
> set-local-community
>
> route-map set-local-community permit 10
> set community AS:180 AS:800
>
> ip route 192.168.224.0 255.255.224.0 null0 254
>
> And it works like a dream.
>
> What is the best way to replicate this in JunOS keeping in mind that
> some routes like this don't have more specifics so adding the community
> to a static discard won't work.
As with most things in Junos there is more than one way to do it. The 
most direct comparison to what you want to do is the following config:

routing-options {
autonomous-system 1234;
static {
route 192.168.224.0/23 discard;
}
}
protocols {
bgp {
export set-local-community;
}
}
policy-options {
policy-statement set-local-community {
term 1 {
then {
community set my-180;
community add my-800;
}
}
}
community my-180 members 1234:180;
community my-800 members 1234:800;
}

Cheers

Dg

_______________________________________________
juniper-nsp mailing list juniper-nsp at puck.nether.net
http://puck.nether.net/mailman/listinfo/juniper-nsp


Regards,
Sean
TechZone
		
---------------------------------
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!


More information about the juniper-nsp mailing list