It is also supported when the LDP next hop resolves to an IGP shortcut tunnel over SR-TE. Weighted load-balancing is supported for both push and swap NHLFEs.
At a high level, weighted load-balancing operates as follows:
All the RSVP or SR-TE LSPs in the ECMP set must have a load-balancing-weight configured; otherwise, non-weighted ECMP behavior is used.
The normalized weight of each RSVP or SR-TE LSP is calculated based on its configured load-balancing weight. LDP performs the calculation to a resolution of 64, meaning if there are values between 1 and 200, the system buckets these into 64 values. These LSP 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 or SR-TE LSPs that they are forwarded over.
No per-service differentiation exists 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. 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, or LDP over SR-TE, when using IGP shortcuts, is enabled as follows:
Classic CLI commands
configure
   router
      weighted-ecmp [strict]
      no weighted-ecmp
configure
   router
      ldp
         [no] weighted-ecmp
            MD-CLI commands
configure
   router
      weighted-ecmp {false|true|strict}
configure
   router
      ldp
         weighted-ecmp {true|false}
            However, in the case of classic LoR, the operator only needs to configure weighted ECMP needs 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.
Classic CLI
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
               MD-CLI
!*[gl:/configure router "Base"]
    static-routes route 192.0.2.102/32 route-type unicast
      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 
        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.