Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
180 views29 pages

01-03 MPLS QoS Configuration

Huawei docs

Uploaded by

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

01-03 MPLS QoS Configuration

Huawei docs

Uploaded by

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

CloudEngine 12800 Series Switches

Configuration Guide - MPLS 3 MPLS QoS Configuration

3 MPLS QoS Configuration

On an MPLS network, MPLS QoS controls enterprise network traffic, and


implements congestion avoidance and congestion management to reduce packet
loss. In addition, MPLS QoS provides dedicated bandwidth for enterprise users or
differentiated services (such as voice, video, and data services).

3.1 Overview of MPLS QoS


3.2 Understanding MPLS QoS
3.3 Licensing Requirements and Limitations for MPLS QoS
3.4 Default Settings for MPLS QoS
3.5 Configuring MPLS QoS
3.6 Configuration Examples for MPLS QoS

3.1 Overview of MPLS QoS


Definition
Multiprotocol Label Switching quality of service (MPLS QoS) is implemented using
the Differentiated Services (DiffServ) model on an MPLS network. MPLS QoS
provides differentiated services to meet diversified requirements.

Purpose
MPLS uses label-based forwarding to replace route-based forwarding and provides
powerful and flexible functions to meet requirements of new applications. In
addition, MPLS supports multiple network protocols including IPv4 and IPv6. MPLS
has been widely used for building large-scale networks. On an MPLS network, IP
QoS cannot be used to guarantee quality of services, so MPLS QoS is used.

Similar to the way IP QoS differentiates services based on priorities of IP packets,


MPLS QoS differentiates data flows based on the EXP field and provides
differentiated services for data flows. The use of MPLS QoS helps minimize delays
and ensure low packet loss ratios for voice and video data streams.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 119


CloudEngine 12800 Series Switches
Configuration Guide - MPLS 3 MPLS QoS Configuration

3.2 Understanding MPLS QoS

3.2.1 MPLS DiffServ

Implementation
In the DiffServ model, network edge nodes map a service to a service class based
on QoS requirements of the service. A service class is identified by the
differentiated service (DS) field (Type of Service (ToS) field) in IP packets or the
PRI field (802.1p priority) in VLAN packets. Nodes on a backbone network apply
preset policies to the service based on the DS or PRI field to ensure service quality.
For details, see Priority Mapping Configuration (CE12800) in CloudEngine 12800
and 12800E Series Switches Configuration Guide - QoS. The service classification
and label distribution mechanisms of DiffServ are similar to MPLS label
distribution. MPLS DiffServ combines DS or PRI distribution with MPLS label
distribution.

NOTE

Currently, the switches do not support the DiffServ function of the MPLS TE feature.

Figure 3-1 Fields in an MPLS packet

Link layer header MPLS Label Layer 3 header Layer 3 payload

0 19 22 23 31
Label Exp S TTL

MPLS DiffServ maps the EXP field (as shown in Figure 3-1) to a per-hop behavior
(PHB). LSRs forward MPLS packets based on EXP fields in the MPLS packets. MPLS
DiffServ provides the following solutions for label switched path (LSP) setup:
● E-LSP: an LSP whose PHB is determined by the EXP field. E-LSP applies to a
network with fewer than eight PHBs. A differentiated services code point
(DSCP) or 802.1p priority is mapped to a specified EXP value that identifies a
PHB. Table 3-1 describes the mapping between PHBs and EXP values. Packets
are forwarded based on labels, and the EXP field determines the packet
scheduling algorithm and drop priority at each hop. An LSP transmits a
maximum of eight PHB flows that are identified by the EXP field in the MPLS
packet header. The EXP value can be configured by the Internet service
provider (ISP) or mapped from the DSCP or 802.1p priority in a packet. In E-
LSP, PHB information does not need to be transmitted by signaling protocols.
Additionally, the label efficiency is high, and the label status is easy to
maintain.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 120


CloudEngine 12800 Series Switches
Configuration Guide - MPLS 3 MPLS QoS Configuration

Table 3-1 Mapping between DiffServ PHBs and EXP values

PHB EXP Value

BE 0

AF1 1

AF2 2

AF3 3

AF4 4

EF 5

CS6 6

CS7 7

● L-LSP: an LSP whose PHB is determined by both the label and EXP value. L-
LSP applies to a network with any number of PHBs. During packet forwarding,
the label of a packet determines the forwarding path and scheduling
algorithm, whereas the EXP field determines the drop priority of the packet.
Labels differentiate service flows, so service flows of a specified type are
transmitted over the same LSP. This solution requires more labels and
occupies a large number of system resources.
NOTE

The device supports only E-LSP.

DiffServ Domain
As shown in Figure 3-2, DiffServ domains include MPLS DiffServ and IP DiffServ
domains.
In the E-LSP solution, MPLS DiffServ manages and schedules the two DiffServ
domains and implements bidirectional mapping between DSCP or 802.1p priorities
and EXP priorities at the MPLS network edge.

Figure 3-2 DiffServ domain

PE PE
MPLS
DiffServ Domain

CE CE

IP IP
DiffServ Domain DiffServ Domain

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 121


CloudEngine 12800 Series Switches
Configuration Guide - MPLS 3 MPLS QoS Configuration

As shown in Figure 3-3, the MPLS DiffServ domain forwards MPLS packets based
on EXP values and provides differentiated services.
When MPLS packets enter the P device, the P device classifies packets and maps
EXP values in packets to class of service (CoS) values and drop priorities. After
traffic classification, QoS implementations including traffic shaping, traffic
policing, and congestion avoidance are the same as those on an IP network. When
MPLS packets leave the P device, the packets carry EXP values.

Figure 3-3 E-LSP

PE_1 P PE_2

EXP=5 EXP=0 EXP=0 EXP=5

E-LSP

BE
queue

EF
queue

3.2.2 MPLS DiffServ Tunnel Modes


An MPLS VPN DiffServ domain supports three tunnel modes:
NOTE

● The MPLS public network and MPLS L3VPN network support the uniform and short pipe
modes.
● The MPLS L2VPN network supports the uniform and pipe modes.
● Uniform: Packet priorities are uniformly defined on the IP network and the
MPLS network, so the priorities are globally valid. On the ingress node, each
packet is assigned a label and its DSCP or 802.1p priority is mapped to an EXP
value. A change in the EXP value on the MPLS network determines the PHB
used when the packet leaves the MPLS network. The egress node maps the
EXP value to the DSCP or 802.1p priority. Figure 3-4 shows priority mapping
in a uniform tunnel using an L3VPN network as an example. PE_1 maps the
DSCP priority to the outer and inner MPLS EXP values (5). P_2 pops out the
outer MPLS label and changes the inner MPLS EXP value to the outer MPLS
EXP value. PE_2 changes the DSCP priority to 46.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 122


CloudEngine 12800 Series Switches
Configuration Guide - MPLS 3 MPLS QoS Configuration

