Mailing List Archive

BGP Outbound Policy
Hi, folks:

I would like to compress BGP updates from Juniper M40s
to other BGP routers. What I want to achieve is, Don't
advertise the route learned from AS 65300 back to the
routers in AS65300. By doing this, I think we can
minimize the bandwith consumed by BGP and also improve
the convergence time.

So what I did on Juniper was adding a policy statement
as follow (the first a couple terms are to
redistribute local, static and OSPF rotues into BGP):

**************************************************
policy-statement export-rib-bgp {
term 10 {
from protocol direct;
then {
community set Local-Community;
accept;
}
}
term 20 {
from protocol static;
then {
community set Local-Community;
accept;
}
}
term 30 {
from {
protocol ospf;
prefix-list Illegal-Prefix;
}
then reject;
}
term 40 {
from protocol ospf;
then {
community set Local-Community;
accept;
}
}
term 50 {
from {
protocol bgp;
as-path AS65300;
}
to neighbor [ 192.168.223.104 192.168.223.105
];
then reject;
}
term 60 {
from protocol bgp;
then accept;
}
}

community Local-Community members 65200:05;
as-path AS65300 "65300{1,}";
***************************************************

Neighbor routers 192.168.223.104 and 192.168.223.105
are in AS 65300. My question is, if I apply this
policy with term 50 and 60 to "protocol bgp export",
will Juniper stop advertising the routes originated
from 65300? By reading the Juniper document, I believe
the export policy only works between RIB and BGP
routing table, not between BGP neighbors. Am I right?
If so, is there any other way to achieve my goal?

Thanks!

Shixiong

__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html
BGP Outbound Policy [ In reply to ]
I believe this policy will do what you want. JUNOS does not maintain a
separate BGP table. Export policy affects all active routes in the routing
table.

/regards



> -----Original Message-----
> From: juniper-nsp-bounces@puck.nether.net
> [mailto:juniper-nsp-bounces@puck.nether.net] On Behalf Of
> Shixiong Shang
> Sent: Monday, February 16, 2004 1:09 PM
> To: juniper-nsp@puck.nether.net
> Subject: [j-nsp] BGP Outbound Policy
>
>
> Hi, folks:
>
> I would like to compress BGP updates from Juniper M40s
> to other BGP routers. What I want to achieve is, Don't
> advertise the route learned from AS 65300 back to the routers
> in AS65300. By doing this, I think we can minimize the
> bandwith consumed by BGP and also improve the convergence time.
>
> So what I did on Juniper was adding a policy statement
> as follow (the first a couple terms are to
> redistribute local, static and OSPF rotues into BGP):
>
> **************************************************
> policy-statement export-rib-bgp {
> term 10 {
> from protocol direct;
> then {
> community set Local-Community;
> accept;
> }
> }
> term 20 {
> from protocol static;
> then {
> community set Local-Community;
> accept;
> }
> }
> term 30 {
> from {
> protocol ospf;
> prefix-list Illegal-Prefix;
> }
> then reject;
> }
> term 40 {
> from protocol ospf;
> then {
> community set Local-Community;
> accept;
> }
> }
> term 50 {
> from {
> protocol bgp;
> as-path AS65300;
> }
> to neighbor [ 192.168.223.104 192.168.223.105
> ];
> then reject;
> }
> term 60 {
> from protocol bgp;
> then accept;
> }
> }
>
> community Local-Community members 65200:05;
> as-path AS65300 "65300{1,}";
> ***************************************************
>
> Neighbor routers 192.168.223.104 and 192.168.223.105
> are in AS 65300. My question is, if I apply this
> policy with term 50 and 60 to "protocol bgp export",
> will Juniper stop advertising the routes originated
> from 65300? By reading the Juniper document, I believe
> the export policy only works between RIB and BGP
> routing table, not between BGP neighbors. Am I right?
> If so, is there any other way to achieve my goal?
>
> Thanks!
>
> Shixiong
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html
_______________________________________________
juniper-nsp mailing list juniper-nsp@puck.nether.net
http://puck.nether.net/mailman/listinfo/juniper-nsp
BGP Outbound Policy [ In reply to ]
sshang2@yahoo.com (Shixiong Shang) writes:

> Hi, folks:
>
> I would like to compress BGP updates from Juniper M40s
> to other BGP routers. What I want to achieve is, Don't
> advertise the route learned from AS 65300 back to the
> routers in AS65300. By doing this, I think we can
> minimize the bandwith consumed by BGP and also improve
> the convergence time.
>
> So what I did on Juniper was adding a policy statement
> as follow (the first a couple terms are to
> redistribute local, static and OSPF rotues into BGP):
>

one caveat: the 'to neighbor x' clause will be ignored. BGP export
policy is applied once per group, thus one cannot specify different
policies on a per neighbor basis.

Thus you can apply this policy to your ebgp neighbors in 65300 but not
to neighbors in other ASes.

I would say that as far as being as optimization, it would only be
worthwhile if AS65300 advertises a significant number of active
routes to you.
>
> Neighbor routers 192.168.223.104 and 192.168.223.105
> are in AS 65300. My question is, if I apply this
> policy with term 50 and 60 to "protocol bgp export",
> will Juniper stop advertising the routes originated
> from 65300?

Yes.

> By reading the Juniper document, I believe
> the export policy only works between RIB and BGP
> routing table, not between BGP neighbors. Am I right?

Export policy can be used to filter/manipulate attributes for any BGP
advertisement. Not all policy qualifiers are valid in export policies.

Pedro.