[j-nsp] under the hood of MP-BGP

Jeff Haas jhaas at juniper.net
Tue Jan 3 08:45:00 EST 2017


> On Dec 23, 2016, at 4:24 AM, adamv0025 at netconsultings.com wrote:
> Does anyone know any details about what's going on under the hood of MP-BGP
> when a new VRF is configured? 
> I'm only clear about this part: 
> When a new RT import is configured or when the RT import is removed, a route
> refresh is sent from the PE to RRs for the affected address families
> VPNv4/6. 
> When a new VRF is configured, the PE sends a route-refresh to RRs. 
> In both cases the RRs do send all VPNv4/6 prefixes to the PE. 
> (In case of RT filter RRs will only send the set of routes according to the
> RT filter advertised by PE). 

All correct so far.  Junos is unfortunately a bit aggressive about route refreshes and really should be a bit more selective about which families it does the refresh for.

> But what happens next or in parallel? 
> Does BGP parse through the local MP-BGP table first in attempt to import at
> least the local routes into the NEW VRF as soon as possible? 

If there's no local target for l3vpn route and the box is not otherwise a route reflector or ebgp speaker, we'll drop the route from bgp.l3vpn.0.  (I.e. the box is a PE-only role.)  While we still do the import table scan, the routes in many cases won't be there.

> With regards to VPN routes coming in from RR, 
> does PE wait till EOR/keepalive from RR in order to start best path
> selection and then parsing to determine which routes needs to be installed
> into the NEW VRF? 

It's done inline as Junos receive the routes.

> Are there any mechanisms in use to speed up parsing through the MP-BGP table
> and installation of paths into NEW VRF? 
> Are VPN routes grouped based on commonalities in RTs? 

Not at this time.  It's been a feature the BGP group has considered adding, but it has an additional memory cost that scales per-route and that's always scary.  With the advent of 64-bit junos, we've considered making some memory-burning features such as these able to be configured using a configuration knob but this class of features tends to be tricky and gives our test group hives. :-)

> These questions are OS agnostic, I'd appreciate any pointers.

FWIW, these questions are OS agnostic but the implementation may heavily vary by vendor.

-- Jeff

More information about the juniper-nsp mailing list