No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade
What is MPLS

This document describes the basic concepts and principles of MPLS.

Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
what is mpls

what is mpls

Introduction

Origin of MPLS

In the middle of the 1990s, IP technology developed rapidly due to its simplicity and low costs, and the Internet data volume increased greatly. As a result, the volume of data transmitted across the Internet increased greatly. Because of hardware limitations, IP technology relies on software to look up routes based on the longest match rule. Software cannot achieve high forwarding performance, and therefore IP technology is not the most efficient choice. The forwarding performance of IP technology has become a bottleneck of network development nowadays.

To adapt to network development, Asynchronous Transfer Mode (ATM) technology emerged. In comparison with IP technology, ATM was much more efficient at forwarding packets by using fixed-length labels (cells) and maintaining a label table much smaller than a routing table. However, ATM technology was a complex protocol with high deployment costs, which hindered its widespread popularity and growth.

Combining the advantages of both IP and ATM was seen as the optimal solution. To achieve this, Multiprotocol Label Switching (MPLS) technology was introduced.

MPLS was designed to increase forwarding rates. Unlike IP technology, MPLS analyzes packet headers only on the edges of a network, not at each hop. Therefore, the packet processing time is shortened.

With the development of ASIC technology, the route lookup speed is no longer the bottleneck of network development. Therefore, MPLS has no obvious advantage in improving the forwarding speed. However, MPLS supports multi-layer labels, and its forwarding plane is connection-oriented. MPLS is widely used in virtual private network (VPN), traffic engineering (TE), and quality of service (QoS) scenarios.

Definition of MPLS

MPLS is implemented between the data link layer and network layer in the TCP/IP protocol stack. MPLS replaces IP forwarding with label switching. A label is a short and fixed-length connection identifier with local significance. It is similar to the virtual path identifier (VPI)/virtual channel identifier (VCI) of ATM and the data link connection identifier (DLCI) of Frame Relay.

MPLS can use any Layer 2 media to transfer packets. It is not limited by any specific protocol at the data link layer. MPLS was derived from the Internet Protocol version 4 (IPv4), and the core MPLS technology can be extended to multiple network protocols, such as the Internet Protocol version 6 (IPv6), Internet Packet Exchange (IPX), Appletalk, DECnet, and Connectionless Network Protocol (CLNP). As its name suggests, MPLS supports label switching between multiple network protocols.

Rather than a service or application, MPLS is actually a tunneling technology, which offers a certain degree of security when transmitting information.

Understanding MPLS

The fundamentals of MPLS are as follows:

  • MPLS system architecture: fundamentals of an individual device that runs MPLS.
  • MPLS network structure: fundamentals of the interworking of multiple devices that run MPLS.

MPLS System Architecture

The MPLS system architecture consists of the control plane and forwarding plane.

  • The control plane is connectionless. It distributes labels, creates a label forwarding information base (LFIB), and establishes or tears down label switched paths (LSPs).
  • The forwarding plane, also called the data plane, is connection-oriented. Its connections can be created on Layer 2 networks such as ATM and Ethernet networks. The forwarding plane adds labels to or deletes labels from IP packets and forwards received packets based on the LFIB.

Figure 1-1 shows the workflow of an MPLS system.

Figure 1-1 Workflow of an MPLS system
  • A: An IP routing protocol establishes a neighbor relationship, exchanges routing information, and generates the IP routing information base (RIB).
  • B: A label switching protocol obtains routing information from the IP RIB. A route prefix in the IP RIB is mapped to a forwarding equivalence class (FEC). All packets transmitted over the same route belong to one FEC.
  • C: The active optimal route in the IP RIB is used to generate a forwarding entry in an IP forwarding information base (FIB).
  • D: A label switching protocol establishes a neighbor relationship, allocates a label to each FEC, and advertises a label to an upstream node. In addition, it obtains a label from a downstream node, and uses label information to generate an LFIB.

After the MPLS forwarding plane is established, the device generates the IP FIB and LFIB used to forward data packets. Figure 1-2 illustrates the forwarding process.