Figure 3-4 Uniform mode

CE_1 PE_1 P_1 P_2 PE_2 CE_2

IP/MPLS backbone
network

Outer MPLS Outer MPLS


EXP 5 EXP 5
Inner MPLS Inner MPLS Inner MPLS
EXP 5 EXP 5 EXP 5
IP DSCP IP DSCP IP DSCP IP DSCP IP DSCP IP DSCP
40 40 40 40 46 46

● Pipe: The EXP value can be manually configured, and the ingress node adds
this EXP value to MPLS packets. Any change in the EXP value is valid only on
the MPLS network. The egress node selects the PHB for MPLS packets
according to the EXP value. When the packets leave the MPLS network, their
DSCP or 802.1p priority is still valid. Figure 3-5 shows priority mapping in a
pipe tunnel using an L2VPN network as an example. PE_1 changes the outer
and inner MPLS EXP values to 1. PE_2 retains the DSCP priority of packets and
selects a PHB based on the inner MPLS EXP value.

Figure 3-5 Pipe mode

CE_1 PE_1 P_1 P_2 PE_2 CE_2

IP/MPLS backbone
network

Outer MPLS Outer MPLS PHB


EXP 1 EXP 1 Inner MPLS
EXP 1 determined by
Inner MPLS Inner MPLS Inner MPLS the EXP priority
EXP 1 EXP 1 EXP 1
802.1p 802.1p 802.1p 802.1p 802.1p 802.1p
4 4 4 4 4 4

● Short pipe: The EXP value can be manually configured, and the ingress node
adds this EXP value to MPLS packets. Any change in the EXP value is valid
only on the MPLS network. The egress node selects the PHB for MPLS packets
according to the DSCP or 802.1p priority. When the packets leave the MPLS
network, their DSCP or 802.1p priority is still valid. Figure 3-6 shows priority
mapping in a short-pipe tunnel using an L3VPN network as an example. PE_1

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 123


CloudEngine 12800 Series Switches
Configuration Guide - MPLS 3 MPLS QoS Configuration

changes the outer and inner MPLS EXP values to 1. PE_2 retains the DSCP
priority of packets and selects a PHB on the DSCP priority.

Figure 3-6 Short pipe mode

CE_1 PE_1 P_1 P_2 PE_2 CE_2

IP/MPLS backbone
network

Outer MPLS Outer MPLS


EXP 1 EXP 1 PHB determined by
Inner MPLS Inner MPLS Inner MPLS the DSCP priority
EXP 1 EXP 1 EXP 1
IP DSCP IP DSCP IP DSCP IP DSCP IP DSCP IP DSCP
40 40 40 40 40 40

3.3 Licensing Requirements and Limitations for MPLS


QoS
Involved Network Elements
Other network elements are not required.

License Requirements
You can use the MPLS QoS feature only after the MPLS function is enabled. The
MPLS function is controlled by a license. By default, this function is disabled on a
newly purchased switch. To use the MPLS function, apply for and purchase the
license from the equipment supplier.

Version Requirements

Table 3-2 Products and minimum version supporting this feature

Product Model Minimum Version


Required

CE12804/CE12808/CE12812 V100R001C00

CE12816 V100R003C00

CE12804S/CE12808S V100R005C00

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 124


CloudEngine 12800 Series Switches
Configuration Guide - MPLS 3 MPLS QoS Configuration

Feature Limitations
When configuring MPLS QoS on the switch, pay attention to the following points:
● CE switches cannot function as PE devices on an MPLS network.
● When configuring MPLS QoS or MPLS L3VPN QoS, you can configure the
MPLS DiffServ mode only on the ingress and egress nodes. The MPLS DiffServ
mode does not take effect on the transit node.
● When configuring MPLS L2VPN QoS, you can only set the MPLS DiffServ
mode to Uniform, so that the device maps 802.1p priorities of packets to EXP
priorities.
● On a transit device, all the following cards cannot perform internal priority
mapping based on the EXP priority of MPLS packets. By default, these cards
map the internal priority based on the 802.1p priority. In this case, you can
configure MQC to map the EXP priority of MPLS packets (if-match mpls-exp)
to the internal priority (remark local-precedence). The involved cards are as
follows: CE-L48GT-EA, CE-L48GT-EC, CE-L48GS-EA, CE-L48GS-EC, CE-L24XS-
BA, CE-L24XS-EA, CE-L48XS-BA, CE-L48XS-EA and CE-L24LQ-EA.
● When the switch is not configured with the MPLS PHP function and uses the
inner label to forward packets after the outer label pops up (for example, the
switch serves as an ASBR in the inter-AS VPN Option B or inter-AS VPN
Option C scenario), the EXP in the label of the forwarded packets cannot be
obtained from outbound priority mappings based on the PHB, and the EXP in
the inner label is used.
● On the CE12800, the user-configured EXP value is preferred as the EXP value
in the outer label of L2VPN packets. If no EXP value is configured, the EXP
value in the inner label is used as the EXP value in the outer label.

In addition, MPLS QoS is developed based on MPLS LDP. For other configuration
notes about MPLS LDP, see MPLS LDP Configuration Notes.

3.4 Default Settings for MPLS QoS


By default, the mappings in the DiffServ domain are as follows:

● Table 3-3 lists the mappings from DSCP priorities to EXP priorities in MPLS
packets.
● Table 3-4 lists the mappings between EXP priorities in MPLS packets, DSCP
priorities, and PHBs and colors.

Table 3-3 Mapping from DSCP priorities to EXP priorities in the outbound
direction in the DiffServ domain

DSCP EXP DSCP EXP

0 0 32 4

1 0 33 4

2 0 34 4

3 0 35 4

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 125


CloudEngine 12800 Series Switches
Configuration Guide - MPLS 3 MPLS QoS Configuration

DSCP EXP DSCP EXP

4 0 36 4

5 0 37 4

6 0 38 4

7 0 39 4

8 1 40 5

9 1 41 5

10 1 42 5

11 1 43 5

12 1 44 5

13 1 45 5

14 1 46 5

15 1 47 5

16 2 48 6

17 2 49 6

18 2 50 6

19 2 51 6

20 2 52 6

21 2 53 6

22 2 54 6

23 2 55 6

24 3 56 7

25 3 57 7

26 3 58 7

27 3 59 7

28 3 60 7

29 3 61 7

30 3 62 7

31 3 63 7

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 126


CloudEngine 12800 Series Switches
Configuration Guide - MPLS 3 MPLS QoS Configuration

Table 3-4 Mapping between EXP priorities in MPLS packets, DSCP priorities, and
PHBs and colors in the inbound direction in the DiffServ domain

EXP Priority CoS Value Color DSCP

0 BE Green 0

1 AF1 Green 10

2 AF2 Green 18

3 AF3 Green 26

4 AF4 Green 34

5 EF Green 46

