0% found this document useful (0 votes)
1 views39 pages

01 MPLS Implementation and Configuration

The document discusses the Multiprotocol Label Switching (MPLS) protocol, which enhances packet forwarding efficiency by using labels instead of traditional IP routing methods. It outlines the objectives of an MPLS course, covering basic concepts, forwarding processes, and static Label Switched Path (LSP) configurations. Additionally, it explains MPLS terminology, including LSRs, FECs, and label processing, while highlighting MPLS's applications in various network scenarios.

Uploaded by

temel.hicyilmaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views39 pages

01 MPLS Implementation and Configuration

The document discusses the Multiprotocol Label Switching (MPLS) protocol, which enhances packet forwarding efficiency by using labels instead of traditional IP routing methods. It outlines the objectives of an MPLS course, covering basic concepts, forwarding processes, and static Label Switched Path (LSP) configurations. Additionally, it explains MPLS terminology, including LSRs, FECs, and label processing, while highlighting MPLS's applications in various network scenarios.

Uploaded by

temel.hicyilmaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 39

MPLS Implementation and

Configuration
age 2 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Forewor

d
In the mid-1990s, Internet traffic grew rapidly. Traditional IP packets were forwarded by
routers based on routing tables. However, due to hardware technology limitations, the
forwarding performance of routers is low. As a result, this mode becomes a bottleneck for
network data forwarding.

As such, the Multiprotocol Label Switching (MPLS) protocol is proposed. It is designed to speed
up packet forwarding on routers. On an MPLS network, IP packet headers are analyzed on
network edges only, and MPLS uses labels to guide packet forwarding inside the MPLS
network. Label-based forwarding features high efficient, shortening the packet processing
time.

With the continuous improvement of devices' hardware performance, the advantage of MPLS
in improving the data forwarding speed is gradually weakened. However, as MPLS supports
multi-layer label nesting and forwarding-and-control separation inside a device, MPLS is
applicable to many scenarios, such as virtual private network (VPN) and quality of service
(QoS).
age 3 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.

Objective
s

On completion of this course, you will be able to:

Understand basic MPLS concepts and terms.

Understand the principles of MPLS.

Configure static LSPs.

Describe the MPLS forwarding process.

age 4 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Content
s
1. MPLS Basics
▪ MPLS Overview

▫ MPLS Terms

▫ MPLS Labels

2. MPLS Forwarding
3. Static LSP Configuration

age 5 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Traditional IP Routing and Forwarding
Traditional IP forwarding uses the hop-by-hop forwarding mode, in which a packet is decapsulated by all
routers that receive the packet. Each router needs to obtain the network layer information and search its
routing table for a route based on the longest match rule. The repeated processes of decapsulating packets,
searching routing tables, and re-encapsulating the packets on routers result in low forwarding performance.

PC1: IP Characteristics of traditional IP routing and


PC2:
192.168.1.1/24 header
192.168.2.1/24
forwarding:
Data
IP IP • All routers need to know the network-wide routes.
header header
Data IP • The length of an IP header is not fixed, and the
IP Data
header header processing efficiency is low.
R
Data Data • Traditional IP forwarding is connectionless and cannot
3
provide good end-to-end QoS guarantee.
IG
GE0/0/
2 P R1 routing table
R R R R
5 Destination/ Preferen
1 2 6 Mask
Protocol
ce
Cost Next Hop Interface
192.168.1.25
192.168.1.0/24 Direct 0 0 GE0/0/0
4
R 192.168.0.0/16 Direct 0 0 192.168.12.1 GE0/0/2
4 0.0.0.0/0 Static 60 0 192.168.12.2 GE0/0/2

age 6 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Basic MPLS Concepts

MPLS is located between the data link layer and the network layer in the TCP/IP protocol stack
and can provide services for all network layers.

An MPLS header is added between a data-link-layer header and a network-layer header, and
data can be forwarded quickly based on the Label field in the MPLS header.