Figure 1-2 MPLS forwarding process

MPLS Network Structure

Figure 1-3 shows a typical MPLS network.

Figure 1-3 MPLS network

An MPLS network consists of label switching routers (LSRs) as basic units. LSRs are categories as label edge routers (LERs) or core LSRs based on their network positions.

  • Label edge router (LER): resides on the edge of an MPLS domain and connects to one or more MPLS-incapable nodes.
  • Core LSR: resides in an MPLS domain and connects only to LSRs inside the domain.

MPLS Implementation

MPLS allocates labels to a FEC to establish an LSP.

MPLS LSP

The path through which IP packets travel on an MPLS network is called an MPLS LSP. Figure 1-4 illustrates an MPLS LSP.

Figure 1-4 MPLS LSP

An MPLS LSP is a unidirectional path that transmits traffic from the ingress to the egress.

  • Ingress: the start node of an LSP. An LSP has only one ingress.

    The ingress pushes a label into an IP packet to encapsulate the IP packet as an MPLS packet for forwarding.

  • Transit node: an intermediate node on an LSP. An LSP may have zero, one, or multiple transit nodes.

    A transit node searches the LFIB and swaps a label for another label in each packet for forwarding.

  • Egress: the last node of an LSP. An LSP has only one egress.

    The egress removes the last label from an MPLS packet and restores the original packet before forwarding the packet.

The ingress and egress function as LERs. A transit node functions only as a core LSR.

LSRs are categorized as upstream or downstream LSRs based on whether the LSRs send MPLS packets to or receive MPLS packets from a local LSR.

  • All LSRs that send MPLS packets to the local LSR are called upstream LSRs.

  • All LSRs that receive MPLS packets from the local LSR are called downstream LSR.

MPLS Label

A label is a 20-bit identifier that uniquely identifies a FEC to which a packet belongs. Upon receipt of an IP packet from a non-MPLS network, the ingress of an LSP creates an MPLS header in the packet and inserts a specific label into this field. The IP packet is then considered to be an MPLS packet. A label is meaningful to only a local end. A FEC can be mapped to multiple incoming labels to balance loads, but a label represents only a single FEC on an LSR.

Figure 1-5 illustrates the structure of a 4-byte MPLS label header.

Figure 1-5 Structure of the MPLS label header

An MPLS label header contains the following fields:

  • Label: a 20-bit field that identifies a label value.

  • Exp: a 3-bit field used for extension. This field is used by the class of service (CoS) function, which is similar to Ethernet 802.1p.

  • BoS: a 1-bit field that identifies the bottom of a label stack. MPLS supports multiple labels, which are stacked. If the BoS field of a label is set to 1, the label is at the bottom of the label stack.

  • TTL: an 8-bit field indicating a time to live (TTL) value. This field implements the same function as the TTL field in IP packets.

Labels are encapsulated between the data link layer and network layer, and are supported by all data link layer protocols. Figure 1-6 illustrates the position of the label in a packet.

Figure 1-6 Position of a label in a packet

A label stack contains an ordered set of labels. Figure 1-7 shows a label stack. The label close to the Layer 2 header is called the stack top label or outer label. The label close to the Layer 3 header is called stack bottom label or inner label. Theoretically, the number of MPLS labels that can be stacked is unlimited.

Figure 1-7 Label stack

The labels are processed from the top of the label stack based on the last in, first out rule.

The following label operations are defined in the LFIB:

  • Push: label adding operation. It is performed by the ingress and transit nodes of an MPLS network. When an IP packet reaches the ingress of an MPLS network, the ingress adds a label between the Layer 2 header and the Layer 3 header of the packet before forwarding the packet. A transit node inside the MPLS network may also add a label to the top of the label stack as needed.

  • Swap: label replacement operation. It is performed by a transit node to replace a label on the top of the label stack in an MPLS packet with another label, which is assigned by the next hop.

  • Pop: label removal operation. It is performed by the egress to remove the label. It may also be performed by the penultimate LSR to decrease the number of labels in the label stack.

