11-ACL and QoS Configuration Guide

HomeSupportRoutersCR16000-F SeriesConfigure & DeployConfiguration GuidesH3C CR16000-F Routers Configuration Guides-Release795x-6W10011-ACL and QoS Configuration Guide
03-MPLS QoS configuration
Title Size Download
03-MPLS QoS configuration 94.70 KB

Configuring MPLS QoS

About MPLS QoS

MPLS uses 3 bits, called EXP bits, to carry class-of-service information to provide support for DiffServ. MPLS QoS identifies different traffic flows with different EXP bits and implements differentiated services.

MPLS QoS supports CAR and priority marking. MPLS QoS classifies traffic on the PE and apply differentiated QoS strategies for different traffic classes. For example, MPLS QoS can organize packets with EXP value 1 into a class and packets with EXP value 2 into another class. Then it performs traffic policing and priority marking for each class of packets.

The EXP field in an MPLS label is processed according to the following rules:

·          During label encapsulation, the ToS field of the IP packet is directly changed into the EXP field of the MPLS label.

·          The EXP field remains unchanged when label swapping is performed.

·          During a label push operation, the EXP field of the newly pushed outer label inherits the EXP field of the inner label.

·          After a label pop operation for a packet, the following rules apply:

¡  If the packet is still an MPLS packet, the EXP field of the popped label is not copied to the inner label.

¡  If the packet is an IP packet, the EXP field of the popped label is not copied to the ToS field of the IP packet.

An MPLS label is encapsulated between the Layer 2 header and Layer 3 header of a packet. Multiple MPLS labels are supported, which are referred to as a label stack. If there are m labels between the Layer 2 header and Layer 3 header, the label closest to the Layer 2 header is called the first label (top label). The label closest to the Layer 3 header is called the mth label (bottom label).

Restrictions: Hardware compatibility with MPLS QoS

CSPC (except CSPC-GE16XP4L-E, CSPC-GE24L-E, and CSPC-GP24GE8XP2L-E) and CMPE-1104 cards do not support MPLS QoS.

Configuring MPLS CAR

About MPLS CAR

A CAR policy for traffic entering an MPLS network performs the following operations:

·          Limits the transmission rate to avoid network congestion.

·          Marks priority for the traffic.

For more information about configuring traffic policing, see "Configuring traffic policing, GTS, and rate limit."

Procedure

1.        Enter system view.

system-view

2.        Enter interface view.

interface interface-type interface-number

3.        Configure an MPLS CAR policy for the interface.

qos car { inbound | outbound } { any | acl [ ipv6 ] acl-number | carl carl-index } cir committed-information-rate [ cbs committed-burst-size [ ebs excess-burst-size ] ] [ green action | red action | yellow action ] *

qos car { inbound | outbound } { any | acl [ ipv6 ] acl-number | carl carl-index } cir committed-information-rate [ cbs committed-burst-size ] pir peak-information-rate [ ebs excess-burst-size ] [ green action | red action | yellow action ] *

By default, no CAR policy is configured for an interface.

Configuring MPLS priority marking

About MPLS priority marking

In an MPLS network, you can adjust the priority of an MPLS traffic flow by marking its EXP value. For more information about priority marking, see "Configuring priority marking."

Restrictions and guidelines

The remark imposition-mpls-exp command takes effect only if the QoS policy is applied to the inbound direction.

·          On a P device, the command modifies only the EXP value in the first (outer) label.

·          On a PE device, the command modifies only the EXP values in all labels.

If the QoS policy is applied to the inbound direction, the remark mpls-exp command modifies the EXP values in all labels.

If the QoS policy is applied to the outbound direction, the remark mpls-exp command modifies only the EXP value in the first (outer) label.

If both the remark mpls-exp and remark imposition-mpls-exp commands are configured in a QoS policy applied to the inbound direction on a PE device, the following rules apply:

·          The remark mpls-exp command modifies only the EXP value in the first label.