This course describes the application of MPLS on IP networks only.

IP header-based
Destination: MPLS label-based MPLS label-based forwarding
3.3.3.3 forwarding forwarding
IP network IP
network
3.3.3.0/24

Etherne
MPLS IP
t
Header Packet
Header

age 7 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Content
s
1. MPLS Basics
▫ MPLS Overview

▪ MPLS Terms

▫ MPLS Labels

2. MPLS Forwarding
3. Static LSP Configuration

age 8 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
MPLS Terms - LSR and MPLS Domain

MPLS domain: consists of a series of consecutive network devices that run MPLS.

Label switching router (LSR): a routing device, such as a router or switch, that runs MPLS. An
LSR that resides at the edge of an MPLS domain and connects to a non-MPLS network is called
a label edge router (LER). An LSR that resides inside an MPLS domain is called a core LSR.

IP IP
network network
LE Core LE
R MPLSLSR R
Domain
Etherne
MPLS IP
t
Header Packet
Header

age 9 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
MPLS Terms - LSR Classification

In addition to location-based LSR classification, LSRs can also be classified according to data
processing modes:

Ingress LSR: generally pushes an MPLS header into an IP packet and generates an MPLS packet.

Transit LSR: generally pushes a label, swaps a label, or pops out a label in a received MPLS packet, and
then forwards the packet inside the MPLS domain.

Egress LSR: generally pops out an MPLS header to restore the IP packet.

IP IP
network network
Ingress Transit Egress
LSR MPLSLSR LSR
Domain
Etherne
MPLS IP
t
Header Packet
Header

age 10 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
MPLS Terms - FEC

Forwarding equivalence class (FEC): a set of packets with similar or identical characteristics
and forwarded in the same way by LSRs.

On an MPLS network, FECs can be classified based on destination IP addresses, network masks, DSCP
values, and so on.

When a packet enters an MPLS domain, the ingress LSR determines the LSP to which the packet
belongs.

MPLS labels match FECs. A mechanism must be available for LSRs to obtain label information about
FECs.
Destination:
3.3.3.3
IP IP
network network
Ingress Transit Egress 3.3.3.0/24
LSR MPLSLSR LSR
The ingress LSR
determines the LSP to Domain
which the data belongs Etherne
MPLS IP
and adds a label to the t
Header Packet
packet. Header

age 11 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
MPLS Terms - LSP

Label switched path (LSP): a path through which a labeled packet traverses an MPLS domain to reach a
destination.

The packets of the same FEC usually traverse an MPLS domain through the same LSP. Therefore, an LSR
always uses the same label to forward the packets of the same FEC.
LSP
1

R R
4 5
Destination:
3.3.3.3
IP network IP network
1.1.1.0/24 3.3.3.0/24
R R R
Destination: 1 2 3
3.3.3.3
IP network
2.2.2.0/24
R R LSP R
8 2 MPLS
7 Etherne
6 MPLS IP
Domain t
Header Packet
Header

age 12 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Content
s
1. MPLS Basics
▫ MPLS Overview

▫ MPLS Terms

▪ MPLS Labels

2. MPLS basic principles


3. Static LSP Configuration

age 13 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
MPLS Labels
Before an IP packet enters an MPLS domain, the ingress LSR pushes an MPLS header (also called
an MPLS label) into the packet to form an MPLS labeled packet. An MPLS labeled packet can
contain one or more labels.

• Label: carries a label value and is 20 bits long.


Layer 2 • Experimental use (EXP): is mainly used for class of
MPLS labeled Label
frame IP header Payload
packet header
header service (CoS) and is 3 bits long.
• Bottom of stack (S): indicates whether a label header is
A label is inserted between the Layer the last label and is 1 bit long. If its value is 1, the current
2 frame header and the IP header.
label header is at the bottom of the label stack. If its
Label EXP S TTL
value is 0, the current label header is not at the bottom
and is followed by other label headers.
32 • Time to live (TTL): prevents a labeled packet from being
bits
infinitely forwarded when a loop occurs. It is 8 bits long
and has the same meaning as the TTL field in an IP
packet header.
age 14 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
MPLS Label Stack