At the last hop, the label becomes unnecessary. Penultimate hop popping (PHP) can be used to enable the penultimate LSR to remove a label from a packet to be sent to the egress. In real world situations, many LSPs may share the same egress. Therefore PHP helps reduce the burden on the egress. The egress forwards the packet over an IP route or based on the next label. PHP is configured on the egress to assign label 3 to a penultimate LSR. Label 3 indicates an implicit-null label that never appears in a label stack. Once an implicit-null label is assigned to an LSR, the LSR directly removes the existing label. The LSR does not need to replace the existing label with this implicit-null label at the top of the label stack. The egress then forwards the packets over IP routes or based on the next layer label.

Allocating Labels to Establish an LSP

MPLS assigns packets to a FEC, distributes labels that identify the FEC, and establishes an LSP. Packets then travel along the LSP. Labels are assigned and distributed by a downstream LSR to an upstream LSR.

Downstream LSRs assign labels for the FEC to upstream LSRs. Through a label advertisement protocol, a downstream LSR informs its upstream LSR of the label. Each upstream LSR adds the label to the local LFIB. Then an LSP is established. Figure 1-8 illustrates MPLS LSP establishment.

Figure 1-8 MPLS LSP establishment

LSPs are classified as static LSPs or dynamic LSPs. Static LSPs are manually configured. Dynamic LSPs are dynamically established using a routing protocol and a label distribution protocol.

MPLS utilizes multiple label distribution protocols, such as the Label Distribution Protocol (LDP), Resource Reservation Protocol - Traffic Engineering (RSVP-TE), and Multiprotocol Extensions for Border Gateway Protocol (MP-BGP).

LDP is a widely used protocol for label distribution. It defines messages in the label distribution process as well as procedures for processing these messages. LSRs create a mapping of incoming labels, next-hop nodes, and outgoing labels contained in the LFIBs for specified FECs. The mapping is then used to establish LSPs.

Configuring a Static LSP

As shown in Figure 1-9, OSPF runs on three nodes. Configure a static LSP on the network, with LSRA functioning as the ingress and LSRC as the egress.

Figure 1-9 Static LSP

In this example, interface 1 and interface 2 represent GE 1/0/0 and GE 2/0/0, respectively.


Table 1-1 provides example configuration files of the three nodes.

Table 1-1 Example configuration files of the static LSP configuration

LSRA

LSRB

LSRC

#
sysname LSRA
#
mpls lsr-id 192.168.1.9
#
mpls
#
interface GigabitEthernet1/0/0
 undo shutdown  
 ip address 10.1.1.1 255.255.255.0
 mpls           
#               
interface LoopBack1
 ip address 192.168.1.9 255.255.255.255
#               
ospf 1          
 area 0.0.0.0   
  network 10.1.1.0 0.0.0.255
  network 192.168.1.9 0.0.0.0
#               
 static-lsp ingress AtoC destination 192.168.3.9 32 nexthop 10.1.1.2 out-label 20
#
return
#
sysname LSRB
#
mpls lsr-id 192.168.2.9
#
mpls
#
interface GigabitEthernet1/0/0
 undo shutdown  
 ip address 10.1.1.2 255.255.255.0
 mpls           
#               
interface GigabitEthernet2/0/0
 undo shutdown  
 ip address 10.2.1.1 255.255.255.0
 mpls           
#               
interface LoopBack1
 ip address 192.168.2.9 255.255.255.255
#               
ospf 1          
 area 0.0.0.0   
  network 10.1.1.0 0.0.0.255
  network 10.2.1.0 0.0.0.255
  network 192.168.2.9 0.0.0.0
# 
 static-lsp transit AtoC in-label 20 outgoing-interface GigabitEthernet2/0/0 nexthop 10.2.1.2 out-label 40
#
return
#
sysname LSRC
#
mpls lsr-id 192.168.3.9
#
mpls
#
interface GigabitEthernet1/0/0
 undo shutdown  
 ip address 10.2.1.2 255.255.255.0
 mpls           
#               
interface LoopBack1
 ip address 192.168.3.9 255.255.255.255
