Weighted load balancing (Weighted ECMP) is supported for LDP over RSVP (LoR), when the LDP next hop resolves to an IGP shortcut tunnel over RSVP, when it resolves to a static route with next hops which in turn uses RSVP tunnels, and where the tunneling option is configured for the LDP peer (classical LDP over RSVP). Weighted load balancing is supported for both push and swap NHLFEs.
At a high level, the feature operates as follows.
All of the RSVP LSPs in the ECMP set should have a load-balancing-weight configured, otherwise non-weighted ECMP behavior is used.
The normalized weight of each RSVP LSP is calculated based on its configured load-balancing weight. The calculation is performed by LDP to a resolution of 64. These next hops are then populated in TTM.
RTM entries are updated accordingly for LDP shortcuts.
When weighted ECMP is configured for LDP, the normalized weight is downloaded to the IOM when the LDP route is resolved. This occurs for both push and swap NHLFEs.
LDP labeled packets are then sprayed in proportion to the normalized weight of the RSVP LSPs that they are forwarded over.
There is no per-service differentiation between packets. LDP labeled packets from all services are sprayed in proportion to the normalized weight.
Tunnel-in-tunnel takes precedence over the existence of a static route with a tunneled next hop. That is, if tunneling is configured, then LDP uses these LSPs instead of those used by the static route. This means that LDP may use different tunnels to those pointed to by static routes.
Weighted ECMP for LDP over RSVP, when using IGP shortcuts or static routes, is enabled as follows:
config
router
ldp
[no] weighted-ecmp
However, in case of classic LoR, weighted ECMP only needs to be configured under LDP. The maximum number of ECMP tunnels is taken from the lower of the config>router>ecmp and config>router>ldp>max-ecmp-routes commands.
The following configuration illustrates the case of LDP resolving to a static route with one or more indirect next hops and a set of RSVP tunnels specified in the resolution filter:
config>router
static-route-entry 192.0.2.102/32
indirect 192.0.2.2
tunnel-next-hop
resolution-filter
rsvp-te
lsp "LSP-ABR-1-1"
lsp "LSP-ABR-1-2"
lsp "LSP-ABR-1-3"
exit
exit
indirect 192.0.2.3
tunnel-next-hop
resolution-filter
rsvp-te
lsp "LSP-ABR-2-1"
lsp "LSP-ABR-2-2"
lsp "LSP-ABR-2-3"
exit
exit
no shutdown
exit
If both config>router>weighted-ecmp and config>router>ldp>weighted-ecmp are configured, then the weights of all of the RSVP tunnels for the static route are normalized to 64 and these are used to spray LDP labeled packets across the set of LSPs. This applies across all shortcuts (static and IGP) to which a route is resolved to the far-end prefix.