MPLS allows one or more layers of label headers to be added in a packet. The ordered set of
these label headers is called label stack.

When there are multiple labels in the label stack:

The label closest to the Layer 2 header is the top label, and the S field in the label is 0.

The label closest to the IP header is the bottom label, and the S field in the label is 1.
Label stack

Stack top Stack


Layer 2 bottom
Label Label Label
frame IP header Payload
header 1 header 2 header 3
header

Label EXP 1 TTL

Label EXP 0 TTL

Label EXP 0 TTL

age 15 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Label Space
A label is a short and fixed-length identifier that has only local significance. A label
space means a label value range. The label value range and planning are as follows:

Label Value Description

Special label values. For example, 0 indicates an IPv4 explicit null


0 to 15
label, and 3 indicates an implicit null label.

16 to 1023 Label space shared by static LSPs and static CR-LSPs.

Label space for dynamic signaling protocols, such as Label


Distribution Protocol (LDP), Resource Reservation Protocol-Traffic
Engineering (RSVP-TE), and Multiprotocol Extensions for Border
1024 to
Gateway Protocol (MP-BGP).
1048575
Each dynamic signaling protocol uses an independent and
contiguous label space, which is not shared with other dynamic
signaling protocols.

age 16 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
MPLS Label Processing
LSRs can perform the following operations on labels: push, swap, and pop.
Push Swap Pop

Pus Swa
h Po
30 20 p 30 30
IP IP IP IP IP p IP
0 0 0 0

Pus Swa
20 40 30 40 Po
40 h 30 40 p 30 40 40
IP IP IP IP IP p IP
0 0 0 0 0 0 0 0 0 0

When an IP packet enters an MPLS When the packet is forwarded Before the packet leaves the MPLS
domain, the ingress adds a label inside the MPLS domain, a transit domain, the egress removes the
between the Layer 2 frame header node searches the label forwarding label of the MPLS packet.
and IP header of the packet. When table and replaces the top label
the packet reaches a transit node, with the label that is assigned by
the transit node can also add a the next hop.
new label at the top of the label
stack.

age 17 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Content
s
1. MPLS Basics
2. MPLS Forwarding
3. Static LSP Configuration

age 18 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Basic LSP Label-based
Concepts Establishment Forwarding

MPLS Forwarding Overview


The essence of MPLS forwarding is to categorize a packet into the corresponding FEC and
forward it based on the LSP pre-established for this FEC.

For the entire MPLS domain, an LSP is the path through which a packet enters and leaves the domain.
An LSP can be considered as an ordered set of LSRs.

For a single LSR, it needs to establish a label forwarding table, use labels to identify FECs, and bind
label processing and forwarding behaviors to the FECs.

IP IP IP IP
network network network network
1.1.1.0/24 2.2.2.0/24 3.3.3.0/24 4.4.4.0/24
Destination: 4.4.4.4 Destination: 4.4.4.4 Destination: 4.4.4.4

MPLS
Domain
R R R R
1 2 3
FEC1 4
Label: 200
FEC1 LSP3: {R3,
Label: 100 R4}
FEC1 LSP2: {R2, R3, R4}
Label: 100
LSP1: {R1, R2, R3, R4}

age 19 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Basic LSP Label-based
Concepts Establishment Forwarding

MPLS Architecture
The MPLS architecture consists of a control plane and a forwarding plane.

Control • Control plane:


plane
IP routing protocols ▫ Generates and maintains routing
information and label information.
RIB ▫ Runs IP routing protocols and LDP, and
stores a RIB and a LIB.
LIB LDP

