Basic Concepts of MPLS TE
LSP
On a label switched path (LSP), traffic forwarding is determined by the labels added to packets by the ingress node of the LSP. An LSP can be considered as a tunnel because traffic is transparently transmitted on intermediate nodes along the LSP.
MPLS TE Tunnel
- Tunnel interface: a point-to-point virtual interface used to encapsulate packets. Similar to a loopback interface, a tunnel interface is a logical interface.
- Tunnel ID: a decimal number that uniquely identifies an MPLS TE tunnel to facilitate tunnel planning and management.
- LSP ID: a decimal number that uniquely identifies an LSP to facilitate LSP planning and management.
Figure 4-3 illustrates the preceding terms. Two LSPs are available on the network. The path LSRA->LSRB->LSRC->LSRD->LSRE is the primary LSP with an LSP ID of 2. The path LSRA->LSRF->LSRG->LSRH->LSRE is the backup LSP with an LSP ID of 1024. The two LSPs form an MPLS TE tunnel with a tunnel ID of 100, and the tunnel interface is Tunnel1.
Link Attributes
Total link bandwidth
Bandwidth of a physical link.
Maximum reservable bandwidth
Maximum bandwidth that a link can reserve for an MPLS TE tunnel. The maximum reservable bandwidth must be lower than or equal to the total link bandwidth.
TE metric
Cost of a TE link. TE metrics are used to control MPLS TE path calculation, making path calculation more independent of IGP routing. By default, IGP metrics are used as TE metrics.
Tunnel Attributes
An MPLS TE tunnel is composed of several constraint-based routed label switched paths (CR-LSPs). The constraints for LSP setup are tunnel attributes.
Bandwidth constraints
Bandwidth constraint is mainly the tunnel bandwidth.
Affinity attribute
An affinity is a 32-bit vector, configured on the ingress of a tunnel. It must be used together with a link administrative group attribute.
After a tunnel is configured with an affinity, a device compares the affinity with the administrative group value during link selection to determine whether a link with specified attributes is selected or not. The link selection criteria are as follows:
The result of the IncludeAny affinity OR administrative group value is not 0.
The result of the ExcludeAny affinity OR the administrative group value is 0.
IncludeAny equals the result of the affinity attribute OR the subnet mask; ExcludeAny equals IncludeAny OR the subnet mask; the administrative group value equals the administrative group value OR the subnet mask.
The following rules apply:If some bits in a mask are 1s, at least one bit in the administrative group is 1 and the corresponding bit in the affinity must be 1. If some bits in the affinity are 0s, the corresponding bits in the administrative group cannot be 1.
For example, an affinity is 0x0000FFFF and its mask is 0xFFFFFFFF. The higher-order 16 bits in the administrative group of available links are 0 and at least one of the lower-order 16 bits is 1. This means the administrative group attribute ranges from 0x00000001 to 0x0000FFFF.
If some bits in a mask are 0s, the corresponding bits in the administrative group are not compared with the affinity bits.
For example, an affinity is 0xFFFFFFFF and its mask is 0xFFFF0000. At least one of the higher-order 16 bits in an administrative group attribute is 1 and the lower-order 16 bits can be 0s and 1s. This means that the administrative group attribute ranges from 0x00010000 to 0xFFFFFFFF.
Understand specific comparison rules before deploying devices of different vendors because the comparison rules vary with the vendor.
A network administrator can use the link administrative group and affinities to control the paths over which MPLS TE tunnels are established.
Path constraints
Path constraints include explicit path, priority and preemption, and hop limit.
Constraint-based routing (CR) is a mechanism to create and manage these constraints, which are described in the following:
Tunnel bandwidth
The bandwidth of a tunnel must be planned according to requirements of the services to be transmitted over the tunnel. The planned bandwidth is reserved on the links along the tunnel to provide bandwidth guarantee.
Explicit path
An explicit path is a CR-LSP manually set up by specifying the nodes to pass or avoid. Explicit paths are classified into the following types:
Strict explicit path
On a strict explicit path, all the nodes are manually specified and two consecutive hops must be directly connected. A strict explicit path precisely controls the path of an LSP.
As shown in Figure 4-4, LSRA is the ingress node, and LSRF is the egress node. An LSP from LSRA to LSRF is set up over a strict explicit path. LSRB Strict indicates that this LSP must pass through LSRB, which is directly connected to LSRA. LSRC Strict indicates that this LSP must pass through LSRC, which is directly connected to LSRB. The rest may be deduced by analogy. In this way, the path that the LSP passes through is precisely controlled.
Loose explicit path
A loose explicit path passes through the specified nodes but allows intermediate nodes between the specified nodes.
As shown in Figure 4-5, an LSP is set up over a loose explicit path from LSRA to LSRF. LSRD Loose indicates that this LSP must pass through LSRD, but LSRD may not be directly connected to LSRA.
Priority and preemption
Priority and preemption determine resources allocated to MPLS TE tunnels based on the importance of services to be transmitted on the tunnels.
Setup priorities and holding priorities of tunnels determine whether a new tunnel can preempt the resources of existing tunnels. If the setup priority of a new CR-LSP is higher than the holding priority of an existing CR-LSP, the new CR-LSP can occupy resources of the existing CR-LSP. The priority value ranges from 0 to 7, among which the value 0 indicates the highest priority, and the value 7 indicates the lowest priority. The setup priority of a tunnel must be lower than or equal to the holding priority of the tunnel.
If no path can provide the required bandwidth for a new CR-LSP, an existing CR-LSP is torn down and its bandwidth is assigned to the new CR-LSP. This is the preemption process. The following preemption modes are supported:- Hard preemption: A high-priority CR-LSP can directly preempt resources assigned to a low-priority CR-LSP. As a result, some traffic is dropped on the low-priority CR-LSP.
- Soft preemption: The make-before-break mechanism applies to resource preemption. A high-priority CR-LSP preempts bandwidth assigned to a lower-priority CR-LSP only after traffic over the low-priority CR-LSP switches to a new CR-LSP.
The priority and preemption attributes determine resource preemption among tunnels. If multiple CR-LSPs need to be set up, CR-LSPs with higher setup priorities can be set up by preempting resources. If resources (such as bandwidth) are insufficient, a CR-LSP with a higher setup priority can preempt resources of an established CR-LSP with a lower holding priority.
As shown in Figure 4-6, links on the network have different bandwidth values but the same metric value. There are two TE tunnels on the network:- Tunnel 1: established over Path 1. Its bandwidth is 100 Mbit/s, and its setup and holding priority values are 0.
- Tunnel 2: established over Path 2. Its bandwidth is 100 Mbit/s, and its setup and holding priority values are 7.
When the link between LSRB and LSRE fails, LSRA calculates a new path, Path 3 (LSRA->LSRB->LSRF->LSRE), for Tunnel 1. The bandwidth of the link between LSRB and LSRF is insufficient for tunnels Tunnel 1 and Tunnel 2. As a result, preemption is triggered, as shown in Figure 4-7.A new path is set up for Tunnel 1 as follows:- After MPLS TE path calculation is complete, Path messages are transmitted along the path LSRA->LSRB->LSRF->LSRE, and Resv messages are transmitted along the path LSRE->LSRF->LSRB->LSRA.
- When a Resv message is sent from LSRF to LSRB, LSRB needs to reserve
bandwidth for the new path but finds that bandwidth is insufficient.
Then preemption occurs. LSRB processes the low-priority path differently
in hard and soft preemption modes:
- In hard preemption mode: Tunnel 1 has a higher priority than Tunnel 2, so LSRB tears down Path 2 of Tunnel 2. In addition, LSRB sends a PathTear message to request LSRF to delete the path information, and sends a ResvTear to request LSRC to delete the reservation state. If traffic is being transmitted on Tunnel 2, some traffic is dropped.
- In soft preemption mode: LSRB sends a ResvTear message to LSRC. A new path, Path 4, is set up while Path 2 is not torn down. After traffic on Path 2 is switched to Path 4, LSRB and LSRC tear down Path 2 on Tunnel 2.
Hop limit
Hop limit is a condition for path selection during CR-LSP setup. Hop limit controls the number of hops allowed on a CR-LSP.