·          The remark imposition-mpls-exp command modifies only the EXP value in the second label.

CSPEX (except CSPEX-1204 and CSPEX-1104-E) and CEPC cards support configuring both remark mpls-exp and remark imposition-mpls-exp commands in one QoS policy.

Procedure

1.        Enter system view.

system-view

2.        Define a traffic class.

a.    Create a traffic class and enter traffic class view.

traffic classifier classifier-name [ operator { and | or } ]

b.    Configure match criteria for the traffic class.

if-match mpls-exp exp-value&<1-8>

By default, no match criteria are configured.

The match criteria apply only to MPLS packets.

c.    Return to system view.

quit

3.        Define a traffic behavior.

a.    Create a traffic behavior and enter traffic behavior view.

traffic behavior behavior-name

b.    Configure an EXP marking action in the traffic behavior. Choose the options to configure as needed:

-      remark mpls-exp exp-value

-      remark imposition-mpls-exp exp-value

By default, no EXP marking action is configured.

c.    Return to system view.

quit

4.        Define a QoS policy.

a.    Create a QoS policy and enter QoS policy view.

qos policy policy-name

b.    Associate the traffic class with the traffic behavior in the QoS policy.

classifier classifier-name behavior behavior-name

By default, no traffic behavior is associated with a traffic class.

c.    Return to system view.

quit

5.        Apply the QoS policy.

For more information, see "Configuring a QoS policy."

Configuring the MPLS DiffServ mode

About MPLS DiffServ mode

In a DiffServ architecture, an intermidiate node can modify the DSCP and EXP fields, which are collectively referred to as class of service (CoS). Therefore, the CoS value of a packet might change during transmission in an IP network or MPLS network. The device supports the following methods of processing CoS:

·          pipe—When an IP packet enters an MPLS network, the ingress node ignores the DSCP value of the IP packet and uses the configured value as the EXP value of the MPLS packet. When the MPLS packet leaves the MPLS network, the egress node does not modify the original DSCP value. In the MPLS network, the packet is scheduled based on the configured EXP value.

·          short-pipe—When an IP packet enters and leaves an MPLS network, the packet is processed in the same way as in pipe mode. On nodes from the ingress node to the penultimate node, the packet is scheduled based on the configured EXP value. On the egress node, the top label is popped, and then the packet is scheduled based on its DSCP value.

·          uniform—When an IP packet enters an MPLS network, the ingress node maps the DSCP value of the IP packet to the EXP value of the MPLS packet. When the MPLS packet leaves the MPLS network, the ingress node maps the EXP value to the DSCP value.

Restrictions and guidelines

Mappings between DSCP and EXP are performed according to the dscp-exp map and exp-dscp map. For more information about these priorities and maps, see "Configuring priority mapping." For information about the default mappings of these maps, see "Appendix Default priority maps."

Procedure

1.        Enter system view.

system-view

2.        Enter VPN instance view.

ip vpn-instance vpn-instance-name

3.        Configure the MPLS DiffServ mode.

diffserv-mode { ingress { pipe service-class | short-pipe service-class | uniform } egress { pipe | short-pipe | uniform } | { pipe service-class | short-pipe service-class | uniform } }

By default, the MPLS DiffServ mode is pipe, and the CoS value is 0.

MPLS QoS configuration examples

Example: Configuring MPLS QoS for traffic in the same VPN

Network configuration

As shown in Figure 1, perform the following tasks to provide differentiated QoS services for flows with different precedence values in VPN 1:

1.        Configure MPLS VPN on CE 1, PE 1, P, PE 2, and CE 2 as follows:

¡  Run OSPF between PE 1 and P, and between PE 2 and P.

¡  Establish an MP-EBGP neighborship between PEs and CEs.

¡  Establish an MP-IBGP neighborship between PEs and PEs.

2.        Configure MPLS QoS on PE 1 and P as follows:

