ON THIS PAGE
BGP Link-Bandwidth Community
Overview
Within a BGP implementation, a link-bandwidth extended community encodes the bandwidth of a given next hop. BGP assists in load-balancing traffic by communicating the speeds of BGP links to remote peers. When you (the network administrator) combine a link-bandwidth community with multipath, the load-balancing algorithm of your choice distributes traffic flows across the set of next hops proportional to their relative bandwidths.
When the BGP link-bandwidth extended community is a transitive attribute across autonomous systems (ASs), the BGP group advertises the link-bandwidth extended community to neighboring ASs. You can choose to use the BGP link-bandwidth community as a nontransitive attribute so routers drop the link-bandwidth community at the AS boundary. The BGP group does not advertise nontransitive link-bandwidth communities to external BGP (EBGP) neighbors.
You can also configure BGP to automatically sense the bandwidth and import the community at a group or neighbor level. Using this link-bandwidth autosense feature, your network can automatically set the link-bandwidth value to the speed of the interface over which the device received the BGP route.
Only per-packet load balancing supports the BGP link-bandwidth community.
Benefits
-
With multipath enabled, link-bandwidth provides weighted equal-cost multipath (WECMP) for unequal load balancing.
-
Ensures high-bandwidth links carry more flows than low-bandwidth links.
-
Reduces the likelihood of traffic congestion.
Configuration
Bandwidth
By default, the link-bandwidth community is transitive. You can use either of these statements to configure the link-bandwidth community as transitive:
set policy-options community name members bandwidth:value
set policy-options community name members bandwidth-transitive:value
To make it nontransitive, use the following configuration:
set policy-options community policy-name members bandwidth-non-transitive:value
Nontransitive Override
You can override a nontransitive configuration so that a BGP group sends the link-bandwidth extended community over an EBGP session even when link-bandwidth is nontransitive. To send the nontransitive link-bandwidth community across an EBGP neighbor, include the following configuration:
set protocols bgp group group-name send-non-transitive-link-bandwidth
The send-non-transitive-link-bandwidth statement does not
differentiate between the originated link-bandwidth community and one that has
been received and readvertised. When you enable this option, BGP advertises all
nontransitive link-bandwidth communities to the EBGP neighbor.
Aggregate Bandwidth
By default, the aggregate link-bandwidth community is transitive. You can use either of these statements to configure the link-bandwidth community as transitive:
set policy-options policy-statement name then aggregate-bandwidth
set policy-options policy-statement name then aggregate-bandwidth transitive
To make it nontransitive, use the following configuration:
set policy-options policy-statement policy-name then aggregate-bandwidth non-transitive
To divide the total link-bandwidth by the number of peers in the advertising
group, enable the divide-equal statement:
set policy-options policy-statement policy-name then aggregate-bandwidth divide-equal
Autosense
You can only enable autosense for single-hop EBGP sessions.
Configure autosense for the BGP group.
Configure the
auto-sensestatement at theneighborhierarchy to detect and store the bandwidth toward that BGP neighbor. Configure it at thegrouphierarchy to detect and store the bandwidth for all neighbors under that BGP group:set protocols bgp group group-name link-bandwith auto-sense set protocols bgp group group-name neighbor link-bandwith auto-sense
Configure the import policy with
auto-link-bandwidthset totransitiveornon-transitive. If you do not specify, by defaultauto-link-bandwidthis transitive:set protocols bgp group group-name import policy-name set policy-options policy-statement policy-name then auto-link-bandwidth non-transitive
(Optional) To suppress frequent changes in the link-bandwidth value when bandwidth increases, you can configure the autosense hold-down timer. The hold-down timer is only triggered when the bandwidth increases. By default, the timer is set to 60 seconds:
set protocols bgp group group-name link-bandwith auto-sense hold-down time-in-seconds
Verification
Verify the configuration was successful using the following commands:
-
show route receive-protocol bgp peer-ip-address extensive -
show route advertising-protocol bgp peer-ip-address extensive -
show route address extensive -
show bgp neighbor address