BGP Link-Bandwidth with JunOS¶
The BGP Link-Bandwidth extension introduces an improvement to the BGP multipath, providing the ability to convey port speeds and propagate this information across network devices.
Note: the new features presented in this article are coming with Junos Release 23.4R2, publicly available the 27th of June, 2024.
Introduction¶
The BGP protocol lacks a built-in mechanism to factor in link bandwidth when calculating paths, unlike IGP protocols such as ISIS and OSPF. While internal networks can utilize underlay protocols like RSVP/SR for traffic engineering, connections between ISPs rely solely on eBGP. This presents challenges when managing multiple links with varying speeds and multipath configurations, resulting in uneven traffic distribution across links and potential packet loss. The goal is to address this issue locally and establish a method to communicate link speeds to remote peers, enabling better optimization of traffic distribution for load balancing. Driven by draft-ietf-idr-link-bandwidth which is currently expired, Juniper is collaborating with other vendors to extend its support for the transitive Link-Bandwidth Community (lbwc).
In other words, we are enhancing the multipath feature to include both ECMP and WECMP options.
Link-Bandwidth Community Structure¶
First Octet (bandwidth): indicates that the extended community pertains to bandwidth information.
Second Octet (222): represents the autonomous system (AS) number associated with the extended community.
Third Octet (99999997952): indicates the link speed encoded in the extended community.
In this case, the value 99999997952 corresponds to a link speed of 800 Gbps. Note: the value is in bytes.
To derive the link speed in Gbps:
- Multiply the third octet value by 8 (since 1 byte = 8 bits).
- Divide the result by 1 billion (to convert from bits to Gbps).
- Therefore, the link speed represented by "bandwidth:222:99999997952" is 800 Gbps.
Note: The number 99999997952 is accurate in terms of the calculation, but it may not match our expectation of a rounded value like 100,000,000,000. It represents the precise result of the calculation, taking into account the actual number of bits involved.
New Features Introduced in Junos 23.4R2¶
In summary, Junos 23.4R2 is bringing:
- Enhancement to the community member:
- Enhancement to policy-statement:
- Enhancement to protocols bgp:
Auto-Link-Bandwidth¶
From Junos 23.4R2, there are two new knobs for the auto link-bandwidth feature.
When link speed on IFL changes:
- If the link speed of an existing IFL changes to lower than already sensed in link-bandwidth value, the change will trigger import evaluation immediately. This is to prevent packet drops due to degraded link speed.
- If the newly detected speed value is higher than already sensed link-bandwidth value, then the change will appear after the default timer expires, which by default 60s. The default timer can be adjusted as necessary:
Example of Auto-Bandwidth with Auto-Sense
Whether it's a Service Provider network or a Data Center, BGP multipath offers significant advantages across diverse network scenarios. While traditional BGP Multipath is limited to Equal-Cost Multipath (ECMP) and BGP PIC is confined to active/backup configurations, recent advancements have introduced the capability for Weighted-ECMP (WECMP) in BGP.

With the following configuration, all imported routes on BGP group PEERING will be installed with the link-bandwidth community and balanced across two interfaces according to their respective link speeds, whether they are physical links (e.g., et- interfaces) or aggregated interfaces (e.g., ae).
Junos provides the flexibility to define policy conditions within a policy-statement, allowing you to specify criteria such as the route source (e.g., prefix, rib, protocol) and take corresponding actions, such as enabling auto-link-bandwidth.
Validating control plane: The output displays the interface bandwidth and how it translates into a BGP route installed in the routing table.
Validating the forwarding plane: The output displays balanced installation in the PFE while maintaining equal multipath weights, resulting in Weighted-ECMP due to the Balanced influenced by the link-bandwidth auto-sense.
As stated, BGP Link-Bandwidth attribute is also beneficial for data centers due to its ability to support links with varying bandwidth capacities between spine and leaf devices. This feature facilitates the integration of devices with different transmission speeds within the network, enabling efficient traffic distribution based on link speed. Even with BGP multipath enabled, the network can effectively utilize unequal link rate with respective bandwidth utilization, optimizing data flow within the data center environment.

Aggregate-bandwidth with Transitive and Non-Transitive Options¶
The aggregate-bandwidth feature is expanded to include transitive and non-transitive keywords.
When the aggregate divide option is enabled, the total link-bandwidth is divided by the number of peers in the advertising group. If peers are added or removed from the group, the new divided value must be sent to all peers.
By default, the value is set to transitive for backward compatibility:
Sending Non-Transitive Link-Bandwidth Extended Communities¶
A new configuration option is introduced to allow the transmission of non-transitive-link-bandwidth-extended-community information to an eBGP neighbor at the group level. This feature is similar to the existing send-non-transitive-extended-community functionality which enables the transmission of all non-transitive extended communities over an eBGP session. However, the new knob specifically focuses on transmitting link-bandwidth communities. It doesn't distinguish between link-bandwidth communities that are originated locally and those that are received and readvertised; all non-transitive link-bandwidth communities will be advertised out using this configuration.
Resolving Global Link-Bandwidth Conflicts¶
To maintain the previous behavior of utilizing the first lower link-bandwidth (LBW) community based on community sorting, you can configure the hidden knob "use-sort-community."
The BGP session will reset after implementing this change.
Conclusion¶
*Important note to conclude: *Enabling BGP multipath also installs additional next-hop entries in the PFE, occupying more memory, which can lead to memory constraints and limitations. However, this is not the case with Juniper devices such as MX Trio and PTX Express silicon.
Glossary
- AS: Autonomous System
- BGP: Border Gateway Protocol
- ECMP: Equal-Cost Multi-Path
- IFL: Interface Logical
- IP: Internet Protocol
- Junos: Juniper Operating System used in Juniper Networks routing, switching and security devices
- LBW: Link Bandwidth
- PE: Provider Edge router
- PFE: Packet Forwarding Engine
- PIC: Prefix Independent Convergence
- RE: Routing Engine
- WECMP: Weighted Equal-Cost Multi-Path
Useful links
- BGP Link Bandwidth IETF Draft: https://datatracker.ietf.org/doc/draft-ietf-idr-link-bandwidth/
- MX304 FIB install rate https://juniper.github.io/techposts/mx304-fib-install-rate/article
- Mastering BGP PIC on JUNOS https://juniper.github.io/techposts/mastering-bgp-pic-on-junos/article
- FIB Compression https://juniper.github.io/techposts/ptx-fib-compression/article
- BGP RIB Sharding https://juniper.github.io/techposts/bgp-rib-sharding/article
Acknowledgments¶
Thanks to Reshma Das, Natarajan Venkataraman for developing the feature in Junos OS