6 CS6 Green 48

7 CS7 Green 56

3.5 Configuring MPLS QoS

3.5.1 Configuring MPLS Public QoS


After you configure MPLS Public QoS, differentiated services are provided for
different services on the MPLS public network based on the service priorities.

Pre-configuration Tasks
Before configuring MPLS QoS, complete the following tasks:

● Configure IP addresses for interfaces to ensure that neighboring nodes are


reachable at the network layer.
● Configure an IGP to advertise the network segments connecting to interfaces
on each node and the routes of hosts with LSR IDs.
● Configure MPLS and MPLS LDP.

Context
To implement certain QoS functions on an MPLS network, devices on the network
need to determine the packet priorities based on the MPLS labels. Therefore, you
need to map the MPLS labels to EXP priorities.

MPLS QoS can differentiate different services on an MPLS network. If you want to
retain priorities carried in original packets regardless of the change in the EXP
field, set the DiffServ mode to short pipe. If you set the DiffServ mode to uniform,
priorities carried in original packets may be changed. In uniform mode, the egress
node determines the per-hop behavior (PHB) based on EXP priorities of packets. In
short pipe mode, the egress node determines the PHB based on Differentiated
Service Code Point (DSCP) priorities of packets.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 127


CloudEngine 12800 Series Switches
Configuration Guide - MPLS 3 MPLS QoS Configuration

NOTE

The MPLS DiffServ mode configured on a transit device does not take effect.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Create a DiffServ domain and configure priority mapping.

For details, see Priority Mapping Configuration in CloudEngine 12800 and 12800E
Series Switches Configuration Guide - QoS.
● Performing the following steps on the ingress:
a. Run diffserv domain ds-domain-name
A DiffServ domain is created and the DiffServ domain view is displayed.
The default domain defines default mappings from packet priorities to
PHBs. You can modify the mapping defined in the default domain but
cannot delete the default domain. In addition to the DiffServ domain
default, a maximum of six user-defined DiffServ domains can be created.
b. Run mpls-exp-outbound dscp-value map exp-value
The DSCP priority is mapped to the EXP priority of MPLS packets in the
outbound direction of an interface.
For details on the default mapping from the DSCP priority to the EXP
priority, see mpls-exp-outbound.
The DSCP priority in this command is the priority carried in packets of a
device's outbound interface.
c. Run quit
Return to the system view.
● Performing the following steps on the egress:
a. Run diffserv domain ds-domain-name
A DiffServ domain is created and the DiffServ domain view is displayed.
The default domain defines default mappings from packet priorities to
PHBs. You can modify the mapping defined in the default domain but
cannot delete the default domain. In addition to the DiffServ domain
default, a maximum of six user-defined DiffServ domains can be created.
b. Run mpls-exp-inbound exp-value phb service-class
The EXP priority of MPLS packets is mapped to the PHB in the inbound
direction of an interface.
For details on the default mapping from the EXP priority to the PHB, see
mpls-exp-inbound.
The EXP priority of MPLS packets is mapped to green in the inbound
direction of an interface.
c. Run quit
Return to the system view.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 128


CloudEngine 12800 Series Switches
Configuration Guide - MPLS 3 MPLS QoS Configuration

NOTE

To apply a user-defined DiffServ domain to a Layer 3 interface on the ingress node


receiving the packets or a Layer 3 interface on the egress node receiving the packets, run
the trust upstream ds-domain-name command in the Layer 3 interface view.

Step 3 Configure the MPLS DiffServ mode.


Run mpls mode { short-pipe [ ttl ttl-value exp exp-value | domain ds-name ] |
uniform [ domain ds-name ] }
The MPLS DiffServ mode is set.
By default, the MPLS DiffServ mode is uniform.

NOTE

When running the mpls mode short-pipe ttl ttl-value exp exp-value command, specify the
same EXP value for the outer and inner MPLS labels. If the parameter exp is not specified,
the inbound interface performs priority mapping for incoming packets based on the original
priorities.
When the MPLS DiffServ mode is uniform, the egress node maps EXP priorities of packets
to DSCP priorities. To map PHBs to DSCP priorities, configure the qos phb marking dscp
enable command in the system view.

Step 4 Run commit


The configuration is committed.

----End

Checking the Configuration


Run the display diffserv domain [ brief | ds-domain-name ] command to view
the DiffServ domain configuration.

3.5.2 Configuring MPLS L3VPN QoS


Context
After you configure MPLS VPN QoS, differentiated services are provided for
different services on the MPLS L3VPN network based on the service priorities.
The configuration of MPLS L3VPN QoS is similar to the configuration of QoS on
the MPLS public network. For detailed configuration, see 3.5.1 Configuring MPLS
Public QoS.

3.5.3 Configuring MPLS L2VPN QoS


Context
After you configure MPLS VPN QoS, differentiated services are provided for
different services on the MPLS L2VPN network based on the service priorities.
On an MPLS L2VPN network, you can configure MPLS L2VPN QoS to differentiate
services in a VPN. To retain the priorities of original packets, set the DiffServ mode
to pipe. To change the priorities of original packets, set the DiffServ mode to
uniform.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 129


CloudEngine 12800 Series Switches
Configuration Guide - MPLS 3 MPLS QoS Configuration

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Create a DiffServ domain and configure priority mapping.


● Performing the following steps on the ingress:
a. Run diffserv domain ds-domain-name
A DiffServ domain is created and the DiffServ domain view is displayed.
The default domain defines default mappings from packet priorities to
PHBs. You can modify the mapping defined in the default domain but
cannot delete the default domain. In addition to the DiffServ domain
default, a maximum of six user-defined DiffServ domains can be created.
b. Run exp-outbound service-class color map exp-value
The PHB and color in original packets are mapped to the EXP priority of
VPLS packets in the outbound direction of an interface.
For details on the default mapping from PHBs and colors in original
packets to EXP priorities of VPLS packets in the outbound direction of an
interface in a DiffServ domain, see exp-outbound.
c. Run quit
Return to the system view.
● Performing the following steps on the egress:
a. Run diffserv domain ds-domain-name
A DiffServ domain is created and the DiffServ domain view is displayed.
The default domain defines default mappings from packet priorities to
PHBs. You can modify the mapping defined in the default domain but
cannot delete the default domain. In addition to the DiffServ domain
default, a maximum of six user-defined DiffServ domains can be created.
b. Run exp-inbound exp-value phb service-class color
The EXP priority of VPLS packets is mapped to the PHB in the inbound
direction of an interface.
For details on the default mapping from EXP priorities of VPLS packets to
PHBs and colors in the inbound direction of an interface in a DiffServ
domain, see exp-inbound.
c. Run quit
Return to the system view.
NOTE

If a user-defined DiffServ domain is used:


