MPLS VPN Tunnel Load Balancing

Tunnel Definition and Tunnel Policy

The tunneling technology provides a mechanism of encapsulating packets of a protocol into packets of another protocol. This allows packets to be transmitted over heterogeneous networks. The channel for transmitting heterogeneous packets is called a tunnel. Tunnels are mandatory for VPNs to transparently transmit VPN data from one VPN site to another.

MPLS VPNs support the following types of tunnels:

  • Label switched path (LSP): includes LDP LSP, BGP LSP, and static LSP.
  • Constraint-based Routed label switched path (CR-LSP): includes RSVP-TE CR-LSP or static CR-LSP. Compared with LSPs, CR-LSPs meet specified constraints, such as bandwidth or path constraints.
  • Generic Routing Encapsulation (GRE) tunnel: GRE-encapsulated data packets are transparently transmitted over the public IP network.

    Generally, MPLS VPNs use LSPs or CR-LSPs as public network tunnels. If the core routers (Ps) on the backbone network, however, provide only the IP functionality and not MPLS functionality, whereas the PEs at the network edge have the MPLS functionality, the LSPs or CR-LSPs cannot be used as public network tunnels. In this situation, GRE tunnels can be used for MPLS VPNs.

A tunnel policy determines the tunnel type to be used for a VPN. By default, a VPN uses LSPs to forward data. To change the tunnel type or configure tunnel load balancing for VPN services, apply a tunnel policy to the VPN and run the tunnel select-seq command in the tunnel policy view to configure the priority sequence of tunnels and the number of tunnels used for load balancing.

Tunnel Load Balancing Selection Rules

The priority of a tunnel type depends on its configuration sequence. The earlier a tunnel type is configured, the higher its priority is. Assume that the following command has been run in a tunnel policy:

tunnel select-seq cr-lsp lsp load-balance-number 2
After the tunnel policy is applied to a VPN, the VPN selects tunnels based on the following rules:
  • If two or more CR-LSPs are available, the VPN selects any two of them at random.
  • If less than two CR-LSPs are available, the VPN selects all CR-LSPs and also selects LSPs as substitutes to ensure that two tunnels are available for load balancing.
  • If two tunnels have been selected, one CR-LSP and the other LSP, and a CR-LSP is added or a CR-LSP goes Up from the Down state, the VPN selects the CR-LSP to replace the LSP.
  • If the number of existing tunnels for load balancing is smaller than the configured number and a CR-LSP or LSP in the Up state is added, the newly added tunnel is also used for load balancing.
  • If one or more tunnels used for load balancing go Down, the tunnel policy is triggered to re-select tunnels. The VPN selects LSPs as substitutes to ensure that the configured number of tunnels are used for load balancing.
  • The number of tunnels used for load balancing depends on the number of eligible tunnels. For example, if there are only one CR-LSP and one LSP in the Up state, load balancing is performed between the two tunnels. The tunnels of other types are not selected even if they are Up.

Priority Sequence for Selecting LSPs

If a tunnel policy has been configured for a VPN to select only LSPs, three types of LSPs are available: LDP LSPs, BGP LSPs, and static LSPs, which can be selected in descending order of priority.

Priority Sequence for Selecting CR-LSPs

If a tunnel policy has been configured for a VPN to select only CR-LSPs, two types of CR-LSPs are available: RSVP-TE CR-LSPs and static CR-LSPs, which can be selected in descending order of priority.

Comparison of Tunnel Load Balancing and Route Load Balancing

Tunnel load balancing and route load balancing are different in the following aspects:

  • Routes used for load balancing must have equal costs, whereas tunnels used for load balancing can have unequal costs.

    On the network shown in Figure 1, assume that all links have the same route cost. If two routes are available from PE1 to PE2 for load balancing, these two routes must have the same cost. If two tunnels are available from PE1 to PE2 for load balancing, these tunnels can have unequal route costs.

    Figure 1 Tunnels used for load balancing do not necessarily have the same cost
  • Routes used for load balancing must go over different paths, whereas tunnels used for load balancing can go over the same path.

    On the network shown in Figure 2, if two routes are available from PE1 to PE2 for load balancing, these two routes must go over different paths. If two tunnels are available from PE1 to PE2 for load balancing, these tunnels can go over the same path.

    Figure 2 Tunnels used for load balancing are allowed to go over the same path
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
Next topic >