User plane • Forwarding plane (also called data


FIB plane)
▫ Forwards common IP packets and MPLS
LFIB
labeled packets.

▫ Stores a FIB and an LFIB.

age 20 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Basic LSP Label-based
Concepts Establishment Forwarding

Control Plane and Forwarding Plane


Transmitting IP Data Packets and MPLS Labeled Data
Exchanging Route and Label Information
Packets

Control plane Control plane


Routing
information IP routing protocols IP routing protocols
exchange

RIB RIB

Label
information LDP LDP
exchange

User plane User plane


FIB Incoming IP FIB Outgoing IP
data packet data packet

LFIB Incoming LFIB Outgoing


labeled labeled
packet packet

age 21 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
LSP
Label-based
Basic Concepts Establishme
Forwarding
nt

LSP Establishment Principles



When the network layer protocol is IP, the route for a FEC must exist in the IP routing table of
an LSR. Otherwise, the label forwarding entry of the FEC does not take effect.

An LSR uses labels to identify a FEC, and it can correctly process an incoming packet of a FEC
only if the packet carries the correct label.
FEC: FEC: FEC: FEC:
4.4.4.0/24 4.4.4.0/24 4.4.4.0/24 4.4.4.0/24
Out Out Out Out
Label=1027 Label=1026 Label=1025 Label=Null
In Label=Null
Destination: 4.4.4.4 In Label=1027 In Label=1026 In Label=1025

IP MPLS IP network
network Domain 4.4.4.0/24
1.1.1.0/24 R R R R
1 2 3 4
• A device provides an incoming label and an outgoing label for each FEC. The incoming label indicates the one
that needs to be carried in a received packet. The outgoing label indicates the one that needs to be carried in a
sent packet.
• Assume that a packet destined for 4.4.4.0/24 is sent from R1 to R2. R1 is the upstream LSR of R2, and R3 is the
downstream LSR of R2. To ensure that a labeled packet is correctly processed and forwarded, the outgoing label
carried in the packet sent from R1 to R2 must be the same as the incoming label on R2 for the FEC to 4.4.4.0/24.
Similarly, the outgoing label on R2 for the FEC to 4.4.4.0/24 must be the same as the incoming label of R3.
age 22 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
LSP
Label-based
Basic Concepts Establishme
Forwarding
nt

LSP Establishment Methods


MPLS needs to distribute labels to packets and establish LSPs before it can forward packets. LSPs
can be either static or dynamic.

Static LSP Dynamic LSP


• Basic concepts: • Basic concepts:
▫ A static LSP is established by manually configuring ▫ Dynamic LSPs are established automatically by a label
labels for a FEC. distribution protocol.
▫ The establishment of static LSPs does not involve ▫ Label distribution protocols, also called signaling
label distribution protocols or control packet protocols, are MPLS control protocols used to identify
exchanging. Therefore, this LSP establishment mode FECs, distribute labels, and create and maintain LSPs.
consumes less resources. • Common label distribution protocol: LDP
▫ Static LSPs cannot adapt to network topology ▫ Full name: Label Distribution Protocol
changes, and require manual adjustment when the ▫ Definition: LDP is a control protocol for MPLS. It is
network topology changes. responsible for FEC classification, label distribution, and
• Application scenarios: LSP establishment and maintenance. LDP defines the
▫ Stable and small-sized network with a simple messages used in label distribution and how to process
topology these messages.
• Label distribution principles: ▫ Application scenario: LDP is widely in VPN scenarios as it
▫ A packet's outgoing label value on the current node features simple networking and configuration, supports
should be the same as the incoming label value on dynamic establishment of LSPs based on routes, and
the next hop. supports a large number of LSPs.

age 23 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Label-
LSP
Basic Concepts based
Establishment
Forwarding

MPLS Label-based Forwarding