1. When a VLANIF interface is connected to an L2VPN, you need to run the trust
upstream ds-domain-name command in the VLAN view of the egress node to apply
this domain.
2. When a BD is connected to an L2VPN, you need to run the trust upstream ds-domain-
name command in the BD view or Layer 2 sub-interface view to apply this domain. The
configuration in the Layer 2 sub-interface view takes precedence over that in the BD
view.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 130


CloudEngine 12800 Series Switches
Configuration Guide - MPLS 3 MPLS QoS Configuration

Step 3 Run mpls l2vpn mode { pipe | uniform } [ domain ds-name ]

The DiffServ mode for MPLS L2VPN is specified and applied to a DiffServ domain.

When the DiffServ mode for MPLS L2VPN is Uniform, the 802.1p priorities of
packets can only be mapped to EXP priorities.

NOTE

On the CE6870EI or CE6875EI:


1. When a VLANIF interface is connected to an L2VPN and the DiffServ mode is set to
pipe, the egress node will map PHBs to 802.1p priorities for outgoing packets if the
interface encapsulation type is changed to Ethernet using the encapsulation ethernet
command. The mappings are pre-defined by the system and cannot be changed.
2. When a BD is connected to an L2VPN and the DiffServ mode is set to uniform, packets
will retain their 802.1p priorities when leaving the network if a QinQ transparent
transmission Layer 2 sub-interface, Dot1q transparent transmission Layer 2 sub-
interface, or default Layer 2 sub-interface (allowing tagged packets) is connected to the
L2VPN.
3. When a BD is connected to an L2VPN and the DiffServ mode is set to pipe, the egress
node will map PHBs to 802.1p priorities for outgoing packets if a QinQ termination
Layer 2 sub-interface or Dot1q termination Layer 2 sub-interface is connected to the
L2VPN. The mappings are pre-defined by the system and cannot be changed.

Step 4 Run commit

The configuration is committed.

----End

Checking the Configuration


Run the display diffserv domain [ brief | ds-domain-name ] command to view
the DiffServ domain configuration.

3.6 Configuration Examples for MPLS QoS


This section only provides configuration examples for individual features. For
details about multi-feature configuration examples, feature-specific configuration
examples, interoperation examples, protocol or hardware replacement examples,
and industry application examples, see the Typical Configuration Examples.

3.6.1 Example for Configuring MPLS QoS

Networking Requirements
Enterprises A and B connect their headquarters to branches by deploying the BGP/
MPLS IP VPN. As shown in Figure 3-7, CE1 and CE3 connect branches to the
headquarters of Enterprise A, and CE2 and CE4 connect branches to the
headquarters of Enterprise B. Enterprise A uses vpna and Enterprise B uses vpnb.

The service quality of video conferences (whose DSCP priority is 32) needs to be
ensured.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 131


CloudEngine 12800 Series Switches
Configuration Guide - MPLS 3 MPLS QoS Configuration

Figure 3-7 Networking diagram for configuring MPLS QoS

AS: 65410 AS: 65430


vpna vpna

CE1 CE3
10GE1/0/1 10GE1/0/1
VLANIF10 VLANIF40
10.1.1.1/24 10.3.1.1/24
Loopback1
10GE1/0/1 2.2.2.9/32 10GE1/0/1
VLANIF10 10GE1/0/1 10GE2/0/2 VLANIF40
10.1.1.2/24 PE1 VLANIF30 VLANIF60 PE2 10.3.1.2/24
Loopback1 172.1.1.2/24 172.2.1.1/24 Loopback1
1.1.1.9/32 10GE3/0/3 10GE3/0/3 3.3.3.9/32
10GE2/0/2 VLANIF30 P VLANIF60 10GE2/0/2
VLANIF20 172.1.1.1/24 AS: 100 172.2.1.2/24 VLANIF50
10.2.1.2/24 10.4.1.2/24
MPLS backbone

10GE1/0/1 10GE1/0/1
VLANIF20 VLANIF50
10.2.1.1/24 10.4.1.1/24
CE2 CE4

vpnb vpnb
AS: 65420 AS: 65440

Configuration Roadmap
To meet the preceding requirements, configure MPLS QoS. The configuration
roadmap is as follows:

1. Configure DiffServ domains on PE1 and PE2, and map DSCP priority 32 to
MPLS EXP 5 to preferentially ensure video quality.
2. Set the MPLS TTL processing mode to pipe on PE1 and PE2 to hide the MPLS
backbone network structure, which ensures network information security.
3. Set the MPLS DiffServ mode to short pipe on PE1 and PE2 so that service data
from a VPN is forwarded on the MPLS network according to the configured
DiffServ priorities. The DSCP value of packets remains unchanged on the
egress node of the MPLS network, and the egress node performs queue
scheduling based on the EXP value in the MPLS label.

NOTE

CE switches cannot function as PE devices. The configurations of PE devices in this example


are only for your reference. In real-world networking, you need to select the devices that
can function as PE devices and configure the devices according to the product manual. It is
recommended that NE routers be used as PE devices.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 132


CloudEngine 12800 Series Switches
Configuration Guide - MPLS 3 MPLS QoS Configuration

Procedure
Step 1 Configure OSPF on the MPLS backbone network so that PE and P can
communicate with each other.

# Configure PE1.
<HUAWEI> system-view
[~HUAWEI] sysname PE1
[*HUAWEI] commit
[~PE1] interface loopback 1
[*PE1-LoopBack1] ip address 1.1.1.9 32
[*PE1-LoopBack1] quit
[*PE1] vlan batch 10 20 30
[*PE1] interface 10ge 1/0/1
[*PE1-10GE1/0/1] port link-type trunk
[*PE1-10GE1/0/1] port trunk allow-pass vlan 10
[*PE1-10GE1/0/1] quit
[*PE1] interface 10ge 2/0/2
[*PE1-10GE2/0/2] port link-type trunk
[*PE1-10GE2/0/2] port trunk allow-pass vlan 20
[*PE1-10GE2/0/2] quit
[*PE1] interface 10ge 3/0/3
[*PE1-10GE3/0/3] port link-type trunk
[*PE1-10GE3/0/3] port trunk allow-pass vlan 30
[*PE1-10GE3/0/3] quit
[*PE1] interface vlanif 30
[*PE1-Vlanif30] ip address 172.1.1.1 24
[*PE1-Vlanif30] quit
[*PE1] commit
[*PE1] ospf 1
[*PE1-ospf-1] area 0
[*PE1-ospf-1-area-0.0.0.0] network 172.1.1.0 0.0.0.255
[*PE1-ospf-1-area-0.0.0.0] network 1.1.1.9 0.0.0.0
[*PE1-ospf-1-area-0.0.0.0] commit
[~PE1-ospf-1-area-0.0.0.0] quit
[~PE1-ospf-1] quit

