MPLS QoS configuration example

Network requirements

As shown in Figure 51:

Provide differentiated QoS services for flows with different precedence values in VPN 1.

The configuration in this example involves the following parts:

First, configure MPLS VPN on CE 1, PE 1, P, PE 2, and CE 2 as follows:

Second, configure MPLS QoS on PE 1 and P as follows:

For the MPLS configuration, see HPE FlexNetwork MSR Router Series Comware 5 MPLS Configuration Guide. This section introduces only the MPLS QoS configuration.

Figure 51: Network diagram

Device

Interface

IP address

Device

Interface

IP address

CE 1

Eth1/2

10.1.1.2/24

CE 2

Eth1/3

10.2.1.2/24

PE 1

Eth1/1

10.1.1.1/24

PE 2

Eth1/2

10.2.1.1/24

S2/1

12.1.1.1/24

S2/2

12.2.1.1/24

Loop0

1.1.1.1/32

Loop0

1.1.1.2/32

P

S2/1

12.1.1.2/24

S2/2

12.2.1.2/24

Configuration procedure

  1. Configure device PE 1:

    # Configure four classes to match the DSCP values AF11, AF21, AF31, and EF of the MPLS packets in the same VPN.

    <PE1> system-view
    [PE1] traffic classifier af11
    [PE1-classifier-af11] if-match dscp af11
    [PE1-classifier-af11] traffic classifier af21
    [PE1-classifier-af21] if-match dscp af21
    [PE1-classifier-af21] traffic classifier af31
    [PE1-classifier-af31] if-match dscp af31
    [PE1-classifier-af31] traffic classifier efclass
    [PE1-classifier-efclass] if-match dscp ef
    [PE1-classifier-efclass] quit
    

    # Configure four traffic behaviors to set the EXP value to 1, 2, 3, and 4, respectively, for MPLS packets.

    [PE1] traffic behavior exp1
    [PE1-behavior-exp1] remark mpls-exp 1
    [PE1-behavior-exp1] traffic behavior exp2
    [PE1-behavior-exp2] remark mpls-exp 2
    [PE1-behavior-exp2] traffic behavior exp3
    [PE1-behavior-exp3] remark mpls-exp 3
    [PE1-behavior-exp3] traffic behavior exp4
    [PE1-behavior-exp4] remark mpls-exp 4
    [PE1-behavior-exp4] quit
    

    # Create QoS policy REMARK, and associate the behaviors with the classes in the QoS policy to mark different classes of packets with different EXP values.

    [PE1] qos policy REMARK
    [PE1-qospolicy-REMARK] classifier af11 behavior exp1
    [PE1-qospolicy-REMARK] classifier af21 behavior exp2
    [PE1-qospolicy-REMARK] classifier af31 behavior exp3
    [PE1-qospolicy-REMARK] classifier efclass behavior exp4
    [PE1-qospolicy-REMARK] quit
    

    # Apply QoS policy REMARK to the incoming traffic of interface Ethernet 1/1 of PE1 in the MPLS network.

    [PE1] interface ethernet 1/1
    [PE1-Ethernet1/1] qos apply policy REMARK inbound
    [PE1-Ethernet1/1] quit
    
  2. Configure device P:

    # Configure four classes to match EXP values 1, 2, 3 and 4 of the MPLS packets, respectively.

    <P> system-view
    [P] traffic classifier EXP1
    [P-classifier-EXP1] if-match mpls-exp 1
    [P-classifier-EXP1] traffic classifier EXP2
    [P-classifier-EXP2] if-match mpls-exp 2
    [P-classifier-EXP2] traffic classifier EXP3
    [P-classifier-EXP3] if-match mpls-exp 3
    [P-classifier-EXP3] traffic classifier EXP4
    [P-classifier-EXP4] if-match mpls-exp 4
    [P-classifier-EXP4] quit
    

    # Create four traffic behaviors and configure AF or EF actions for them.

    [P] traffic behavior AF11
    [P-behavior-AF11] queue af bandwidth pct 10
    [P-behavior-AF11] traffic behavior AF21
    [P-behavior-AF21] queue af bandwidth pct 20
    [P-behavior-AF21] traffic behavior AF31
    [P-behavior-AF31] queue af bandwidth pct 30
    [P-behavior-AF31] traffic behavior EF
    [P-behavior-EF] queue ef bandwidth pct 40
    [P-behavior-EF] quit
    

    # Create QoS policy QUEUE, and associate the behaviors with the classes to meet the following requirements: guarantee 10% of the bandwidth for traffic with an EXP value of 1, guarantee 20% of the bandwidth for traffic with an EXP value of 2, guarantee 30% of the bandwidth for traffic with an EXP value of 3, and guarantee a low delay and 40% of the bandwidth for traffic with an EXP value of 4.

    [P] qos policy QUEUE
    [P-qospolicy-QUEUE] classifier EXP1 behavior AF11
    [P-qospolicy-QUEUE] classifier EXP2 behavior AF21
    [P-qospolicy-QUEUE] classifier EXP3 behavior AF31
    [P-qospolicy-QUEUE] classifier EXP4 behavior EF
    [P-qospolicy-QUEUE] quit
    

    # Apply QoS policy QUEUE to the outgoing traffic of Serial 2/2 on device P.

    [P] interface serial 2/2
    [P-Serial2/2] qos apply policy QUEUE outbound
    

    After the configuration, when congestion occurs in VPN 1, the bandwidth proportion between flows with the DSCP value being af11, af21, af31, and ef is 1:2:3:4, and the delay for the flow with the DSCP value being ef is smaller than the other traffic flows.