#               
ospf 1          
 area 0.0.0.0   
  network 10.2.1.0 0.0.0.255
  network 192.168.3.9 0.0.0.0
#
 static-lsp egress AtoC incoming-interface GigabitEthernet1/0/0 in-label 40
#
return

Verify the configuration. The following example uses the command output on LSRA. If Lsp Status is Up, the static LSP is established successfully.

<LSRA> display mpls static-lsp verbose
 No              : 1
 LSP-Name        : AtoC
 LSR-Type        : Ingress
 FEC             : 192.168.3.9/32
 In-Label        : NULL
 Out-Label       : 20
 In-Interface    : -
 Out-Interface   : GigabitEthernet1/0/0
 NextHop         : 10.1.1.2
 Static-Lsp Type : Normal
 Lsp Status      : Up

Configuring a Dynamic LDP LSP

As shown in Figure 1-10, OSPF runs on three nodes. Configure a dynamic LSP on the network, with LSRA functioning as the ingress and LSRC as the egress.

Figure 1-10 Dynamic LSP

In this example, interface 1 and interface 2 represent GE 1/0/0 and GE 2/0/0, respectively.


Table 1-2 provides example configuration files of nodes on a dynamic LSP.

Table 1-2 Example configuration files of the dynamic LSP configuration

LSRA

LSRB

LSRC

#
sysname LSRA
#
mpls lsr-id 192.168.1.9
#
mpls
#
mpls ldp
#
interface GigabitEthernet1/0/0
 undo shutdown
 ip address 10.1.1.1 255.255.255.0
 mpls
 mpls ldp
#
interface LoopBack1
 ip address 192.168.1.9 255.255.255.255
#
ospf 1
 area 0.0.0.0
  network 10.1.1.0 0.0.0.255
  network 192.168.1.9 0.0.0.0
#
return
#
sysname LSRB
#
mpls lsr-id 192.168.2.9
#
mpls
#
mpls ldp
#
interface GigabitEthernet1/0/0
 undo shutdown
 ip address 10.1.1.2 255.255.255.0
 mpls
 mpls ldp
#
interface GigabitEthernet2/0/0
 undo shutdown
 ip address 10.2.1.1 255.255.255.0
 mpls
 mpls ldp
#
interface LoopBack1
 ip address 192.168.2.9 255.255.255.255
#
ospf 1          
 area 0.0.0.0   
  network 10.1.1.0 0.0.0.255
  network 10.2.1.0 0.0.0.255
  network 192.168.2.9 0.0.0.0
# 
return
#
sysname LSRC
#
mpls lsr-id 192.168.3.9
#
mpls
#
mpls ldp
#
interface GigabitEthernet1/0/0
 undo shutdown
 ip address 10.2.1.2 255.255.255.0
 mpls
 mpls ldp
#
interface LoopBack1
 ip address 192.168.3.9 255.255.255.255
#               
ospf 1          
 area 0.0.0.0   
  network 10.2.1.0 0.0.0.255
  network 192.168.3.9 0.0.0.0
#
return
Verify the configuration. Check the LDP session status on each node. The following example uses the command output on LSRA. If Status is Operational, the dynamic LSP is established successfully.
<LSRA> display mpls ldp session
 LDP Session(s) in Public Network
 Codes: LAM(Label Advertisement Mode), SsnAge Unit(DDD:HH:MM)
 An asterisk (*) before a session means the session is being deleted.
---------------------------------------------------------------------------------
 PeerID          Status        LAM        SsnRole        SsnAge        KASent/Rcv
---------------------------------------------------------------------------------
192.168.2.9:0    Operational   DU         Passive        0000:00:22    91/91
---------------------------------------------------------------------------------
TOTAL: 1 Session(s) Found.

Related Information

For more information about MPLS and its configuration methods, see NE40E V800R011C10SPC100 Product Documentation.

Translation
Download
Updated: 2019-12-18

Document ID: EDOC1100118961

Views: 236

Downloads: 31

Average rating:
This Document Applies to these Products

Related Version

Related Documents

Share
Previous Next