# Configure P.
<HUAWEI> system-view
[~HUAWEI] sysname P
[*HUAWEI] commit
[~P] interface loopback 1
[*P-LoopBack1] ip address 2.2.2.9 32
[*P-LoopBack1] quit
[*P] vlan batch 30 60
[*P] interface 10ge 1/0/1
[*P-10GE1/0/1] port link-type trunk
[*P-10GE1/0/1] port trunk allow-pass vlan 30
[*P-10GE1/0/1] quit
[*P] interface 10ge 2/0/2
[*P-10GE2/0/2] port link-type trunk
[*P-10GE2/0/2] port trunk allow-pass vlan 60
[*P-10GE2/0/2] quit
[*P] interface vlanif 30
[*P-Vlanif30] ip address 172.1.1.2 24
[*P-Vlanif30] quit
[*P] interface vlanif 60
[*P-Vlanif60] ip address 172.2.1.1 24
[*P-Vlanif60] quit
[*P] commit
[*P] ospf
[*P-ospf-1] area 0
[*P-ospf-1-area-0.0.0.0] network 172.1.1.0 0.0.0.255
[*P-ospf-1-area-0.0.0.0] network 172.2.1.0 0.0.0.255
[*P-ospf-1-area-0.0.0.0] network 2.2.2.9 0.0.0.0
[*P-ospf-1-area-0.0.0.0] commit

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 133


CloudEngine 12800 Series Switches
Configuration Guide - MPLS 3 MPLS QoS Configuration

[~P-ospf-1-area-0.0.0.0] quit
[~P-ospf-1] quit

# Configure PE2.
<HUAWEI> system-view
[~HUAWEI] sysname PE2
[*HUAWEI] commit
[~PE2] interface loopback 1
[*PE2-LoopBack1] ip address 3.3.3.9 32
[*PE2-LoopBack1] quit
[*PE2] vlan batch 40 50 60
[*PE2] interface 10ge 1/0/1
[*PE2-10GE1/0/1] port link-type trunk
[*PE2-10GE1/0/1] port trunk allow-pass vlan 40
[*PE2-10GE1/0/1] quit
[*PE2] interface 10ge 2/0/2
[*PE2-10GE2/0/2] port link-type trunk
[*PE2-10GE2/0/2] port trunk allow-pass vlan 50
[*PE2-10GE2/0/2] quit
[*PE2] interface 10ge 3/0/3
[*PE2-10GE3/0/3] port link-type trunk
[*PE2-10GE3/0/3] port trunk allow-pass vlan 60
[*PE2-10GE3/0/3] quit
[*PE2] interface vlanif 60
[*PE2-Vlanif60] ip address 172.2.1.2 24
[*PE2-Vlanif60] quit
[*PE2] commit
[*PE2] ospf
[*PE2-ospf-1] area 0
[*PE2-ospf-1-area-0.0.0.0] network 172.2.1.0 0.0.0.255
[*PE2-ospf-1-area-0.0.0.0] network 3.3.3.9 0.0.0.0
[*PE2-ospf-1-area-0.0.0.0] commit
[~PE2-ospf-1-area-0.0.0.0] quit
[~PE2-ospf-1] quit

After the configuration is complete, OSPF neighbor relationships are set up


between PE1, P, and PE2. Run the display ip routing-table command. The
command output shows that PEs have learned the routes to Loopback1 of each
other.
Step 2 Configure basic MPLS functions, enable MPLS LDP, and establish LDP LSPs on the
MPLS backbone network.
# Configure PE1.
[~PE1] mpls lsr-id 1.1.1.9
[*PE1] mpls
[*PE1-mpls] quit
[*PE1] mpls ldp
[*PE1-mpls-ldp] quit
[*PE1] interface vlanif 30
[*PE1-Vlanif30] mpls
[*PE1-Vlanif30] mpls ldp
[*PE1-Vlanif30] quit
[*PE1] commit

# Configure P.
[~P] mpls lsr-id 2.2.2.9
[*P] mpls
[*P-mpls] quit
[*P] mpls ldp
[*P-mpls-ldp] quit
[*P] interface vlanif 30
[*P-Vlanif30] mpls
[*P-Vlanif30] mpls ldp
[*P-Vlanif30] quit
[*P] interface vlanif 60

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 134


CloudEngine 12800 Series Switches
Configuration Guide - MPLS 3 MPLS QoS Configuration

[*P-Vlanif60] mpls
[*P-Vlanif60] mpls ldp
[*P-Vlanif60] quit
[*P] commit

# Configure PE2.
[~PE2] mpls lsr-id 3.3.3.9
[*PE2] mpls
[*PE2-mpls] quit
[*PE2] mpls ldp
[*PE2-mpls-ldp] quit
[*PE2] interface vlanif 60
[*PE2-Vlanif60] mpls
[*PE2-Vlanif60] mpls ldp
[*PE2-Vlanif60] quit
[*PE2] commit

After the configuration is complete, LDP sessions are set up between PE1 and P
and between P and PE2. Run the display mpls ldp session command. The
command output shows that the LDP session status is Operational.
PE1 is used as an example
[~PE1] display mpls ldp session
LDP Session(s) in Public Network
LAM: Label Advertisement Mode, KA: KeepAlive SsnAge: Session Age, Unit(DDDD:HH:MM)
An asterisk (*) before a session means the session is being deleted.
------------------------------------------------------------------------------
PeerID Status LAM SsnRole SsnAge KASent/Rcv
------------------------------------------------------------------------------
2.2.2.9:0 Operational DU Active 0000:00:01 6/6
------------------------------------------------------------------------------
TOTAL: 1 Session(s) Found.

Step 3 Configure a VPN instance on each PE and connect the CEs to the PEs.
# Configure PE1.
[~PE1] ip vpn-instance vpna
[*PE1-vpn-instance-vpna] ipv4-family
[*PE1-vpn-instance-vpna-af-ipv4] route-distinguisher 100:1
[*PE1-vpn-instance-vpna-af-ipv4] vpn-target 111:1 both
[*PE1-vpn-instance-vpna-af-ipv4] quit
[*PE1-vpn-instance-vpna] quit
[*PE1] ip vpn-instance vpnb
[*PE1-vpn-instance-vpnb] ipv4-family
[*PE1-vpn-instance-vpnb-af-ipv4] route-distinguisher 100:2
[*PE1-vpn-instance-vpnb-af-ipv4] vpn-target 222:2 both
[*PE1-vpn-instance-vpnb-af-ipv4] quit
[*PE1-vpn-instance-vpnb] quit
[*PE1] interface vlanif 10
[*PE1-Vlanif10] ip binding vpn-instance vpna
[*PE1-Vlanif10] ip address 10.1.1.2 24
[*PE1-Vlanif10] quit
[*PE1] interface vlanif 20
[*PE1-Vlanif20] ip binding vpn-instance vpnb
[*PE1-Vlanif20] ip address 10.2.1.2 24
[*PE1-Vlanif20] quit
[*PE1] commit