Method 1:

¡  On PE 1, configure and apply a QoS policy to the outbound direction of GigabitEthernet 3/1/1 to set the EXP values in the first label of MPLS packets according to their DSCP values.

¡  On the P device, configure and apply a QoS policy to the outbound direction of GigabitEthernet 3/1/2: classify traffic on the basis of the EXP field in the first MPLS label, and configure CBQ as follows:

-      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.

-      Guarantee a low delay and 40% of the bandwidth for traffic with an EXP value of 4.

Method 2:

¡  On PE 1, configure and apply a QoS policy to the inbound direction of GigabitEthernet 3/1/2 to set the EXP values in all labels of MPLS packets according to their DSCP values.

¡  On the P device, configure and apply a QoS policy to the outbound direction of GigabitEthernet 3/1/2: classify traffic on the basis of the EXP field in the second MPLS label, and configure CBQ as follows:

-      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.

-      Guarantee a low delay and 40% of the bandwidth for traffic with an EXP value of 4.

For information about the MPLS configuration, see MPLS L3VPN in MPLS Configuration Guide. This section introduces only the MPLS QoS configuration.

Figure 1 Network diagram

 

Table 1 Interfaces and IP address assignment

Device

Interface

IP address

Device

Interface

IP address

CE 1

GE3/1/1

10.1.1.2/24

CE 2

GE3/1/1

10.2.1.2/24

PE 1

GE3/1/2

10.1.1.1/24

PE 2

GE3/1/2

10.2.1.1/24

GE3/1/1

12.1.1.1/24

GE3/1/1

12.2.1.1/24

Loop0

1.1.1.1/32

Loop0

1.1.1.2/32

P

GE3/1/1

12.1.1.2/24

 

 

 

GE3/1/2

12.2.1.2/24

 

 

 

 

Procedure

Configuration for method 1

1.        Configure PE 1:

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

<PE1> system-view

[PE1] traffic classifier af11

[PE1-classifier-af11] if-match dscp af11

[PE1-classifier-af11] quit

[PE1] traffic classifier af21

[PE1-classifier-af21] if-match dscp af21

[PE1-classifier-af21] quit

[PE1] traffic classifier af31

[PE1-classifier-af31] if-match dscp af31

[PE1-classifier-af31] quit

[PE1] traffic classifier efclass

[PE1-classifier-efclass] if-match dscp ef

[PE1-classifier-efclass] quit

# Configure four traffic behaviors to set the EXP values in the first label to 1, 2, 3, and 4 for MPLS packets.

[PE1] traffic behavior exp1

[PE1-behavior-exp1] remark mpls-exp 1

[PE1-behavior-exp1] quit

[PE1] traffic behavior exp2

[PE1-behavior-exp2] remark mpls-exp 2

[PE1-behavior-exp2] quit

[PE1] traffic behavior exp3

[PE1-behavior-exp3] remark mpls-exp 3

[PE1-behavior-exp3] quit

[PE1] 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 outgoing traffic of interface GigabitEthernet 3/1/1 of PE 1 in the MPLS network.

[PE1] interface gigabitethernet 3/1/1

[PE1-GigabitEthernet3/1/1] qos apply policy REMARK outbound

[PE1-GigabitEthernet3/1/1] quit

2.        Configure device P:

# Configure four classes to match MPLS packets with first-label EXP values as 1, 2, 3 and 4.

<P> system-view

[P] traffic classifier EXP1

[P-classifier-EXP1] if-match mpls-exp 1

[P-classifier-EXP1] quit

[P] traffic classifier EXP2

[P-classifier-EXP2] if-match mpls-exp 2

[P-classifier-EXP2] quit

[P] traffic classifier EXP3

[P-classifier-EXP3] if-match mpls-exp 3

[P-classifier-EXP3] quit

[P] 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] quit

[P] traffic behavior AF21

[P-behavior-AF21] queue af bandwidth pct 20