An LSR processes packets mainly based on the FTN, NHLFE, and ILM.
FTN NHLFE ILM
• FEC-to-NHLFE (FTN): is used when • Next hop label forwarding entry • Incoming label map (ILM): guides
an LSR receives an IP packet and (NHLFE): is used when an LSR performs MPLS packet forwarding (MPLS or
needs to perform MPLS MPLS forwarding for a packet (MPLS or IP forwarding). ILMs exist only on
forwarding. FTNs exist only on IP packet). NHLFEs exist on ingresses egresses and transit nodes.
ingresses. and transit nodes. • An ILM contains the following
• An FTN contains a tunnel ID and • An NHLFE contains the following information: tunnel ID, incoming
mapping from an FEC to an information: tunnel ID, outbound label, inbound interface, and label
NHLFE. interface, next hop, outgoing label, and operation type.
label operation type.

Tunnel Out Out


FEC Tunnel ID NH In Label In IF Tunnel ID OPER
ID IF Label

1 An ingress searches its FIB for the entry with a 2 3


A transit node searches The OPER field in the ILM table
non-0x0 tunnel ID to learn detailed FTN for an NHLFE that on an egress is Pop. If a packet
information. matches the tunnel ID in contains only one label, the
the ILM table. egress removes it and then
performs IP forwarding.
age 24 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Label-
LSP
Basic Concepts based
Establishment
Forwarding

Packet Processing on an Ingress LSR


NHLFE When an IP packet enters an MPLS domain:
Out IF Tunnel ID OPER NH Out Label 1. The ingress LSR searches the FIB table and checks
3
IF2 0x11 Push 1.1.1.2 Z whether the tunnel ID corresponding to the destination
IP address is 0x0. If the tunnel ID is 0x0, the ingress
LSR performs IP forwarding for the packet.
2. If the tunnel ID is not 0x0, the ingress searches for the
2 NHLFE matching the tunnel ID in the FIB table, and
associates the FIB entry with the NHLFE.
3. The ingress LSR checks the NHLFE to learn the
FIB outbound interface, next hop, outgoing label, and label
DEST Tunnel ID operation type.
3.3.3.1/2
0x11 4. The ingress LSR pushes an outgoing label into the IP
4 packet, processes the TTL, and then sends the
1 4 encapsulated MPLS packet to the next hop.
IP: Push IP: IP: IP:
3.3.3.1
Z
3.3.3.1
Y 3.3.3.1 3.3.3.1

3.3.3.1/2
IF1 IF2 IF1 IF2 IF1 IF2 Note:
1.1.1.1/24 1.1.1.2/24 2.2.2.1/24 2.2.2.2/24
4
NH=NEXTHO
Ingres Transi Egress P
s t IF=Interface
age 25 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Label-
LSP
Basic Concepts based
Establishment
Forwarding

Packet Processing on a Transit LSR

When an MPLS packet is forwarded in


an MPLS domain:
NHLFE
5. The transit LSR searches for the ILM
Out IF Tunnel ID OPER NH Out Label that matches the MPLS label value
IF2 0x15 Swap 2.2.2.2 Y to learn the tunnel ID.
6. The transit LSR searches for the
6
NHLFE that matches the tunnel ID in
the ILM table.
7. The transit LSR checks the NHLFE to
ILM learn the outbound interface, next
In Label In IF Tunnel ID
hop, outgoing label, and label
Z IF1 0x15 operation type. If the label
operation type is Swap, the transit
5 7
LSR performs label swapping.
IP: Push IP: Swap IP: IP:
3.3.3.1
Z
3.3.3.1
Y 3.3.3.1 3.3.3.1

3.3.3.1/2
IF1 IF2 IF1 IF2 IF1 IF2 Note:
1.1.1.1/24 1.1.1.2/24 2.2.2.1/24 2.2.2.2/24
4
NH=NEXTHO
Ingres Transi Egress P
s t IF=Interface
age 26 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Label-
LSP
Basic Concepts based
Establishment
Forwarding

Packet Processing on an Egress LSR