# Configure PE2.
[~PE2] ip vpn-instance vpna
[*PE2-vpn-instance-vpna] ipv4-family
[*PE2-vpn-instance-vpna-af-ipv4] route-distinguisher 200:1
[*PE2-vpn-instance-vpna-af-ipv4] vpn-target 111:1 both
[*PE2-vpn-instance-vpna-af-ipv4] quit
[*PE2-vpn-instance-vpna] quit

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 135


CloudEngine 12800 Series Switches
Configuration Guide - MPLS 3 MPLS QoS Configuration

[*PE2] ip vpn-instance vpnb


[*PE2-vpn-instance-vpnb] ipv4-family
[*PE2-vpn-instance-vpnb-af-ipv4] route-distinguisher 200:2
[*PE2-vpn-instance-vpnb-af-ipv4] vpn-target 222:2 both
[*PE2-vpn-instance-vpnb-af-ipv4] quit
[*PE2-vpn-instance-vpnb] quit
[*PE2] interface vlanif 40
[*PE2-Vlanif40] ip binding vpn-instance vpna
[*PE2-Vlanif40] ip address 10.3.1.2 24
[*PE2-Vlanif40] quit
[*PE2] interface vlanif 50
[*PE2-Vlanif50] ip binding vpn-instance vpnb
[*PE2-Vlanif50] ip address 10.4.1.2 24
[*PE2-Vlanif50] quit
[*PE2] commit

# Assign IP addresses to the interfaces on the CEs according to Figure 3-7. The
configuration procedure is not mentioned here.

After the configurations are complete, each PE can ping its connected CE.

NOTE

If a PE has multiple interfaces bound to the same VPN instance, specify a source IP
addresses by specifying -a source-ip-address in the ping -vpn-instance vpn-instance-name
-a source-ip-address dest-ip-address command to ping the CE connected to the remote PE.
If you do not specify a source IP address, the ping fails.

Use the command output on PE1 and CE1 as an example.


[~PE1] ping -vpn-instance vpna 10.1.1.1
PING 10.1.1.1: 56 data bytes, press CTRL_C to break
Reply from 10.1.1.1: bytes=56 Sequence=1 ttl=255 time=5 ms
Reply from 10.1.1.1: bytes=56 Sequence=2 ttl=255 time=3 ms
Reply from 10.1.1.1: bytes=56 Sequence=3 ttl=255 time=3 ms
Reply from 10.1.1.1: bytes=56 Sequence=4 ttl=255 time=3 ms
Reply from 10.1.1.1: bytes=56 Sequence=5 ttl=255 time=16 ms

--- 10.1.1.1 ping statistics ---


5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 3/6/16 ms

Step 4 Set up an MP-IBGP peer relationship between PEs.

# Configure PE1.
[~PE1] bgp 100
[*PE1-bgp] peer 3.3.3.9 as-number 100
[*PE1-bgp] peer 3.3.3.9 connect-interface loopback 1
[*PE1-bgp] ipv4-family vpnv4
[*PE1-bgp-af-vpnv4] peer 3.3.3.9 enable
[*PE1-bgp-af-vpnv4] commit
[~PE1-bgp-af-vpnv4] quit
[~PE1-bgp] quit

# Configure PE2.
[~PE2] bgp 100
[*PE2-bgp] peer 1.1.1.9 as-number 100
[*PE2-bgp] peer 1.1.1.9 connect-interface loopback 1
[*PE2-bgp] ipv4-family vpnv4
[*PE2-bgp-af-vpnv4] peer 1.1.1.9 enable
[*PE2-bgp-af-vpnv4] commit
[~PE2-bgp-af-vpnv4] quit
[~PE2-bgp] quit

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 136


CloudEngine 12800 Series Switches
Configuration Guide - MPLS 3 MPLS QoS Configuration

After the configuration is complete, run the display bgp peer command on PEs.
The command output shows that the BGP peer relationships have been
established between the PEs.
[~PE1] display bgp peer
BGP local router ID : 1.1.1.9
Local AS number : 100
Total number of peers :1
Peers in established state : 1
Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv
3.3.3.9 4 100 12 6 0 00:02:21 Established 0

Step 5 Set up the EBGP peer relationships between the PEs and CEs and import VPN
routes.

# Configure CE1.
[~CE1] bgp 65410
[*CE1-bgp] peer 10.1.1.2 as-number 100
[*CE1-bgp] import-route direct
[*CE1-bgp] commit
[~CE1-bgp] quit

The configurations of CE2, CE3, and CE4 are similar to the configuration of CE1,
and are not mentioned here.

# Configure PE1.
[~PE1] bgp 100
[~PE1-bgp] ipv4-family vpn-instance vpna
[*PE1-bgp-vpna] peer 10.1.1.1 as-number 65410
[*PE1-bgp-vpna] import-route direct
[*PE1-bgp-vpna] quit
[*PE1-bgp] ipv4-family vpn-instance vpnb
[*PE1-bgp-vpnb] peer 10.2.1.1 as-number 65420
[*PE1-bgp-vpnb] import-route direct
[*PE1-bgp-vpnb] commit
[~PE1-bgp-vpnb] quit
[~PE1-bgp] quit

The configuration of PE2 is similar to that of PE1, and is not mentioned here.

After the configurations are complete, run the display bgp vpnv4 vpn-instance
peer command on the PEs. The command output shows that BGP peer
relationships between PEs and CEs have been established.

Use the peer relationship between PE1 and CE1 as an example.


[~PE1] display bgp vpnv4 vpn-instance vpna peer
BGP local router ID : 1.1.1.9
Local AS number : 100
Total number of peers :1
Peers in established state : 1
Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv
10.1.1.1 4 65410 11 9 0 00:07:25 Established 1

Step 6 Configure PE1 and PE2 to allocate common labels to the penultimate hop.

#Configure PE1.
[~PE1] mpls
[~PE1-mpls] label advertise non-null
[*PE1-mpls] commit
[~PE1-mpls] quit

#Configure PE2.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 137


CloudEngine 12800 Series Switches
Configuration Guide - MPLS 3 MPLS QoS Configuration

[~PE2] mpls
[~PE2-mpls] label advertise non-null
[*PE2-mpls] commit
[~PE2-mpls] quit

Step 7 Configure the DiffServ domain.


#Configure PE1.
[~PE1] diffserv domain dsvpna
[*PE1-dsdomain-dsvpna] mpls-exp-outbound 32 map 5
[*PE1-dsdomain-dsvpna] quit
[*PE1] commit

#Configure PE2.
[~PE2] diffserv domain dsvpnb
[*PE2-dsdomain-dsvpnb] mpls-exp-outbound 32 map 5
[*PE2-dsdomain-dsvpnb] quit
[*PE2] commit

Step 8 Configure the DiffServ modes and MPLS TTL processing modes on PE1 and PE2.
#Configure PE1.
[~PE1] mpls mode short-pipe domain dsvpna
[*PE1] commit