[P-behavior-AF21] quit

[P] traffic behavior AF31

[P-behavior-AF31] queue af bandwidth pct 30

[P-behavior-AF31] quit

[P] 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.

[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 GigabitEthernet 3/1/2.

[P] interface gigabitethernet 3/1/2

[P-GigabitEthernet3/1/2] qos apply policy QUEUE outbound

Configuration for method 2

1.        Configure PE 1:

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

<PE1> system-view

[PE1] traffic classifier af11

[PE1-classifier-af11] if-match dscp af11

[PE1-classifier-af11] quit

[PE1] traffic classifier af21

[PE1-classifier-af21] if-match dscp af21

[PE1-classifier-af21] quit

[PE1] traffic classifier af31

[PE1-classifier-af31] if-match dscp af31

[PE1-classifier-af31] quit

[PE1] traffic classifier efclass

[PE1-classifier-efclass] if-match dscp ef

[PE1-classifier-efclass] quit

# Configure four traffic behaviors to set the EXP values in all labels to 1, 2, 3, and 4 for MPLS packets.

[PE1] traffic behavior exp1

[PE1-behavior-exp1] remark imposition-mpls-exp 1

[PE1-behavior-exp1] quit

[PE1] traffic behavior exp2

[PE1-behavior-exp2] remark imposition-mpls-exp 2

[PE1-behavior-exp2] quit

[PE1] traffic behavior exp3

[PE1-behavior-exp3] remark imposition-mpls-exp 3

[PE1-behavior-exp3] quit

[PE1] traffic behavior exp4

[PE1-behavior-exp4] remark imposition-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 GigabitEthernet 3/1/2 in the MPLS network.

[PE1] interface gigabitethernet 3/1/2

[PE1-GigabitEthernet3/1/2] qos apply policy REMARK inbound

[PE1-GigabitEthernet3/1/2] quit

2.        Configure device P:

# Configure four classes to match MPLS packets with second-label EXP values as 1, 2, 3, and 4.

<P> system-view

[P] traffic classifier EXP1

[P-classifier-EXP1] if-match second-mpls-exp 1

[P-classifier-EXP1] quit

[P] traffic classifier EXP2

[P-classifier-EXP2] if-match second-mpls-exp 2

[P-classifier-EXP2] quit

[P] traffic classifier EXP3

[P-classifier-EXP3] if-match second-mpls-exp 3

[P-classifier-EXP3] quit

[P] traffic classifier EXP4

[P-classifier-EXP4] if-match second-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 200

[P-behavior-AF11] quit

[P] traffic behavior AF21

[P-behavior-AF21] queue af bandwidth 400

[P-behavior-AF21] quit

[P] traffic behavior AF31

[P-behavior-AF31] queue af bandwidth 600

[P-behavior-AF31] quit

[P] traffic behavior EF

[P-behavior-EF] queue ef bandwidth 800

[P-behavior-EF] quit

# Create QoS policy QUEUE, and associate the behaviors with the classes.

[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 GigabitEthernet 3/1/2.

[P] interface gigabitethernet 3/1/2

[P-GigabitEthernet3/1/2] qos apply policy QUEUE outbound

Verifying the configuration

# When congestion occurs in VPN 1, verify that:

·          The bandwidth proportion between flows with the DSCP values af11, af21, af31, and ef is 1:2:3:4.

·          The delay for the flow with DSCP value ef is smaller than the other traffic flows.

(Details not shown.)


Appendix Default priority maps

Table 2 Default dscp-exp priority map

DSCP values

EXP value

dscp

exp

0 to 7

0

8 to 15

1

16 to 23

2

24 to 31

3

32 to 39

4

40 to 47

5

48 to 55

6

56 to 63

7

 

Table 3 Default exp-dscp map

EXP value

DSCP value

0

0

1

8

2

16

3

24

4

32

5

40

6

48

7

56

 

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网