When an MPLS packet leaves an MPLS domain:

8. An egress LSR searches the ILM table for the • S = 1: The current label is

operation type that matches the FEC of the packet. the bottom label, and IP

The operation type is always pop on an egress LSR. forwarding is performed for

As such, the egress LSR removes the label from the the packet.

packet. 9
• S = 0: The current label is

9. The egress LSR performs further processing based on not the bottom label, and a
ILM lower-layer label exists. In
the inner header in the packet. In Tunnel
In IF OPER
Label ID this case, the packet is
Y IF1 0x22 Pop
performed based on the
8
IP: Push IP: Swap IP: IP: lower-layer label.
3.3.3.1
Z
3.3.3.1
Y 3.3.3.1 3.3.3.1

3.3.3.1/2
IF1 IF2 IF1 IF2 IF1 IF2 Note:
1.1.1.1/24 1.1.1.2/24 2.2.2.1/24 2.2.2.2/24
4
NH=NEXTHO
Ingres Transi Egress P
s t IF=Interface
age 27 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Label-
LSP
Basic Concepts based
Establishment
Forwarding

Detailed MPLS Packet Forwarding


Process
NHLFE
Out IF Tunnel ID OPER NH Out Label
IF2 0x11 Push 1.1.1.2 Z

Out IF Tunnel ID OPER NH Out Label


IF2 0x15 Swap 2.2.2.2 Y
Performs further
2 6
9 processing based on the
inner packet header.

FIB LIM
DEST Tunnel ID In Label In IF Tunnel ID In Label In IF Tunnel ID
3.3.3.1/2 Z IF1 0x15 Y IF1 0x22
0x11
4
1 4 5 7 8
IP: Push IP: Swap IP: IP:
3.3.3.1
Z
3.3.3.1
Y 3.3.3.1 3.3.3.1

3.3.3.1/2
IF1 IF2 IF1 IF2 IF1 IF2 Note:
1.1.1.1/24 1.1.1.2/24 2.2.2.1/24 2.2.2.2/24
4
NH=NEXTHO
Ingres Transi Egress P
s t IF=Interface
age 28 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Content
s
1. MPLS Basics
2. MPLS Forwarding
3. Static LSP Configuration

age 29 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Basic MPLS Configuration Commands
1. Set an LSR ID.

[Huawei] mpls lsr-id lsr-id

The mpls lsr-id command sets an LSR ID. An LSR ID uniquely identifies an LSR on a network. By default, no LSR ID
is set for an LSR, and an LSR ID can only be manually set. To improve network reliability, you are advised to use the
IP address of a loopback interface on an LSR as the LSR ID and plan the LSR IDs of all LSRs on the network in a
unified manner before configuration.

2. Enable MPLS.

[Huawei] mpls
The mpls command enables MPLS on the current node and displays the MPLS view.

[Huawei-GigabitEthernet0/0/0] mpls

Enable MPLS on an interface. Before running this command, enable MPLS globally.

age 30 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Static LSP Configuration Commands
(1)
1. Configure a static LSP on an ingress LSR.

[Huawei] static-lsp ingress lsp-name destination ip-address { mask-length | mask }


{ nexthop next-hop-address | outgoing-interface interface-type interface-number } * out-
label out-label
The static-lsp ingress command configures a static LSP on an ingress.
• You are advised to specify the next-hop parameter to configure a static LSP. This ensures that the local routing
table contains the routing entry that exactly matches the specified destination IP address and next-hop IP
address. If the outbound interface of the LSP is an Ethernet interface, you must specify nexthop next-hop-
address to ensure normal forwarding along the LSP.
• The value of out-label ranges from 16 to 1048575.
2. Configure a static LSP on a transit LSR.

[Huawei] static-lsp transit lsp-name [ incoming-interface interface-type interface-number ] in-