#Configure PE2.
[~PE2] mpls mode short-pipe domain dsvpnb
[*PE2] commit

----End

Configuration Files
● PE1 configuration file
#
sysname PE1
#
vlan batch 10 20 30
#
diffserv domain dsvpna
mpls-exp-outbound 32 map 5
#
mpls mode short-pipe domain dsvpna
#
ip vpn-instance vpna
ipv4-family
route-distinguisher 100:1
vpn-target 111:1 export-extcommunity
vpn-target 111:1 import-extcommunity
#
ip vpn-instance vpnb
ipv4-family
route-distinguisher 100:2
vpn-target 222:2 export-extcommunity
vpn-target 222:2 import-extcommunity
#
mpls lsr-id 1.1.1.9
mpls
label advertise non-null
#
mpls ldp
#
ipv4-family
#

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 138


CloudEngine 12800 Series Switches
Configuration Guide - MPLS 3 MPLS QoS Configuration

interface Vlanif10
ip binding vpn-instance vpna
ip address 10.1.1.2 255.255.255.0
#
interface Vlanif20
ip binding vpn-instance vpnb
ip address 10.2.1.2 255.255.255.0
#
interface Vlanif30
ip address 172.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE2/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE3/0/3
port link-type trunk
port trunk allow-pass vlan 30
#
interface LoopBack1
ip address 1.1.1.9 255.255.255.255
#
bgp 100
peer 3.3.3.9 as-number 100
peer 3.3.3.9 connect-interface LoopBack1
#
ipv4-family unicast
peer 3.3.3.9 enable
#
ipv4-family vpnv4
policy vpn-target
peer 3.3.3.9 enable
#
ipv4-family vpn-instance vpna
import-route direct
peer 10.1.1.1 as-number 65410
#
ipv4-family vpn-instance vpnb
import-route direct
peer 10.2.1.1 as-number 65420
#
ospf 1
area 0.0.0.0
network 1.1.1.9 0.0.0.0
network 172.1.1.0 0.0.0.255
#
return
● P configuration file
#
sysname P
#
vlan batch 30 60
#
mpls lsr-id 2.2.2.9
mpls
#
mpls ldp
#
ipv4-family
#
interface Vlanif30
ip address 172.1.1.2 255.255.255.0
mpls

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 139


CloudEngine 12800 Series Switches
Configuration Guide - MPLS 3 MPLS QoS Configuration

mpls ldp
#
interface Vlanif60
ip address 172.2.1.1 255.255.255.0
mpls
mpls ldp
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 30
#
interface 10GE2/0/2
port link-type trunk
port trunk allow-pass vlan 60
#
interface LoopBack1
ip address 2.2.2.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 2.2.2.9 0.0.0.0
network 172.1.1.0 0.0.0.255
network 172.2.1.0 0.0.0.255
#
return
● PE2 configuration file
#
sysname PE2
#
vlan batch 40 50 60
#
diffserv domain dsvpnb
mpls-exp-outbound 32 map 5
#
mpls mode short-pipe domain dsvpnb
#
ip vpn-instance vpna
ipv4-family
route-distinguisher 200:1
vpn-target 111:1 export-extcommunity
vpn-target 111:1 import-extcommunity
#
ip vpn-instance vpnb
ipv4-family
route-distinguisher 200:2
vpn-target 222:2 export-extcommunity
vpn-target 222:2 import-extcommunity
#
mpls lsr-id 3.3.3.9
mpls
label advertise non-null
#
mpls ldp
#
ipv4-family
#
interface Vlanif40
ip binding vpn-instance vpna
ip address 10.3.1.2 255.255.255.0
#
interface Vlanif50
ip binding vpn-instance vpnb
ip address 10.4.1.2 255.255.255.0
#
interface Vlanif60
ip address 172.2.1.2 255.255.255.0
mpls
mpls ldp
#

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 140


CloudEngine 12800 Series Switches
Configuration Guide - MPLS 3 MPLS QoS Configuration

interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 40
#
interface 10GE2/0/2
port link-type trunk
port trunk allow-pass vlan 50
#
interface 10GE3/0/3
port link-type trunk
port trunk allow-pass vlan 60
#
interface LoopBack1
ip address 3.3.3.9 255.255.255.255
#
bgp 100
peer 1.1.1.9 as-number 100
peer 1.1.1.9 connect-interface LoopBack1
#
ipv4-family unicast
peer 1.1.1.9 enable
#
ipv4-family vpnv4
policy vpn-target
peer 1.1.1.9 enable
#
ipv4-family vpn-instance vpna
import-route direct
peer 10.3.1.1 as-number 65430
#
ipv4-family vpn-instance vpnb
import-route direct
peer 10.4.1.1 as-number 65440
#
ospf 1
area 0.0.0.0
network 3.3.3.9 0.0.0.0
network 172.2.1.0 0.0.0.255
#
return
● CE1 configuration file (enterprise A headquarters egress)
#
sysname CE1
#
vlan batch 10
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
bgp 65410
peer 10.1.1.2 as-number 100
#
ipv4-family unicast
import-route direct
peer 10.1.1.2 enable
#
return
● CE2 configuration file (enterprise B headquarters egress)
#
sysname CE2
#
vlan batch 20
#
interface Vlanif20

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 141


CloudEngine 12800 Series Switches
Configuration Guide - MPLS 3 MPLS QoS Configuration

ip address 10.2.1.1 255.255.255.0


#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 20
#
bgp 65420
peer 10.2.1.2 as-number 100
#
ipv4-family unicast
import-route direct
peer 10.2.1.2 enable
#
return
● CE3 configuration file (enterprise A branch egress)
#
sysname CE3
#
vlan batch 40
#
interface Vlanif40
ip address 10.3.1.1 255.255.255.0
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 40
#
bgp 65430
peer 10.3.1.2 as-number 100
#
ipv4-family unicast
import-route direct
peer 10.3.1.2 enable
#
return
● CE4 configuration file (enterprise B branch egress)
#
sysname CE4
#
vlan batch 50
#
interface Vlanif50
ip address 10.4.1.1 255.255.255.0
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 50
#
bgp 65440
peer 10.4.1.2 as-number 100
#
ipv4-family unicast
import-route direct
peer 10.4.1.2 enable
#
return

3.6.2 Example for Configuring MPLS L2VPN QoS


Networking Requirements
As shown in Figure 3-8, an enterprise has its own MPLS backbone network. The
enterprise has a small number of branch sites (two in this example). Site1
connects CE1 to PE1 to access the MPLS backbone network, and Site2 connects
CE2 to PE2 to access the MPLS backbone network. Users in Site1 and Site2 want

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 142


CloudEngine 12800 Series Switches
Configuration Guide - MPLS 3 MPLS QoS Configuration

