Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?




Hierarchy Level


Enable BGP RIB sharding. BGP RIB sharding is to split the BGP process across routes. Different routes are hashed into different threads to achieve concurrency. BGP RIB sharding splits a unified BGP RIB into several sub RIBs and each sub RIB handles a subset of BGP routes. Each sub RIB is served by a separate RPD thread to achieve concurrency. BGP RIB sharding is disabled by default. To enable, you need to explicitly configure it on a multicore routing engine. This feature is supported only on 64-bit routing protocol process (rpd) where the Routing Engine has more than one core. We recommend configuring this feature on a device with atleast 4CPU cores and 16GB of memory.

  • RPD would restart automatically when rib-sharding or update-threading configuration is changed.

  • Sharding requires Update/IO thread. If rib-sharding is configured and update-threading is not configured, the commit check fails.

  • BGP RIB sharding and update IO features are supported for the following IPv4 and IPv6 address families:
    • IPv4 VPN Unicast

    • IPv4 VPN Multicast (vrf.inet.2)

    • IPv6 VPN Unicast

    • IPv6 VPN Multicast (vrf.inet.2)

    • IPv4 Labeled Unicast

    • IPv6 Labeled Unicast

  • All the other RIBs are still processed without sharding.


number of shards—the number of sharding threads created. If you configure rib-sharding on a routing engine, RPD creates sharding threads. By default, it is the same as the number of CPU cores on the routing engine. Optionally, you can specify the number-of-shards you want to create.

  • Range: 1-31 shards

Required Privilege Level

system—To view this statement in the configuration.

system-control—To add this statement to the configuration.

Release Information

Statement introduced in Junos OS Release 19.4R1.

Support for NSR with sharding introduced in Junos OS Release 22.2.

BGP sharding supports IPv4, IPv6, L3VPN and BGP-LU from Junos OS Release 20.4R1.