label in-label { nexthop next-hop-address | outgoing-interface interface-type interface-
number }* out-label out-label
The static-lsp transit command configures a static LSP on a transit node.
• The configuration rules of the next hop and outbound interface are the same as those for an ingress LSR.
• The value of in-label ranges from 16 to 1023.
• The value of out-label ranges from 16 to 1048575.

age 31 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Static LSP Configuration Commands
(2)
3. Configure a static LSP on an egress LSR.

[Huawei] static-lsp egress lsp-name [ incoming-interface interface-type interface-number ] in-


label in-label
The static-lsp egress command configures a static LSP on an egress LSR.
• The value of in-label ranges from 16 to 1023.

4. Check information about static LSPs.

[Huawei] display mpls static-lsp [ lsp-name ] [ { include | exclude } ip-address mask-length ]


[ verbose ]
The display mpls static-lsp command displays information about static LSPs.

age 32 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Static LSP Configuration Example (1)

Use case: An IGP has been deployed on R1, R2, and R3. The networks 1.1.1.0/24 and 3.3.3.0/24 can
communicate with each other. In this scenario, configure static LSPs to allow the two networks to
communicate through MPLS. The following figure shows the distributed labels.

Configuration roadmap:
1. Enable MPLS on the devices and interfaces.

2. Configure static LSPs as planned.

FEC: FEC: FEC:


3.3.3.0/24 3.3.3.0/24 3.3.3.0/24
Out Out Out
Label=200 Label=300 Label=Null
In Label=Null In Label=200 In Label=300
GE0/0/0 GE0/0/0 GE0/0/1 GE0/0/0
IP 10.0.12.1/ 10.0.12.2/ 10.0.23.2/ 10.0.23.3/ IP
24 24 24 24
network network
1.1.1.0/24 R MPLS R R 3.3.3.0/24
1 Domain 2 3
LSP

age 33 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Static LSP Configuration Example (2)
1. The LSR IDs of the three routers are 10.1.1.1, 10.1.1.2, and 10.1.1.3, respectively. The following
example uses R1 to describe the configuration. Enable MPLS globally and on interfaces on R1.

[R1]mpls lsr-id 10.1.1.1


[R1]mpls
Info: Mpls starting, please wait... OK!
[R1-mpls]quit
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]mpls
[R1-GigabitEthernet0/0/0]quit]

FEC: FEC: FEC:


3.3.3.0/24 3.3.3.0/24 3.3.3.0/24
Out Out Out
Label=200 Label=300 Label=Null
In Label=Null In Label=200 In Label=300
GE0/0/0 GE0/0/0 GE0/0/1 GE0/0/0
IP network 10.0.12.1/ 10.0.12.2/ 10.0.23.2/ 10.0.23.3/ IP network
1.1.1.0/24 24 24 24 24 3.3.3.0/24
R MPLS R R
1 Domain 2 3
LSP

age 34 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Static LSP Configuration Example (3)
2. Configure a static LSP from R1 to R3.

[R1] static-lsp ingress 1to3 destination 3.3.3.0 24 nexthop 10.0.12.2 out-label 200

[R2] static-lsp transit 1to3 incoming-interface GigabitEthernet 0/0/0 in-label 200 nexthop 10.0.23.3 out-label
300
[R3] static-lsp egress 1to3 incoming-interface GigabitEthernet 0/0/0 in-label 300

FEC: FEC: FEC:


3.3.3.0/24 3.3.3.0/24 3.3.3.0/24
Out Out Out
Label=200 Label=300 Label=Null
In Label=Null In Label=200 In Label=300
GE0/0/0 GE0/0/0 GE0/0/1 GE0/0/0
IP 10.0.12.1/ 10.0.12.2/ 10.0.23.2/ 10.0.23.3/ IP
network 24 24 24 24
network
1.1.1.0/24 R MPLS R R 3.3.3.0/24
1 Domain 2 3
LSP