to exchange Layer 2 services with each other and require that user information in
Layer 2 packets be retained when the packets are transmitted over the backbone
network. The users want to assign 802.1p priorities 7, 6, and 5 for voice, video, and
data services respectively, so that the devices provide different QoS for the three
services in case of network congestion.

Figure 3-8 Configuring MPLS L2VPN QoS


Loopback1 Loopback1 Loopback1
1.1.1.9/32 2.2.2.9/32 3.3.3.9/32
10GE2/0/2 10GE2/0/2
VLANIF20 VLANIF30
172.1.1.1/24 172.2.1.1/24
PE1 PE2
10GE1/0/1 10GE1/0/1
10GE1/0/1 VLANIF20 P VLANIF30 10GE2/0/2
VLANIF10 172.1.1.2/24 172.2.1.2/24 VLANIF40
10GE1/0/1 10GE1/0/1
VLANIF10 VLANIF10
192.168.1.5/24 CE1 CE2 192.168.1.6/24

Site1 Site2

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure VPLS in Martini mode so that Site1 and Site2 can exchange Layer 2
services with each other and that user information in Layer 2 packets can be
retained when the packets are transmitted over the backbone network.
2. Create a DiffServ domain on PE1 and PE2 and configure priority mapping on
the VPLS network to set the EXP priorities of voice, video, and data packets to
6, 5, and 4 respectively, so that quality of the voice service is ensured.
3. Set the DiffServ mode to pipe on PE1 and PE2, so that VPN services are
forwarded over the VPLS network based on the priorities required by the
enterprise and the egress schedules the packets based on the EXP priorities in
VPLS labels but not change the PHBs and colors carried in the packets.
NOTE

CE switches cannot function as PE devices. The configurations of PE devices in this example


are only for your reference. In real-world networking, you need to select the devices that
can function as PE devices and configure the devices according to the product manual. It is
recommended that NE routers be used as PE devices.

Procedure
Step 1 Configure VPLS in Martini mode so that Site1 and Site2 can exchange Layer 2
services with each other.
For detailed configuration, see Example for Configuring Martini VPLS.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 143


CloudEngine 12800 Series Switches
Configuration Guide - MPLS 3 MPLS QoS Configuration

Step 2 Map 802.1p priorities of VLAN packets to PHBs and colors.


802.1p priorities of VLAN packets are mapped to PHBs and colors based on the
default mapping shown in Table 3-5.

Table 3-5 Mappings from 802.1p priorities of VLAN packets to PHBs and colors in
the inbound direction in the DiffServ domain
Packet Type 802.1p Priority PHB Color

Data 5 EF green

Video 6 CS6 green

Voice 7 CS7 green

Step 3 Configure a DiffServ domain.


# Configure PE1.
[~PE1] diffserv domain ds1
[*PE1-dsdomain-ds1] exp-outbound cs7 green map 6
[*PE1-dsdomain-ds1] exp-outbound cs6 green map 5
[*PE1-dsdomain-ds1] exp-outbound ef green map 4
[*PE1-dsdomain-ds1] quit
[*PE1] commit

# Configure PE2.
[~PE2] diffserv domain ds1
[*PE2-dsdomain-ds1] exp-outbound cs7 green map 6
[*PE2-dsdomain-ds1] exp-outbound cs6 green map 5
[*PE2-dsdomain-ds1] exp-outbound ef green map 4
[*PE2-dsdomain-ds1] quit
[*PE2] commit

Step 4 Configure the DiffServ mode on PE1 and PE2.


# Configure PE1.
[~PE1] mpls l2vpn mode pipe domain ds1
[*PE1] commit

# Configure PE2.
[~PE2] mpls l2vpn mode pipe domain ds1
[*PE2] commit

----End

Configuration Files
● CE1 configuration file
#
sysname CE1
#
vlan batch 10
#
interface Vlanif10
ip address 192.168.1.5 255.255.255.0
#
interface 10GE1/0/1
port link-type trunk

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 144


CloudEngine 12800 Series Switches
Configuration Guide - MPLS 3 MPLS QoS Configuration

port trunk allow-pass vlan 10


#
return
● CE2 configuration file
#
sysname CE2
#
vlan batch 40
#
interface Vlanif40
ip address 192.168.1.6 255.255.255.0
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 40
#
return
● PE1 configuration file
#
sysname PE1
#
vlan batch 10 20
#
diffserv domain ds1
exp-outbound ef green map 4
exp-outbound cs6 green map 5
exp-outbound cs7 green map 6
#
vlan 10
trust upstream ds1 #
mpls lsr-id 1.1.1.9
#
mpls
#
mpls l2vpn mode pipe domain ds1
#
mpls l2vpn
#
vsi a2 static
pwsignal ldp
vsi-id 2
peer 3.3.3.9
#
mpls ldp
#
mpls ldp remote-peer 3.3.3.9
remote-ip 3.3.3.9
#
interface Vlanif10
l2 binding vsi a2
#
interface Vlanif20
ip address 172.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE2/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
interface LoopBack1
ip address 1.1.1.9 255.255.255.255
#
ospf 1

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 145


CloudEngine 12800 Series Switches
Configuration Guide - MPLS 3 MPLS QoS Configuration

area 0.0.0.0
network 1.1.1.9 0.0.0.0
network 172.1.1.0 0.0.0.255
#
return
● P configuration file
#
sysname P
#
vlan batch 20 30
#
mpls lsr-id 2.2.2.9
#
mpls
#
mpls ldp
#
interface Vlanif20
ip address 172.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif30
ip address 172.2.1.1 255.255.255.0
mpls
mpls ldp
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE2/0/2
port link-type trunk
port trunk allow-pass vlan 30
#
interface LoopBack1
ip address 2.2.2.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 2.2.2.9 0.0.0.0
network 172.1.1.0 0.0.0.255
network 172.2.1.0 0.0.0.255
#
return
● PE2 configuration file
#
sysname PE2
#
vlan batch 30 40
#
diffserv domain ds1
exp-outbound ef green map 4
exp-outbound cs6 green map 5
exp-outbound cs7 green map 6
#
vlan 40
trust upstream ds1
#
mpls lsr-id 3.3.3.9
#
mpls
#
mpls l2vpn mode pipe domain ds1
#
mpls l2vpn
#
vsi a2 static

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 146


CloudEngine 12800 Series Switches
Configuration Guide - MPLS 3 MPLS QoS Configuration

pwsignal ldp
vsi-id 2
peer 1.1.1.9
#
mpls ldp
#
mpls ldp remote-peer 1.1.1.9
remote-ip 1.1.1.9
#
interface Vlanif30
ip address 172.2.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif40
l2 binding vsi a2
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 30
#
interface 10GE2/0/2
port link-type trunk
port trunk allow-pass vlan 40
#
interface LoopBack1
ip address 3.3.3.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 3.3.3.9 0.0.0.0
network 172.2.1.0 0.0.0.255
#
return

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 147

You might also like