Improve Network Resiliency Using Multiple ECMP BGP Peers
Overview
Equal-cost multipath (ECMP) is a network routing strategy that allows for traffic of the same session, or flow, to be transmitted across multiple paths of equal cost. A flow is traffic with the same source and destination. The ECMP process identifies routers that are legitimate equal-cost next hops toward the flow's destination. The device then uses load balancing to evenly distribute traffic across these multiple equal-cost next hops. ECMP is a mechanism that enables you (the network administrator) to load-balance traffic and increase bandwidth by fully utilizing otherwise unused bandwidth on links to the same destination.
You often use ECMP with BGP. Each BGP route can have multiple ECMP next hops. The BGP export policy determines whether to advertise the BGP route to these next hops. As the network administrator, you can control the advertisement and withdrawal of BGP prefixes to and from these ECMP peers. The BGP export policy determines whether to advertise a BGP prefix based on the number of ECMP BGP peers the policy receives the prefix from.
You can configure the BGP export policy to withdraw a BGP route unless it receives the BGP route prefix from a minimum number of ECMP BGP peers. Requiring the BGP route to have multiple ECMP BGP peers creates better resiliency in case of link failures.
Benefits
-
Improves resiliency of your network
-
Prevents accidental overloading of links
-
Assists with load balancing
Platform Support
See Feature Explorer for platform and release support. Starting in Junos OS Evolved Release 23.4R2, this feature is supported on these platforms:
-
QFX5130-32CD, QFX5130-48C, and QFX5130-48CM
-
QFX5220
-
QFX5230-64CD
-
QFX5240-64OD and QFX5240-64QD
Configuration Statements
The BGP export policy compares the number of ECMP next hops for the BGP route against
the value you configure with the from nexthop-ecmp
statement at
either of these hierarchies: [edit policy-options policy-statement
policy-name]
or [edit policy-options
policy-statement policy-name term
term-name]
. The options for this statement
are:
-
value
: The exact number of ECMP gateways (1 through 512) required to meet the condition. -
equal
: The number of gateways must be equal to the configured value. -
greater-than
: The number of gateways must be greater than the configured value. -
greater-than-equal
: The number of gateways must be greater than or equal to the configured value. -
less-than
: The number of gateways must be less than the configured value. -
less-than-equal
: The number of gateways must be less than or equal to the configured value.
In this example, the BGP export policy stops advertising BGP route prefixes if it detects less than two ECMP BGP peers:
set policy-options policy-statement policy-name term min-ecmp from nexthop-ecmp less-than 2 set policy-options policy-statement policy-name term min-ecmp then reject set policy-options policy-statement policy-name term default then accept set protocols bgp group underlay export policy-name
Verification and Troubleshooting
Confirm that you have configured the number of required BGP ECMP peers in the policy:
show policy policy-name
Check whether the BGP route has been advertised to or withdrawn from the desired upstream BGP peer:
show route advertising-protocol bgp peer-advertised [detail]