age 35 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Static LSP Configuration Example -
Checking the Configuration
[R1]display mpls lsp [R2]display mpls lsp
--------------------------------------------------------------------- ---------------------------------------------------------------------
LSP Information: STATIC LSP LSP Information: STATIC LSP
--------------------------------------------------------------------- ---------------------------------------------------------------------
FEC In/Out Label In/Out IF Vrf Name FEC In/Out Label In/Out IF Vrf Name

3.3.3.0/24 NULL/200 -/GE0/0/0 3.3.3.0/24 200/300 GE0/0/0/GE0/0/1

[R3]display mpls lsp


The ping test from the host on the
--------------------------------------------------------------------- 1.1.1.0/24 network segment to the host
LSP Information: STATIC LSP on the 3.3.3.0/24 network segment is
successful.
---------------------------------------------------------------------
FEC In/Out Label In/Out IF Vrf Name Why can bidirectional communication be
implemented when only a unidirectional
3.3.3.0/24 300/NULL GE0/0/0/- static LSP from 1.1.1.0/24 to 3.3.3.0/24 is
configured?

age 36 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Static LSP Configuration Example -
Packet Header Obtaining Analysis
No. Time Source Destination Protocol Length Info
5 12.109000 1.1.1.1 3.3.3.3 ICMP 102 Echo
(ping) request
Frame 5: 102 bytes on wire (816 bits), 102 bytes captured (816 bits) on interface 0
Ethernet II, Src: HuaweiTe_b1:15:3e (00:e0:fc:b1:15:3e), Dst: HuaweiTe_49:20:bb
(00:e0:fc:49:20:bb)
MultiProtocol Label Switching Header, Label: 300, Exp: 0, S: 1, TTL: 254
Internet Protocol Version 4, Src: 1.1.1.1, Dst: 3.3.3.3
Internet
No. Control
TimeMessageSource
Protocol Destination Protocol Length Info
6 12.141000 3.3.3.3 1.1.1.1 ICMP 98 Echo (ping) reply
Frame 6: 98 bytes on wire (784 bits), 98 bytes captured (784 bits) on interface 0
Ethernet II, Src: HuaweiTe_49:20:bb (00:e0:fc:49:20:bb), Dst: HuaweiTe_b1:15:3e
(00:e0:fc:b1:15:3e)
Internet Protocol Version 4, Src: 3.3.3.3, Dst: 1.1.1.1
Internet Control Message Protocol
According to the obtained packet information, the packets from the
host on the 1.1.1.0/24 network segment to the host on the 3.3.3.0/24
network segment are forwarded based on MPLS labels.
The packets from the host on the 3.3.3.0/24 network segment to the
host on the 1.1.1.0/24 network segment are forwarded based on IP
packet headers.

age 37 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Quiz
1. (Multi-Answer) Which of the following statements about an MPLS header are
correct?
A. An MPLS header is 32 bits long.

B. The value of the Label field in an MPLS header ranges from 0 to 65535.

C. MPLS can implement multi-layer MPLS header nesting.

D. The max_hop field in an MPLS header can be used to prevent labeled packets from being
infinitely forwarded.

2. (Single-Answer) The values of the incoming and the outgoing label both range from
16 to 1023 for a static LSP to be configured on a transit LSR.
A. True

B. False
age 38 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Summar

y
MPLS was originally proposed to solve the problem of low forwarding speed of
traditional IP routers. MPLS implements fast forwarding through label headers.

An MPLS label is a short and fixed-length identifier that has only local significance. It
is used to uniquely identify the FEC to which a packet belongs. Label operations on
an LSR include push, swap, and pop.

MPLS consists of the control plane and data plane. The control plane transmits
routing information and distributes labels, and the data plane forwards data.

With the development of technologies, the advantage of MPLS in the data
forwarding speed is weakened gradually, but MPLS is widely used in the VPN area
due to its pros.

age 39 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Thank You
www.huawei.com

age 40 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.

You might also like