When the weighted-ecmp command is configured in the base router context (config>router) or a VPRN (config>service>vprn), any IPv4 or IPv6 static, IS-IS, or OSPF route associated with the routing instance can be programmed into the data path to use weighted load-balancing across the interface next-hops of the route.
In order for weighted ECMP to be supported across the interface next-hops of an IS-IS or OSPF route the following conditions must be met.
All of the calculated ECMP next-hops must be interface next-hops.
All of the calculated ECMP next-hop interfaces must have a non-zero load-balancing-weight value configured in the isis>interface context. By default, IS-IS or OSPF interfaces have a zero weight (no load-balancing-weight); non-zero values must be configured explicitly. Values cannot be auto-derived.
In order for weighted ECMP to be supported across the interface next-hops of a static route the following conditions must be met.
All of the configured ECMP next-hops must be direct next-hops (resolved to an interface). The ECMP next-hops are the next-hops with the lowest preference that also have the lowest metric.
All of the configured ECMP next-hop interfaces must have a non-zero load-balancing-weight value configured in the static-route-entry>next-hop context. By default, static route next-hops have a zero weight (no load-balancing-weight); non-zero values must be configured explicitly. Values cannot be auto-derived. The ECMP next-hops are the next-hops with the lowest preference that also have the lowest metric.
The load-balancing-weight commands in the IS-IS or OSPF and static route configuration trees accept a value between 0 and 4294967295.
If an IPv4 or IPv6 BGP route has a BGP next-hop resolved by a static, IS-IS, or OSPF ECMP route and ibgp-multipath is configured under BGP, traffic forwarded to the BGP next-hop is sprayed according to the load-balancing-weights of the interface next-hops.