[j-nsp] Conditionally advertising default based on provider BGP status
Dennis Krul | Tilaa
dennis at tilaa.nl
Thu Nov 8 04:04:08 EST 2012
On 8 nov. 2012, at 09:53, Morgan McLean wrote:
> Last email about defaults, I swear. :)
>
> I have two routers that have some feeds to providers. I don't want them to
> be advertising the default atomic aggregate I'm generating to downstream
> devices when it doesn't have the connectivity to back it up.
>
> Whats the best way to do this? I consider taking key internet routes and
> putting them into a policy for the aggregate, if 1.0.0.0/8 or longer
> exists, allow etc. I could do this for a few ranges that span different
> major IP's, but maybe a route filter that large would slow things down?
>
> I'd like to be able to do it based on BGP state...
>
> Any tips?
>
> Right now I plan on running both routers independent of one another, so
> basically if one router loses connectivity to providers, it won't advertise
> default to my SRX cluster. If the router loses connectivity to the SRX
> cluster, it won't advertise to the providers.
>
> I don't want to share full tables between the routers, so I figured that
> was easiest and most direct / effective.
>
> Thank you!
> Morgan
Hello Morgan,
We do something like this to only export a default route when there is at least one peer available:
[routing-options]
generate {
route 0.0.0.0/0 {
policy export_default_route_contributors;
discard;
}
}
[policy-options]
policy-statement export_default_route_contributors {
term is_peer_up {
from {
neighbor [ip of bgp peer];
next-hop [ip of bgp peer];
}
then accept;
}
term reject_rest {
then reject;
}
}
Add terms for all peers that export full table (or a default route).
Regards,
--
Dennis Krul
Tilaa
e: dennis at tilaa.nl
w: http://www.tilaa.nl
More information about the juniper-nsp
mailing list