452
Quidway NetEngine80E/40E Core Router V300R003 Configuration Guide - QoS Issue 03 Date 2008-09-22 Part Number 00399154 Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.

00399154-Configuration Guide - QoS(V300R003_03).pdf

Embed Size (px)

Citation preview

Page 1: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Quidway NetEngine80E/40E Core Router

V300R003

Configuration Guide - QoS

Issue 03

Date 2008-09-22

Part Number 00399154

Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Page 2: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Huawei Technologies Co., Ltd. provides customers with comprehensive technical support and service. For anyassistance, please contact our local office or company headquarters.

Huawei Technologies Co., Ltd.Address: Huawei Industrial Base

Bantian, LonggangShenzhen 518129People's Republic of China

Website: http://www.huawei.com

Email: [email protected]

Copyright © Huawei Technologies Co., Ltd. 2008. All rights reserved.No part of this document may be reproduced or transmitted in any form or by any means without prior writtenconsent of Huawei Technologies Co., Ltd. Trademarks and Permissions

and other Huawei trademarks are the property of Huawei Technologies Co., Ltd.All other trademarks and trade names mentioned in this document are the property of their respective holders. NoticeThe information in this document is subject to change without notice. Every effort has been made in thepreparation of this document to ensure accuracy of the contents, but the statements, information, andrecommendations in this document do not constitute a warranty of any kind, express or implied.

Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Page 3: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Contents

About This Document.....................................................................................................................1

1 QoS Overview.............................................................................................................................1-11.1 Introduction.....................................................................................................................................................1-2

1.1.1 Traditional Packet Transmission Application........................................................................................1-21.1.2 New Application Requirements.............................................................................................................1-2

1.2 End-to-End QoS Model...................................................................................................................................1-31.2.1 Best-Effort Service Model.....................................................................................................................1-31.2.2 Integrated Service Model.......................................................................................................................1-31.2.3 Differentiated Service Model.................................................................................................................1-4

1.3 Techniques Used for the QoS Application......................................................................................................1-91.3.1 Traffic Classification............................................................................................................................1-101.3.2 Traffic Policing and Shaping................................................................................................................1-111.3.3 Congestion Avoidance Configuration..................................................................................................1-111.3.4 RSVP....................................................................................................................................................1-13

1.4 QoS Supported by the NE80E/40E...............................................................................................................1-13

2 Traffic Policing and Shaping Configuration........................................................................2-12.1 Introduction.....................................................................................................................................................2-2

2.1.1 Traffic Policing......................................................................................................................................2-22.1.2 Traffic Shaping.......................................................................................................................................2-42.1.3 Traffic Policing and Shaping Supported by NE80E/40E.......................................................................2-5

2.2 Configuring Interface-based Traffic Policing.................................................................................................2-62.2.1 Establishing the Configuration Task......................................................................................................2-62.2.2 Configuring CAR on a Layer 3 Interface...............................................................................................2-72.2.3 Configuring CAR on a Layer 2 Interface...............................................................................................2-82.2.4 Checking the Configuration...................................................................................................................2-9

2.3 Configuring CTC-based Traffic Policing........................................................................................................2-92.3.1 Establishing the Configuration Task....................................................................................................2-102.3.2 Defining Traffic Classes.......................................................................................................................2-102.3.3 Defining a Behavior and Configuring Traffic Policing Actions..........................................................2-122.3.4 Configuring a Traffic Policy................................................................................................................2-132.3.5 Applying Traffic Policies.....................................................................................................................2-132.3.6 Checking the Configuration.................................................................................................................2-15

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS Contents

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

i

Page 4: 00399154-Configuration Guide - QoS(V300R003_03).pdf

2.4 Configuring Traffic Shaping.........................................................................................................................2-162.4.1 Establishing the Configuration Task....................................................................................................2-162.4.2 Configuring Traffic Shaping................................................................................................................2-172.4.3 Checking the Configuration.................................................................................................................2-18

2.5 Maintaining Statistics....................................................................................................................................2-182.5.1 Clearing Statistics.................................................................................................................................2-18

2.6 Configuration Examples................................................................................................................................2-192.6.1 Example for Configuring Traffic Policing and Traffic Shaping..........................................................2-19

3 Congestion Avoidance Configuration................................................................................... 3-13.1 Introduction.....................................................................................................................................................3-2

3.1.1 Introduction to Congestion Avoidance..................................................................................................3-23.1.2 Congestion Avoidance Supported by NE80E/40E.................................................................................3-3

3.2 Configuring WRED.........................................................................................................................................3-33.2.1 Establishing the Configuration Task......................................................................................................3-43.2.2 Configuring WRED Parameters.............................................................................................................3-43.2.3 Applying WRED....................................................................................................................................3-53.2.4 Checking the Configuration...................................................................................................................3-6

3.3 Configuration Examples..................................................................................................................................3-73.3.1 Example for Configuring Congestion Avoidance..................................................................................3-7

4 Class-based QoS Configuration..............................................................................................4-14.1 Overview.........................................................................................................................................................4-2

4.1.1 Introduction to Class-based QoS............................................................................................................4-24.1.2 Class-based QoS Supported by the NE80E/40E....................................................................................4-4

4.2 Configuring a Traffic Policy Based on the Complex Traffic Classification...................................................4-44.2.1 Establishing the Configuration Task......................................................................................................4-44.2.2 Defining a Traffic Classifier..................................................................................................................4-54.2.3 Defining a Traffic Behavior and Configuring Traffic Actions..............................................................4-84.2.4 Defining a Policy and Specifying a Behavior for the Classifier..........................................................4-124.2.5 Applying a Traffic Policy.....................................................................................................................4-124.2.6 Applying the Statistic Function of a Traffic Policy.............................................................................4-144.2.7 Checking the Configuration.................................................................................................................4-15

4.3 Configuring Precedence Mapping Based on the Simple Traffic Classification............................................4-164.3.1 Establishing the Configuration Task....................................................................................................4-164.3.2 Defining the DiffServ Domain and Configuring a Traffic Policy........................................................4-174.3.3 Applying Traffic Policy Based on Simple Traffic Classification to an Interface................................4-244.3.4 Checking the Configuration.................................................................................................................4-26

4.4 Maintaining Class-based QoS Configuration................................................................................................4-274.4.1 Clearing the Statistics About Traffic Policies......................................................................................4-274.4.2 Troubleshooting...................................................................................................................................4-27

4.5 Configuration Examples................................................................................................................................4-284.5.1 Example for Configuring a Traffic Policy Based on Complex Traffic Classification.........................4-284.5.2 Example for Configuring Complex Traffic Classification on QinQ Termination Sub-interface.........4-36

ContentsQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

ii Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 5: 00399154-Configuration Guide - QoS(V300R003_03).pdf

4.5.3 Example for Configuring Priority Mapping Based on the Simple Traffic Classification (VLAN).....4-394.5.4 Example for Configuring Priority Mapping Based on the Simple Traffic Classification (MPLS)......4-44

5 QPPB Configuration..................................................................................................................5-15.1 Introduction.....................................................................................................................................................5-2

5.1.1 QPPB Overview.....................................................................................................................................5-25.1.2 QPPB Supported by the NE80E/40E.....................................................................................................5-2

5.2 Configuring QPPB..........................................................................................................................................5-25.2.1 Establishing the Configuration Task......................................................................................................5-35.2.2 Configuring the Routing Policy on the BGP Route Sender...................................................................5-45.2.3 Advertising Routing Policy on the Route Sender..................................................................................5-55.2.4 Configuring the Traffic Behavior on the Route Receiver......................................................................5-55.2.5 Configuring a Routing Policy to the Route Receiver.............................................................................5-65.2.6 Applying a Routing Policy to the Route Receiver.................................................................................5-75.2.7 Applying QPPB to the Interface.............................................................................................................5-85.2.8 Checking the Configuration...................................................................................................................5-8

5.3 Configuration Examples..................................................................................................................................5-95.3.1 Example for QPPB Configuration..........................................................................................................5-9

5.4 Maintaining QPPB Configuration.................................................................................................................5-145.4.1 Troubleshooting...................................................................................................................................5-14

6 VPN QoS Configuration...........................................................................................................6-16.1 Introduction.....................................................................................................................................................6-2

6.1.1 VPN QoS Overview...............................................................................................................................6-26.1.2 VPN QoS Features Supported by the NE80E/40E.................................................................................6-2

6.2 Configuring QPPB in L3VPNs.......................................................................................................................6-86.2.1 Establishing the Configuration Task......................................................................................................6-86.2.2 Configuring a Routing Policy on the BGP Route Sender....................................................................6-106.2.3 Advertising a Routing Policy on the Route Sender..............................................................................6-116.2.4 Configuring a Traffic Behavior on the Route Receiver.......................................................................6-126.2.5 Configuring a Routing Policy on the Route Receiver..........................................................................6-136.2.6 Applying a Routing Policy on the Route Receiver..............................................................................6-146.2.7 Applying QPPB on the Interface..........................................................................................................6-156.2.8 Checking the Configuration.................................................................................................................6-16

6.3 Configuring Hierarchical Resource Reserved L3VPNs................................................................................6-166.3.1 Establishing the Configuration Task....................................................................................................6-166.3.2 Configuring a Flow Queue...................................................................................................................6-186.3.3 (Optional) Enabling an L3VPN to Support DiffServ Models..............................................................6-196.3.4 (Optional) Configuring a Class Queue.................................................................................................6-206.3.5 Configuring a Tunnel Policy and Apply It to a VPN Instance.............................................................6-226.3.6 Configuring a Bandwidth for an MPLS TE Tunnel.............................................................................6-226.3.7 Binding an MPLS TE Tunnel to a VPN Instance and Specifying a QoS Policy.................................6-236.3.8 Checking the Configuration.................................................................................................................6-24

6.4 Configuring Hierarchical Resource Reserved L2VPNs................................................................................6-24

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS Contents

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

iii

Page 6: 00399154-Configuration Guide - QoS(V300R003_03).pdf

6.4.1 Establishing the Configuration Task....................................................................................................6-256.4.2 Configuring a Flow Queue...................................................................................................................6-266.4.3 (Optional) Enabling an L2VPN to Support DiffServ Models..............................................................6-286.4.4 (Optional) Configuring a Class Queue.................................................................................................6-296.4.5 Configuring a Tunnel Policy................................................................................................................6-306.4.6 Applying an MPLS TE Tunnel Policy to an MPLS L2VPN...............................................................6-316.4.7 Configuring the Bandwidth of an MPLS TE Tunnel...........................................................................6-326.4.8 Associating an MPLS TE Tunnel with an L2VPN and Specifying a QoS Policy...............................6-326.4.9 Checking the Configuration.................................................................................................................6-34

6.5 Example For Configuring VPN QoS............................................................................................................6-356.5.1 Example for Applying a Routing Policy with QoS Parameters in VPNv4..........................................6-356.5.2 Example for Applying Routing Policies with QoS Parameters to a VPN Instance.............................6-456.5.3 Example for Configuring a Hierarchical Resource Reserved L3VPN.................................................6-556.5.4 Example for Configuring a Hierarchical Resource Reserved L2VPN (VLL).....................................6-716.5.5 Example for Configuring a Hierarchical Resource Reserved L2VPN (VPLS)...................................6-856.5.6 Example for Configuring Hierarchical Resource Reserved VPNs (with Both L3VPNs and L2VPNsDeployed)......................................................................................................................................................6-956.5.7 Example for Configuring an MPLS DiffServ Model on the VPLS over TE.....................................6-114

6.6 Maintaining VPN QoS Configuration.........................................................................................................6-1226.6.1 Troubleshooting.................................................................................................................................6-122

7 ATM QoS Configuration..........................................................................................................7-17.1 Overview.........................................................................................................................................................7-2

7.1.1 Introduction to ATM QoS......................................................................................................................7-27.1.2 ATM QoS Features Supported by the NE80E/40E................................................................................7-2

7.2 Configuring ATM Simple Traffic Classification............................................................................................7-57.2.1 Establishing the Configuration Task......................................................................................................7-57.2.2 Enabling ATM Simple Traffic Classification........................................................................................7-77.2.3 Configuring Mapping Rules for ATM QoS...........................................................................................7-77.2.4 Checking the Configuration...................................................................................................................7-8

7.3 Configuring Forced ATM Traffic Classification............................................................................................7-87.3.1 Establishing the Configuration Task......................................................................................................7-97.3.2 Configuring ATM Services..................................................................................................................7-107.3.3 Configuring Forced ATM Traffic Classification.................................................................................7-117.3.4 Checking the Configuration.................................................................................................................7-12

7.4 Configuring ATM Complex Traffic Classification.......................................................................................7-127.4.1 Establishing the Configuration Task....................................................................................................7-127.4.2 Defining Traffic Classifiers..................................................................................................................7-137.4.3 Defining Traffic Behaviors..................................................................................................................7-147.4.4 Defining Traffic Policies......................................................................................................................7-157.4.5 Applying Traffic Policies.....................................................................................................................7-157.4.6 Checking the Configuration.................................................................................................................7-16

7.5 Configuring the ATM Traffic Shaping.........................................................................................................7-17

ContentsQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

iv Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 7: 00399154-Configuration Guide - QoS(V300R003_03).pdf

7.5.1 Establishing the Configuration Task....................................................................................................7-187.5.2 Configuring ATM Traffic Shaping Parameters...................................................................................7-187.5.3 Applying ATM Traffic Shaping Parameters........................................................................................7-197.5.4 Checking the Configuration.................................................................................................................7-20

7.6 Configuring the Priority of an ATM PVC....................................................................................................7-207.6.1 Establshing the Configuration Task.....................................................................................................7-207.6.2 Configuring the Priority of an ATM PVC...........................................................................................7-21

7.7 Configuring Congestion Management of the ATM PVC.............................................................................7-217.7.1 Establshing the Configuration Task.....................................................................................................7-227.7.2 Configuring the Queue Scheduling of an ATM PVC..........................................................................7-227.7.3 Checking the Configuration.................................................................................................................7-23

7.8 Configuration Examples................................................................................................................................7-247.8.1 Example for Configuring Simple Traffic Classification for 1-to-1 VCC ATM Transparent Transmission.......................................................................................................................................................................7-257.8.2 Example for Configuring Simple Traffic Classification for 1-to-1 VPC ATM Transparent Transmission.......................................................................................................................................................................7-317.8.3 Example for Configuring Simple Traffic Classification for AAL5 SDU ATM Transparent Transmission.......................................................................................................................................................................7-377.8.4 Example of Configuring for 1483R-based ATM Simple Traffic Classification..................................7-437.8.5 Example for Configuring 1483B-Based ATM Simple Traffic Classificaiton.....................................7-467.8.6 Example for Configuring Forced ATM Traffic Classification............................................................7-507.8.7 Example for Configuring the ATM Complex Traffic Classification...................................................7-547.8.8 Example for Configuring Queue Scheduling for an ATM PVC..........................................................7-59

8 Frame Relay QoS Configuration.............................................................................................8-18.1 Overview.........................................................................................................................................................8-3

8.1.1 Introduction to Frame Relay QoS..........................................................................................................8-38.1.2 Frame Relay QoS Supported by the NE80E/40E...................................................................................8-3

8.2 Configuring Frame Relay Traffic Shaping......................................................................................................8-38.2.1 Establishing the Configuration Task......................................................................................................8-48.2.2 Configuring FRTS Parameters...............................................................................................................8-48.2.3 Applying FRTS Parameters to the Interface..........................................................................................8-58.2.4 Enabling FRTS.......................................................................................................................................8-6

8.3 Configuring Frame Relay Traffic Policing.....................................................................................................8-78.3.1 Establishing the Configuration Task......................................................................................................8-78.3.2 Configuring FRTP Parameters...............................................................................................................8-78.3.3 Applying FRTP Parameters to the Interface..........................................................................................8-88.3.4 Enabling FRTP.......................................................................................................................................8-9

8.4 Configuring Universal Frame Relay Queues..................................................................................................8-98.4.1 Establishing the Configuration Task......................................................................................................8-98.4.2 Configuring Universal Frame Relay Queues.......................................................................................8-108.4.3 Applying Universal Queues to an Frame Relay Interface....................................................................8-118.4.4 Applying Universal Queues to Frame Relay Virtual Circuits..............................................................8-12

8.5 Configuring PVC PQ of Frame Relay...........................................................................................................8-13

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS Contents

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

v

Page 8: 00399154-Configuration Guide - QoS(V300R003_03).pdf

8.5.1 Establishing the Configuration Task....................................................................................................8-138.5.2 Configuring PVC PQ on an FR Interface.............................................................................................8-138.5.3 Configuring the FR PVC PQ Precedence............................................................................................8-14

8.6 Configuring Frame Relay Congestion Avoidance........................................................................................8-158.6.1 Establishing the Configuration Task....................................................................................................8-158.6.2 Creating a Frame Relay Class..............................................................................................................8-168.6.3 Configuring WRED Parameters...........................................................................................................8-178.6.4 Applying WRED Parameters on the Frame Relay Interface................................................................8-188.6.5 Checking the Configuration.................................................................................................................8-19

8.7 Configuring Frame Relay Fragmentation.....................................................................................................8-198.7.1 Establishing the Configuration Task....................................................................................................8-198.7.2 Configuring Frame Relay Fragmentation............................................................................................8-208.7.3 Applying FR Fragmentation to a Virtual Circuit.................................................................................8-208.7.4 Checking the Configuration.................................................................................................................8-21

8.8 Debugging Frame Relay QoS.......................................................................................................................8-218.9 Configuration Examples................................................................................................................................8-22

8.9.1 Example for Configuring Frame Relay Traffic Shaping......................................................................8-228.9.2 Example for Configuring Frame Relay Fragmentation........................................................................8-24

9 HQoS Configuration.................................................................................................................9-19.1 Overview.........................................................................................................................................................9-2

9.1.1 Introduction to HQoS.............................................................................................................................9-29.1.2 Related Concepts....................................................................................................................................9-29.1.3 HQoS Supported by the NE80E/40E.....................................................................................................9-3

9.2 Configuring HQoS on an Ethernet Interface.................................................................................................9-119.2.1 Establishing the Configuration Task....................................................................................................9-119.2.2 (Optional) Configuring an FQ WRED Object.....................................................................................9-139.2.3 (Optional) Configuring Scheduling Parameters of an FQ....................................................................9-149.2.4 (Optional) Configuring Mapping from an FQ to a CQ........................................................................9-159.2.5 (Optional) Configuring the Traffic Shaping of a GQ...........................................................................9-159.2.6 Configuring Scheduling Parameters of an SQ.....................................................................................9-169.2.7 (Optional) Configuring a CQ WRED Object.......................................................................................9-179.2.8 (Optional) Configuring Scheduling Parameters of a CQ.....................................................................9-179.2.9 Checking the Configuration.................................................................................................................9-18

9.3 Configuring HQoS on a QinQ Termination Sub-interface...........................................................................9-219.3.1 Establishing the Configuration Task....................................................................................................9-219.3.2 (Optional) Configuring an FQ WRED Object.....................................................................................9-229.3.3 (Optional) Configuring Scheduling Parameters of an FQ....................................................................9-239.3.4 (Optional) Configuring Mapping from an FQ to a CQ........................................................................9-249.3.5 (Optional) Configuring the Traffic Shaping of a GQ...........................................................................9-249.3.6 Enabling QinQ on an Interface.............................................................................................................9-259.3.7 Configuring QinQ on a Sub-interface..................................................................................................9-269.3.8 Configuring a VLAN Group................................................................................................................9-26

ContentsQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

vi Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 9: 00399154-Configuration Guide - QoS(V300R003_03).pdf

9.3.9 Configuring Scheduling Parameters of an SQ.....................................................................................9-279.3.10 (Optional) Configuring a CQ WRED Object.....................................................................................9-279.3.11 (Optional) Configuring Scheduling Parameters of a CQ...................................................................9-289.3.12 Checking the Configuration...............................................................................................................9-29

9.4 Configuring HQoS on a CPOS or E3/T3 Interface.......................................................................................9-299.4.1 Establishing the Configuration Task....................................................................................................9-309.4.2 Configuring HQoS...............................................................................................................................9-309.4.3 Checking the Configuration.................................................................................................................9-31

9.5 Configuring HQoS Based on the PBB-TE Tunnels......................................................................................9-319.5.1 Establishing the Configuration Task....................................................................................................9-329.5.2 Configuring a Reserved Bandwidth for PBB-TE Services on an Interface.........................................9-339.5.3 (Optional) Configuring the WRED Object of an FQ...........................................................................9-339.5.4 (Optional) Configuring Scheduling Parameters of an FQ....................................................................9-349.5.5 (Optional) Configuring Mappings from an FQ to a CQ.......................................................................9-349.5.6 (Optional) Configuring Traffic Shaping of a GQ.................................................................................9-349.5.7 Configuring Scheduling Parameters of an SQ.....................................................................................9-359.5.8 Checking the Configuration.................................................................................................................9-35

9.6 Configuring Class-based HQoS....................................................................................................................9-379.6.1 Establishing the Configuration Task....................................................................................................9-379.6.2 Defining a Traffic Classifier................................................................................................................9-389.6.3 (Optional) Configuring a WRED Object for a Flow Queue................................................................9-399.6.4 (Optional) Configuring Scheduling Parameters for a Flow Queue......................................................9-409.6.5 (Optional) Configuring Mappings from a Flow Queue to a Class Queue...........................................9-409.6.6 (Optional) Configuring Traffic Shaping for a Group Queue...............................................................9-419.6.7 Defining a Traffic Behavior and Configuring Scheduling Parameters for a Subscriber Queue..........9-429.6.8 Defining a Traffic Policy and Applying It to an Interface...................................................................9-429.6.9 (Optional) Configuring a WRED Object for a Class Queue................................................................9-439.6.10 (Optional) Configuring Scheduling Parameters for a Class Queue...................................................9-449.6.11 Checking the Configuration...............................................................................................................9-44

9.7 Configuring Template-based HQoS..............................................................................................................9-479.7.1 Establishing the Configuration Task....................................................................................................9-489.7.2 (Optional) Configuring an FQ WRED Object.....................................................................................9-499.7.3 (Optional) Configuring Scheduling Parameters of an FQ....................................................................9-499.7.4 (Optional) Configuring Mapping from an FQ to a CQ........................................................................9-509.7.5 (Optional) Configuring the Traffic Shaping of a GQ...........................................................................9-519.7.6 (Optional) Configuring Packet Loss Compensation Length of Service Templates.............................9-519.7.7 Defining a QoS Template and Configuring Scheduling Parameters....................................................9-529.7.8 Applying a QoS Template....................................................................................................................9-539.7.9 (Optional) Configuring a CQ WRED Object.......................................................................................9-539.7.10 (Optional) Configuring Scheduling Parameters of a CQ...................................................................9-549.7.11 Checking the Configuration...............................................................................................................9-55

9.8 Maintaining HQoS........................................................................................................................................9-57

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS Contents

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

vii

Page 10: 00399154-Configuration Guide - QoS(V300R003_03).pdf

9.8.1 Clearing Queue Statistics.....................................................................................................................9-579.9 Configuration Examples................................................................................................................................9-57

9.9.1 Example for Configuring HQoS on an Ethernet Interface...................................................................9-589.9.2 Example for Configuring QinQ HQoS.................................................................................................9-649.9.3 Example for Configuring HQoS on an E3 or T3 Interface..................................................................9-699.9.4 Example for Configuring HQoS on a CPOS Interface........................................................................9-729.9.5 Example for Configuring HQoS Based on the PBB-TE Tunnel..........................................................9-769.9.6 Example for Configuring Class-based HQoS......................................................................................9-829.9.7 Example for Configuring Template-based HQoS................................................................................9-89

A Glossary.....................................................................................................................................A-1

B Acronyms and Abbreviations.................................................................................................B-1

Index.................................................................................................................................................i-1

ContentsQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

viii Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 11: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Figures

Figure 1-1 Diff-Serv networking diagram............................................................................................................1-5Figure 1-2 ToS field and DS field........................................................................................................................1-5Figure 1-3 Position of EXP field..........................................................................................................................1-8Figure 1-4 Common QoS features in the DiffServ model..................................................................................1-10Figure 1-5 Traffic policing and shaping.............................................................................................................1-11Figure 1-6 Schematic diagram of traffic congestion..........................................................................................1-12Figure 2-1 Traffic policing according to CAR.....................................................................................................2-2Figure 2-2 TS diagram......................................................................................................................................... 2-5Figure 2-3 Application of traffic policing and shaping........................................................................................2-5Figure 2-4 Networking diagram of TS...............................................................................................................2-19Figure 3-1 Relationship between WRED and queue mechanism........................................................................ 3-3Figure 3-2 Networking diagram for configuring congestion avoidance..............................................................3-7Figure 4-1 Diagram for configuring a traffic policy based on the complex traffic classification......................4-29Figure 4-2 Networking diagram for configuring complex traffic classification on QinQ termination sub-interface.............................................................................................................................................................................4-36Figure 4-3 Networking diagram for configuring VLAN QoS............................................................................4-40Figure 4-4 Mapping from DSCP priority to MPLS priority..............................................................................4-44Figure 5-1 Networking diagram for applying QPPB........................................................................................... 5-3Figure 5-2 Networking diagram of QPPB configuration.....................................................................................5-9Figure 6-1 Networking diagram of QPPB on L3VPN.........................................................................................6-3Figure 6-2 Principle diagram for hierarchical resource reserved VPNs...............................................................6-4Figure 6-3 The DSCP field in the IP packet and the EXP field in the MPLS packet.......................................... 6-5Figure 6-4 Uniform model................................................................................................................................... 6-6Figure 6-5 Pipe model..........................................................................................................................................6-7Figure 6-6 Short Pipe model................................................................................................................................ 6-7Figure 6-7 Typical networking for QPPB on L3VPN..........................................................................................6-9Figure 6-8 Networking diagram for configuring QPPB in an L3VPN (VPNv4)...............................................6-36Figure 6-9 Networking diagram for configuring QPPB in an L3VPN (VPN instance).....................................6-46Figure 6-10 Networking diagram for configuring a hierarchical resource reserved L3VPN.............................6-56Figure 6-11 Networking diagram for configuring a hierarchical resource reserved L2VPN (VLL).................6-72Figure 6-12 Networking diagram for configuring a hierarchical resource reserved L2VPN (VPLS)...............6-86Figure 6-13 Networking diagram for configuring hierarchical resource reserved VPNs..................................6-96Figure 6-14 Networking diagram for configuring an MPLS DiffServ model..................................................6-114Figure 7-1 Forced ATM traffic classification...................................................................................................... 7-4

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS Figures

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

ix

Page 12: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Figure 7-2 Networking diagram for connecting two ATM networks with the PSN network..............................7-6Figure 7-3 Networking diagram for transmitting Ethernet or IP packets over the ATM network.......................7-6Figure 7-4 Forced traffic classification for transparent transmission of ATM cells............................................7-9Figure 7-5 Forced traffic classification of 1483B traffic....................................................................................7-10Figure 7-6 Networking diagram for configuring ATM simple traffic classification for 1-to-1 VCC ATM transparenttransmission.........................................................................................................................................................7-25Figure 7-7 Networking diagram for configuring simple traffic classification for 1-to-1 VPC ATM transparenttransmission.........................................................................................................................................................7-32Figure 7-8 Networking diagram for configuring simple traffic classification for AAL5 SDU ATM transparenttransmission.........................................................................................................................................................7-38Figure 7-9 Networking diagram of configuring 1483R-based ATM simple traffic classification.....................7-43Figure 7-10 Networking diagram of configuring 1483B-based ATM simple traffic classification...................7-47Figure 7-11 Networking diagram for forced ATM traffic classification...........................................................7-50Figure 7-12 Networking diagram for configuring the ATM complex traffic classification..............................7-55Figure 7-13 Networking diagram for configuring queue scheduling of ATM PVCs........................................7-59Figure 8-1 Networking diagram of FRTS..........................................................................................................8-22Figure 8-2 Networking diagram of FR fragmentation.......................................................................................8-24Figure 9-1 Principle of traditional QoS queue scheduling...................................................................................9-2Figure 9-2 Principle of HQoS scheduling on an Ethernet interface.....................................................................9-4Figure 9-3 Upstream HQoS scheduling on an Ethernet interface........................................................................9-5Figure 9-4 Downstream HQoS scheduling on an Ethernet interface...................................................................9-8Figure 9-5 HQoS on a CPOS or E3/T3 interface.................................................................................................9-9Figure 9-6 Typical networking diagram for VLAN user access through sub-interfaces...................................9-12Figure 9-7 Typical networking diagram for VPN user access through sub-interfaces......................................9-12Figure 9-8 Networking diagram for configuring SQ..........................................................................................9-58Figure 9-9 Networking diagram for configuring QinQ HQoS...........................................................................9-64Figure 9-10 Networking diagram for configuring HQoS on E3 interfaces........................................................9-70Figure 9-11 Networking diagram for configuring HQoS on a CPOS interface.................................................9-73Figure 9-12 Networking diagram for configuring PBB-TE-based HQoS..........................................................9-77Figure 9-13 Networking diagram for configuring class-based HQoS................................................................9-82Figure 9-14 Networking diagram of template-based HQoS...............................................................................9-89

FiguresQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

x Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 13: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Tables

Table 1-1 Classification of DSCP........................................................................................................................ 1-6Table 1-2 AF codepoint........................................................................................................................................1-7Table 1-3 The default mapping between IPv4 precedence and CSCP.................................................................1-8Table 4-1 Traffic classifiers and behaviors defined in policy1............................................................................ 4-7Table 4-2 Traffic classifiers and behaviors defined in policy2............................................................................ 4-7Table 4-3 Traffic classifiers and behaviors defined in policy3............................................................................ 4-8Table 4-4 Default mapping between DSCP value and COS value of IP packets...............................................4-18Table 4-5 Default mapping between the CoS value and the DSCP value..........................................................4-20Table 4-6 Default mapping between DSCP value and COS value of IP packets in QinQ domain....................4-20Table 4-7 Default mapping between the EXP value and the COS value of MPLS packets...............................4-21Table 4-8 Default mapping between the CoS value and the EXP value............................................................4-21Table 4-9 Mappings from 802.1p priorities to QoS CoSs and colors in the 5p3d domain template..................4-22Table 4-10 Mappings from QoS CoSs and colors to 802.1p priorities in the 5p3d domain template................4-23Table 4-11 Mappings from 802.1p priorities to QoS CoSs and colors in the default domain template............4-23Table 4-12 Mappings from QoS CoSs and colors to 802.1p priorities in the default domain template............4-23Table 6-1 Default mapping between the CoS value and the EXP value..............................................................6-6

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS Tables

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

xi

Page 14: 00399154-Configuration Guide - QoS(V300R003_03).pdf
Page 15: 00399154-Configuration Guide - QoS(V300R003_03).pdf

About This Document

PurposeThis document describes the basic knowledge and configurations of QoS, including trafficpolicing, traffic shaping, congestion management and avoidance, and traffic classification andprovides an introduction of QPPB, VPN QoS, ATM QoS, FR QoS, and HQoS.

This document can be used as a guide for QoS configurations.

Related VersionsThe following table lists the product versions related to this document.

Product Name Version

Quidway NetEngine80E/40ERouter

V300R003

Intended AudienceThis document is intended for:

l Commissioning engineer

l Data configuration engineer

l Network monitoring engineer

l System maintenance engineer

OrganizationThis document is organized as follows.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS About This Document

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

1

Page 16: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Chapter Description

1 QoS Overview This chapter describes the performance measurement ofservices provided by the service provider. It also introducessome QoS solutions, such as RSVP and Diff-Serv Model.

2 Traffic Policing andShaping Configuration

This chapter describes the traffic policing, traffic shaping andlimit rate concepts. It also describes the configuration steps,along with typical examples.

3 Congestion AvoidanceConfiguration

This chapter introduces the WRED concept and theconfiguration steps.

4 Class-based QoSConfiguration

This chapter describes the configuration of traffic policybased on complex traffic classification and simple trafficclassification.

5 QPPB Configuration This chapter describes concepts and configuration steps ofQPPB.

6 VPN QoS Configuration This chapter describes the implementation and configurationof QoS policies in VPN.

7 ATM QoS Configuration This chapter describes the configuration of simple ATMtraffic classification and forced ATM traffic classification.

8 Frame Relay QoSConfiguration

This chapter describes the configuration of frame relay trafficpolicing, frame relay traffic shaping, frame relay congestionmanagement, frame relay congestion avoidance, and framefragmentation.

9 HQoS Configuration This chapter describes the basic concept, configurationprocedure and examples of HQoS.

A Glossary This appendix collates frequently used glossaries in thisdocument.

B Acronyms andAbbreviations

This appendix collates frequently used acronyms andabbreviations in this document.

Conventions

Symbol Conventions

The symbols that may be found in this document are defined as follows.

Symbol Description

Indicates a hazard with a high level of risk, which if notavoided, will result in death or serious injury.

About This DocumentQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

2 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 17: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Symbol Description

Indicates a hazard with a medium or low level of risk, whichif not avoided, could result in minor or moderate injury.

Indicates a potentially hazardous situation, which if notavoided, could result in equipment damage, data loss,performance degradation, or unexpected results.

Indicates a tip that may help you solve a problem or savetime.

Provides additional information to emphasize or supplementimportant points of the main text.

General ConventionsThe general conventions that may be found in this document are defined as follows.

Convention Description

Times New Roman Normal paragraphs are in Times New Roman.

Boldface Names of files, directories, folders, and users are inboldface. For example, log in as user root.

Italic Book titles are in italics.

Courier New Examples of information displayed on the screen are inCourier New.

Command ConventionsThe command conventions that may be found in this document are defined as follows.

Convention Description

Boldface The keywords of a command line are in boldface.

Italic Command arguments are in italics.

[ ] Items (keywords or arguments) in brackets [ ] are optional.

{ x | y | ... } Optional items are grouped in braces and separated byvertical bars. One item is selected.

[ x | y | ... ] Optional items are grouped in brackets and separated byvertical bars. One item is selected or no item is selected.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS About This Document

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

3

Page 18: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Convention Description

{ x | y | ... }* Optional items are grouped in braces and separated byvertical bars. A minimum of one item or a maximum of allitems can be selected.

[ x | y | ... ]* Optional items are grouped in brackets and separated byvertical bars. Several items or no item can be selected.

&<1-n> The parameter before the & sign can be repeated 1 to n times.

# A line starting with the # sign is comments.

GUI Conventions

The GUI conventions that may be found in this document are defined as follows.

Convention Description

Boldface Buttons, menus, parameters, tabs, window, and dialog titlesare in boldface. For example, click OK.

> Multi-level menus are in boldface and separated by the ">"signs. For example, choose File > Create > Folder.

Keyboard Operations

The keyboard operations that may be found in this document are defined as follows.

Format Description

Key Press the key. For example, press Enter and press Tab.

Key 1+Key 2 Press the keys concurrently. For example, pressing Ctrl+Alt+A means the three keys should be pressed concurrently.

Key 1, Key 2 Press the keys in turn. For example, pressing Alt, A meansthe two keys should be pressed in turn.

Mouse Operations

The mouse operations that may be found in this document are defined as follows.

Action Description

Click Select and release the primary mouse button without movingthe pointer.

About This DocumentQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

4 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 19: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Action Description

Double-click Press the primary mouse button twice continuously andquickly without moving the pointer.

Drag Press and hold the primary mouse button and move thepointer to a certain position.

Update HistoryUpdates between document issues are cumulative. Therefore, the latest document issue containsall updates made in previous issues.

Updates in Issue 03 (2008-09-22)This document is the third commercial release.

Updates in Issue 02 (2008-05-08)This document is the second commercial release.

Updates in Issue 01 (2008-02-22)Initial field trial release

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS About This Document

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

5

Page 20: 00399154-Configuration Guide - QoS(V300R003_03).pdf
Page 21: 00399154-Configuration Guide - QoS(V300R003_03).pdf

1 QoS Overview

About This Chapter

This chapter describes the performance measurement of services provided by the serviceprovider. It also introduces some QoS solutions, such as RSVP and Diff-Serv Model.

1.1 IntroductionThis section describes the basic concepts of the Quality of Service (QoS), traditional packetdelivery services, new demands resulting from new services, and QoS features supported by theproduct.

1.2 End-to-End QoS ModelThis section describes the end-to-end service of QoS.

1.3 Techniques Used for the QoS ApplicationTechniques Used for the QoS Application

1.4 QoS Supported by the NE80E/40EThis section describes the QoS supported by the NE80E/40E

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 1 QoS Overview

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

1-1

Page 22: 00399154-Configuration Guide - QoS(V300R003_03).pdf

1.1 IntroductionThis section describes the basic concepts of the Quality of Service (QoS), traditional packetdelivery services, new demands resulting from new services, and QoS features supported by theproduct.

Quality of service (QoS) is used to assess the ability of the supplier to meet the customerdemands. In the Internet, QoS is used to assess the ability of the network to transmit packets.The network provides a wide variety of services and therefore, QoS should be assessed fromdifferent aspects.

QoS generally refers to the analysis of the issues related to the process of sending packets suchas, bandwidth, delay, jitter, and packet loss ratio.

1.1.1 Traditional Packet Transmission Application

1.1.2 New Application Requirements

1.1.1 Traditional Packet Transmission Application

It is difficult to ensure QoS in the traditional IP network. Because routers in the network handleall the packets equally and adopt First In First Out (FIFO) method to transfer packets. Resourcesused for forwarding packets are allocated based on the arrival sequence of the packets.

All packets share the bandwidth of networks and routers. Resources are allocated according tothe arrival time of the packets. This policy is called best effort (BE) . The device in this modetries its best to transmit packets to the destination. The BE mode, however, does not ensure anyimprovement in delay time, jitter, packet loss ratio, and high reliability.

The traditional BE mode applies only to services such as World Wide Web (WWW), file transfer,and email, which have no specific request for bandwidth and jitter.

1.1.2 New Application Requirements

With the rapid development of the network, increasing number of networks are connected to theInternet. The Internet expands greatly in size, scope, and users. The use of the Internet as aplatform for data transmission and implementation of various applications is on the rise. Further,the service providers also want to develop new services for more profits.

Apart from traditional applications such as WWW, email, and File Transfer Protocol (FTP), theInternet has expanded to accommodate other services such as E-learning, telemedicine,videophone, videoconference, and video on demand. Enterprise users want to connect theirbranches in different areas through VPN technologies to implement applications such asaccessing corporate databases or managing remote devices through Telnet.

These new applications put forward special requirements for bandwidth, delay, and jitter. Forexample, videoconference and video on demand require high bandwidth, low delay, and lowjitter. Telnet stresses on low delay and priority handling in the event of congestion.

As new services spring up, the number of requests for the service capability of IP networks hasbeen on the rise. Users expect improved service transmission to the destination and also betterquality of services. For example, IP networks are expected to provide dedicated bandwidth,reduce packet loss ratio, avoid network congestion, control network flow, and set the preferenceof packets to provide different QoS for various services.

1 QoS OverviewQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

1-2 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 23: 00399154-Configuration Guide - QoS(V300R003_03).pdf

All these demand better service capability from the network, and QoS is just an answer to therequirements.

1.2 End-to-End QoS ModelThis section describes the end-to-end service of QoS.

Different service models are provided for user services to ensure QoS according to users'requirements and the quality of the network. The common service models are as follows:

l Best-Effort service model

l Integrated service model

l Differentiated service model

1.2.1 Best-Effort Service Model

1.2.2 Integrated Service Model

1.2.3 Differentiated Service Model

1.2.1 Best-Effort Service Model

Best-Effort is an indiscriminate and the simplest service model. Application programs can,without notifying the network or obtaining any approval from the network, send any number ofpackets at any time. For the Best-Effort service, the network tries its best to send packets, butcannot ensure the performance such as delay and reliability. The Best-Effort model is the defaultservice model of the Internet and can be applied to most networks, such as FTP and email,through the First-in-First-out (FIFO) queue.

1.2.2 Integrated Service Model

The integrated service model is called Antiserum for short. Antiserum is an integrated servicemodel and can meet various QoS requirements. In this service model, before sending packets,an application program needs to apply for specific services through signaling. The applicationprogram first notifies the network of its traffic parameters and the request for special servicequalities such as bandwidth and delay. After receiving the confirmation of the network thatresources have been reserved for packets, the application program begins sending packets. Thesent packets are controlled within the range specified by the flow parameters.

After receiving the request for resources from the application program, the network checks theresource allocation. That is, based on the request and current available resources, the networkdetermines whether to allocate resources for the application program or not. Once the networkconfirms that resources are allocated for the packets, and as long as the packets are controlledwithin the range specified by the flow parameters, the network is certain to meet the QoSrequirements of the application program. The network maintains a state for each flow that isspecified by the source and destination I addresses, interface number, and protocol number.Based on the state, the network classifies packets and performs traffic policing, queuing, andscheduling to fulfil its commitment to the application program.

Antiserum can provide the following services:

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 1 QoS Overview

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

1-3

Page 24: 00399154-Configuration Guide - QoS(V300R003_03).pdf

l Guaranteed service: provides the preset bandwidth and delay to meet the requirements ofthe application program. For example, a 10 Bit/s bandwidth and a delay less than one secondcan be provided for Voice over I (VoIP) services.

l Controlled-load service: If network overload occurs, packets can still be provided with theservice similar to that provided in the absence of network overload. That is, when trafficcongestion occurs on the network, less delay and high pass rate are ensured for the packetsof certain application programs.

1.2.3 Differentiated Service Model

The differentiated service model is called DiffServ for short. In the model, the applicationprogram does not need to send its request for network resource before sending the packets. Theapplication program informs network nodes of its demand for QoS by using QoS parameters inthe IP packet header. Then routers along the path obtain the demand by analyzing the header ofthe packet.

To implement Diff-Serv, the access router classifies packets and marks the class of service (CoS)in the IP packet header. The downstream routers then identify the CoS and forward the packetson the basis of CoS. Diff-Serv is therefore a class-based QoS solution.

Diff-Serv Model in IP Networkl Diff-Serv Networking

The network node that implements Diff-Serv is called a DS node. A group of DS nodesthat adopt the same service policy and the same per-hop behavior (PHB) is called a DSdomain. See Figure 1-1.DS nodes are classified into the following two modes:– DS border node: Connects DS domain with non-DS domain. This node controls traffic

and sets Differentiated Services CodePoint (DSCP) value in packets according to theTraffic Conditioning Agreement (TCA).

– DS interior node: Connects a DS border node with other interior nodes in a DS domain.This node carries out only the simple traffic classification and traffic control based onthe DSCP value.

1 QoS OverviewQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

1-4 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 25: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Figure 1-1 Diff-Serv networking diagram

l DS Field and DSCPThe Type of Service (ToS) octet in IPv4 packet header is defined in RFC791, RFC134, andRFC1349. As shown in Figure 1-2, the ToS octet contains the following fields: Precedence:It is of three bits (bits 0 through 2). It indicates the precedence of the IP packet. D bit: It isof one bit and indicates delay. T bit: It is of one bit and indicates throughput. R bit: It is ofone bit and indicates reliability. C bit: It is of one bit and indicates cost. The highest bit ofToS field has to be 0.The router first checks the IP precedence of packets to implement QoS. The other bits arenot fully used.The ToS octet of IPv4 packet header is redefined in RFC2474, called DS field. As shownin Figure 1-2: Bits 0 through 5 in DS field are used as DSCP. Bit 6 and bit 7 are the reservedbits. Bits 0 through 2 are Class Selector CodePoint (CSCP), which indicate a type of DSCP.DS node selects PHB according to the DSCP value.

Figure 1-2 ToS field and DS field

The DSCP field within the DS field is capable of conveying 64 distinct codepoints. Thecodepoint space is divided into three pools as shown in Table 1-1.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 1 QoS Overview

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

1-5

Page 26: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Table 1-1 Classification of DSCP

Code Pool Code Space Usage

1 xxxxx0 Standard action

2 xxxx11 EXP/LU (experiment or local use)

3 xxxx01 EXP/LU (can be used as the extended space forfuture standard action)

Code pool 1 (xxxxx0) is used for standard action, code pool 2 (xxxx11) and code pool 3(xxxx01) are used for experiment or future extension.

l Standard PHB

The DS node implements the PHB behavior on the data flow. The network administratorcan configure the mapping from DSCP to PHB. When a packet is received, the DS nodedetects its DSCP to find the mapping from DSCP to PHB. If no matching mapping is found,the DS node selects the default PHB (Best-Effort, DSCP=000000) to forward the packet.All the DS nodes support the default PHB.

The following are the four standard PHBs defined by the IETF: Class selector (CS),Expedited forwarding (EF), Assured forwarding (AF) and Best-Effort (BE). The defaultPHB is BE.

– CS PHB

Service levels defined by the CS are the same as the IP precedence used on the network.

The value of the DSCP is XXX000 where the value of "X" is either 1 or 0. When thevalue of DSCP is 000000, the default PHB is selected.

– EF PHB

EF means that the flow rate should never be less than the specified rate from any DSnode. EF PHB cannot be re-marked in DS domain except on border node. New DSCPis required to meet EF PHB features.

EF PHB is defined to simulate the forwarding of a virtual leased line in the DS domainto provide the forwarding service with low drop ratio, low delay, and high bandwidth.

– AF PHB

AF PHB allows traffic of a user to exceed the order specification agreed by the user andthe ISP. It ensures that traffic within the order specification is forwarded. The trafficexceeding the specification is not simply dropped, but is forwarded at lower servicepriorities.

Four classes of AF: AF1, AF2, AF3, and AF4 are defined. Each class of AF can beclassified into three different dropping priorities. AF codepoint AFij indicates AF classis i (1<=i<=4) and the dropping priority is j (1<=j<=3). When providing AF service,the carrier allocates different bandwidth resource for each class of AF.

A special requirement for AF PHB is that the traffic control cannot change the packetsequence in a data flow. For instance, in traffic policing, different packets in a serviceflow are marked with different dropping priorities even if the packets belong to the sameAF class. Although the packets in different service flows have different dropping ratio,their sequence remains unchanged. This mechanism is especially applicable to thetransmission of multimedia service.

1 QoS OverviewQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

1-6 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 27: 00399154-Configuration Guide - QoS(V300R003_03).pdf

– BE PHBBE PHB is the traditional IP packet transmission that focuses only on reachability. Allrouters support BE PHB.

l Recommended DSCPDifferent DS domains can have self-defined mapping from DSCP to PHB. RFC2474recommends code values for BE, EF, AFij, and Class Selector Codepoints (CSCP). CSCPis designed to be compatible with IPv4 precedence model.– BE: DSCP=000000

– EF: DSCP=101110

– AFij codepointAFij codepoint is shown in Table 1-2.

Table 1-2 AF codepoint

ServiceClass

Low DroppingPriority, j=1

MediumDropping Priority,j=2

High DroppingPriority, j=3

AF(i=4) 100010 100100 100110

AF(i=3) 011010 011100 011110

AF(i=2) 010010 010100 010110

AF(i=1) 001010 001100 001110

In traffic policing:– If j=1, the packet color is marked as green.

– If j=2, the packet color is marked as yellow.

– If j=3, the packet color is marked as red.The first three bits of the same AF class are identical. For example, the first threebits of AF1j are 001; that of AF3j are 011, that of AF4j are 100. Bit 3 and bit 4indicate the dropping priority which has three valid values including 01, 10, and 11.The greater the Bit value, the higher the dropping priority.

– Class selector codepointIn the Diff-Serv standard, the CSCP is defined to make the DSCP compatible withthe precedence field of the IPv4 packet header. The routers identify the priority ofthe packets through IP precedence. The IP precedence and the CSCP parametersmap with each other. The user should configure the values for these parameters. InCSCP, the higher the value of DSCP=xxx000 is, the lower the forwarding delay ofPHB is.The default mapping between CSCP and IPv4 precedence is shown in Table 1-3.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 1 QoS Overview

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

1-7

Page 28: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Table 1-3 The default mapping between IPv4 precedence and CSCP

IPv4Precedence

CSCP (inbinary)

CSCP (in dotteddecimal)

ServiceClass

0 000000 0 BE

1 001000 8 AF1

2 010000 16 AF2

3 011000 24 AF3

4 100000 32 AF4

5 101000 40 EF

6 110000 48 EF

7 111000 56 EF

– Other codepoints

Besides the preceding DSCPs, other DSCPs correspond with BE services.

Diff-Serv Model in the MPLS Networkl EXP field

Defined in RFC3032, MPLS packet header is shown in Figure 1-3. EXP field is of threebits. Its value ranges from 0 to 7 and indicates the traffic type. By default, EXP correspondsto IPv4 priority.

Figure 1-3 Position of EXP field

l Processing QoS Traffic in MPLS Domain– Processing QoS Traffic on the Ingress LER

On the Ingress Label Edger Router (LER) of MPLS domain, you can limit the data flowby setting the Committed Access Rate (CAR) to ensure that the data flow complies withMPLS bandwidth regulations. Besides, you can assign different priorities to the IPpackets according to certain policies.One-to-one mapping can be achieved since the IP precedence field and the EXP fieldare both 3 bits. In Diff-Serv domain, however, the DSCP field of IP packet is 6 bits,which is different from the length of EXP and thus leads to many-to-one mapping. It isdefined that the first 3 bits of DSCP (that is, CSCP) are mapped with EXP.

– Processing QoS Traffic on the Device in the MPLS Domain

1 QoS OverviewQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

1-8 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 29: 00399154-Configuration Guide - QoS(V300R003_03).pdf

When forwarding the MPLS label, the LSR in MPLS carries out queue schedulingaccording to the EXP field in the labels of packets that are received. This ensures thatpackets with higher priority enjoy better service.

– Processing QoS Traffic on the Egress LEROn the Egress LER of MPLS domain, you need to map EXP field to DSCP field of IPpacket. By standard, the first 3 bits of DSCP (that is, CSCP) take the value of EXP, andthe last 3 bits take 0.

It should be noted that QoS is an end-to-end solution, while MPLS only ensures that data canenjoy the services regulated in SLA. After the data enters the IP network, IP network ensuresQoS.

1.3 Techniques Used for the QoS ApplicationTechniques Used for the QoS Application

The primary technologies for implementing DiffServ include:

l Traffic classification

l Traffic policing

l Traffic shaping

l Congestion management

l Congestion avoidance

Traffic classification is the basis of the QoS application. With this technique, packets areidentified based on certain mapping rules. This is a precondition for providing differentiatedservices. Traffic policing, traffic shaping, congestion management, and congestion avoidancecontrol the network traffic and resource allocation from different aspects. They feature theDiffServ concept. The following describes these techniques in detail:

l Traffic classification: Identifies objects according to specific rules. It is the prerequisite ofDiff-Serv and is used to identify packets according to defined rules.

l Traffic policing: Controls the traffic rate. The rate of the traffic that enters the network ismonitored and the traffic exceeding its rate limit is restricted. Only a reasonable trafficrange is allowed to pass through the network. This optimizes the use of network resourcesand protects the interests of the service providers.

l Traffic shaping: Actively adjusts the rate of outputting traffic. It adjusts the volume ofoutput traffic according to the network resources that can be afforded by the downstreamrouter to prevent dropping of packets and congestion.

l Congestion management: Handles resource allocation during network congestion. It storespackets in the queue first, and then takes a dispatching algorithm to decide the forwardingsequence of packets.

l Congestion avoidance: Monitors the usage of network resources, and actively drops packetsin case of heavy congestion. This addresses the problem of network overload.

For the common QoS features in the DiffServ model, see Figure 1-4.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 1 QoS Overview

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

1-9

Page 30: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Figure 1-4 Common QoS features in the DiffServ model

In the IntServ model, the Resource Reservation Protocol (RSVP) is used as signaling for thetransmission of QoS requests. When a user needs QoS guarantee, the user sends a QoS requestto the network devices through the RSVP signaling. The request may be a requirement for delay,bandwidth, or packet loss ratio. After receiving the RSVP request, the nodes along the transferpath perform admission control to check the validity of the user and the availability of resources.Then the nodes decide whether to reserve resources for the application program. The nodes alongthe transfer path meet the request of the user by allocating resources to the user. This ensuresthe QoS of the user services.

In addition, the link efficiency mechanism carries out packet header compression on low-ratelinks, which greatly improves the efficiency of links. The headers such as IP headers,Transmission Control Protocol (TCP) headers, and User Datagram Protocol (UDP) headers ofpackets transmitted on the link layer are compressed through the mechanism. This mechanismapplies mainly to PPP link layers.

1.3.1 Traffic Classification

1.3.2 Traffic Policing and Shaping

1.3.3 Congestion Avoidance Configuration

1.3.4 RSVP

1.3.1 Traffic Classification

When implementing QoS in Diff-Serv model, the router needs to identify each class of traffic.The following are the two methods for the router to classify traffic:

1 QoS OverviewQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

1-10 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 31: 00399154-Configuration Guide - QoS(V300R003_03).pdf

l Complex traffic classification: This classification is based on IP protocol domain, sourceIP address range, destination IP address range, DSCP, IP precedence, source port range,destination port range, type and code of ICPM protocol, type of IGMP protocol.

l Simple traffic classification: This classification is based on IP precedence, DSCP, MPLSEXP, 802.1P precedence in packets. A collection of packets of the same class is calledBehavior Aggregate (BA). Generally, the core router in Diff-Serv domain performs onlysimple traffic classification.

1.3.2 Traffic Policing and Shaping

In a Diff-Serv domain, traffic policing, and traffic shaping is completed by the traffic conditioner.A traffic conditioner consists of four parts: Meter, Marker, Shaper, and Dropper as shown inFigure 1-5.

l Meter: Measures the traffic and judges whether the traffic complies with the specificationsdefined in TCS. Based on the result, the router performs other actions through Marker,Shaper, and Dropper.

l Marker: Re-marks the DSCP of the packet, and puts the re-marked packet into the specifiedBA. The available measures include lowering the service level of the packet flow whichdoes not match the traffic specifications (Out-of-Profile) and maintaining the service level.

l Shaper: Indicates the traffic shaper. Shaper buffers the traffic received and ensures thatpackets are sent at a rate not higher than the committed rate.

l Dropper: Indicates the action in traffic policing to control the traffic in accordance with thetraffic specification by dropping packets. Dropper can be implemented by setting the Shaperbuffer to 0 or a small value.

Figure 1-5 Traffic policing and shaping

In Diff-Serv, routers must support traffic control on the inbound and outbound interfacessimultaneously. The functions of routers vary with their locations. The functions of a router areas follows:

l The border router processes the access of a limited number of low-speed users. In this way,traffic control on the border router can be completed efficiently. A large amount of trafficclassification and traffic control are completed by the border router.

l The core router only performs PHB forwarding of BA to which packets flow belong. Inthis way, PHB forwarding can be completed with high efficiency, which also meets therequirements of high-speed forwarding by Internet core network.

1.3.3 Congestion Avoidance Configuration

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 1 QoS Overview

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

1-11

Page 32: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Low QoS in the traditional networks is mainly caused by network congestion. When the availableresources temporarily fail to meet the requirements of the service transmission, the bandwidthcannot be ensured. As a result, service rate decreases, resulting in long delay and high jitter. Thisphenomenon is called congestion.

Causes of CongestionCongestion often occurs in complex packet switching environment of the Internet. It is causedby the bandwidth bottleneck of two types of links, as shown in Figure 1-6.

Figure 1-6 Schematic diagram of traffic congestion

l Packets enter the router at high rate through v1, and are forwarded at low rate through v2.Congestion occurs in the router because the rate of v1 is greater than that of v2.

l Packets from multiple links enter the router at the rate of v1, v2, and v3. They are forwardedat the same rate of v4 through a single link. Congestion occurs in the router because thetotal rate of v1, v2, and v3 is greater than that of v4.

Congestion also occurs due to the causes as follows:

l Packets enter the router at line speed.

l Resources such as available CPU time, buffer, or memory used for sending packets areinsufficient.

l Packets that arrive at the router within a certain period of time are not well controlled. Asa result, the network resources required to handle the traffic exceed the available resources.

Congestion ResultsThe impact of congestion is as follows:

l Increases the delay and the jitter in sending packets. Long delay can cause retransmissionof packets.

l Reduces the efficiency of throughput of the network and result in waste of the networkresources.

l Consumes more network resources, particularly storage resources when congestion isaggravated. If not properly allocated, the network resources may be exhausted, and thesystem may crash.

Congestion is the main cause of low QoS. It is very common in complex networks and must besolved to increase the efficiency of the network.

1 QoS OverviewQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

1-12 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 33: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Congestion SolutionsWhen congestion occurs or aggravates, queue scheduling and packet discard policies can beused to allocate network resources for traffic of each service class. The commonly used packetdiscard policies are as follows:

l Tail DropWhen the queue is full, subsequent packets that arrive are discarded.

l Random Early Detection (RED)When the queue reaches a certain length, packets are discarded randomly. This can avoidglobal synchronization due to slow TCP start.

l Weighted Random Early Detection (WRED)When discarding packets, the router considers the queue length and packet precedence. Thepackets with low precedence are discarded first and are more likely to be discarded.

The NE80E/40E adopts WRED to avoid congestion problems.

1.3.4 RSVP

RSVP is an end-to-end protocol.

Requests for resources are transmitted between nodes through RSVP. The nodes allocateresources at the requests. This is the process of resource reservation. Nodes check the requestsagainst current network resources before determining whether to accept the requests. If thecurrent network resources are quite limited, certain requests can be rejected.

Different priorities can be set for different requests for resources. Therefore, a request with ahigher priority can preempt reserved resources when network resources are limited.

RSVP determines whether to accept requests for resources and promises to meet the acceptedrequests. RSVP itself, however, does not implement the promised service. Instead, it uses thetechniques such as queuing to guarantee the requested service.

Network nodes need to maintain some soft state information for the reserved resource. Therefore,the maintenance cost is very high when RSVP is implemented on large networks. RSVP istherefore not recommended for the backbone network.

1.4 QoS Supported by the NE80E/40EThis section describes the QoS supported by the NE80E/40E

The NE80E/40E supports unicast QoS and multicast QoS. The mechanism of multicast QoS issimilar to that of unicast QoS; the only difference between them is that multicast packets enterdifferent queues for QoS processing. Therefore, you do not need to perform specialconfigurations.

NE80E/40E supports IPv4 QoS and IPv6 QoS and can classify, re-mark service priorities of,and redirect IPv6 packets.

NE80E/40E supports the following QoS techniques:

l Traffic classification

l Traffic policing

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 1 QoS Overview

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

1-13

Page 34: 00399154-Configuration Guide - QoS(V300R003_03).pdf

l Traffic shaping

l Congestion avoidance

l Congestion management

l HQoS that enables more specific scheduling

l MPLS DiffServ, MPLS TE, and MPLS DS-TE that enable comprehensive combinationbetween QoS and MPLS

l VPN QoS that enables VPN services with end-to-end QoS deployment

NE80E/40E supports ATM QoS and FR QoS, thus enabling QoS deployment on non-IPnetworks and delivery of QoS parameters between IP networks and non-IP networks.

1 QoS OverviewQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

1-14 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 35: 00399154-Configuration Guide - QoS(V300R003_03).pdf

2 Traffic Policing and Shaping Configuration

About This Chapter

This chapter describes the concepts of traffic policing and traffic shaping. It also describes theconfiguration steps, along with typical examples.

2.1 IntroductionThis section describes some concepts related to traffic policing and traffic shaping, and ratelimitation.

2.2 Configuring Interface-based Traffic PolicingThis section describes the procedure for configuring interface-based traffic policing.

2.3 Configuring CTC-based Traffic PolicingThis section describes the procedure for configuring CTC-based traffic policing.

2.4 Configuring Traffic ShapingThis section describes how to configure traffic shaping.

2.5 Maintaining StatisticsThe section describes how to maintain statistics.

2.6 Configuration ExamplesThis section provides an example for configuring traffic policing and traffic shaping.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 2 Traffic Policing and Shaping Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

2-1

Page 36: 00399154-Configuration Guide - QoS(V300R003_03).pdf

2.1 IntroductionThis section describes some concepts related to traffic policing and traffic shaping, and ratelimitation.

2.1.1 Traffic Policing

2.1.2 Traffic Shaping

2.1.3 Traffic Policing and Shaping Supported by NE80E/40E

2.1.1 Traffic Policing

Traffic policing (TP) is used to monitor the specifications of the traffic that enters a network andkeep it within a reasonable range. In addition, TP optimizes network resources and protects theinterests of carriers by restricting the traffic that exceeds the rate limit.

CARThe Committed Access Rate (CAR) is applied to limit certain categories of traffic. For example,Hypertext Transfer Protocol (HTTP) packets can be kept from taking up more than 50% of thenetwork bandwidth. Packets are first classified according to the pre-defined matching rules.Packets that comply with the specified rate limit are forwarded directly. Packets that exceed thespecifications are dropped or have their priorities re-set.

Token BucketCAR uses token buckets (TBs) to implement traffic policing. As shown in Figure 2-1, the tokenbucket is regarded as a container of tokens with a pre-defined capacity. The system puts tokensinto the bucket at a defined rate. If the token bucket is full, no more tokens can be added.

Figure 2-1 Traffic policing according to CAR

The process is as follows:

2 Traffic Policing and Shaping ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

2-2 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 37: 00399154-Configuration Guide - QoS(V300R003_03).pdf

1. If there are enough tokens in the bucket, packets are forwarded. At the same time, theamount of tokens in the bucket decreases based on the length of the packets.

2. If the token bucket does not hold enough tokens for sending packets, the packets are droppedor their priority values are re-set.l Traffic policing with a single token bucket

A single token bucket can implement traffic measurement in simple situations. Whena single token bucket is used, one token is used to forward one byte of data. If there areenough tokens available to forward a packet, the packet is regarded as compliant and ismarked green. Otherwise, the packet is regarded as noncompliant or over the limit, andis marked red.The following are the two parameters used in traffic policing with a single token bucket:– Committed Information Rate: the rate of putting tokens into the bucket, that is, the

permitted average traffic rate. .– Committed Burst Size : the capacity of the token bucket, that is, the maximum

amount of traffic. The value of the CBS must be greater than that of the maximumpacket size.

A new evaluation is made when a new packet arrives. If there are enough tokens in thebucket for each evaluation, it implies that the packet is within the range. In this case,the number of tokens taken equals the byte size of the forwarded packet.

l Traffic policing with two token bucketsYou can use two token buckets to measure traffic in more complex conditions andimplement more flexible traffic policing. These two buckets are called C bucket and Pbucket. The C bucket places tokens at a rate of the Committed Information Rate (CIR)and its size is called Committed Burst Size (CBS). The P bucket places tokens at a rateof Peak Information Rate (PIR) and its size is called Peak Burst Size (PBS). The valueof CBS is less than that of PBS.Each time the traffic is measured, the following rules are applied:– If there are enough tokens in C bucket, packets are marked green.

– If there are not enough tokens in C bucket but enough tokens in P bucket, packetsare marked yellow.

– If tokens in neither of the buckets are enough, packets are marked red.

The parameters used in traffic policing with two token buckets are described as follows:– CIR: the rate of putting tokens into C bucket, that is, the permitted average traffic

rate of C bucket.– CBS: the capacity of the C bucket, that is, the maximum amount of traffic of C

bucket.– PIR: the rate of putting tokens into P bucket, that is, the permitted average traffic

rate of P bucket.– PBS: the capacity of the P bucket, that is, the maximum amount of traffic of P bucket.

The NE80E/40E uses two algorithms, srTCM and trTCM, in traffic policing with twotoken buckets. The algorithms have two working modes, Color-blind and Color-aware.The color-blind mode is more commonly used. For details, refer to "QoS Overview."

Traffic Policing ActionAccording to different evaluation results, TP implements the pre-configured policing actions,which are described as follows:

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 2 Traffic Policing and Shaping Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

2-3

Page 38: 00399154-Configuration Guide - QoS(V300R003_03).pdf

l Pass: Forwards the packets evaluated as "compliant" or re-forwards the service markedDifferentiated Services Code Point (DSCP) for DiffServ.

l Discard: Drops the packets evaluated as "noncompliant."

l Remark: Changes the precedence of the packet that is evaluated as "partly compliant" andthen forwards it.

Statistics FunctionIt is necessary to control and measure users' traffic on a network. The traditional method ofstatistics based on the interface has the following disadvantages:

l Of the upstream traffic, only the traffic before CAR operation can be measured. It isimpossible to measure the actual traffic of users and the loss of packets that occurs whenthe traffic rate exceeds the bandwidth limit.

l Of the downstream traffic, only the interface traffic after CAR operation at the egress canbe measured. Forwarded and dropped traffic cannot be measured.

To analyze how users' traffic exceeds the limit, carriers have to collect statistics again after CAR.Based on this statistic data, carriers can advise users to buy a higher bandwidth.

With the interface CAR statistics function, the NE80E/40E can measure and record the trafficafter upstream CAR operation, that is, the actual access traffic of a company user or an Internetbar, as well as the forwarded and dropped packets after downstream CAR operation. This canhelp carriers know users' network traffic.

2.1.2 Traffic Shaping

Traffic shaping (TS) is an active way to adjust the traffic output rate. A typical application ofTS is to control the volume and burst of outgoing traffic based on the network connection. Thusthe packets can be transmitted at a uniform rate. TS is implemented by using the buffer and tokenbucket.

As shown in Figure 2-2, after classification, packets are processed as follows:

l For packets not involved in TS, the packets are forwarded directly.

l For packets involved in TS, when no General Traffic Shaping (GTS) queue exists, thelength of packets is compared with the number of tokens in the token bucket. If there aresufficient tokens to send packets, packets are sent; if there are insufficient tokens, the GTSqueue is enabled where packets are cached. Tokens are placed in the token bucket at theuser-defined rate. Packets in the GTS queue are removed and sent periodically. As packetsare sent, the number of tokens reduces based on the number of packets. During the courseof sending packets, the number of packets is compared with the number of tokens in thetoken bucket. The number of tokens in the token bucket stops decreasing when all thepackets in the GTS queue are sent or can no longer be sent.

l For packets involved in TS, packets enter the GTS queue to wait before being sentperiodically, if the GTS queue is enabled.

l If the GTS queue is full when new packets arrive at the queue, the packets are dropped.

2 Traffic Policing and Shaping ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

2-4 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 39: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Figure 2-2 TS diagram

As shown in Figure 2-3, Router A sends packets to Router B. Router B performs TP on thepackets, and directly drops the packets over the traffic limits.

Figure 2-3 Application of traffic policing and shaping

To reduce the number of packets that are dropped, you can use TS on the output interface ofRouter A. The packets beyond the traffic limits of TS are cached in Router A. While sendingthe next batch of packets, TS gets the cached packets from the buffer or queues and sends themout. In this way, all the packets sent to Router B abide by the traffic regulation of Router B.

The main difference between TS and TP is that TS buffers the packets which exceed the trafficlimits. When there are enough tokens in the Token Bucket, these buffered packets are sent outat a uniform rate. Another difference is that TS may increase delay but TP causes almost noextra delay.

2.1.3 Traffic Policing and Shaping Supported by NE80E/40E

NE80E/40E supports traffic policing and shaping. It includes:

l Interface-based traffic policing.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 2 Traffic Policing and Shaping Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

2-5

Page 40: 00399154-Configuration Guide - QoS(V300R003_03).pdf

l Interface-based statistics function of CAR. It can measure the interface upstream trafficafter CAR operation.

l CTC-based traffic policing. CoSs and color of packets can be re-marked after trafficpolicing.

l Traffic shaping on the outbound interface.

2.2 Configuring Interface-based Traffic PolicingThis section describes the procedure for configuring interface-based traffic policing.

NOTE

l You can obtain CAR statistics of the following interfaces: Ethernet interfaces, POS interfaces, Ethernetsub-interfaces (excluding QinQ sub-interface), and Layer 2 Ethernet ports, GRE Tunnel interface, Eth-Trunk interface, Layer 2 Eth-Trunk interface, Eth-Trunk sub-interface, and IP-Trunk interface. Notethat when you query the statistics of Layer 2 ports, you must specify a VLAN.

l Interface-based traffic policing does not differentiate unicast, multicast, or broadcast packets.

2.2.1 Establishing the Configuration Task

2.2.2 Configuring CAR on a Layer 3 Interface

2.2.3 Configuring CAR on a Layer 2 Interface

2.2.4 Checking the Configuration

2.2.1 Establishing the Configuration Task

Applicable EnvironmentIf users' traffic is not limited, burst data from numerous users can make the network congested.To optimize the use of network resources, you need to limit users' traffic. Traffic policing is atraffic control method that limits network traffic and control the usage of network resources bymonitoring network specifications. Traffic policing can be implemented on both inboundinterfaces and outbound interfaces.

Traffic policing based on the interface controls all traffic that enters an interface withoutdifferentiating types of packets. This method is used on core routers of a network.

Pre-configuration TasksBefore configuring TP, complete the following tasks:

l Configuring the physical parameters of interfaces

l Configuring the link layer attributes of interfaces to ensure normal operation of theinterfaces

l Configuring IP addresses for interfaces (This is done when you configure CAR on Layer3 interfaces.)

l Enabling routing protocols and ensuring that routers interwork with each other (This isdone when you configure CAR at Layer 3 interfaces.)

Data PreparationTo configure traffic policing, you need the following data:

2 Traffic Policing and Shaping ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

2-6 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 41: 00399154-Configuration Guide - QoS(V300R003_03).pdf

No. Data

1 CIR, PIR, CBS, and PBS

2 Interfaces where CAR and directions (inbound or outbound) are configured

2.2.2 Configuring CAR on a Layer 3 Interface

ContextNOTE

You can configure traffic policing for the NE80E/40E only on the Ethernet (excluding QinQ), POS, Layer2 Ethernet, GRE Tunnel, Eth-Trunk, Layer 2 Eth-Trunk, or IP-Trunk interface, or the Ethernet or Eth-Trunk sub-interface.

The NE80E/40E supports configuration of traffic policing in both inbound and outbounddirections on major Layer 3 interfaces. Traffic policing includes two types: STB traffic policingand DTB traffic policing.

l If the network traffic is simple, you can configure STB traffic policing with parameterscir and cbs.

l If the network traffic is complex, you need to configure DTB traffic policing withparameters cir, pir, cbs, and pbs.

Do as follows on the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:interface interface-type interface-number

The interface view is displayed.

Step 3 Run:qos car { cir cir-value [ pir pir-value ] } [ cbs cbs-value pbs pbs-value ] [ green { discard | pass [ service-class class color color ] } | yellow { discard | pass [ service-class class color color ] } | red { discard | pass [ service-class class color color ] } ]* { inbound | outbound }

The interface is configured with CAR.

----End

Postrequisite

If packets are re-marked to service classes of EF, BE, CS6, and CS7, these packets can only bere-marked green in color.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 2 Traffic Policing and Shaping Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

2-7

Page 42: 00399154-Configuration Guide - QoS(V300R003_03).pdf

2.2.3 Configuring CAR on a Layer 2 Interface

ContextThe NE80E/40E supports configuration of traffic policing in both inbound and outbounddirections on Layer 2 interfaces.

l To configure STB traffic policing, select parameters cir and cbs.

l To configure DTB traffic policing, select parameters cir, pir, cbs and pbs.

l To configure inbound traffic policing, select the parameter inbound.

l To configure outbound traffic policing, select the parameter outbound.

NOTE

You can configure traffic policing for the NE80E/40E only on the physical GE and Ethernet interfaces.

Do as follows on the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:interface { ethernet | gigabitethernet } interface-number

The interface view is displayed.

Step 3 Run:portswitch

The Layer 2 interface view is displayed.

Step 4 Run the following command as required:l Run:

port default vlan vlan-idA Layer 2 interface is added to a VLAN.

l Run:port trunk allow-pass vlan { { vlan-id1 [ to vlan-id2 ] } & <1-10> | all }The IDs of the VLANs allowed by the current interface are specified.

Step 5 Run:qos car { cir cir-value [ pir pir-value] } [ cbs cbs-value pbs pbs-value ] [ green { discard | pass [ service-class class color color ] } | yellow { discard | pass [ service-class class color color ] } | red { discard | pass [ service-class class color color ] } ]* { inbound | outbound } [ vlan { vlan-id1 [ to vlan-id2 ] &<1-9> } ]

CAR is configured on an interface. The parameter [ vlan { vlan-id1 [ to vlan-id2 ] &<1-9> } ]takes effect only on layer 2 interfaces, and VLAN ID must be configured. When this commandis configured on a layer 3 interface, however, VLAN ID cannot be configured.

----End

2 Traffic Policing and Shaping ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

2-8 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 43: 00399154-Configuration Guide - QoS(V300R003_03).pdf

PostrequisiteIf packets are re-marked to service classes of EF, BE, CS6, and CS7, these packets can only bere-marked green in color.

2.2.4 Checking the Configuration

Run the following commands to check the previous configuration.

Action Command

Check the traffic informationabout an interface.

display interface [ interface-type [ interface-number ] ][ | { begin | exclude | include } regular-expression ]

Check the CAR statistics on aLayer 3 interface of a specifieddirection.

display car statistics interface interface-type interface-number [ .sub-interface ] { inbound | outbound }

Check the CAR statistics on aLayer 2 port of a specifieddirection.

display car statistics interface interface-type interface-number vlan vlan-id { inbound | outbound }

Using the display car statistics interface interface-type interface-number [ vlan vlan-id ]{ inbound | outbound } command, you can view the statistics on an interface of a specifieddirection. The statistics include the number of passed packets, number of passed bytes, and rateof passed packets; number of dropped packets, number of dropped bytes, and rate of droppedpackets. For example:

<Quidway> display car statistics interface pos 6/0/0 outboundinterfacePos6/0/0 outbound Committed Access Rate: CIR 200(Kbps), PIR 0(Kbps), CBS 400(byte), PBS 500(byte) Conform Action: pass Yellow Action: pass Exceed Action: discard Passed: 840 bytes, 15 packets Dropped: 56 bytes, 1 packets Last 30 seconds passed rate: 0 bps, 0 pps Last 30 seconds dropped rate: 0 bps, 0 pps

2.3 Configuring CTC-based Traffic PolicingThis section describes the procedure for configuring CTC-based traffic policing.

2.3.1 Establishing the Configuration Task

2.3.2 Defining Traffic Classes

2.3.3 Defining a Behavior and Configuring Traffic Policing Actions

2.3.4 Configuring a Traffic Policy

2.3.5 Applying Traffic Policies

2.3.6 Checking the Configuration

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 2 Traffic Policing and Shaping Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

2-9

Page 44: 00399154-Configuration Guide - QoS(V300R003_03).pdf

2.3.1 Establishing the Configuration Task

Applicable EnvironmentThere are a large number of users in the network and they send data constantly. This can causenetwork congestion and have a great impact on the operation and service quality of the network.

Therefore, to guarantee the bandwidth no matter the network is idle or congested, traffic controlneeds to be implemented on one or several types of packets. You can combine complex trafficclassification (CTC) and traffic control to configure the traffic policing policy based on complextraffic classification. Then, apply the policy to the inbound interface to restrict the traffic of thespecific packets within a reasonable range. Therefore limited network resources are betterutilized.

NOTE

CTC means classifying packets based on the quintuple that includes the source address, source port number,protocol number, destination address, and destination address. It is usually implemented on the borderrouters in the network.

Pre-configuration TasksBefore configuring CTC-based traffic policing, you need to complete the following pre-configuration tasks:

l Configure the physical parameters for related interfaces

l Configure the link layer attributes for related interfaces to ensure normal operation of theinterfaces

l Configure IP addresses for related interfaces

l Enable the routing protocols for reachability

Data PreparationThe following data is necessary for configuring CTC-based traffic policing.

No. Data

1 Class name

2 ACL number, source MAC address, destination MAC address, IP precedence, DSCPvalue, 802.1p value, and TCP flag value

3 Traffic behavior name

4 CIR, PIR, CBS, and PBS

5 Policy name

6 Interface type and number where the traffic policy is applied

2.3.2 Defining Traffic Classes

2 Traffic Policing and Shaping ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

2-10 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 45: 00399154-Configuration Guide - QoS(V300R003_03).pdf

ContextNOTE

l If traffic classification is based on Layer 3 or Layer 4 information, the traffic policy can be applied toonly Layer 3 interface.

l If traffic classification is based on Layer 2 information, the traffic policy can be applied to both Layer3 interface and Layer 2 port. To apply such a traffic policy to a Layer 2 port or a Layer 3 interface,specify the key word link-layer in the command line.

Procedurel Defining traffic classification based on layer 3 or layer 4 information

Do as follows on the router:

1. Run:system-view

The system view is displayed.2. Run:

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

A traffic classifier is defined and the view of the classifier is displayed.3. Choose the desired matching rule according to your requirements:

– To set a matching rule to classify traffic based on the ACL number, Run:if-match [ ipv6 ] acl acl-number

– To set a matching rule to classify traffic based on the DSCP value, Run:if-match [ ipv6 ] dscp dscp-value

– To set a matching rule to classify traffic based on the TCP flag, Run:if-match tcp syn-flag tcpflag-value

– To set a matching rule to classify traffic based on the IP precedence, Run:if-match ip-precedence ip-precedence

– To match all packets, Run:if-match [ ipv6 ] any

– To set a matching rule to classify traffic based on the source IPv6 address, Run:if-match ipv6 source-address ipv6-address prefix-length

– To set a matching rule to classify traffic based on the destination IPv6 address,Run:if-match ipv6 destination-address ipv6-address prefix-length

A matching rule is set to classify traffic.

NOTE

If both the if-match [ ipv6 ] acl acl-number command and the if-match [ ipv6 ] any commandare configured, the command that is configured first takes effect before the other.

To match IPv6 packets, you must specify the key word ipv6 when you choose a matching rulein Step 3. A matching rule defined to match packets based on source or destination addressesis valid only with IPv6 packets, but not with IPv4 packets.

If you set more than one matching rule for the same classifier, you can set their relationsby specifying the parameter operator in step 2:

– Logic operator and: A packet belongs to the classifier only when it matches all the rules.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 2 Traffic Policing and Shaping Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

2-11

Page 46: 00399154-Configuration Guide - QoS(V300R003_03).pdf

– Logic operator or: A packet belongs to the classifier if it matches one of the rules.

– By default, the logic operator of the rules is or.

l Defining traffic classification based on layer 2 information

Do as follows on the router:

1. Run:system-view

The system view is displayed.2. Run:

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

A traffic classifier is defined and the view of the classifier is displayed.3. Choose the desired matching rule according to your requirements:

– To set a matching rule to classify VLAN packets based on the value of the 802.1pfield, Run:if-match 8021p 8021p-value

– To set a matching rule to classify traffic based on the source MAC address, Run:if-match source-mac mac-address

– To set a matching rule to classify traffic based on the destination MAC address,Run:if-match destination-mac mac-address

– To set a matching rule to classify traffic based on MPLS EXP, Run:if-match mpls-exp exp-value

If you set more than one matching rule for the same classifier, you can set their relationsby specifying the parameter operator in step 2:

– Logic operator and: A packet belongs to the classifier only when it matches all the rules.

– Logic operator or: A packet belongs to the classifier if it matches one of the rules.

– By default, the logic operator of the rules is or.

----End

2.3.3 Defining a Behavior and Configuring Traffic Policing Actions

Context

Do as follows on the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:traffic behavior behavior–name

2 Traffic Policing and Shaping ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

2-12 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 47: 00399154-Configuration Guide - QoS(V300R003_03).pdf

A traffic behavior is set and the behavior view is displayed.

Step 3 Run:car { cir cir-value [ pir pir-value] } [ cbs cbs-value pbs pbs-value ] [ green { discard | pass [ service-class class color color ] } | yellow { discard | pass [ service-class class color color ] } | red { discard | pass [ service-class class color color ] } ]*

A traffic policing action is set for the traffic behavior.

In step 3, choose parameters according to your requirement:

l To set traffic policing with a single token bucket, select cir and cbs, and set the value ofpbs to 0.

l To set traffic policing with double token buckets, select cir, cbs, and pbs.

l Use parameters cir, pir, cbs, and pbs to configure traffic policing with two rates and twotoken buckets.

----End

Postrequisite

The NE80E/40E supports marking the priority and color of packets after traffic policing. Ifpackets are re-marked as the service levels of ef, be, cs6, and cs7, the packet color can only bere-marked in green.

2.3.4 Configuring a Traffic Policy

Context

Do as follows on the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:traffic policy policy-name

A policy is defined and the view of the policy is displayed.

Step 3 Run:classifier traffic-class-name behavior behavior-name

The specified behavior and classifier are associated in the policy.

----End

2.3.5 Applying Traffic Policies

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 2 Traffic Policing and Shaping Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

2-13

Page 48: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Procedurel Applying Traffic Policies to Layer 3 Interfaces

NOTE

l This product supports traffic policies on physical interfaces POS ports and GE ports, as well aslogical interfaces, such as the sub-interface, ring-if, IP-Trunk and Eth-Trunk interface.

l Traffic policies cannot be directly applied to the VLANIF interface. They can be implementedby combining physical or Eth-trunk interfaces with VLAN IDs.

l If traffic is to be classified on a layer 3 interface based on layer 2 information 802.1p, the interfacemust be a sub-interface.

Do as follows on the router.

1. Run:system-view

The system view is displayed.2. Run:

interface interface-type interface-number

The specified interface view is displayed.3. Run:

traffic-policy policy-name { inbound | outbound } [ link-layer| all-layer ]

The specified traffic policy is applied to the interface.

If the parameter all-layer is specified, the system performs the complex classificationaccording to Layer 2 information about packets. If the Layer 2 information about apacket fails to match the classification rules, the system goes on with the Layer 3information about the packet.

By default, the system performs the complex traffic classification according to Layer3, Layer 4, or other information.

When applying a traffic policy to a Layer 3 interface, you can specify trafficclassification based on Layer 2, Layer 3 or Layer 4 information about the packet.

In step 3, choose parameters according to your requirements:

– To perform complex traffic classification based on Layer 2 information first, andthen on Layer 3 or Layer 4 information if the Layer 2 information fails to matchthe classification rules, choose the parameter all-layer.

– To configure complex classification of the incoming traffic, choose the parameterinbound.

– To configure complex classification of the outgoing traffic, choose the parameteroutbound.

l Applying the Traffic Policy to Layer 2 Interfaces

Do as follows on the router.

1. Run:system-view

The system view is displayed.2. Run:

2 Traffic Policing and Shaping ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

2-14 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 49: 00399154-Configuration Guide - QoS(V300R003_03).pdf

interface { ethernet | gigabitethernet | eth-trunk } interface-number

The specified interface view is displayed.3. Run:

portswitch

The interface changes to a layer 2 interface.4. Run:

traffic-policy policy-name { inbound | outbound } [ vlan vlan-id1 [ to vlan-id2 ] ] [ link-layer | all-layer]

The specified traffic policy is applied to the layer 2 port.

NOTE

If you apply a traffic policy to the VLAN traffic on a Layer 2 interface, you need to configure theport trunk allow-pass vlan { { vlan-id1 [ to vlan-id2 ] } & <1-10> | all } or the port default vlanvlan-id command on the Layer 2 interface.

If you apply a traffic policy without specifying a VLAN, the traffic policy is applied to the VLANswitch services that pass through the interface or the service traffic that is added to PBB-TE ininterface mode.

When applying a traffic policy to VLAN switch services on a Layer 2 interface or the service trafficthat is added to PBB-TE in interface mode, you do not need to specify a VLAN ID. You must,however, specify a VLAN ID when you apply a traffic policy to the VLAN traffic that goes througha Layer 2 interface.

When applying traffic policies on Layer 2 interfaces, you can set trafffic classification basedon only the Layer 2 information of the packet:– To configure complex classification of the incoming traffic, use parameter inbound.

– To configure complex classification of the outgoing traffic, use parameter outbound.

----End

2.3.6 Checking the Configuration

Use the following display commands to check the configuration.

Action Command

Check the traffic of aninterface.

display interface [ interface-type [ interface-number ] ] [ |{ begin | exclude | include } regular-expression ]

Check the traffic behavior. display traffic behavior { system-defined | user-defined } [ behavior-name ]

Check the classifier. display traffic classifier { system-defined | user-defined } [ classifier-name ]

Check the associated behaviorand classifier in the trafficpolicy.

display traffic policy { system-defined | user-defined }[ policy-name [ classifier classifier-name ] ]

If the configuration succeeds,

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 2 Traffic Policing and Shaping Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

2-15

Page 50: 00399154-Configuration Guide - QoS(V300R003_03).pdf

l The name of the configured traffic behavior and the actions are displayed if you run thedisplay traffic behavior command:<Quidway> display traffic behavior user-defined User Defined Behavior Information: Behavior: database Redirecting: Redirect Ip-NextHop 20.13.9.3 Behavior: huawei Marking: Remark IP Precedence 4 Committed Access Rate: CIR 1000 (Kbps), PIR 0 (Kbps), CBS 10000 (byte), PBS 0 (byte) Conform Action: pass Yellow Action: pass Exceed Action: discard Redirecting:

l The name of the configured traffic classifier and its matching rules, as well as the logicaloperator of the rules are displayed if you run the display traffic classifier command:<Quidway> display traffic classifier user-defined User Defined Classifier Information: Classifier: database Operator: OR Rule(s) : if-match acl 3000 Classifier: huawei Operator: AND Rule(s) : if-match ip-precedence 3

l The name of the configured traffic policy and the associated behavior and classifier aredisplayed if you run the display traffic policy command:<Quidway> display traffic policy user-defined User Defined Traffic Policy Information: Policy: test Classifier: default-class Behavior: be -none- Classifier: huawei Behavior: huawei Marking: Remark IP Precedence 4 Committed Access Rate: CIR 1000 (Kbps), PIR 0 (Kbps), CBS 10000 (byte), PBS 0 (byte) Conform Action: pass Yellow Action: pass Exceed Action: discard Redirecting: Classifier: database Behavior: database Redirecting:

2.4 Configuring Traffic ShapingThis section describes how to configure traffic shaping.

2.4.1 Establishing the Configuration Task

2.4.2 Configuring Traffic Shaping

2.4.3 Checking the Configuration

2.4.1 Establishing the Configuration Task

2 Traffic Policing and Shaping ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

2-16 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 51: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Applicable Environment

When the traffic is heavy on the network, the packets that exceed specifications will be dropped.To avoid network congestion or loss of packets at the downstream network caused by too muchtraffic sent from the upstream network, you can configure traffic shaping on the outboundinterface of the upstream router. Traffic shaping refers to restricting the packets of a specificconnection flowing out of a network so that the packets are sent out at an even rate.

TS is usually carried out with cache buffer and token buckets. When the rate for sending packetsis too high, packets are first placed in buffer queue, and then are forwarded steadily. Theforwarding of packets is controlled by the token bucket, based on the priority of the queue. Thiscan avoid retransmission of the packet.

Pre-configuration Tasks

Before configuring TS, you need to complete the tasks as follows:

l Configure the physical parameters of related interfaces

l Configure the link layer attributes of related interfaces to ensure normal operation of theinterface

l Configure IP addresses for related interfaces

l Enable routing protocols so that routes are reachable

Data Preparation

To configure TS, you need the following data.

No. Data

1 Interface to be configured with TS

2 TS rate

2.4.2 Configuring Traffic Shaping

Context

At present, the NE80E/40E supports TS only on the outbound interface.

NOTE

The NE80E/40E distributes resources to services of specific classes such as EF and AF through the pre-defined queue scheduling mechanism. Users need not configure queue management.

Do as follows on the router:

Procedure

Step 1 Run:system-view

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 2 Traffic Policing and Shaping Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

2-17

Page 52: 00399154-Configuration Guide - QoS(V300R003_03).pdf

The system view is displayed.

Step 2 Run:interface interface-type interface-number

The specified interface view is displayed.

Step 3 Run:port shaping shaping-value

TS is configured on the interface. You can perform TS for the outgoing traffic on the interface.

----End

2.4.3 Checking the Configuration

Run the following display commands to check the previous configuration.

Action Command

Check information about traffic ofan interface.

display interface [ interface-type [ interface-number ] ][ | { begin | exclude | include } regular-expression ]

2.5 Maintaining StatisticsThe section describes how to maintain statistics.

2.5.1 Clearing Statistics

2.5.1 Clearing Statistics

CAUTIONCAR statistic information cannot be restored after you clear it. So, confirm the action beforeyou use the command.

To clear the CAR statistic information, run the following reset commands in the user view.

Action Command

Clear the CAR statistics of aLayer 3 interface in a direction.

reset car statistics interface interface-type interface-number [ .sub-interface ] { inbound | outbound }

Clear the CAR statistics of aLayer 2 port in a direction.

reset car statistics interface interface-type interface-number vlan vlan-id { inbound | outbound }

2 Traffic Policing and Shaping ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

2-18 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 53: 00399154-Configuration Guide - QoS(V300R003_03).pdf

2.6 Configuration ExamplesThis section provides an example for configuring traffic policing and traffic shaping.

2.6.1 Example for Configuring Traffic Policing and Traffic Shaping

2.6.1 Example for Configuring Traffic Policing and Traffic Shaping

Networking RequirementsAs shown in Figure 2-4, the POS3/0/0 of Router A is connected with the POS1/0/0 of RouterB. Server, PC1 and PC2 can access the Internet through Router A and Router B.

Server, PC1 and the GE1/0/0 of Router A are on the same network segment. PC2 and the GE2/0/0of Router A are on the same network segment.

The process to control traffic from Server and PC1 received by the GE1/0/0 of Router A is asfollows:

l A bandwidth of up to 6 Mbit/s is assured for traffic from Server. The default value is 5Mbit/s and the maximum value is not more than 6 Mbit/s. For traffic whose rate is beyond5 Mbit/s but is within the assured rate of 6 Mbit/s, packets are forwarded properly. Whenthe traffic rate exceeds 6 Mbit/s, the packets are sent in the BE fashion.

l The rate-limit on traffic from PC1 is 2 Mbit/s. Traffic below this rate-limit can betransmitted properly. When the traffic exceeds this rate-limit, packets are dropped.

In addition, the POS3/0/0 and POS2/0/0 of Router A and Router B should meet the followingrequirements for sending and receiving packets:

l The rate-limit on the traffic that travels from the POS 3/0/0 of Router A to Router B is 20Mbit/s. When the traffic exceeds this rate-limit, packets are dropped.

l The rate-limit on traffic going to the Internet through the POS2/0/0 of Router B is 30 Mbit/s. When the traffic exceeds this rate-limit, packets are dropped.

Networking Diagram

Figure 2-4 Networking diagram of TS

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 2 Traffic Policing and Shaping Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

2-19

Page 54: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Configuration RoadmapThe configuration roadmap is as follows:

1. On the inbound interface GE 1/0/0 of Router A, perform traffic policing based on complextraffic classification on traffic from Server and PC1.

2. On the outbound interface POS 3/0/0 of Router A, configure traffic shaping and restrict therate of the traffic that goes into Router B to 20 Mbit/s.

3. On the outbound interface POS 2/0/0 of Router B, configure traffic shaping and restrict therate of the traffic that goes into the Internet to 30 Mbit/s.

Data PreparationTo complete the configuration, you need the following data:

l The ACL number, traffic classifier name, traffic behavior name, traffic policy name, andthe interface where the traffic policy is applied, of Server and PC1

l CIR, PIR, CBS, and MBS

l Traffic rate for traffic shaping and the interface where traffic shaping is configured

Configuration Procedure1. Configure IP addresses for interfaces (The detailed configuration is not mentioned here).2. Configure Router A.

# Configure an ACL for matching data flows from Server and PC1.<RouterA> system-view[RouterA] acl number 2001[RouterA-acl-basic-2001] rule permit source 1.1.1.1 0.0.0.0[RouterA-acl-basic-2001] quit[RouterA] acl number 2002[RouterA-acl-basic-2002] rule permit source 1.1.1.2 0.0.0.0[RouterA-acl-basic-2002] quit# Configure traffic classes and define ACL-based class matching rules.[RouterA] traffic classifier class1[RouterA-classifier-class1] if-match acl 2001[RouterA-classifier-class1] quit[RouterA] traffic classifier class2[RouterA-classifier-class2] if-match acl 2002[RouterA-classifier-class2] quit# Define a behavior so that the default rate-limit on traffic from Server is 5 Mbit/s. Set theupper limit to 6 Mbit/s: When the traffic rate is higher that 5 Mbit/s but below 6 Mbit/s,packets are forwarded properly; when the traffic rate exceeds 6 Mbit/s, packets are sent inthe BE fasion.[RouterA] traffic behavior behavior1[RouterA-behavior-behavior1] car cir 5000 pir 6000 green pass yellow pass red pass service-class be color green[RouterA-behavior-behavior1] quit# Define a behavior so that the rate-limit is 2 Mbit/s. When the traffic rate exceeds 2 Mbit/s, packets are dropped.[RouterA] traffic behavior behavior2[RouterA-behavior-behavior2] car cir 2000 green pass yellow discard red discard[RouterA-behavior-behavior2] quit# Define a policy to associate classes with behaviors.[RouterA] traffic policy policy1

2 Traffic Policing and Shaping ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

2-20 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 55: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[RouterA-trafficpolicy-policy1] classifier class1 behavior behavior1[RouterA-trafficpolicy-policy1] classifier class2 behavior behavior2[RouterA-trafficpolicy-policy1] quit

# Apply the policy to GE1/0/0.[RouterA] interface gigabitethernet 1/0/0[RouterA-GigabitEthernet1/0/0] undo shutdown[RouterA-GigabitEthernet1/0/0] traffic-policy policy1 inbound

# Configure TS on POS3/0/0 of Router A to shape the EF traffic on the interface (EF trafficbeyond than 20 Mbit/s is dropped) to lower the packet loss ratio on POS1/0/0 of Router B.[RouterA] interface pos 3/0/0[RouterA-Pos3/0/0] undo shutdown[RouterA-Pos3/0/0] port shaping 20

3. Configure Router B.# Shape the traffic on POS2/0/0.<RouterB> system-view[RouterB] interface pos2/0/0[RouterB-Pos2/0/0] undo shutdown[RouterB-Pos2/0/0] port shaping 30[RouterB-Pos2/0/0] return

Configuration Filesl Configuration file of Router A

# sysname RouterA#acl number 2001 rule permit source 1.1.1.1 0.0.0.0acl number 2002 rule permit source 1.1.1.2 0.0.0.0#traffic classifier class1 if-match acl 2001traffic classifier class2 if-match acl 2002#traffic behavior behavior1 car cir 5000 pir 6000 green pass yellow pass red pass service-class be color greentraffic behavior behavior2 car cir 2000 green pass yellow discard red discard#traffic policy policy1 classifier class1 behavior behavior1 classifier class2 behavior behavior2 #interface GigabitEthernet1/0/0 undo shutdownip address 1.1.1.3 255.255.255.0 traffic-policy policy1 inbound#interface Pos3/0/0 undo shutdownip address 2.1.1.2 255.255.255.0 port shaping 20#ospf 1 area 0.0.0.0 network 1.1.1.0 0.255.255.255 network 2.1.1.0 0.0.0.255#return

l Configuration file of Router B

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 2 Traffic Policing and Shaping Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

2-21

Page 56: 00399154-Configuration Guide - QoS(V300R003_03).pdf

# sysname RouterB#interface Pos 2/0/0undo shutdownip address 2.2.2.1 255.255.255.0 port shaping 30#ospf 1 area 0.0.0.0 network 2.2.2.0 0.0.0.255 network 2.1.1.0 0.0.0.255#return

2 Traffic Policing and Shaping ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

2-22 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 57: 00399154-Configuration Guide - QoS(V300R003_03).pdf

3 Congestion Avoidance Configuration

About This Chapter

This chapter introduces the WRED concept and the configuration steps.

3.1 IntroductionThis section describes the traffic policies for congestion avoidance.

3.2 Configuring WREDThis section describes the procedure of configuring WRED.

3.3 Configuration ExamplesThis section provides an example on configuring WRED.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 3 Congestion Avoidance Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

3-1

Page 58: 00399154-Configuration Guide - QoS(V300R003_03).pdf

3.1 IntroductionThis section describes the traffic policies for congestion avoidance.

3.1.1 Introduction to Congestion Avoidance

3.1.2 Congestion Avoidance Supported by NE80E/40E

3.1.1 Introduction to Congestion Avoidance

Congestion avoidance is a traffic control mechanism used to avoid network overload by adjustingnetwork traffic. With this mechanism, the router can monitor the usage of network resourcesand discard packets when the network congestion gets heavier.

Compared with the end-to-end traffic control, congestion avoidance involves the traffic load ofmore service flows in the router. When dropping packets, however, the router can cooperatewith traffic control actions on the source end, such as TCP traffic control, to adjust the load ofthe network to a reasonable state.

Traditional Packet-Dropping PolicyIn the traditional tail-drop policy, all the newly received packets are dropped when a queuereaches its maximum length.

This policy may lead to global TCP synchronization. When queues drop the packets of severalTCP connections at the same time, the TCP connections start to adjust their trafficsimultaneously. There is a possibility that all the TCP connection sources begin the slow startprocess to perform congestion avoidance. Then, all the TCP connection sources start to buildup traffic, causing the traffic to peak at a certain time. Therefore, traffic on the network fluctuatescyclically.

RED and WREDTo avoid global TCP synchronization, the following two algorithms are introduced:

l Random Early Detection (RED)

l Weighted Random Early Detection (WRED)

The RED algorithm sets the upper and lower limits for each queue and specifies the followingrules:

l When the length of a queue below the lower limit, no packet is dropped.

l When the length of a queue exceeds the upper limit, all the incoming packets are dropped.

l When the length of a queue is between the lower and upper limits, the incoming packetsare dropped randomly. A random number is set for each received packet. It is comparedwith the drop probability of the current queue. The packet is dropped when the randomnumber is larger than the drop probability. The longer the queue, the higher the discardprobability.

Unlike RED, the random number in WRED is based on the IP precedence of IP packets. WREDkeeps a lower drop probability for the packet that has a higher IP precedence.

3 Congestion Avoidance ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

3-2 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 59: 00399154-Configuration Guide - QoS(V300R003_03).pdf

RED and WRED employ the random packet drop policy to avoid global TCP synchronization.When the packets of a TCP connection are dropped and sent at a lower rate, the packets of otherTCP connections are still being sent at a relatively higher rate. There are always some TCPconnections whose packets are sent at a relatively higher rate, improving the utilization ofnetwork bandwidth.

If packets are dropped by directly comparing the length of queues with the upper and lowerlimits (which set the absolute length of the queue threshold), the transmission of burst data streamis affected. The average queue length is hence used to set the relative value to compare the queuethreshold and average queue length. The average length of a queue is the average length of thequeues passing through a low pass filter. It reflects queue changes and is not affected by theburst change in queue length. This prevents adverse impact on the burst data stream.

Using Weighted Fair Queuing (WFQ), you can set the minimum threshold, maximum thresholdand packet discard probability for every queue to provide different drop features for differentclasses of packets.

The relationship between WRED and queue mechanism is shown in Figure 3-1.

Figure 3-1 Relationship between WRED and queue mechanism

3.1.2 Congestion Avoidance Supported by NE80E/40E

The NE80E/40E supports WRED for congestion avoidance on outbound interface.

3.2 Configuring WREDThis section describes the procedure of configuring WRED.

3.2.1 Establishing the Configuration Task

3.2.2 Configuring WRED Parameters

3.2.3 Applying WRED

3.2.4 Checking the Configuration

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 3 Congestion Avoidance Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

3-3

Page 60: 00399154-Configuration Guide - QoS(V300R003_03).pdf

3.2.1 Establishing the Configuration Task

Applicable EnvironmentDue to limited memory resources, packets that exceed specifications are traditionally discardedin the case of network congestion. When a large number of TCP packets are discarded, TCPconnections will time out. As a result, slow start of TCP connections and congestion avoidanceare triggered so as to reduce the forwarding of TCP packets. When the packets of many TCPconnections are discarded at the same time, slow start and congestion avoidance of the TCPconnections occur simultaneously. This is called global TCP synchronization and it lowers theutilization of link bandwidth.

To avoid global TCP synchronization, you can set the queue to discard packets randomly usingthe WRED mechanism. Random packet discarding of WRED can prevent multiple TCPconnections from reducing their transmit rates. As a result, global TCP synchronization isavoided. In addition, the bandwidth can be efficiently utilized.

NOTE

The random packet discarding is usually used together with WFQ queue.

Pre-configuration TasksBefore configuring WRED, you need to complete the following pre-configuration tasks:

l Configure physical parameters for related interfaces

l Configure link layer attributes for related interfaces

l Configure IP addresses for related interfaces

l Enable routing protocols to achieve reachable routes

Data PreparationTo configure WRED, you need the following data.

No Data

1 WRED object name, lower limit and upper limit percentage, discarding probability,and color of packets in each queue

2 The interface where the WRED is applied and parameters for the class queue

3.2.2 Configuring WRED Parameters

ContextWith a WRED template, you can set the parameters for packets of three colors. Generally, thegreen packets have the smallest discarding probability and the highest thresholds; the yellowpackets have the medium discarding probability and thresholds; the red packets have the highestdiscarding probability and the lowest thresholds.

3 Congestion Avoidance ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

3-4 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 61: 00399154-Configuration Guide - QoS(V300R003_03).pdf

By configuring a WRED object, you can set the upper limit, lower limit, and discardingprobability for queues.

l When the length of a queue is below the lower percentage limit, no packet is dropped.

l When the length of a queue exceeds the upper percentage limit, all the incoming packetsare dropped.

l When the length of a queue is between the lower and upper percentage limits, the incomingpackets are dropped randomly. The longer the queue, the higher the discarding probability.

l You can configure limits and discarding probability for each color of packets.

l By default, the system can contain a maximum of eight class queue WRED objects. Amongthem, one is the default object (the lower percentage limit, the upper percentage limit andthe discarding percentage are all 100) and seven objects can be created by users.

NOTE

l If you do not configure a port-wred object, the system uses the default tail-drop policy.

l You can configure the smallest upper and lower percentage limits for the queue containing red packets,medium upper and lower percentage limits for the queue containing yellow packets, and the highestupper and lower percentage limits for the queue containing green packets.

l In actual configuration, it is recommended that the lower percentage threshold for WRED starts from50%; the thresholds for packets of different colors are then adjusted accordingly. It is recommendedthat the discarding probability is set to 100%.

Do as follows on the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:port-wred port-wred-name

A WRED object of a class queue is created and the WRED view is displayed.

Step 3 Run:color { green | yellow | red } low-limit low-limit-percentage high-limit high-limit-percentage discard-percentage discard-percentage

The lower percentage limit, upper percentage limit and discarding probability are set for differentcolors of packets.

----End

3.2.3 Applying WRED

Context

Currently, the WRED template can only be applied in the outbound direction of an interface.

Do as follows on the router where a WRED object is configured:

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 3 Congestion Avoidance Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

3-5

Page 62: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:interface interface-type interface-number

The interface view is displayed.

Step 3 Run:port-queue cos-value { { pq | wfq weight weight-value | lpq} | shaping { shaping-value | shaping-percentage shaping-percentage-value } | port-wred wred-name } * outbound

The scheduling policy is set for the class queue with the specified CoS and the WRED object isapplied in the scheduling policy.

----End

3.2.4 Checking the Configuration

Run the following display command to check the previous configuration.

Action Command

Check the traffic statistics on aninterface.

display interface [ interface-type [ interface-number ] ][ | { begin | exclude | include } regular-expression ]

Check the parameters for aWRED object of a class queue.

display port-wred configuration [ verbose [ port-wred-name ] ]

Check the detailed configurationof a class queue.

display port-queue configuration interface interface-type interface-number outbound

Check the statistics on a classqueue.

display port-queue statistics interface interface-typeinterface-number [ cos-value ] outbound

Running the display port-queue statistics interface interface-type interface-number [ cos-value ] outbound command, you can view the statistics on a class queue.

For example:

<Quidway> display port-queue statistics interface gigabitethernet 2/0/1 af1 outbound[af1] Total pass: 27,697,521 packets, 2,006,796,750 bytes Total discard: 0 packets, 0 bytes --Drop tail discard: 0 packets, 0 bytes --Wred discard: 0 packets, 0 bytes Last 30 seconds pass rate: 0 pps, 0 bps

3 Congestion Avoidance ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

3-6 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 63: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Last 30 seconds discard rate: 0 pps, 0 bps --Drop tail discard rate: 0 pps, 0 bps --Wred discard rate: 0 pps, 0 bps

If the configuration succeeds, the following results can be obtained by running the precedingcommand:

l In the system view, you can see that the upper threshold, lower threshold, and discardprobability of the WRED templates for all colors of packets are configured correctly.

l The WRED template is applied to packets with the specified class of service (CoS).

3.3 Configuration ExamplesThis section provides an example on configuring WRED.

3.3.1 Example for Configuring Congestion Avoidance

3.3.1 Example for Configuring Congestion Avoidance

Networking Requirements

As shown in Figure 3-2, devices Server, Telephone, PC1 and PC2 all send data to the networkthrough Router A. The data sent from Server is of critical traffic class; the data sent fromTelephone is of voice services; the data from PC1 and PC2 is of normal services. Because therate of the inbound interface GE 1/0/0 on Router A is greater than that of the outbound interfacePOS 2/0/0, congestion may occur on POS 2/0/0.

When network congestion occurs, the data sent by Server and Telephone must be transmittedfirst. Users PC1 and PC2 allow a little delay to the transmission of their data but they also requirebandwidth guarantee because they are VIP users. Therefore, Router A must discard packetsbased on the priority of the packets when the network congestion intensifies.

Thus, WFQ and WRED must be both configured on Router A.

Figure 3-2 Networking diagram for configuring congestion avoidance

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 3 Congestion Avoidance Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

3-7

Page 64: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Configuration RoadmapThe configuration roadmap is as follows:

1. On GE 1/0/0 of Router A, mark the priority of different flows.2. Configure a WRED object to set the lower and upper percentage limits for discarding

packets as well as the discarding probability.3. On POS 2/0/0, set the scheduling policy for the class queue and apply the WRED object

in the scheduling policy.

Data PreparationTo complete the configuration, you need the following data:

l ACL number, traffic classifier name, traffic behavior name, priority of the service to be re-marked and the traffic policy name

l WRED object name, lower percentage limit and upper percentage limit, discardingprobability and packet color in each queue

l The interface where the packet discarding of WRED is applied and parameters for the classqueue

Configuration Procedure1. Set ACL rules for packets that are sent from Server, Telephone, PC1 and PC2.

<RouterA> system-view[RouterA] acl number 2001[RouterA-acl-basic-2001] rule permit source 10.1.1.3 0.0.0.0[RouterA-acl-basic-2001] quit[RouterA] acl number 2002[RouterA-acl-basic-2002] rule permit source 10.1.1.2 0.0.0.0[RouterA-acl-basic-2002] quit[RouterA] acl number 2003[RouterA-acl-basic-2001] rule permit source 10.1.1.4 0.0.0.0[RouterA-acl-basic-2001] quit[RouterA] acl number 2004[RouterA-acl-basic-2002] rule permit source 10.1.1.5 0.0.0.0[RouterA-acl-basic-2002] return

2. On GE 1/0/0 of Router A, configure the complex traffic classification to mark the priorityof services.<RouterA> system-view[RouterA] traffic classifier aa[RouterA-classifier-aa] if-match acl 2001[RouterA-classifier-aa] quit[RouterA] traffic classifier bb[RouterA-classifier-bb] if-match acl 2002[RouterA-classifier-bb] quit[RouterA] traffic classifier cc[RouterA-classifier-cc] if-match acl 2003[RouterA-classifier-cc] quit[RouterA] traffic classifier dd[RouterA-classifier-dd] if-match acl 2004[RouterA-classifier-dd] quit[RouterA] traffic behavior aa[RouterA-behavior-aa] remark ip-precedence 5[RouterA-behavior-aa] quit[RouterA] traffic behavior bb[RouterA-behavior-bb] remark ip-precedence 4[RouterA-behavior-bb] quit[RouterA] traffic behavior cc[RouterA-behavior-cc] remark ip-precedence 3

3 Congestion Avoidance ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

3-8 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 65: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[RouterA-behavior-cc] quit[RouterA] traffic behavior dd[RouterA-behavior-dd] remark ip-precedence 2[RouterA-behavior-dd] quit[RouterA] traffic policy ee[RouterA-trafficpolicy-ee] classifier aa behavior aa[RouterA-trafficpolicy-ee] classifier bb behavior bb[RouterA-trafficpolicy-ee] classifier cc behavior cc[RouterA-trafficpolicy-ee] classifier dd behavior dd[RouterA-trafficpolicy-ee] quit[RouterA] interface gigabiethernet1/0/0[RouterA-gigabitEthernet1/0/0] undo shutdown[RouterA-gigabitEthernet1/0/0] traffic-policy ee inbound[RouterA-gigabitEthernet1/0/0] return

3. Configure a WRED object on Router A.<RouterA> system-view[RouterA] port-wred pw[RouterA-port-wred-pw] color green low-limit 70 high-limit 100 discard-percentage 100[RouterA-port-wred-pw] color yellow low-limit 60 high-limit 90 discard-percentage 100[RouterA-port-wred-pw] color red low-limit 50 high-limit 80 discard-percentage 100[RouterA-port-wred-pw] returnAfter the preceding configuration, run the display port-wred configuration verbosecommand to check the parameters set for the WRED object:<RouterA> display port-wred configuration verbose pwport-wred-name : pw color low-limit high-limit discard-percent green 70 100 100 yellow 60 90 100 red 50 80 100 [reference relationship] NULL

4. On POS 2/0/0 of Router A, configure class queues and apply the WRED object pw.<RouterA> system-view[RouterA] interface pos2/0/0[RouterA-POS2/0/0] undo shutdown[RouterA-POS2/0/0] port-queue ef pq port-wred pw outbound[RouterA-POS2/0/0] port-queue af4 wfq weight 15 shaping 100 port-wred pw outbound[RouterA-POS2/0/0] port-queue af3 wfq weight 10 shaping 50 port-wred pw outbound[RouterA-POS2/0/0] port-queue af2 wfq weight 10 shaping 50 port-wred pw outbound[RouterA-POS2/0/0] returnAfter the preceding configuration, run the display port-queue configuration interfacecommand to view the configuration of class queues:<Quidway> display port-queue configuration interface pos 2/0/0 outboundPOS2/0/0 be current configuration: Arithmetic: wfq weight: 10 tm weight: 3 fact weight: 10.00 shaping(mbps): NA port-wred name: NA af1 current configuration: Arithmetic: wfq weight: 10 tm weight: 3 fact weight: 10.00 shaping(mbps): NA port-wred name: NA af2 current configuration:

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 3 Congestion Avoidance Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

3-9

Page 66: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Arithmetic: wfq weight: 10 tm weight: 3 fact weight: 10.00 shaping(mbps): 50 port-wred name: pw af3 current configuration: Arithmetic: wfq weight: 10 tm weight: 3 fact weight: 10.00 shaping(mbps): 50 port-wred name: pw af4 current configuration: Arithmetic: wfq weight: 15 tm weight: 2 fact weight: 15.00 shaping(mbps): 100 port-wred name: pwef current configuration: Arithmetic: pq weight: NA tm weight: NA fact weight: NA shaping(mbps): NA port-wred name: pw cs6 current configuration: Arithmetic: pq weight: NA tm weight: NA fact weight: NA shaping(mbps): NA port-wred name: NA cs7 current configuration: Arithmetic: pq weight: NA tm weight: NA fact weight: NA shaping(mbps): NA port-wred name: NA

5. Check the configuration.When traffic transits the network, run the display port-queue statistics command on theoutbound interface POS 2/0/0 of Router A. The output shows that the traffic volume ofservices EF, AF4, AF3, AF2, and BE increases rapidly.When the traffic volume increases rapidly in the network, the output shows that thediscarded traffic of services EF, AF4, AF3, AF2, and BE is also increasing. The traffic ofAF4, AF3,and AF2 is forwarded using the configured bandwidth.<Quidway> display port-queue statistics interface pos 2/0/0 outboundPos 2/0/0 outbound traffic statistics:[be] Total pass: 633,876,898 packets, 48,076,301,860 bytes Total discard: 0 packets, 0 bytes --Drop tail discard: 0 packets, 0 bytes --Wred discard: 0 packets, 0 bytes Last 30 seconds pass rate: 0 pps, 0 bps Last 30 seconds discard rate: 0 pps, 0 bps --Drop tail discard rate: 0 pps, 0 bps --Wred discard rate:

3 Congestion Avoidance ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

3-10 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 67: 00399154-Configuration Guide - QoS(V300R003_03).pdf

0 pps, 0 bps [af1] Total pass: 0 packets, 0 bytes Total discard: 0 packets, 0 bytes --Drop tail discard: 0 packets, 0 bytes --Wred discard: 0 packets, 0 bytes Last 30 seconds pass rate: 0 pps, 0 bps Last 30 seconds discard rate: 0 pps, 0 bps --Drop tail discard rate: 0 pps, 0 bps --Wred discard rate: 0 pps, 0 bps [af2] Total pass: 58 packets, 5,684 bytes Total discard: 24,478,662 packets, 1,860,378,312 bytes --Drop tail discard: 0 packets, 0 bytes --Wred discard: 0 packets, 0 bytes Last 30 seconds pass rate: 0 pps, 0 bps Last 30 seconds discard rate: 0 pps, 0 bps --Drop tail discard rate: 0 pps, 0 bps --Wred discard rate: 0 pps, 0 bps [af3] Total pass: 0 packets, 0 bytes Total discard: 0 packets, 0 bytes --Drop tail discard: 0 packets, 0 bytes --Wred discard: 0 packets, 0 bytes Last 30 seconds pass rate: 0 pps, 0 bps Last 30 seconds discard rate: 0 pps, 0 bps --Drop tail discard rate: 0 pps, 0 bps --Wred discard rate: 0 pps, 0 bps [af4] Total pass: 0 packets, 0 bytes Total discard: 0 packets, 0 bytes --Drop tail discard: 0 packets, 0 bytes --Wred discard: 0 packets, 0 bytes Last 30 seconds pass rate: 0 pps, 0 bps Last 30 seconds discard rate: 0 pps, 0 bps --Drop tail discard rate: 0 pps, 0 bps --Wred discard rate: 0 pps, 0 bps

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 3 Congestion Avoidance Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

3-11

Page 68: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[ef] Total pass: 19,126,381 packets, 1,874,388,964 bytes Total discard: 24,353,802 packets, 406,888,952 bytes --Drop tail discard: 0 packets, 0 bytes --Wred discard: 0 packets, 0 bytes Last 30 seconds pass rate: 196,829 pps, 19,286,890 bps Last 30 seconds discard rate: 0 pps, 0 bps --Drop tail discard rate: 0 pps, 0 bps --Wred discard rate: 0 pps, 0 bps [cs6] Total pass: 3,789 packets, 330,302 bytes Total discard: 0 packets, 0 bytes --Drop tail discard: 0 packets, 0 bytes --Wred discard: 0 packets, 0 bytes Last 30 seconds pass rate: 0 pps, 0 bps Last 30 seconds discard rate: 0 pps, 0 bps --Drop tail discard rate: 0 pps, 0 bps --Wred discard rate: 0 pps, 0 bps [cs7] Total pass: 0 packets, 0 bytes Total discard: 0 packets, 0 bytes --Drop tail discard: 0 packets, 0 bytes --Wred discard: 0 packets, 0 bytes Last 30 seconds pass rate: 0 pps, 0 bps Last 30 seconds discard rate: 0 pps, 0 bps --Drop tail discard rate: 0 pps, 0 bps --Wred discard rate: 0 pps, 0 bps

Configuration FilesConfiguration file on Router A# sysname RouterA#acl number 2001 rule permit source 10.1.1.3 0#acl number 2002 rule permit source 10.1.1.2 0#acl number 2003 rule permit source 10.1.1.4 0#acl number 2004

3 Congestion Avoidance ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

3-12 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 69: 00399154-Configuration Guide - QoS(V300R003_03).pdf

rule permit source 10.1.1.5 0 #traffic classifier cc operator or if-match acl 2003traffic classifier dd operator or if-match acl 2004traffic classifier aa operator or if-match acl 2001traffic classifier bb operator or if-match acl 2002#traffic behavior cc remark ip-precedence 3traffic behavior dd remark ip-precedence 2traffic behavior aa remark ip-precedence 5traffic behavior bb remark ip-precedence 4#traffic policy ee classifier aa behavior aa classifier bb behavior bb classifier cc behavior cc classifier dd behavior dd#port-wred pwcolor green low-limit 40 high-limit 90 discard-percentage 10color yellow low-limit 30 high-limit 70 discard-percentage 20color red low-limit 20 high-limit 60 discard-percentage 50#interface gigabitEthernet1/0/0 undo shutdown ip address 10.1.1.1 0.0.0.255 traffic-policy ee inbound#interface POS2/0/0 undo shutdown ip address 100.1.1.1 0.0.0.255port-queue ef pq port-wred pw outboundport-queue af4 wfq weight 15 shaping 100 port-wred pw outboundport-queue af3 wfq weight 10 shaping 50 port-wred pw outboundport-queue af2 wfq weight 10 shaping 50 port-wred pw outbound#ospf 1 area 0.0.0.0 network 10.1.1.0 0.0.0.255 network 100.1.1.0 0.0.0.255#return

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 3 Congestion Avoidance Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

3-13

Page 70: 00399154-Configuration Guide - QoS(V300R003_03).pdf
Page 71: 00399154-Configuration Guide - QoS(V300R003_03).pdf

4 Class-based QoS Configuration

About This Chapter

This chapter describes the configuration of traffic policy based on complex traffic classificationand simple traffic classification.

4.1 OverviewThis section describes the Differentiated Service (DiffServ) traffic management policysupported by the NE80E/40E.

4.2 Configuring a Traffic Policy Based on the Complex Traffic ClassificationThis section describes the procedure of configuring a traffic policy based on the complex trafficclassification.

4.3 Configuring Precedence Mapping Based on the Simple Traffic ClassificationThis section describes the procedure of configuring precedence mapping based on the simpletraffic classification.

4.4 Maintaining Class-based QoS ConfigurationThis section describes how to clear statistics about a traffic policy.

4.5 Configuration ExamplesThis section provides some examples for configuring class-based QoS.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 4 Class-based QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-1

Page 72: 00399154-Configuration Guide - QoS(V300R003_03).pdf

4.1 OverviewThis section describes the Differentiated Service (DiffServ) traffic management policysupported by the NE80E/40E.

4.1.1 Introduction to Class-based QoS

4.1.2 Class-based QoS Supported by the NE80E/40E

4.1.1 Introduction to Class-based QoS

The NE80E/40E supports DiffServ and provides standard forwarding services such as EF andAF for users by using the following traffic management measures:

l Traffic classification

l Traffic policing

l Traffic shaping

l Congestion avoidance

QoS of the NE80E/40E supports traffic policy with the above measures and mapping betweenthe QoS fields in the IP header and the MPLS header.

The traffic policies in the NE80E/40E are as follows:

l Traffic policy based on complex traffic classificationThe NE80E/40E carries out traffic policing, re-marking, filtering, policy-based routing andtraffic sampling based on the class of the packet. Such a policy is usually applied to theborder router of a DiffServ domain.

l Traffic policy based on simple traffic classificationThe NE80E/40E re-sets the CoS, color and drop precedence of packets based on the markfields in the packet. Such a traffic policy is usually configured on a router near the core ofa network.

l Internal traffic policy in the routerThe NE80E/40E uses the internal traffic policy to control the traffic sent from the LPU tothe SRU so that the SRU remains in a stable state.

NOTE

l DiffServ is mainly used to guarantee the bandwidth for BA data flows. The NE80E/40E uses the pre-defined queuing mechanism to assign resources for EF, AF and other services. Users do not need toconfigure queue management.

l The precedence of complex traffic classification is higher than that of simple traffic classification.

Traffic ClassificationTraffic classification is used to identify packets that have the same characters according tospecific rules. It is the basis for providing differentiated services. Traffic classification consistsof complex traffic classification and simple traffic classification:

l Simple traffic classificationThe simple traffic classification refers to classifying packets according to the IP precedenceor DSCP of the IP packet, the EXP of the MPLS packet, or the 802.1p field of the VLAN

4 Class-based QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

4-2 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 73: 00399154-Configuration Guide - QoS(V300R003_03).pdf

packet. It is used to simply identify the traffic that has the specific precedence or class ofservice.

l Complex traffic classificationThe complex traffic classification refers to classifying packets according to more complexrules, for example, the combination of the link layer, the network layer, and the transportlayer information.

Traffic Behavior

Traffic classification is meaningful only after it is associated with traffic control actions.

The NE80E/40E supports the following traffic actions and the combination of these trafficactions:

l Deny/PermitIt is the simplest traffic control action. It enables the NE80E/40E to control traffic bydiscarding packets or allowing packets to pass through.

l MarkThis traffic control action is used to set the precedence field in the packet. The precedencefield in a packet varies with the network type. For example, the packet carries the 802.1pfield in the VLAN, the DSCP field in the DiffServ network, and the EXP filed in the MPLSnetwork. Therefore, the router is required to mark the precedence of packets according totheir network type.Usually, devices at the border of a network marks the precedence of incoming packets.Devices in the core of the network provides corresponding QoS services according to theprecedence marked by the border device, or re-mark the precedence according to its ownstandard.

l RedirectionIt indicates that the router does not forward a packet according to the destination addressin the packet but forwards it to another next hop or Label Distribution Path (LSP). This ispolicy-based routing.

l Traffic policingIt is a traffic control action used to limit the traffic and the resource used by the traffic bymonitoring the specifications of the traffic. With traffic policing, the router can discard, re-mark the color or precedence of, or perform other QoS measures over packets that exceedthe specifications.

l SecurityIt refers to performing such measures as Unicast Reverse Path Forwarding (URPF), portmirroring, or traffic statistics over packets.Security actions are not QoS measures but can be used together with other QoS actions toimprove the security of the network and packets.

Precedence Mapping

The precedence field in a packet varies with the network type. For example, the packet carriesthe 802.1p field in the VLAN, the DSCP field in the DiffServ network, and the EXP filed in theMPLS network. When a packet passes through different networks, the mapping between theprecedence used in the networks must be set on the gateway that connects the networks to keepthe precedence of the packet.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 4 Class-based QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-3

Page 74: 00399154-Configuration Guide - QoS(V300R003_03).pdf

When the NE80E/40E serves as the gateway of different networks, the precedence fields in thepackets that go into the NE80E/40E are all mapped as the internal precedence of the router.When the NE80E/40E sends out the packet, the internal precedence is mapped back to theexternal precedence.

4.1.2 Class-based QoS Supported by the NE80E/40E

The NE80E/40E supports class-based QoS to carry out:

l Traffic policing based on complex traffic classification, re-marking, packet filtering,policy-based routing, load balancing, URPF, NetStream, and mirroring.

l Mapping of priorities of services between networks based on simple traffic classification.

4.2 Configuring a Traffic Policy Based on the ComplexTraffic Classification

This section describes the procedure of configuring a traffic policy based on the complex trafficclassification.

ContextNOTE

l The NE80E/40E supports complex traffic classification on physical interfaces POS and GE and theirsub-interfaces, QinQ interfaces, and QinQ sub-interfaces. The NE80E/40Ealso supports complextraffic classification on logical interfaces such as ring-if, IP trunk and Eth-trunk. For details ofconfiguring a QinQ interface, refer to "QinQ Configuration" in the Quidway NetEngine80E/40ERouter Configuration Guide – LAN Access and MAN Access.

l Traffic policies cannot be directly applied to the VLANIF interface. The traffic policies can be appliedto the scenario of the physical or layer 2 Eth-trunk interface plus VLAN ID range.

4.2.1 Establishing the Configuration Task

4.2.2 Defining a Traffic Classifier

4.2.3 Defining a Traffic Behavior and Configuring Traffic Actions

4.2.4 Defining a Policy and Specifying a Behavior for the Classifier

4.2.5 Applying a Traffic Policy

4.2.6 Applying the Statistic Function of a Traffic Policy

4.2.7 Checking the Configuration

4.2.1 Establishing the Configuration Task

Applicable Environment

To manage or limit the traffic that goes into or flows in a network according to the class ofservice, you need to configure QoS traffic policies based on the complex traffic classification.That is, you need to provide differentiated services according to parameters such as DSCP,protocol type, IP address, or port number in the packet. In this way, traffic from different users,

4 Class-based QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

4-4 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 75: 00399154-Configuration Guide - QoS(V300R003_03).pdf

such as voice services, video services, and data services can be served differently in terms ofbandwidth, delay, and precedence.

It is usually applied to the edge of the network and must be associated with specific traffic controlor resource allocation actions. It is used to provide differentiated services.

Pre-configuration Tasks

Before configuring a traffic policy based on traffic classification, you need to complete thefollowing pre-configuration tasks:

l Configuring physical parameters for related interfaces

l Configuring link layer attributes for related interfaces to ensure normal operation of theinterfaces

l Configuring IP addresses for related interfaces

l Enabling routing protocols to achieve reachable routes

Data Preparation

The following data is necessary for configuring a traffic policy based on traffic classification:

No. Data

1 Class name

2 ACL number, DSCP value, 802.1p value, TCP flag value

3 Behavior name

4 Committed information rate (CIR), peak information rate (PIR), committed burst size(CBS), peak burst size (PBS), DSCP value, IP preference value, EXP value, 8021Pvalue, next hop address or outbound interface

5 Traffic policy name

6 Interface type and number where the traffic policy is applied

4.2.2 Defining a Traffic Classifier

Procedurel Defining a Traffic Classifier Based on Layer-3 or Layer-4 Information

Do as follows on the router:

1. Run:system-view

The system view is displayed.2. Run:

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

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 4 Class-based QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-5

Page 76: 00399154-Configuration Guide - QoS(V300R003_03).pdf

A traffic classifier is defined and the view of the classifier is displayed.3. Choose the required match rule according to your needs:

– To set a matching rule to classify traffic based on the ACL number, run:if-match [ ipv6 ] acl acl-number

– To set a matching rule to classify traffic based on the DSCP value, run:if-match [ ipv6 ] dscp dscp-value

– To set a matching rule to classify traffic based on the TCP flag, run:if-match tcp syn-flag tcpflag-value

– To set a matching rule to classify traffic based on the IP precedence, run:if-match ip-precedence ip-precedence

– To set a match rule to classify traffic based on the MPLS EXP value, run:if-match mpls-exp exp-value

NOTENE80E/40E supports the complex traffic classification of upstream packets based on theMPLS EXP at the outermost layer. The classified packets support only the actions of Deny,Remark, mpls-exp, Mirror, and CAR.

– To match all packets, run: if-match [ ipv6 ] any

– To set a matching rule to classify traffic based on the source IPv6 address, run:if-match ipv6 source-address ipv6-address prefix-length

– To set a matching rule to classify traffic based on the destination IPv6 address,run:if-match ipv6 destination-address ipv6-address prefix-length

For IPv6 packets, you need to specify the parameter ipv6 in step 3. Source IP- anddestination IP-based matching rules are applicable to only IPv6 packets. IPv4 packetsare not supported.

If you set more than one match rule for the same classifier, you can set their relations withthe parameter operator in step 2:– Logic operator and: A packet belongs to the classifier only when it matches all the rules.

– Logic operator or: A packet belongs to the classifier if it matches any one of the rules.

– By default, the logical operator of the rules is or.

l Defining a Traffic Classifier Based on Layer-2 Information

Do as follows on the router:

1. Run:system-view

The system view is displayed.2. Run:

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

A traffic classifier is defined and the view of the classifier is displayed.3. Run the following command as required:

– To set an 802.1p match rule to classify VLAN packets, run:if-match 8021p 8021p-value

– To set a match rule to classify traffic based on the source MAC address, run:

4 Class-based QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

4-6 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 77: 00399154-Configuration Guide - QoS(V300R003_03).pdf

if-match source-mac mac-address

– To set a match rule to classify traffic based on the source MAC address, run:if-match destination-mac mac-address

If you set more than one match rule for the same classifier, you can set their relations withthe parameter operator in step 2:

– Logic operator and: A packet belongs to the classifier only when it matches all the rules.

– Logic operator or: A packet belongs to the classifier if it matches any one of the rules.

– By default, the logical operator of the rules is or.

If multiple traffic rules are configured in one traffic policy, the traffic behaviorscorresponding to the traffic classes are implemented in different orders.

– When many traffic rules match different IP packet fields, the traffic behaviorcorresponding to the traffic class that is bound first is implemented.

For example, three matching rules with their mapping traffic behaviors are bound inpolicy1; classifier1 is configured first and classifier3 last, as shown in Table 4-1. If apacket matches all the three traffic rules, the packet performs the action of behavior1,that is, re-marking 802.1p as 1.

Table 4-1 Traffic classifiers and behaviors defined in policy1

TrafficClass Name Traffic Rule

TrafficBehavior Name Traffic Action

Classifier1 Matching adestination MAC

Behavior1 Re-marking 802.1pas 1

Classifier2 Matching a VLAN ID Behavior2 Re-marking 802.1pas 2

Classifier3 Matching a sourceMAC

Behavior3 Re-marking 802.1pas 3

– Multiple traffic rules can match the same IP packet field, but no packet can match allthe traffic rules; as a result, the packet performs the traffic action corresponding to thetraffic class that matches the traffic rule.

For example, three traffic rules with their corresponding traffic behaviors are bound inpolicy2; classifier1 is configured first and classifier3 last, as shown in Table 4-2.Because the traffic rules match the same IP packet field, a packet can match only onetraffic rule. As a result, the packet performs the traffic behavior corresponding to thetraffic class that matches the traffic rule.

Table 4-2 Traffic classifiers and behaviors defined in policy2

TrafficClassifierName Traffic Rule

TrafficBehavior Name Traffic Action

Classifier1 Matching destinationMAC 1-1-1

Behavior1 Remarking 802.1p as1

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 4 Class-based QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-7

Page 78: 00399154-Configuration Guide - QoS(V300R003_03).pdf

TrafficClassifierName Traffic Rule

TrafficBehavior Name Traffic Action

Classifier2 Matching destinationMAC 2-2-2

Behavior2 Remarking 802.1p as2

Classifier3 Matching destinationMAC 3-3-3

Behavior3 Remarking 802.1p as3

– If some traffic rules match the same packet field and others match different packet fields,they are different.

– If traffic classes match the same IP packet field, no conflict occurs.

– If traffic classes match different IP packet field, the traffic behavior correspondingto the traffic class that is bound first in a traffic policy is performed.

For example, three traffic rules with their corresponding traffic behaviors are bound inpolicy3; classifier1 is configured first and classifier3 last, as shown in Table 4-3. In thispolicy, classifier1 and classifier3 match the same IP packet field, no conflict occurs.

When a packet matches both classifier1 and classifier2, the packet performs the trafficbehavior corresponding to classifier1. When a packet matches both classifier2 andclassifier3, the traffic behavior corresponding to classifer2 is also performed.

Table 4-3 Traffic classifiers and behaviors defined in policy3

Traffic ClassifierName Traffic Rule

TrafficBehaviorName Traffic Action

Classifier1 Matchingdestination MAC1-1-1

Behavior1 Remarking 802.1pas 1

Classifier2 Matching sourceMAC 2-2-2

Behavior2 Remarking 802.1pas 2

Classifier3 Matchingdestination MAC3-3-3

Behavior3 Remarking 802.1pas 3

----End

4.2.3 Defining a Traffic Behavior and Configuring Traffic Actions

Context

The NE80E/40E supports various types of traffic behaviors. You can choose one or morebehaviors to meet your requirements.

4 Class-based QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

4-8 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 79: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Procedurel Setting Packet Filtering Actions

Do as follows on the router:

1. Run:system-view

The system view is displayed.2. Run:

traffic behavior behavior–name

A traffic behavior is defined and the traffic behavior view is displayed.3. Run:

permit

Packets are allowed to pass.

Or run:

deny

Packets are discarded.

NOTE

If you run both the if-match any and the deny commands to configure the complex trafficclassification, the device discards all packets, including protocol packets, that flow through aninterface. Therefore, be cautious about configuring traffic classifiers and traffic behaviors byusing the preceding commands.

l Setting Traffic Policing Actions

Do as follows on the router:

1. Run:system-view

The system view is displayed.2. Run:

traffic behavior behavior–name

A traffic behavior is set and the behavior view is displayed.3. Run:

car { cir cir-value [ pir pir-value] } [ cbs cbs-value pbs pbs-value ] [ green { discard | pass [ service-class class color color ] } | yellow { discard | pass [ service-class class color color ] } | red { discard | pass [ service-class class color color ] } ]*

A traffic policing action is set in the traffic behavior.

After you configure a traffic policing action for a traffic policy, the traffic policy canbe applied to both an inbound and an outbound interface.

After the traffic policy for traffic policing is applied to an interface, the statistics maybe incorrect due to the previous configuration with the command qos car.

If you run this command for the same traffic policy more than once, the latestconfiguration takes effect.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 4 Class-based QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-9

Page 80: 00399154-Configuration Guide - QoS(V300R003_03).pdf

If packets are re-marked as the service levels of ef, be, cs6, and cs7, the packet canonly be re-marked in green.

l Defining a Traffic Behavior to Set the Precedence of Packets

Do as follows on the router:

1. Run:system-view

The system view is displayed.2. Run:

traffic behavior behavior–name

A traffic behavior is set and the behavior view is displayed.3. Run the following command as required.

– To re-configure the precedence of IP packets, run:remark ip-precedence ip-precedence

– To re-configure the DSCP value of IPv6 packets, run:remark [ ipv6 ] dscp dscp-value

– To re-configure the precedence of MPLS packets, run:remark mpls-exp exp

NOTEThe remark mpls-exp exp command can be run only on the inbound interface of therouter.

– To re-configure the precedence of VLAN packets, run:remark 8021p 8021p-value

NOTEThe 802.1p-based complex traffic classification does not support MPLS and DSCPremarking. The traffic policy that contains the action of re-marking the 802.1p priority canbe applied to only the outbound Ethernet sub-interface.

– To re-configure the DSCP value of IPv6 packets, run:remark ipv6 dscp dscp-value

l Defining a Traffic Behavior to Set the Class of Service in Packets

Do as follows on the router:

1. Run:system-view

The system view is displayed.2. Run:

traffic behavior behavior–name

A traffic behavior is set and the behavior view is displayed.3. Run:

service-class service-class color color

The class of service (CoS) in packets is set.

Setting the COS is valid only in the upstream packets. It is used to specify the CoSand to discard precedence of packets so that matched packets can be placed incorresponding queues. In this way, the router need not look up the BA table according

4 Class-based QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

4-10 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 81: 00399154-Configuration Guide - QoS(V300R003_03).pdf

to the precedence field in the packets to get the CoS. Further, the router need notchange the precedence field in the packet to transmit the packet transparently.

If the service level of packets is EF, BE, CS6, or CS7, the packets cannot be remarkedin yellow or red.

l Defining a Traffic Behavior to Redirect Packets

CAUTIONl Logical interfaces such as VLANIF, ring-if and trunk interface, do not support direction

of packets to multiple next hops and the outbound interface.l Redirection to LSP on the public network can be set only on the ingress of the MPLS

network.l Redirection to LSP on the public network can be set only to the application with a single

MPLS tag.

Do as follows on the router:

1. Run:system-view

The system view is displayed.2. Run:

traffic behavior behavior–name

A traffic behavior is set and the behavior view is displayed.3. Run the following command as required.

– To forward packets directly instead of redirecting them, run (in the traffic behaviorview):permit

– To discard packets directly instead of redirecting them, run (in the traffic behaviorview):deny

– To re-configure a singe next hop to be re-directed, run:redirect ip-nexthop ip-address [ interface interface-type interface-number ]

– To re-configure multiple next hops to be re-directed, run:redirect ipv4-multinhp nhp ip-address interface interface-type interface-number { nhp ip-address interface interface-type interface-number } &<1-3>

– To redirect IP data flows to a destination LSP on the public network, run:redirect lsp public dest-ipv4-address [ nexthop-address | interface interface-type interface-number | secondary ]

– To redirect packets to a service instance, run:redirect service-instance instance-name

– To re-configure a singe next hop to be re-directed for IPv6 packets, run:redirect ipv6-nexthop ipv6-address interface interface-type interface-number

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 4 Class-based QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-11

Page 82: 00399154-Configuration Guide - QoS(V300R003_03).pdf

The action deny is mutually exclusive with other traffic actions. If traffic has beenconfigured with the deny action, you must apply the permit action before executing othertraffic actions.

l Setting the Load Balancing Mode

Do as follows on the router:

1. Run:system-view

The system view is displayed.2. Run:

traffic behavior behavior–name

A traffic behavior is set and the behavior view is displayed.3. Run:

load-balance { flow | packet }

The load balancing mode is specified as flow after flow, or packet after packet.

----End

4.2.4 Defining a Policy and Specifying a Behavior for the Classifier

Context

Do as follows on the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:traffic policy policy-name

A traffic policy is defined and the policy view is displayed.

Step 3 Run:classifier classifier-name behavior behavior-name

A traffic behavior is specified for a traffic classifier in the traffic policy.

----End

4.2.5 Applying a Traffic Policy

Procedurel Applying a Traffic Policy to Layer 3 Interfaces

4 Class-based QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

4-12 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 83: 00399154-Configuration Guide - QoS(V300R003_03).pdf

NOTE

l The NE80E/40E supports traffic policies on physical interfaces such as POS and GE or their sub-interfaces. The NE80E/40E also supports traffic policies on logical interfaces such as Ringif, IP-Trunk, and Eth-Trunk interface.

l Traffic policies cannot be directly implemented on the VLANIF interface. They can be appliedon the basis of the physical or layer-2 Eth-Trunk interface plus VLAN ID.

Do as follows on the router:

1. Run:system-view

The system view is displayed.2. Run:

interface interface-type interface-number

The specified interface view is displayed.3. Run:

traffic-policy policy-name { inbound | outbound } [ link-layer | all-layer ]

The specified traffic policy is applied to the interface.

If you specify link-layer, the NE80E/40E classifies traffic based on the layer-2information of the packet.

Specify the parameter all-layer indicates the following rule-matching method after anassociated traffic policy is applied to an interface. The system first performs rule-matching according to Layer 2 information and implements a corresponding trafficaction. If Layer 2 information of a packet does not match the traffic rule, the systemperforms rule-matching according to Layer 3 information and implements acorresponding traffic action.

By default, the NE80E/40E classifies traffic based on Layer 3 or Layer 4 information.l Applying the Traffic Policy to Layer 2 Interfaces

Do as follows on the router:

1. Run:system-view

The system view is displayed.2. Run:

interface interface-type interface-number

The specified interface view is displayed.3. Run:

portswitch

The interface becomes a layer 2 interface.4. Run:

traffic-policy policy-name { inbound | outbound } [ vlan vlan-id1 [ to vlan-id2 ] ] [ link-layer | all-layer ]

The specified traffic policy is applied to the layer 2 interface.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 4 Class-based QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-13

Page 84: 00399154-Configuration Guide - QoS(V300R003_03).pdf

NOTE

If you apply a traffic policy without specifying a VLAN, the traffic policy is applied to the VLANswitch services that flow through the interface or the service traffic that is added to a PBB-TE tunnelin interface mode.

To apply a traffic policy to VLAN switch services on a Layer 2 interface or the service traffic thatis added to PBB-TE tunnel in interface mode, you do not need to specify a VLAN ID. You must,however, specify a VLAN ID if you apply a traffic policy to the VLAN traffic that goes through aLayer 2 interface.

----End

4.2.6 Applying the Statistic Function of a Traffic Policy

ContextDo as follows on the router where a traffic policy is applied:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:traffic policy policy-name

The defined policy view is displayed.

Step 3 Run:statistics enable

The statistic function of a traffic policy is enabled.

Step 4 Run:share-mode

The shared mode is specified for the traffic policy.

NOTEStep 3 is optional. To save the memory, the system does not enable the statistic function of a traffic policyby default. To display the statistics of a traffic policy, you can enable the statistic function of a traffic policy.

Step 4 is optional. The default mode depends on the paf file.

l After a traffic policy is applied to an interface, you cannot modify the shared or unshared mode of atraffic policy. Before modifying the shared or unshared mode of a traffic policy, you must cancel theapplication of the traffic policy from the interface.

l A traffic policy with the shared attribute: Although traffic policies are applied on different interfaces,statistics to be displayed are the final data (which is after calculation). Therefore, the original data oneach interface is not identified.

l A traffic policy with the unshared attribute: You can identify the statistics of a traffic policy accordingto the interface where the traffic policy is applied.

l Traffic is differentiated as incoming and outgoing no matter whether the shared mode is enabled ornot.

----End

4 Class-based QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

4-14 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 85: 00399154-Configuration Guide - QoS(V300R003_03).pdf

4.2.7 Checking the Configuration

Use the following display commands to check the previous configuration.

Action Command

Check information about thetraffic on an interface.

display interface [ interface-type [ interface-number ] ] [ |{ begin | exclude | include } regular-expression ]

Check the traffic behavior. display traffic behavior { system-defined | user-defined } [ behavior-name ]

Check the traffic classifier. display traffic classifier { system-defined | user-defined } [ classifier-name ]

Check the class and thebehavior in the traffic policy.

display traffic policy { system-defined | user-defined }[ policy-name [ classifier classifier-name ] ]

Check information about trafficpolicies configured on aspecified interface or allinterfaces.

display traffic policy interface brief [ interface-type[ interface-number ] ]

Check the statistics about thetraffic policy on an interface.

display traffic policy statistics interface interface-typeinterface-number [ .sub-interface ] [ vlan vlan-id ]{ inbound | outbound } [ verbose { classifier-based | rule-based} [ class class-name ] ]

If the configuration succeeds:

l You can view the name of the configured traffic behavior and actions when you run thedisplay traffic behavior command.

l You can view the name of the configured traffic classifier and its matching rules, as wellas the logic operator of the rules when you run the display traffic classifier command.

l You can view the name of the configured traffic policy and the associated behavior andclassifier.

l You can view the statistics on traffic policies configured on interfaces when you run thedisplay traffic policy interface brief command. For example:<Quidway> display traffic policy interface brief Interface InboundPolicy OutboundPolicy Ethernet2/1/0 tp3 tp4 Ethernet2/1/1 - tp6 Ethernet2/1/1.1 - tp2 GigabitEthernet3/2/0 tp1 - Vlan 1 to 100 - tp4 Vlan 200 to 300 tp3 - Pos4/2/0 - tp2

l Running the display traffic policy statistics command, you can view the statistics on thetraffic policy on an interface. For example:<Quidway> display traffic policy statistics interface gigabitethernet 1/0/0 inboundInterface: GigabitEthernet1/0/0 Traffic policy inbound: test Traffic policy applied at 2007-08-30 18:30:20

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 4 Class-based QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-15

Page 86: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Statistics enabled at 2007-08-30 18:30:20Statistics last cleared: NeverRule number: 7 IPv4, 1 IPv6 Current status: OK!Item Packets Bytes-------------------------------------------------------------------Matched 1,000 100,000 +--Passed 500 50,000 +--Dropped 500 50,000 +--Filter 100 10,000 +--URPF 100 10,000 +--CAR 300 30,000Missed 500 50,000Last 30 seconds rateItem pps bps-------------------------------------------------------------------Matched 1,000 100,000 +--Passed 500 50,000 +--Dropped 500 50,000 +--Filter 100 10,000 +--URPF 100 10,000 +--CAR 300 30,000Missed 500 50,000

4.3 Configuring Precedence Mapping Based on the SimpleTraffic Classification

This section describes the procedure of configuring precedence mapping based on the simpletraffic classification.

NOTE

Apart from the POS and GE interfaces and sub-interfaces, QinQ interface, QinQ sub-interface, the NE80E/40E also supports simple traffic classification on many logical interfaces such as Ring-if, IP-Trunk, andEth-Trunk. For details about the QinQ interface and its configuration, refer to "QinQ Configuration" in theQuidway NetEngine80E/40E Router Configuration Guide – LAN Access and MAN Access.

Using the qos default-service-class command, you can configure the upstream traffic on the interface toenter the specific queues. By default, the traffic enters the queues with the service class as BE. After thiscommand is run, other packets cannot be enabled to enter the queues, and simple traffic classificationcannot be enabled.

4.3.1 Establishing the Configuration Task

4.3.2 Defining the DiffServ Domain and Configuring a Traffic Policy

4.3.3 Applying Traffic Policy Based on Simple Traffic Classification to an Interface

4.3.4 Checking the Configuration

4.3.1 Establishing the Configuration Task

Applicable Environments

Traffic policy based on simple traffic classification is used to map the precedence of traffic onone type of network to another type. That is, to transmit the traffic in the other network accordingto the original precedence.

When the NE80E/40E serves as the border router of different networks, the precedence fieldsin the packets that go into the NE80E/40E are all mapped to the internal precedence of the

4 Class-based QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

4-16 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 87: 00399154-Configuration Guide - QoS(V300R003_03).pdf

router. When the NE80E/40E sends out the packet, the internal precedence is mapped back tothe external precedence.

Simple traffic classification is usually implemented on the core devices of the network. It canbe applied to both physical and logical interfaces. If implemented on the logical interface, simpletraffic classification can limit traffic congestion on member ports of the logical interface andrestrict the precedence of packets on the logical interface.

NOTE

For precedence mappings in the simple traffic classification, packets with the CoSs of BE, EF, CS6, andCS7 can be marked only in green.

A Diff-Serv (DS) domain is a group of Diff-Serv nodes that adopt the same service policies and implementthe same PHB aggregate.

The precedence of packets is usually accepted or re-defined on the core router. On the border router in theIP domain or MPLS domain, DSCP and EXP also need to be mapped.

The simple traffic classification can map the internal precedence to the external precedence, and the externalprecedence to the internal precedence. However, mapping between traffic of the same type, for example,IP traffic or MPLS traffic, is not supported.

Pre-configuration TasksBefore configuring the precedence mapping based on simple traffic classification, you need tocomplete the following pre-configuration tasks:

l Configuring physical parameters for related interfaces

l Configuring link layer attributes for related interfaces to ensure normal operation of theinterfaces

l Configuring IP addresses for related interfaces

l Enabling routing protocols to achieve reachable routes

Data PreparationsThe following data is necessary for configuring the priority mapping based on simple trafficclassification:

No. Data

1 DS domain name

2 802.1p value and class of service of uplink/downlink VLAN packets

3 DSCP code value and class of service of uplink/downlink IP packets

4 EXP field, class of service and color for packet marking for uplink/downlink MPLSpackets

5 Type and number of the interface on which DS domain is enabled

4.3.2 Defining the DiffServ Domain and Configuring a TrafficPolicy

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 4 Class-based QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-17

Page 88: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Procedurel Configuring a traffic policy based on simple traffic classification for IP packets

Do as follows on the router:

1. Run:system-view

The system view is displayed.2. Run:

diffserv domain { ds-domain-name | default | qinq }

A DS domain is defined and the DS domain view is displayed.3. Run:

– ip-dscp-inbound dscp-value phb service-class [ color ]

Mapping from the DSCP value to the COS value is set for incoming IP packets.– ip-dscp-outbound service-class color map dscp-code

Mapping from the COS value to the DSCP value is set for outgoing IP packets.

The default and QinQ domain is pre-defined by the system. If the precedence mapping inStep 3 is not set in the DS domain, the system uses the default mapping. The default andQinQ domain template describes the default mapping relations from the DSCP of IP packetsto the QoS services classes and colors, or from the QoS services classes and colors to theDSCP value. You can change the mapping relations in the default domain template. TheDSCP values of the packets from an upstream device are mapped to the QoS CoSs andcolors. Their mapping relations are shown in Table 4-4. The QoS CoSs and colors of thepackets going to a downstream device are mapped to the DSCP value. Their mappingrelations are shown in Table 4-5.

In QinQ domain, the DSCP values of the packets from an upstream device are mapped tothe QoS CoSs and colors. Their mapping relations are shown in Table 4-6. The QoS CoSsand colors of the packets going to a downstream device are mapped to the DSCP value.Their mapping relations are the same with that in the default domain.

NOTE

Using the common-inbound command, you can configure the corresponding relationship betweenthe DSCP priority of the upstream packets in the QinQ domain and colorize the packets.

The sub-interface for QinQ termination on the LPUF-20 or the sub-interface for QinQ terminationon the Trunk that includes the member interfaces of the LPUF-20 can be configured with only theQinQ domain, rather than other domains.

The default mapping between DSCP and CoS of IP packets is shown inTable 4-4.

Table 4-4 Default mapping between DSCP value and COS value of IP packets

DSCP Service Color DSCP Service Color

00 BE Green 32 AF4 Green

01 BE Green 33 BE Green

02 BE Green 34 AF4 Green

03 BE Green 35 BE Green

4 Class-based QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

4-18 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 89: 00399154-Configuration Guide - QoS(V300R003_03).pdf

DSCP Service Color DSCP Service Color

04 BE Green 36 AF4 Yellow

05 BE Green 37 BE Green

06 BE Green 38 AF4 Red

07 BE Green 39 BE Green

08 AF1 Green 40 EF Green

09 BE Green 41 BE Green

10 AF1 Green 42 BE Green

11 BE Green 43 BE Green

12 AF1 Yellow 44 BE Green

13 BE Green 45 BE Green

14 AF1 Red 46 EF Green

15 BE Green 47 BE Green

16 AF2 Green 48 CS6 Green

17 BE Green 49 BE Green

18 AF2 Green 50 BE Green

19 BE Green 51 BE Green

20 AF2 Yellow 52 BE Green

21 BE Green 53 BE Green

22 AF2 Red 54 BE Green

23 BE Green 55 BE Green

24 AF3 Green 56 CS7 Green

25 BE Green 57 BE Green

26 AF3 Green 58 BE Green

27 BE Green 59 BE Green

28 AF3 Yellow 60 BE Green

29 BE Green 61 BE Green

30 AF3 Red 62 BE Green

31 BE Green 63 BE Green

The default mapping between the CoS value and the DSCP value is shown inTable 4-5.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 4 Class-based QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-19

Page 90: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Table 4-5 Default mapping between the CoS value and the DSCP value

Service Color DSCP

BE Green 0

AF1 Green 10

AF1 Yellow 12

AF1 Red 14

AF2 Green 18

AF2 Yellow 20

AF2 Red 22

AF3 Green 26

AF3 Yellow 28

AF3 Red 30

AF4 Green 34

AF4 Yellow 36

AF4 Red 38

EF Green 46

CS6 Green 48

CS7 Green 56

Table 4-6 Default mapping between DSCP value and COS value of IP packets in QinQdomain

DSCP Service Color DSCP Service Color

0~7 be green 8~15 af1 green

16~23 af2 green 24~31 af3 green

32~39 af4 green 40~47 ef green

48~55 cs6 green 56~63 cs7 green

l Configuring a traffic policy based on simple traffic classification for MPLS packets

Do as follows on the router:

1. Run:system-view

The system view is displayed.

4 Class-based QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

4-20 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 91: 00399154-Configuration Guide - QoS(V300R003_03).pdf

2. Run:diffserv domain { ds-domain-name | default | qinq }

A DS domain is defined and the DS domain view is displayed.3. Run:

– mpls-exp-inbound exp phb service-class [color ]

Mapping from the EXP value to the COS value is set for incoming MPLS packets.– mpls-exp-outbound service-class color map exp

Mapping from the COS value to the EXP value is set for outgoing MPLS packets.

The default domain is pre-defined by the system. If the precedence mapping in Step 3 isnot set in the DS domain, the system uses the default mapping. The default domain templatedescribes the default mapping relations from the EXP of MPLS packets to the QoS servicesclasses and colors, or from the QoS services classes and colors to the EXP value. You canchange the mapping relations in the default domain template. The EXP of the packets froman upstream device are mapped to the QoS CoSs and colors. Their mapping relations areshown in Table 4-7. The QoS CoSs and colors of the packets going to a downstream deviceare mapped to the DSCP value. Their mapping relations are shown in Table 4-8.

The default mapping between the EXP value and the COS value of MPLS packets is shownin Table 4-7.

Table 4-7 Default mapping between the EXP value and the COS value of MPLS packets

EXP CoS Color EXP CoS Color

0 BE Green 4 AF4 Green

1 AF1 Green 5 EF Green

2 AF2 Green 6 CS6 Green

3 AF3 Green 7 CS7 Green

The default mapping between the CoS value and the EXP value is shown in Table 4-8.

Table 4-8 Default mapping between the CoS value and the EXP value

CoS Color MPLS EXP

BE Green 0

AF1 Green, Yellow, Red 1

AF2 Green, Yellow, Red 2

AF3 Green, Yellow, Red 3

AF4 Green, Yellow, Red 4

EF Green 5

CS6 Green 6

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 4 Class-based QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-21

Page 92: 00399154-Configuration Guide - QoS(V300R003_03).pdf

CoS Color MPLS EXP

CS7 Green 7

l Configuring a traffic policy based on simple traffic classification for VLAN packets

NOTEIf congestion occurs to the interface on the 8GE sub-interface of the LPUF, run the set pic-forwarding command to configure the scheduling priorities of the untagged packets or taggedpackets on the interface. The packets with higher priorities are scheduled first. Those with lowerpriorities are buffered before being scheduled. In this manner, the transmission quality can beguaranteed for the packets with higher priorities. The 802.1 p priorities must be specified for taggedpackets.

Do as follows on the router:

1. Run:system-view

The system view is displayed.2. Run:

diffserv domain { ds-domain-name | default | qinq }

A DS domain is defined and the DS domain view is displayed.3. Run:

– 8021p-inbound 8021p-code phb service-class [ color ]

Mapping from the 802.1p field to the COS value is set for incoming VLAN packets.– 8021p-outbound service-class color map 8021p-code

Mapping from the COS value to the 802.1p field is set for outgoing VLAN packets.

Three DS domain templates are pre-defined by the system for VLAN packets: the 5p3ddomain template, the QinQ domain template and the default domain template.

– The 5p3d domain template describes mapping relations from the 802.1 priorities ofVLAN packets to the QoS CoSs and colors, or from the QoS CoSs and colors to the802.1 priorities. These mapping relations are not configurable. The 802.1p priorities ofthe packets from an upstream device are mapped to the QoS CoSs and colors. Theirmapping relations are shown in Table 4-9. The QoS CoSs and colors of the packetsgoing to a downstream device are mapped to the 802.1p priorities. Their mappingrelations are shown in Table 4-10.

Table 4-9 Mappings from 802.1p priorities to QoS CoSs and colors in the 5p3d domaintemplate

802.1p CoS Color 802.1p CoS Color

0 BE Yellow 4 AF4 Yellow

1 BE Green 5 AF4 Green

2 AF2 Yellow 6 CS6 Green

3 AF2 Green 7 CS7 Green

4 Class-based QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

4-22 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 93: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Table 4-10 Mappings from QoS CoSs and colors to 802.1p priorities in the 5p3d domaintemplate

Service Color 802.1p Service Color 802.1p

BE Green 1 AF3 Yellow 2

AF1 Green 1 AF3 Red 2

AF1 Yellow 0 AF4 Green 5

AF1 Red 0 AF4 Yellow 4

AF2 Green 3 AF4 Red 4

AF2 Yellow 2 EF Green 5

AF2 Red 2 CS6 Green 6

AF3 Green 3 CS7 Green 7

– The default domain template describes the default mapping relations from the 802.1p

priorities of VLAN packets to the QoS services classes and colors, or from the QoSservices classes and colors to the 802.1p priorities. You can change the mappingrelations in the default domain template. The 802.1p priorities of the packets from anupstream device are mapped to the QoS CoSs and colors. Their mapping relations areshown in Table 4-11. The QoS CoSs and colors of the packets going to a downstreamdevice are mapped to the 802.1p priorities. Their mapping relations are shown in Table4-12.

Table 4-11 Mappings from 802.1p priorities to QoS CoSs and colors in the defaultdomain template

802.1p CoS Color 802.1p CoS Color

0 BE Green 4 AF4 Green

1 AF1 Green 5 EF Green

2 AF2 Green 6 CS6 Green

3 AF3 Green 7 CS7 Green

Table 4-12 Mappings from QoS CoSs and colors to 802.1p priorities in the defaultdomain template

CoS Color 802.1p

BE Green 0

AF1 Green, yellow, and red 1

AF2 Green, yellow, and red 2

AF3 Green, yellow, and red 3

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 4 Class-based QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-23

Page 94: 00399154-Configuration Guide - QoS(V300R003_03).pdf

CoS Color 802.1p

AF4 Green, yellow, and red 4

EF Green 5

CS6 Green 6

CS7 Green 7

The default mapping between the 802.1p field and the COS value of VLAN packets inQinQ domain is the same with that in the default domain.

NOTE

Using the common-inbound command, you can configure the corresponding relationshipbetween the 802.1p priority of the upstream packets in the QinQ domain and colorize the packets.The sub-interface for QinQ termination on the LPUF-20 or the sub-interface for QinQ terminationon the Trunk that includes the member interfaces of the LPUF-20 can be configured with onlythe QinQ domain, rather than other domains.

l Configuring a traffic policy for control packets based on the simple traffic classification

Control packets are usually forwarded with preference so that service interruption resultingfrom the loss of control packets due to network congestion is avoided.

By default, the system places control packets into the EF queue for being forwarded withpreference.

Do as follows on the router:

1. Run:system-view

The system view is displayed.2. Run:

diffserv domain { ds-domain-name | default | qinq }

A DS domain is created and the DS domain view is displayed.3. Run:

ppp-inbound control phb service-class [ color ]

To map the priorities of PPP control packets to the interior priorities of a router.

----End

4.3.3 Applying Traffic Policy Based on Simple Traffic Classificationto an Interface

ContextTo apply the traffic policy based on simple traffic classification to an interface, you can add theinterface to the DS domain that has been configured with the traffic policy. When you add aninterface to a DS domain, the traffic policy configured for the domain is then automaticallyapplied to the incoming and outgoing traffic on the interface.

4 Class-based QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

4-24 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 95: 00399154-Configuration Guide - QoS(V300R003_03).pdf

NOTE

This NE80E/40E supports simple traffic classification both on physical interface such as GE and POS, andon logical interfaces such as Ethernet sub-interface, Eth-Trunk, IP-Trunk, and Ring-if.

Procedurel Applying traffic policy to IP packets and control packetson a layer-3 interface

Do as follows on the router:

1. Run:system-view

The system view is displayed.2. Run:

interface interface-type interface-number

The specified interface view is displayed.3. Run:

trust upstream { 5p3d | ds-domain-name | default | qinq }

The interface is added in the DS domain and simple traffic classification is enabled.l Applying traffic policy to MPLS packets

Do as follows on the router:

1. Run:system-view

The system view is displayed.2. Run:

interface interface-type interface-number

The specified interface view is displayed.3. Run:

trust upstream { 5p3d | ds-domain-name | default | qinq }

The interface is added in the DS domain and simple traffic classification is enabled.l Applying traffic policy to VLAN packets

Do as follows on the router:

1. Run:system-view

The system view is displayed.2. Run:

interface { ethernet | gigabitethernet } interface-number.subnumber

The specified interface view is displayed.3. Run:

trust upstream { 5p3d | ds-domain-name | default | qinq }

The interface is added in the DS domain.4. Run:

trust 8021p

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 4 Class-based QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-25

Page 96: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Traffic classification based on the 802.1p field is enabled.

NOTE

l You can run the trust 8021p command only on the Ethernet (FE, GE and Eth-trunk) sub-interface and the physical interface where you run the portswitch command.

l Before you run this command, you must add the interface to the DS domain first. Otherwise,the configuration does not take effect.

After an interface is added to a DS domain, the traffic policies defined in this domain can acton the incoming and outgoing traffic on this interface.

l Applying traffic policy based on simple traffic classification to a layer-2 port

Do as follows on the router:

1. Run:system-view

The system view is displayed.2. Run:

interface interface-type interface-number

The specified interface view is displayed.3. Run:

portswitch

The interface becomes a layer 2 port.4. Run:

trust upstream { 5p3d | ds-domain-name | default | qinq } [ vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> ]

The port is added to the specified DS domain.5. Run:

trust 8021p vlan { vlan-id1 [ to vlan-id2 ] } &<1-10>

Traffic classification based on the 802.1p field is enabled.

NOTE

If you apply a traffic policy of the simple traffic classification without specifying a VLAN ID,the traffic policy is applied to the VLAN switch services that flow through the port or the servicepackets that are added to a PBB-TE tunnel in port mode.

To apply a traffic policy to VLAN switch services on a Layer 2 port or the service packets thatare added to a PBB-TE tunnel in port mode, you do not need to specify a VLAN ID. You must,however, specify a VLAN ID if you apply a traffic policy to the VLAN packets that go througha Layer 2 port.

----End

4.3.4 Checking the Configuration

Use the following display command to check the previous configuration.

Action Command

Display the DS domain name. display diffserv domain [ ds–domain–name ]

4 Class-based QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

4-26 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 97: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Action Command

Display the traffic information on aninterface.

display interface [ interface-type [ interface-number ] ] [ | { begin | exclude | include } regular-expression ]

If the configuration succeeds, you can see that, in the DS domain, the traffic policy based onsimple traffic classification is configured correctly by running the display diffserv domaincommand.

4.4 Maintaining Class-based QoS ConfigurationThis section describes how to clear statistics about a traffic policy.

4.4.1 Clearing the Statistics About Traffic Policies

4.4.2 Troubleshooting

4.4.1 Clearing the Statistics About Traffic Policies

CAUTIONThe statistics is deleted after you run the reset command. So, confirm the action before you usethe command.To delete the statistics about traffic policies on an interface, run the following reset commandin the user view.

Action Command

Clear the statistics about thetraffic policy on an interface.

reset traffic policy statistics interface interface-typeinterface-number [. sub-interface ] [ vlan vlan-id ]{ inbound | outbound }

4.4.2 Troubleshooting

Fault DescriptionAfter the configuration, QoS on the router does not take effect.

Fault AnalysisQoS rules, behaviors, and traffic parameters must be set correctly. Further, they must beimplemented in correct direction.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 4 Class-based QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-27

Page 98: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Troubleshooting Procedure1. Use the display commands about QoS to check that the rules, actions and traffic parameters

are correct.

2. Use the display current-configuration command to check that the configured inbound/outbound interfaces are correct.

3. Use the display device command to check the interface board status. The normal stateshould be "Registered."

4. Use the ping command to check that the physical connection and the lower layer protocolsrun normally.

4.5 Configuration ExamplesThis section provides some examples for configuring class-based QoS.

4.5.1 Example for Configuring a Traffic Policy Based on Complex Traffic Classification

4.5.2 Example for Configuring Complex Traffic Classification on QinQ Termination Sub-interface

4.5.3 Example for Configuring Priority Mapping Based on the Simple Traffic Classification(VLAN)

4.5.4 Example for Configuring Priority Mapping Based on the Simple Traffic Classification(MPLS)

4.5.1 Example for Configuring a Traffic Policy Based on ComplexTraffic Classification

Networking Requirements

As shown in Figure 4-1, PE1, P, and PE2 are routers on an MPLS backbone network; CE1 andCE2 are access routers on the edge of the backbone network. Three users from the local networkaccess the Internet through CE1.

l On CE1, the CIR of the users from the network segment 1.1.1.0 is limited to 10 Mbit/s andthe CBS is limited to 150000 bytes.

l On CE1, the CIR of the users from the network segment 2.1.1.0 is limited to 5 Mbit/s andthe CBS is limited to 100000 bytes.

l On CE1, the CIR of the users from the network segment 3.1.1.0 is limited to 2 Mbit/s andthe CBS is limited to 100000 bytes.

l On CE1, the DSCP values of the service packets from the three network segments aremarked to 40, 26, and 0.

l PE1 accesses the MPLS backbone network at the CIR of 15 Mbit/s, the CBS of 300000bytes, and the PIR of 20 Mbit/s.

l On CE1, the CIR of the UDP protocol packets (except DNS, SNMP, SNMP Trap, andSyslog packets) is limited to 5 Mbit/s, the CBS is limited to 100000 bytes, and the PIR islimited to 15 Mbit/s.

4 Class-based QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

4-28 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 99: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Figure 4-1 Diagram for configuring a traffic policy based on the complex traffic classification

Configuration RoadmapThe configuration roadmap is as follows:

1. Configure ACL rules.2. Configure traffic classifiers.3. Configure traffic actions.4. Configure traffic policies.5. Apply policies to interfaces

Data PreparationTo complete the configuration, you need the following data:

l ACL numbers are 2001, 2002, 2003, 3001 and 3002.

l The DSCP values the packets from the three network segments are re-marked 40, 26, and0.

l The CIRs of the traffic of the three network segments are 10 Mbit/s, 5 Mbit/s, and 2 Mbit/s; their CBSs are 150000 bytes, 100000 bytes, and 100000 bytes.

l The CIR of the UDP protocol packets (except DNS, SNMP, SNMP Trap, and Syslogpackets) on CE1 is 5 Mbit/s, the CBS is 100000 bytes, and the PIR is 15 Mbit/s.

l The CIR of PE1 is 15 Mbit/s; the CBS is 300000 bytes; the PIR is 20 Mbit/s.

l Names of traffic classifiers, traffic behaviors, and traffic policies; the numbers of interfaceswhere the traffic policies are applied.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 4 Class-based QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-29

Page 100: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Configuration Procedure1. Configure the IP addresses of the interfaces, the routes, and the basic MPLS functions (not

mentioned here).2. Configure complex traffic classification on CE1 to control the traffic that accesses CE1

from the three local networks.# Define ACL rules.<CE1> system-view[CE1] acl number 2001[CE1-acl-basic-2001] rule permit source 1.1.1.0 0.0.0.255[CE1-acl-basic-2001] quit[CE1] acl number 2002[CE1-acl-basic-2002] rule permit source 2.1.1.0 0.0.0.255[CE1-acl-basic-2002] quit[CE1] acl number 2003[CE1-acl-basic-2003] rule permit source 3.1.1.0 0.0.0.255[CE1-acl-basic-2003] quit[CE1] acl number 3001[CE1-acl-basic-3001] rule 0 permit udp destination-port eq dns[CE1-acl-basic-3001] rule 1 permit udp destination-port eq snmp[CE1-acl-basic-3001] rule 2 dpermit udp destination-port eq snmptrap [CE1-acl-basic-3001] rule 3 permit udp destination-port eq syslog [CE1-acl-basic-3001] quit[CE1] acl number 3002[CE1-acl-basic-3002] rule 4 permit udp [CE1-acl-basic-3002] quit

# Configure traffic classifiers and define ACL-rule-based matching rules.[CE1] traffic classifier a[CE1-classifier-a] if-match acl 2001[CE1-classifier-a] quit[CE1] traffic classifier b[CE1-classifier-b] if-match acl 2002[CE1-classifier-b] quit[CE1] traffic classifier c[CE1-classifier-c] if-match acl 2003[CE1-classifier-c] quit[CE1]traffic classifier udplimit operator or [CE1-classifier-udplimit] if-match acl 3001[CE1-classifier-udplimit] quit[CE1] traffic classifier udplimit1 operator or[CE1-classifier-udplimit1] if-match acl 3002[CE1-classifier-udplimit1] quit

After the preceding configuration, you can run the following display traffic classifiercommand to view the configuration of the traffic classifiers.[CE1] display traffic classifier user-definedUser Defined Classifier Information: Classifier: a Operator: OR Rule(s): if-match acl 2001 Classifier: c Operator: OR Rule(s): if-match acl 2003 Classifier: b Operator: OR Rule(s): if-match acl 2002 Classifier: udplimit Operator: OR Rule(s) : if-match acl 3001 Classifier: udplimit1 Operator: OR Rule(s) : if-match acl 3002

# Define traffic behaviors; configure traffic policing, and DSCP values to be re-marked.[CE1] traffic behavior e

4 Class-based QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

4-30 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 101: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[CE1-behavior-e] car cir 10000 cbs 150000 pbs 0[CE1-behavior-e] remark dscp 40[CE1-behavior-e] quit[CE1] traffic behavior f[CE1-behavior-f] car cir 5000 cbs 100000 pbs 0[CE1-behavior-f] remark dscp 26[CE1-behavior-f] quit[CE1] traffic behavior g[CE1-behavior-g] car cir 2000 cbs 100000 pbs 0[CE1-behavior-g] remark dscp 0[CE1-behavior-g] quit[CE1] traffic behavior udplimit[CE1-behavior-udplimit] quit[CE1] traffic behavior udplimit1[CE1-behavior-udplimit1] car cir 5000 cbs 100000 pbs 150000 green pass yellow discard red discard[CE1-behavior-udplimit1] quit

# Define traffic policies and associate the traffic classifiers with the traffic behaviors.[CE1] traffic policy 1[CE1-trafficpolicy-1] classifier a behavior e[CE1-trafficpolicy-1] quit[CE1] traffic policy 2[CE1-trafficpolicy-2] classifier b behavior f[CE1-trafficpolicy-2] quit[CE1] traffic policy 3[CE1-trafficpolicy-3] classifier c behavior g[CE1-trafficpolicy-3] quit[CE1] traffic policy udplimit[CE1-trafficpolicy-udplimit] classifier udplimit behavior udplimit[CE1-trafficpolicy-udplimit] classifier udplimit1 behavior udplimit1[CE1-trafficpolicy-3] quit

After the preceding configuration, run the display traffic policy command to view theconfiguration of the traffic policies, traffic classifiers defined in the traffic policies, and thetraffic behaviors associated with traffic classifiers.[CE1] display traffic policy user-definedUser Defined Traffic Policy Information:Policy: 1 Classifier: default-class Behavior: be -none- Classifier: a Behavior: e Committed Access Rate: CIR 10000 (Kbps), PIR 0 (Kbps), CBS 15000 (byte), PBS 0 (byte) Conform Action: pass Yellow Action: pass Exceed Action: discard Marking: Remark DSCP cs5Policy: 2 Classifier: default-class Behavior: be -none- Classifier: b Behavior: f Committed Access Rate: CIR 5000 (Kbps), PIR 0 (Kbps), CBS 100000 (byte), PBS 0 (byte) Conform Action: pass Yellow Action: pass Exceed Action: discard Marking: Remark DSCP af31 Policy: 3 Classifier: default-class Behavior: be -none- Classifier: c

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 4 Class-based QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-31

Page 102: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Behavior: g Committed Access Rate: CIR 2000 (Kbps), PIR 0 (Kbps), CBS 100000 (byte), PBS 0 (byte) Conform Action: pass Yellow Action: pass Exceed Action: discard Marking: Remark DSCP defaultPolicy: udplimit Classifier: default-class Behavior: be -none- Classifier: udplimit Behavior: udplimit -none- Classifier: udplimit1 Behavior: udplimit1 Committed Access Rate: CIR 5000 (Kbps), PIR 0 (Kbps), CBS 10000 (byte), PBS 15000 (byte) Conform Action: pass Yellow Action: discard Exceed Action: discard # Apply the traffic policies to the inbound interfaces.[CE1] interface gigabitethernet 1/0/0[CE1-GigabitEthernet1/0/0] undo shutdown[CE1-GigabitEthernet1/0/0] traffic-policy 1 inbound[CE1-GigabitEthernet1/0/0] quit[CE1] interface gigabitethernet 3/0/0[CE1-GigabitEthernet3/0/0] undo shutdown[CE1-GigabitEthernet3/0/0] traffic-policy 2 inbound[CE1-GigabitEthernet3/0/0] quit[CE1] interface gigabitethernet 4/0/0[CE1-GigabitEthernet4/0/0] undo shutdown[CE1-GigabitEthernet4/0/0] traffic-policy 3 inbound[CE1] interface gigabitethernet 2/0/0[CE1-GigabitEthernet2/0/0] undo shutdown[CE1-GigabitEthernet2/0/0] traffic-policy udplimit outbound

3. Configure complex traffic classification on PE1 to control the traffic that goes to the MPLSbackbone network.# Configure traffic classifiers and define matching rules.<PE1> system-view[PE1] traffic classifier pe[PE1-classifier-pe] if-match any[PE1-classifier-pe] quitAfter the preceding configuration, you can run the display traffic classifier command toview the configuration of the traffic classifiers.[PE1] display traffic classifier user-definedUser Defined Classifier Information: Classifier: pe Operator: ORRule(s): if-match any# Define traffic behaviors; configure traffic policing and DSCP values to be re-marked.[PE1] traffic behavior pe[PE1-behavior-pe] car cir 15000 pir 20000 cbs 300000 pbs 500000[PE1-behavior-pe] quit# Define traffic policies and associate the traffic classifiers with the traffic behaviors.[PE1] traffic policy pe[PE1-trafficpolicy-pe] classifier pe behavior pe[PE1-trafficpolicy-pe] quitAfter the preceding configuration, you can run the display traffic policy command to viewthe configuration of the traffic policies, traffic classifiers defined in the traffic policies, andthe traffic behaviors associated with traffic classifiers.

4 Class-based QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

4-32 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 103: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[PE1] display traffic policy user-definedUser Defined Traffic Policy Information:Policy: pe Classifier: default-class Behavior: be -none- Classifier: pe Behavior: pe Committed Access Rate:CIR 15000 (Kbps), PIR 20000 (Kbps), CBS 300000 (byte), PBS 500000 (byte) Conform Action: pass Yellow Action: pass Exceed Action: discard# Apply the traffic policies to the inbound interfaces.[PE1] interface gigabitethernet 1/0/0[PE1-GigabitEthernet1/0/0] undo shutdown[PE1-GigabitEthernet1/0/0] traffic-policy pe inbound[PE1-GigabitEthernet1/0/0] quit

4. Verify the configuration.Run the display interface command on CE1 and PE1. You can view that the traffic on theinterfaces are controlled according to the configured traffic policies.

Configuration Filesl Configuration file of CE1

# sysname CE1#acl number 2001 rule permit source 1.1.1.0 0.0.0.255acl number 2002 rule permit source 2.1.1.0 0.0.0.255acl number 2003 rule permit source 3.1.1.0 0.0.0.255acl number 3001 rule 0 permit udp destination-port eq dns rule 1 permit udp destination-port eq snmp rule 2 dpermit udp destination-port eq snmptrap rule 3 permit udp destination-port eq syslogacl number 3302 rule 4 permit udp #traffic classifier a operator or if-match acl 2001traffic classifier c operator or if-match acl 2003traffic classifier b operator or if-match acl 2002traffic classifier udp-limit operator or if-match acl 3001traffic classifier udp-limit1 operator or if-match acl 3002#traffic behavior e car cir 10000 cbs 150000 pbs 0 green pass red discard remark dscp cs5traffic behavior g car cir 2000 cbs 100000 pbs 0 green pass red discard remark dscp defaulttraffic behavior f car cir 5000 cbs 100000 pbs 0 green pass red discard remark dscp af31traffic behavior udp-limittraffic behavior udp-limit1 car cir 5000 cbs 100000 pbs 150000 green pass yellow discard red discard #

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 4 Class-based QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-33

Page 104: 00399154-Configuration Guide - QoS(V300R003_03).pdf

traffic policy 3 classifier c behavior g traffic policy 2 classifier b behavior f traffic policy 1 classifier a behavior e traffic policy udp-limit classifier udp-limit behavior udp-limit classifier udp-limit1 behavior udp-limit1#interface GigabitEthernet1/0/0undo shutdownip address 1.1.1.1 255.255.255.0 traffic-policy 1 inbound#interface GigabitEthernet2/0/0undo shutdownip address 10.1.1.1 255.255.255.0traffic-policy udplimit outbound#interface GigabitEthernet3/0/0undo shutdownip address 2.1.1.1 255.255.255.0 traffic-policy 2 inbound#interface GigabitEthernet4/0/0undo shutdownip address 3.1.1.1 255.255.255.0 traffic-policy 3 inbound#ospf 1 area 0.0.0.0 network 1.1.1.0 0.0.0.255 network 2.1.1.0 0.0.0.255 network 3.1.1.0 0.0.0.255 network 10.1.1.0 0.0.0.255#return

l Configuration file of PE1# sysname PE1#mpls lsr-id 11.11.11.11 mpls#mpls ldp#traffic classifier pe operator or if-match any#traffic behavior pe car cir 15000 pir 20000 cbs 300000 pbs 500000 green pass yellow pass red discard#traffic policy pe classifier pe behavior pe#interface GigabitEthernet1/0/0undo shutdownip address 10.1.1.2 255.255.255.0 traffic-policy pe inbound#interface Pos2/0/0undo shutdownip address 100.1.1.1 255.255.255.0mplsmpls ldp#interface LoopBack0

4 Class-based QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

4-34 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 105: 00399154-Configuration Guide - QoS(V300R003_03).pdf

ip address 11.11.11.11 255.255.255.255#ospf 1 area 0.0.0.0 network 10.1.1.0 0.0.0.255 network 100.1.1.0 0.0.0.255 network 11.11.11.11 0.0.0.0#return

l Configuration file of P# sysname P# mpls lsr-id 33.33.33.33 mpls#mpls ldp#interface Pos1/0/0 link-protocol ppp ip address 100.1.1.2 255.255.255.0 mpls mpls ldp#interface Pos2/0/0 link-protocol ppp ip address 110.1.1.1 255.255.255.0 mpls mpls ldp#interface LoopBack0 ip address 33.33.33.33 255.255.255.255#ospf 1 area 0.0.0.0 network 100.1.1.0 0.0.0.255 network 110.1.1.0 0.0.0.255 network 33.33.33.33 0.0.0.0#return

l Configuration file of PE2# sysname PE2#mpls lsr-id 22.22.22.22mpls#mpls ldp#interface GigabitEthernet1/0/0undo shutdownip address 20.1.1.2 255.255.255.0#interface Pos2/0/0 undo shutdownip address 110.1.1.1 255.255.255.0mplsmpls ldp#interface LoopBack0 ip address 22.22.22.22 255.255.255.255#ospf 10 area 0.0.0.0 network 110.1.1.0 0.0.0.255network 20.1.1.0 0.0.0.255 network 22.22.22.22 0.0.0.0#

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 4 Class-based QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-35

Page 106: 00399154-Configuration Guide - QoS(V300R003_03).pdf

return

l Configuration file of CE2# sysname CE2#interface GigabitEthernet2/0/0undo shutdown ip address 20.1.1.1 255.255.255.0#ospf 1 area 0.0.0.0network 20.1.1.0 0.0.0.255 #return

4.5.2 Example for Configuring Complex Traffic Classification onQinQ Termination Sub-interface

Networking Requirements

As shown in Figure 4-2, Switch A and Switch B connect the carrier's network through RouterA and Router B. On the QinQ termination sub-interface GE2/0/0.1 on Router A, configurecomplex traffic classification to limit the user access rate on Switch A to 10 Mbit/s and thecommitted burst size (CBS) to 150,000 bytes.

NOTE

For details about the QinQ interface and its configuration, refer to "QinQ Configuration" in the QuidwayNetEngine80E/40E Router Configuration Guide – LAN Access and MAN Access.

Figure 4-2 Networking diagram for configuring complex traffic classification on QinQtermination sub-interface

Configuration Roadmap

The roadmap for configuring the complex traffic classification on a QinQ sub-interface is asfollows:

1. Configure the GE2/0/0.1 on Router A and on Router B to a QinQ termination sub-interface.

4 Class-based QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

4-36 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 107: 00399154-Configuration Guide - QoS(V300R003_03).pdf

2. Configure traffic policing based on the complex traffic classification on the QinQtermination sub-interface.

Data PreparationTo complete the configuration, you need the following data:

l The IP addresses of the interfaces

l The range of VLAN IDs to be terminated on the QinQ termination sub-interface

l For users attached to Switch A, the CIR is 10 Mbit/s and the CBS is 150000 bytes

l Traffic classifier name, traffic behavior name, traffic policy name, and the interface numberwhere the traffic policy is applied

Configuration Procedures1. Configure the IGP of the backbone network. In this example, OSPF is used.

# Configure Router A.<Quidway> system-view[Quidway] sysname RouterA[RouterA] interface pos 1/0/0[RouterA-Pos1/0/0] undo shutdown[RouterA-Pos1/0/0] ip address 100.1.1.1 24[RouterA-Pos1/0/0] quit[RouterA] ospf[RouterA-ospf-1] area 0[RouterA-ospf-1-area-0.0.0.0] network 100.1.1.0 0.0.0.255[RouterA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255[RouterA-ospf-1-area-0.0.0.0] quit[RouterA-ospf-1] quit# Configure Router B.<Quidway> system-view[Quidway] sysname RouterB[RouterB] interface pos 1/0/0[RouterB-Pos1/0/0] undo shutdown[RouterB-Pos1/0/0] ip address 100.1.1.2 24[RouterB-Pos1/0/0] quit[RouterB] ospf[RouterB-ospf-1] area 0[RouterB-ospf-1-area-0.0.0.0] network 100.1.1.0 0.0.0.255[RouterB-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255[RouterB-ospf-1-area-0.0.0.0] quit[RouterB-ospf-1] quit

2. Configure QinQ termination sub-interface.# Configure Router A.[RouterA] interface gigabitethernet 2/0/0[RouterA-GigabitEthernet2/0/0] undo shutdown[RouterA-GigabitEthernet2/0/0] mode user-termination[RouterA-GigabitEthernet2/0/0] quit[RouterA] interface gigabitethernet 2/0/0.1[RouterA-GigabitEthernet2/0/0.1] control-vid 1 qinq-termination[RouterA-GigabitEthernet2/0/0.1] qinq termination pe-vid 100 ce-vid 10 to 20[RouterA-GigabitEthernet2/0/0.1] ip address 10.1.1.1 24[RouterA-GigabitEthernet2/0/0.1] arp broadcast enable[RouterA-GigabitEthernet2/0/0.1] quit# Configure Router B.[RouterB] interface gigabitethernet 2/0/0[RouterB-GigabitEthernet2/0/0] undo shutdown[RouterB-GigabitEthernet2/0/0] mode user-termination[RouterB-GigabitEthernet2/0/0] quit

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 4 Class-based QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-37

Page 108: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[RouterB] interface gigabitethernet 2/0/0.1[RouterB-GigabitEthernet2/0/0.1] control-vid 1 qinq-termination[RouterB-GigabitEthernet2/0/0.1] qinq termination pe-vid 100 ce-vid 10 to 20[RouterB-GigabitEthernet2/0/0.1] ip address 10.2.1.1 24[RouterB-GigabitEthernet2/0/0.1] arp broadcast enable[RouterB-GigabitEthernet2/0/0.1] quit

3. Configure the complex traffic classification function for the QinQ termination sub-interfaceon Router A.# Configure a traffic class and define a matching rule.[RouterA] traffic classifier c1[RouterA-classifier-c1] if-match any[RouterA-classifier-c1] quit# Define a traffic behavior.[RouterA] traffic behavior b1[RouterA-behavior-b1] car cir 10000 cbs 150000 pbs 0[RouterA-behavior-b1] quit# Define a traffic policy and associate the traffic class with the traffic behavior.[RouterA] traffic policy p1[RouterA-trafficpolicy-p1] classifier c1 behavior b1[RouterA-trafficpolicy-p1] quit# After the preceding configuration, use the display traffic policy command to view theconfiguration result, paying attention to the traffic policy, the traffic class defined in thetraffic policy and the traffic behavior that is associated with the traffic class.[RouterA] display traffic policy user-defined User Defined Traffic Policy Information: Policy: p1 Classifier: default-class Behavior: be -none- Classifier: c1 Behavior: b1 Committed Access Rate: CIR 10000 (Kbps), PIR 0 (Kbps), CBS 150000 (byte), PBS 0 (byte) Conform Action: pass Yellow Action: pass Exceed Action: discard# Apply the traffic policy to the interface.[RouterA] interface gigabitethernet 2/0/0.1[RouterA-GigabitEthernet2/0/0.1] traffic-policy p1 inbound[RouterA-GigabitEthernet2/0/0.1] quit

4. Check the configuration.After the interface is bound with the traffic policy, the GE2/0/0 interface on Router A onlyadmits a traffic rate of 10 Mbit/s. If the traffic rate is more than that, the packets arediscarded.

Configuration Filesl Configuration file of Router A

# sysname RouterA#traffic classifier c1 operator and if-match any#traffic behavior b1 car cir 10000 cbs 150000 pbs 0 green pass yellow pass red discard#traffic policy p1 classifier c1 behavior b1

4 Class-based QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

4-38 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 109: 00399154-Configuration Guide - QoS(V300R003_03).pdf

#interface GigabitEthernet2/0/0 undo shutdown mode user-termination#interface GigabitEthernet2/0/0.1control-vid 1 qinq-termination qinq termination pe-vid 100 ce-vid 10 to 20 ip address 10.1.1.1 255.255.255.0 traffic-policy p1 inbound arp broadcast enable#interface Pos1/0/0 undo shutdown link-protocol ppp ip address 100.1.1.1 255.255.255.0#ospf 1 area 0.0.0.0 network 10.1.1.0 0.0.0.255 network 100.1.1.0 0.0.0.255#return

l Configuration file of Router B# sysname RouterB#interface GigabitEthernet2/0/0 undo shutdown mode user-termination#interface GigabitEthernet2/0/0.1control-vid 1 qinq-termination qinq termination pe-vid 100 ce-vid 10 to 20 ip address 10.2.1.1 255.255.255.0 arp broadcast enable#interface Pos1/0/0 undo shutdown link-protocol ppp ip address 100.1.1.2 255.255.255.0#ospf 1 area 0.0.0.0 network 10.2.1.0 0.0.0.255 network 100.1.1.0 0.0.0.255#return

4.5.3 Example for Configuring Priority Mapping Based on theSimple Traffic Classification (VLAN)

Networking RequirementsAs shown in Figure 4-3, Router A and Router B connect to each other through VLAN. WhenIP packets sent from Router A go into VLAN, the precedence of the IP packets is mapped to the802.1p priority according to the default mapping. When the packets from VLAN go into RouterB, the precedence is mapped according to the precedence mapping for the DS domain set onRouter B.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 4 Class-based QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-39

Page 110: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Figure 4-3 Networking diagram for configuring VLAN QoS

Configuration RoadmapThe configuration roadmap is as follows:

1. Set VLAN and routes on RouterA and RouterB.2. On the inbound interface of RouterA, set the router to trust the precedence of packets from

the upstream device.3. On the inbound interface of RouterB, set the precedence mapping based on simple traffic

classification.

Data PreparationTo complete the configuration, you need the following data:

l VLAN ID

l The 802.1p priority, internal CoS and color inside the router, and the IP DSCP value

Configuration Procedures1. Assign IP addresses for the interfaces (not mentioned).2. Set VLAN on RouterA and RouterB.

# Create the sub-interface GigabitEthernet4/0/0.1 and add it to the VLAN.[RouterA] interface gigabitethernet 4/0/0.1[RouterA-GigabitEthernet4/0/0.1] vlan-type dot1q 10 [RouterA-GigabitEthernet4/0/0.1] return# Create the sub-interface GigabitEthernet2/0/0.1 and add it to the VLAN.<RouterB> system-view[RouterB] interface gigabitethernet 2/0/0.1[RouterB-GigabitEthernet2/0/0] vlan-type dot1q 10[RouterB-GigabitEthernet2/0/0] return

3. Configure dynamic routing protocols on Router A and Router B. Take OSPF as an example.# Configure Router A.<RouterA> system-view[RouterA] ospf 1[RouterA-ospf-1] area 0.0.0.0[RouterA-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255 [RouterA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255[RouterA-ospf-1-area-0.0.0.0] return# Configure Router B.<RouterB> system-view[RouterB] ospf 1[RouterB-ospf-1] area 0.0.0.0[RouterB-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255 [RouterB-ospf-1-area-0.0.0.0] network 11.1.1.0 0.0.0.255

4 Class-based QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

4-40 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 111: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[RouterB-ospf-1-area-0.0.0.0] return4. Enable the simple traffic classification on GE 1/0/0 of Router A to map the precedence in

IP packets to the 802.1p priority according to the default mapping.<RouterA> system-view[RouterA] interface gigabitethernet 1/0/0[RouterA-GigabitEthernet1/0/0] undo shutdown[RouterA-GigabitEthernet1/0/0] trust upstream default[RouterA-GigabitEthernet1/0/0] quit[RouterA] interface gigabitethernet 4/0/0.1[RouterA-GigabitEthernet4/0/0.1] trust upstream default[RouterA-GigabitEthernet4/0/0.1] trust 8021p[RouterA-GigabitEthernet4/0/0.1] returnAfter the said configuration, the DSCP field value in the IP packets that are sent from theupstream device is mapped on Router A to the 802.1p priority according to the defaultmapping.

5. On GE 2/0/0.1 of Router B, set the mapping from the 802.1p priority to IP DSCP field.<RouterB> system-view[RouterB] diffserv domain default[RouterB-dsdomain-default] 8021p-inbound 2 phb ef green[RouterB-dsdomain-default] ip-dscp-outbound ef green map 34[RouterB-dsdomain-default] quit[RouterB] interface gigabitethernet 2/0/0.1[RouterB-GigabitEthernet2/0/0.1] trust upstream default[RouterB-GigabitEthernet2/0/0.1] trust 8021p[RouterB-GigabitEthernet2/0/0.1] returnAfter the said configuration, the VLAN frames that are upstream device and in which the80.21p priority value is 2 are converted to the IP packets in which the DSCP value is 34,the CoS is AF4, and the packet color is green. The 802.1p priority values in other VLANframes are mapped to the DSCP values according to the default mapping.

6. Check the configuration.On GE 3/0/0 of Router B, run the display port-queue statistics interface gigabitethernet3/0/0 outbound command and the output is as follows. The statistics about AF2 packetsare not displayed because the mapping from the 802.1p priority 2 to the service priority EFof IP packets is configured on the inbound interface.<RouterB> display port-queue statistics interface gigabitethernet 3/0/0 outboundGigabitEthernet3/0/0 outbound traffic statistics: [be] Total pass: 18,466,135 packets, 1,735,817,160 bytes Total discard: 0 packets, 0 bytes --Drop tail discard: 0 packets, 0 bytes --Wred discard: 0 pps, 0 bps Last 30 seconds pass rate: 33,599 pps, 3,158,306 bps Last 30 seconds discard rate: 0 pps, 0 bps --Drop tail discard rate: 0 pps, 0 bps --Wred discard rate: 0 pps, 0 bps [af1] Total pass: 670,712 packets, 63,046,928 bytes Total discard: 0 packets, 0 bytes --Drop tail discard: 0 packets, 0 bytes --Wred discard:

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 4 Class-based QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-41

Page 112: 00399154-Configuration Guide - QoS(V300R003_03).pdf

0 pps, 0 bps Last 30 seconds pass rate: 33,600 pps, 3,158,400 bps Last 30 seconds discard rate: 0 pps, 0 bps --Drop tail discard rate: 0 pps, 0 bps --Wred discard rate: 0 pps, 0 bps [af2] Total pass: 58 packets, 5,684 bytes Total discard: 24,478,662 packets, 1,860,378,312 bytes --Drop tail discard: 0 packets, 0 bytes --Wred discard: 0 pps, 0 bps Last 30 seconds pass rate: 33,599 pps, 3,158,306 bps Last 30 seconds discard rate: 0 pps, 0 bps --Drop tail discard rate: 0 pps, 0 bps --Wred discard rate: 0 pps, 0 bps [af3] Total pass: 58 packets, 5,684 bytes Total discard: 478,662 packets, 1,860,378,312 bytes --Drop tail discard: 0 packets, 0 bytes --Wred discard: 0 pps, 0 bps Last 30 seconds pass rate: 0 pps, 0 bps Last 30 seconds discard rate: 0 pps, 0 bps --Drop tail discard rate: 0 pps, 0 bps --Wred discard rate: 0 pps, 0 bps [af4] Total pass: 670,709 packets, 63,046,646 bytes Total discard: 0 packets, 0 bytes --Drop tail discard: 0 packets, 0 bytes --Wred discard: 0 pps, 0 bps Last 30 seconds pass rate: 33,598 pps, 3,158,212 bps Last 30 seconds discard rate: 0 pps, 0 bps --Drop tail discard rate: 0 pps, 0 bps --Wred discard rate: 0 pps, 0 bps [ef] Total pass: 670,712 packets, 63,046,928 bytes Total discard: 353,802 packets, 406,888,952 bytes --Drop tail discard: 0 packets, 0 bytes --Wred discard: 0 pps, 0 bps

4 Class-based QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

4-42 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 113: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Last 30 seconds pass rate: 33,600 pps, 3,158,400 bps Last 30 seconds discard rate: 0 pps, 0 bps --Drop tail discard rate: 0 pps, 0 bps --Wred discard rate: 0 pps, 0 bps [cs6] Total pass: 147 packets, 12,667 bytes Total discard: 0 packets, 0 bytes --Drop tail discard: 0 packets, 0 bytes --Wred discard: 0 pps, 0 bps Last 30 seconds pass rate: 33,599 pps, 3,158,306 bps Last 30 seconds discard rate: 0 pps, 0 bps --Drop tail discard rate: 0 pps, 0 bps --Wred discard rate: 0 pps, 0 bps [cs7] Total pass: 670,708 packets, 63,046,458 bytes Total discard: 0 packets, 0 bytes --Drop tail discard: 0 packets, 0 bytes --Wred discard: 0 pps, 0 bps Last 30 seconds pass rate: 33,599 pps, 3,158,306 bps Last 30 seconds discard rate: 0 pps, 0 bps --Drop tail discard rate: 0 pps, 0 bps --Wred discard rate: 0 pps, 0 bps

Configuration Filesl Configuration file of Router A.

# sysname RouterA#vlan batch 10#interface GigabitEthernet 1/0/0 undo shutdownip address 20.1.1.1 255.255.255.0trust upstream default#interface GigabitEthernet 4/0/0.1ip address 10.1.1.1 255.255.255.0vlan-type dot1q 10trust upstream defaulttrust 802.1p#ospf 1area 0.0.0.0network 20.1.1.0 0.0.0.255 network 10.1.1.0 0.0.0.255#return

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 4 Class-based QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-43

Page 114: 00399154-Configuration Guide - QoS(V300R003_03).pdf

l Configuration file on Router B# sysname RouterB#vlan batch 10#diffserv domain default8021p-inbound 2 phb ef greenip-dscp-outbound ef green map 34#interface GigabitEthernet 2/0/0.1ip address 10.1.1.2 255.255.255.0vlan-type dot1q 10trust upstream default trust 802.1p #interface GigabitEthernet 3/0/0 undo shutdownip address 11.1.1.1 255.255.255.0#ospf 1area 0.0.0.0network 11.1.1.0 0.0.0.255 network 10.1.1.0 0.0.0.255#return

4.5.4 Example for Configuring Priority Mapping Based on theSimple Traffic Classification (MPLS)

Networking Requirements

As shown in Figure 4-4, Router A, Router B, and Router C establish MPLS neighborrelationship. When IP packets reach Router A, it adds MPLS header to the packets. The packetsare then transmitted from Router A to Router C as MPLS packets. When the MPLS packetsreach Router C, Router C removes the MPLS headers and the packets are sent out from RouterC as IP packets.

It is necessary to configure Router A to change the priority of MPLS packets when required.Similarly, it is necessary to configure Router C to change the priority of IP packets at any giventime.

Figure 4-4 Mapping from DSCP priority to MPLS priority

NOTE

l Assume that the three routers in this example have been configured to forward IP packets as MPLSpackets from Router A to Router C, and are sent as IP packets again when they flow out of Router C.

l This example lists only the commands related to the QoS.

4 Class-based QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

4-44 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 115: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Configuration Roadmap

The configuration roadmap is as follows:

1. On the inbound interface POS 1/0/0 of Router A, set the mapping from the IP DSCP fieldto the MPLS EXP field and enable simple traffic classification.

2. On the inbound interface POS 1/0/0 of Router C, set the mapping from the MPLS EXPfield to the IP DSCP field and enable simple traffic classification.

Data Preparation

To complete the configuration, you need the following data:

The MPLS EXP value, internal CoS and color inside the router, and the IP DSCP value

Configuration Procedures1. Configure basic MPLS functions and routes (not mentioned).

For details, see the Chapter "Basic MPLS Configuration" in the Quidway NetEngine80E/40E Router Configuration Guide – MPLS.

2. Set the mapping between DSCP field and EXP field at POS1/0/0 on Router A.<RouterA> system-view [RouterA] diffserv domain default[RouterA-dsdomain-default] ip-dscp-inbound 18 phb af4 green[RouterA-dsdomain-default] mpls-exp-outbound af4 green map 5[RouterA-dsdomain-default] quit[RouterA] interface pos 1/0/0[RouterA-Pos1/0/0] undo shutdown[RouterA-Pos1/0/0] trust upstream default[RouterA] interface pos 2/0/0[RouterA-Pos2/0/0] undo shutdown[RouterA-Pos2/0/0] trust upstream default[RouterA-Pos2/0/0] quit

After the above settings, the AF2 green service (DSCP value 18) is converted into the AF4service on the inbound interface of Router A. On the outbound interface, the AF4 serviceis converted into the EF service of the MPLS service (MPLS priority 5).

3. Set the mapping from MPLS priority 5 to DSCP AF3 at POS1/0/0 on Router C.<RouterC> system-view[RouterC] diffserv domain default[RouterC-dsdomain-default] mpls-exp-inbound 5 phb af3 green[RouterC-dsdomain-default] ip-dscp-outbound af3 green map 32[RouterC] interface pos 1/0/0[RouterC-Pos1/0/0] undo shutdown[RouterC-Pos1/0/0] trust upstream default[RouterC] interface pos 2/0/0[RouterC-Pos2/0/0] undo shutdown[RouterC-Pos2/0/0] trust upstream default[RouterC-Pos2/0/0] quit

Configure the mapping from MPLS priority 5 to AF3 green service on the inbound interfaceof Router C and configure on the outbound interface the conversion from AF3 green serviceto DSCP value 32. The traffic going out of Router C is of AF4.

4. Check the configuration.

After the preceding settings, when POS 1/0/0 on Router A sends packets at 100 Mbit/s withthe DSCP value of 18, Router C outputs packets with the DSCP value of 32 at 100 Mbit/s.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 4 Class-based QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-45

Page 116: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Configuration Filesl Configuration file on Router A

# sysname RouterA#diffserv domain default ip-dscp-inbound 18 phb af4 green mpls-exp-outbound af4 green map 5#interface Pos1/0/0 undo shutdownip address 2.2.2.1 255.255.255.0 trust upstream default#interface Pos2/0/0 undo shutdownip address 3.3.3.1 255.255.255.0 trust upstream default#return

l Configuration file of Router C# sysname RouterC#diffserv domain default ip-dscp-outbound af3 green map 32 mpls-exp-inbound 5 phb af3 green #interface Pos1/0/0 undo shutdownip address 4.4.4.1 255.255.255.0 trust upstream default#interface Pos2/0/0 undo shutdownip address 5.5.5.1 255.255.255.0 trust upstream default#return

4 Class-based QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

4-46 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 117: 00399154-Configuration Guide - QoS(V300R003_03).pdf

5 QPPB Configuration

About This Chapter

This chapter describes concepts and configuration steps of QPPB.

5.1 IntroductionThis section describes the basic concept of QPPB.

5.2 Configuring QPPBThis section describes the configuration procedures of QPPB.

5.3 Configuration ExamplesThis section provides an example for configuring QPPB.

5.4 Maintaining QPPB ConfigurationThis section describes the methods for fault analysis and troubleshooting QPPB.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 5 QPPB Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

5-1

Page 118: 00399154-Configuration Guide - QoS(V300R003_03).pdf

5.1 IntroductionThis section describes the basic concept of QPPB.

5.1.1 QPPB Overview

5.1.2 QPPB Supported by the NE80E/40E

5.1.1 QPPB Overview

The NE80E/40E provides the QoS Policy Propagation through the Border Gateway Protocol(QPPB) feature. With the QPPB feature, the BGP route sender can set community attributes forBGP routes by matching the route with route policies; the BGP route receiver can set trafficbehaviors for BGP routes based on the BGP community attribute, AS path list, ACL number,and prefix list. The traffic behavior, together with the routing information, is delivered to theFIB. The route receiver forwards packets. It then can apply different QoS polices based on thetraffic behavior and local polices for receiving routes.

QPPB configuration involves that on the route sender and that on the route receiver.

l On the BGP route sender, you can set attributes, by matching route polices, for the BGProute to be sent out, such as AS path, community attribute, and extended communityattribute.

l On the BGP route receiver:

l By matching the routing policy for receiving routes, you can set QoS parameters forreceived BGP routes based on the attribute such as AS path, community attribute, andextended community attribute of the routes. The product only supports setting trafficbehaviors for traffic that matches the policy for receiving BGP routes.

l When the BGP route receiver forwards packets, it applies different QoS policies to thepackets according to the associated traffic behavior. Thus, QPPB is carried out.

With the QPPB feature, the BGP route sender can classify routes in advance based on thecommunity attribute; the BGP receiver can apply different QoS policies to BGP routes basedon the community attribute set on the BGP route sender.

In the complex networking environment, the policy for route classification needs to be changedperiodically. QPPB can simplify the process of changing the policy on the BGP receiver. UsingQPPB, you can change the routing policy on the BGP receiver by changing the policy on theBGP sender.

5.1.2 QPPB Supported by the NE80E/40E

NE80E/40E supports traffic classification according to community attributes, ACLs, prefixes,or AS paths and the definition of QoS policies. The reduces the workload of modifyingconfiguration resulting from the frequent change of network structure.

5.2 Configuring QPPBThis section describes the configuration procedures of QPPB.

5.2.1 Establishing the Configuration Task

5 QPPB ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

5-2 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 119: 00399154-Configuration Guide - QoS(V300R003_03).pdf

5.2.2 Configuring the Routing Policy on the BGP Route Sender

5.2.3 Advertising Routing Policy on the Route Sender

5.2.4 Configuring the Traffic Behavior on the Route Receiver

5.2.5 Configuring a Routing Policy to the Route Receiver

5.2.6 Applying a Routing Policy to the Route Receiver

5.2.7 Applying QPPB to the Interface

5.2.8 Checking the Configuration

5.2.1 Establishing the Configuration Task

Application Environment

In the large-scaled complex network, a lot of complex traffic classification must be performedand it is unable to classify packets based on the community attribute, ACL number, prefix, orAS path list. If the network structure is not very stable, it is very difficult to modify the networkconfiguration.

Applying QPPB can decrease the workload for modifying the configuration. QPPB enables theBGP route sender to classify routes in ahead by setting BGP attributes. Thus, the route receiveronly needs to configure BGP route policies when the network topology changes. This simplifiesthe policy modification at the route receiver.

QPPB is applicable to both IBGP and EBGP. So, QPPB can be configured in the same AS oramong different ASs.

As shown in Figure 5-1, Router B is the BGP route sender and Router A is the receiver. RouterB advertises BGP routes that carry the community attribute to Router A. When receiving theBGP route, Router A associates the BGP route with the traffic behavior based on the communitylist number, ACL number, or BGP AS path list. When QPPB is enabled on the inbound interface,the routing policy has an effect on all the traffic that goes into Router A.

Figure 5-1 Networking diagram for applying QPPB

Pre-configuration Tasks

Before configuring QPPB, complete the following tasks:

l Configure the basic functions of BGP

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 5 QPPB Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

5-3

Page 120: 00399154-Configuration Guide - QoS(V300R003_03).pdf

l Configure the local routes advertised by BGP

l Configure the interfaces used for setting up BGP connection

Data PreparationTo configure QPPB, you need the following data.

No. Data

1 Traffic behavior name , DSCP value, IP precedence, CIR, CBS, PIR, and PBS

2 Name of the routing policy

3 Matching rule, ACL number, AS path list, community attribute, route cost, and IPaddress prefix list

5.2.2 Configuring the Routing Policy on the BGP Route Sender

ContextDo as follows on the BGP route sender:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:route-policy route-policy-name { permit | deny } node node-number

The node of the routing policy is created and the policy view is displayed

Step 3 Choose one of the following command to configure the matching rule of the routing policy:l To match ACL rules, run:

if-match acl acl-number.

l To match the AS path list in the BGP route, run:if-match as-path-filter as-path-filter &<1-16>.

l To match the community attribute in the BGP route, run:if-match community-filter { basic-comm-filter-num [ whole-match ] | ext-comm-filter-num } * &<1-16>.

l To match the route cost, run:if-match cost cost.

l To match the IP address prefix list, run:if-match ip-prefix ip-prefix.

Step 4 Choose one of the following command to set the community attribute for BGP routes bymatching the routing policy:

5 QPPB ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

5-4 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 121: 00399154-Configuration Guide - QoS(V300R003_03).pdf

l To set the AS path list number, run:apply as-path as-number &<1-10> [ additive ]

l To set the community attribute, runapply community { [ community-number | aa:nn ] &<1-16> | internet | no-advertise | no-export | no-export-subconfed } * [ additive ]

l To set the route cost, run:apply cost [ + | - ] cost.

AS path list number, community attribute, and the extended community attribute are used to setthe BGP route attribute for the routes that match the routing policy. You need to only configureone of them.

----End

5.2.3 Advertising Routing Policy on the Route Sender

ContextDo as follows on the BGP route sender:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:bgp as-number

The BGP view is displayed.

Step 3 Run:peer { ip-address | group-name } route-policy route-policy-name export

The routing policy is applied to the BGP routes advertised to the peer.

Step 4 Run:peer ip-address advertise-community

The community attribute is advertised to the peer.

By default, BGP does not advertise the community attribute to the peer. When you set QoSpolicies to enable the peers to match the routing policy based on the community attribute, youneed to enable advertising the community attribute to the peer.

----End

5.2.4 Configuring the Traffic Behavior on the Route Receiver

ContextDo as follows on the BGP route sender:

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 5 QPPB Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

5-5

Page 122: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:traffic behavior behavior–name

A traffic behavior is set and the behavior view is displayed.

Step 3 Do as follows as required:l To configured the traffic policing action, run :

car { cir cir-value [ pir pir-value] } [ cbs cbs-value pbs pbs-value ] [ { green { discard | pass [ service-class class color color ] } } | { yellow { discard | pass [ service-class class color color ] } } | {red { discard | pass [ service-class class color color ] } } ]*

l To mark the DSCP value of IP packets, run:remark dscp dscp-value

l To mark the IP precedence of IP packets, run:remark ip-precedence ip-precedence

l To allow matched packets to pass, run:permit

l To deny the matched packets, run:deny

----End

5.2.5 Configuring a Routing Policy to the Route Receiver

ContextA routing policy consists of several nodes and each node consists of multiple if-match andapply clauses.

You can set multiple if-match clauses for each node. The logical relation of the clauses for thesame node is AND. That is, a packet can pass the routing policy only when it matches all theclauses.

The logical relation of the clauses for different nodes is OR. That is, a packet can pass the routingpolicy if it matches one of the nodes.

In step 3, you can choose one or more matching rules according to the type of traffic classificationrequired:l To classify traffic based on ACL list, choose acl acl-number.

l To classify traffic based on AS path list of BGP routes, choose as-path-filter as-path-filter &<1-16>. You can set up to 16 path filters.

l To classify traffic based on the community attribute list of BGP routes (basic or extended),choose community-filter. You can specify up to 16 community attribute lists. You canalso choose whole-match to classify traffic based on all the basic community attribute lists.

l To classify traffic based on the cost of routes, choose cost cost.

5 QPPB ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

5-6 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 123: 00399154-Configuration Guide - QoS(V300R003_03).pdf

l To classify traffic based on the IP address prefix list, choose ip-prefix ip-prefix-name.

In step 4, the specified traffic behavior must be defined in advance.

Do as follows on the BGP route receiver:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:route-policy route-policy-name { permit | deny } node node-number

The node of the routing policy is created and the policy view is displayed.

Step 3 Choose one of the following commands to configure the matching rule on the route receiver forreceiving routes:l To match the AS path list in the BGP route, run

if-match as-path-filter as-path-filter &<1-16>

l To match the community attribute in the BGP route, runif-match community-filter { basic-comm-filter-num [ whole-match ] | ext-comm-filter-num } * &<1-16>

l To match the route cost, runif-match cost cost.

Step 4 Run:apply behavior behavior-name

or

apply ip-precedence precedence-value

The specified traffic behavior or IP precedence is associated with the matched routing policy.

NOTE

The traffic behavior or IP precedence to be associated with the routing policy must be defined in advance.

----End

5.2.6 Applying a Routing Policy to the Route Receiver

ContextDo as follows on the BGP route receiver:

Procedure

Step 1 Run:system-view

The system view is displayed.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 5 QPPB Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

5-7

Page 124: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Step 2 Run:bgp as-number

BGP is run and the BGP view is displayed.

Step 3 Run:peer ip-address route-policy route-policy-name import

The routing policy is applied to the routes received from the peer (route sender).

----End

5.2.7 Applying QPPB to the Interface

ContextQPPB and QoS actions can be applied only to the inbound interface.

The QPPB configured at the outbound interface has an effect on all the packets that match therules.

BGP route in QPPB refers to only public BGP routes. In private networks, QPPB is applied inL3VPN.

Do as follows on the BGP route receiver:

ProcedureStep 1 Run:

system-view

The system view is displayed.

Step 2 Run:interface interface-type interface-number

The specified interface view is displayed.

Step 3 Run:qppb-policy behavior { source | destination }

QPPB is applied to the inbound interface. The router looks up FIB based on the source ordestination IP address to perform traffic behaviors.

----End

5.2.8 Checking the Configuration

In any of the views, use the following display command to check the configuration.

Action Command

Display QPPB display fib verbose [ | { begin | exclude | include } regular-expression ]

If the configuration succeeds, the QosInfo item in the display of FIB information is 0x2000000.Of the information related to the QosInfo item, 0x2 means that the interface on Router A matches

5 QPPB ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

5-8 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 125: 00399154-Configuration Guide - QoS(V300R003_03).pdf

QPPB; 0000001 means that the IP precedence matched based on destination addresses is 1. Thefollowing information is displayed when you run the above command:

[Quidway] display fib verboseFIB Table: Total number of Routes : 1Destination: 66.1.1.1 Mask : 255.255.255.255 Nexthop : 100.1.1.2 OutIf : Pos1/0/0 LocalAddr : 100.1.1.1 LocalMask: 0.0.0.0 Flags : DGU Age : 165sec ATIndex : 0 Slot : 1 LspFwdFlag : 0 LspToken : 0x0 InLabel : NULL OriginAs : 200 BGPNextHop : 2.2.2.2 PeerAs : 200 QosInfo : 0x20000001 OriginQos: 0x0 NexthopBak : 0.0.0.0 OutIfBak : [No Intf] LspTokenBak: 0x0 InLabelBak : NULL LspToken_ForInLabelBak : 0x0 EntryRefCount : 1 rt_ulVlanId : 0x0 rt_ulVlinkBak : NULL

5.3 Configuration ExamplesThis section provides an example for configuring QPPB.

5.3.1 Example for QPPB Configuration

5.3.1 Example for QPPB Configuration

Networking Requirements

As shown in Figure 5-2, Router A and Router B are BGP neighbors. Router B is the sender ofBGP routes, while Router A is the receiver of the BGP route. The BGP route from Router B toRouter A has been configured with community attribute.

The community attributes are set on Router A for BGP routes received from Router B. AfterRouter A receives a BGP route from Router B, it sets the traffic behavior for the imported routeby matching the community attribute using routing policy. Then, it applies the traffic behaviorto all the incoming packets that match the BGP community attribute.

Figure 5-2 Networking diagram of QPPB configuration

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 5 QPPB Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

5-9

Page 126: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Configuration RoadmapThe configuration roadmap is as follows:

1. Configure basic BGP functions.2. On Router B, create a routing policy to set the community attribute of the sent routes;

advertise the routing policy through BGP.3. On Router A, apply the routing policy and set the traffic behavior.4. Enable QPPB on the inbound interface.

Data PreparationTo complete the configuration, you need the following data:

l IP addresses of the interfaces

l Route policy name, matching rules, and route attribute

l Traffic behavior name and the related traffic actions

Configuration Procedure1. Configure basic BGP functions on Router A and Router B.

# Configure the Loopback interface of Router A and that of Router B.<RouterA> system-view[RouterA] interface loopback 0[RouterA-LoopBack0] ip address 1.1.1.1 255.255.255.255[RouterA-LoopBack0] return<RouterB> system-view[RouterB] interface loopback 0[RouterB-LoopBack0] ip address 2.2.2.2 255.255.255.255[RouterB-LoopBack0] quit[RouterB] interface loopback 10[RouterB-LoopBack10] ip address 66.1.1.1 255.255.255.255[RouterB-LoopBack10] return

# Configure the directly connected interfaces between Router A and Router B, and thatbetween Router A and Router C.<RouterA> system-view [RouterA] interface pos 2/0/0[RouterA-Pos2/0/0] undo shutdown[RouterA-Pos2/0/0] ip address 100.1.1.1 255.255.255.0[RouterA-Pos2/0/0] quit[RouterA] interface gigabitethernet 1/0/0 [RouterA-GigabitEthernet1/0/0] undo shutdown[RouterA-GigabitEthernet1/0/0] ip address 200.1.1.2 255.255.255.0[RouterA-GigabitEthernet1/0/0] return<RouterB> system-view [RouterB] interface pos 1/0/0[RouterB-Pos1/0/0] undo shutdown[RouterB-Pos1/0/0] ip address 100.1.1.2 255.255.255.0[RouterB-Pos1/0/0] return<RouterC> system-view[RouterC] interface gigabitethernet1/0/0 [RouterC-GigabitEthernet1/0/0] undo shutdown[RouterC-GigabitEthernet1/0/0] ip address 200.1.1.1 255.255.255.0[RouterC-GigabitEthernet1/0/0] return

# Enable OSPF and advertise the route to the IP address of the interface.<RouterA> system-view[RouterA] ospf[RouterA-ospf-1] area 0

5 QPPB ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

5-10 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 127: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[RouterA-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0[RouterA-ospf-1-area-0.0.0.0] network 100.1.1.0 0.0.0.255[RouterA-ospf-1-area-0.0.0.0] network 200.1.1.0 0.0.0.255[RouterA-ospf-1-area-0.0.0.0] quit[RouterA-ospf-1] return<RouterB> system-view[RouterB] ospf[RouterB-ospf] area 0[RouterB-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0[RouterB-ospf-1-area-0.0.0.0] network 100.1.1.0 0.0.0.255[RouterB-ospf-1-area-0.0.0.0] quit[RouterB-ospf-1] return<RouterC> system-view[RouterC] ospf[RouterC-ospf] area 0[RouterC-ospf-1-area-0.0.0.0] network 200.1.1.0 0.0.0.255[RouterC-ospf-1-area-0.0.0.0] return# Create EBGP connections between Router A and Router B.<RouterA> system-view[RouterA] bgp 100[RouterA-bgp] peer 2.2.2.2 as-number 200[RouterA-bgp] peer 2.2.2.2 ebgp-max-hop 3[RouterA-bgp] peer 2.2.2.2 connect-interface loopback 0[RouterA-bgp] import-route direct[RouterA-bgp] return<RouterB> system-view[RouterB] bgp 200[RouterB-bgp] peer 1.1.1.1 as-number 100[RouterB-bgp] peer 1.1.1.1 ebgp-max-hop 3[RouterB-bgp] peer 1.1.1.1 connect-interface loopback 0[RouterB-bgp] import-route direct[RouterB-bgp] return# Create IGP connections between Router A and Router C<RouterA> system-view[RouterA] bgp 100[RouterA-bgp] peer 200.1.1.1 as-number 100[RouterA-bgp] import-route direct[RouterA-bgp] quit<RouterC> system-view[RouterC] bgp 100[RouterC-bgp] peer 200.1.1.2 as-number 100[RouterC-bgp] import-route direct[RouterC-bgp] quitAfter the said configuration, Router A, Router B, and Router C can communicate.

2. Set the routing policy on the route sender, Router B.# Set the IP prefix.<RouterB> system-view[RouterB] ip ip-prefix bb permit 66.1.1.1 32[RouterB] return# Set the routing policy.<RouterB> system-view[RouterB] route-policy aa permit node 10[RouterB-route-policy] if-match ip-prefix bb[RouterB-route-policy] apply community 10:10[RouterB-route-policy] return# Advertise the routing policy.<RouterB> system-view[RouterB] bgp 200[RouterB-bgp] peer 1.1.1.1 route-policy aa export[RouterB-bgp] peer 1.1.1.1 advertise-community[RouterB-bgp] return

3. On Router A, set the routing policy for receiving BGP routes and apply traffic behaviorsto the traffic that matches the specified community attribute.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 5 QPPB Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

5-11

Page 128: 00399154-Configuration Guide - QoS(V300R003_03).pdf

# Set the QoS policy, that is, traffic behavior.<RouterA> system-view[RouterA] traffic behavior dd[RouterA-behavior-dd] remark ip-precedence 1[RouterA-behavior-dd] return# Set the routing policy for receiving BGP routes and apply the traffic behavior to the routethat matches the community attribute.<RouterA> system-view[RouterA] ip community-filter 10 permit 10:10[RouterA] route-policy aa permit node 10[RouterA-route-policy] if-match community-filter 10[RouterA-route-policy] apply behavior dd[RouterA-route-policy] return# On Router A, apply the routing policy to the routes advertised by Router B.<RouterA> system-view[RouterA] bgp 100[RouterA-bgp] peer 2.2.2.2 route-policy aa import[RouterA-bgp] return

4. On Router A, apply QPPB to the inbound interface.l If the traffic flows from Router B to Router C, configure QPPB on the inbound interface

POS 2/0/0.<RouterA> system-view[RouterA] interface pos 2/0/0[RouterA-Pos2/0/0] qppb-policy behavior source[RouterA-Pos2/0/0] return

l If the traffic flows from Router C to Router B, configure QPPB on the inbound interfaceGE 1/0/0. The configuration for this example is as follows:<RouterA> system-view[RouterA] interface gigabitethernet 1/0/0[RouterA-GigabitEthernet1/0/0] qppb-policy behavior destination[RouterA-GigabitEthernet1/0/0] return

5. Check the configuration.# Display the FIB information on Router A.[RouterA] display fib verboseFIB Table: Total number of Routes : 1Destination: 66.1.1.1 Mask : 255.255.255.255 Nexthop : 100.1.1.2 OutIf : Pos2/0/0 LocalAddr : 100.1.1.1 LocalMask: 0.0.0.0 Flags : DGU Age : 165sec ATIndex : 0 Slot : 1 LspFwdFlag : 0 LspToken : 0x0 InLabel : NULL OriginAs : 200 BGPNextHop : 2.2.2.2 PeerAs : 200 QosInfo : 0x20000001 OriginQos: 0x0 NexthopBak : 0.0.0.0 OutIfBak : [No Intf] LspTokenBak: 0x0 InLabelBak : NULL LspToken_ForInLabelBak : 0x0 EntryRefCount : 1 rt_ulVlanId : 0x0 rt_ulVlinkBak : NULLOf the information related to the QosInfo item, 0x2 means that the interface on Router Amatches QPPB; 0000001 means that the IP precedence matched based on destinationaddresses is 1.

Configuration Filesl Configuration file of Router A

#

5 QPPB ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

5-12 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 129: 00399154-Configuration Guide - QoS(V300R003_03).pdf

sysname RouterA#traffic behavior dd remark ip-precedence 1#interface GigabitEthernet1/0/0undo shutdown ip address 200.1.1.2 255.255.255.0 qppb-policy behavior destination#interface Pos2/0/0undo shutdown link-protocol ppp ip address 100.1.1.1 255.255.255.0 qppb-policy behavior source#interface LoopBack0 ip address 1.1.1.1 255.255.255.255#bgp 100 peer 2.2.2.2 as-number 200peer 2.2.2.2 ebgp-max-hop 3 peer 2.2.2.2 connect-interface LoopBack0peer 200.1.1.1 as-number 100#ipv4-family unicast undo synchronization import-route direct peer 2.2.2.2 enable peer 2.2.2.2 route-policy aa import peer 200.1.1.1 enable #ospf 1 area 0.0.0.0 network 1.1.1.1 0.0.0.0 network 100.1.1.0 0.0.0.255 network 200.1.1.0 0.0.0.255#route-policy aa permit node 10 if-match community-filter 10 apply behavior dd# ip community-filter 10 permit 10:10#return

l Configuration files of Router B# sysname RouterB#interface Pos1/0/0undo shutdown link-protocol ppp ip address 100.1.1.2 255.255.255.0#interface LoopBack0 ip address 2.2.2.2 255.255.255.255#interface LoopBack10 ip address 66.1.1.1 255.255.255.255#bgp 200 peer 1.1.1.1 as-number 100peer 1.1.1.1 ebgp-max-hop 3 peer 1.1.1.1 connect-interface LoopBack0 # ipv4-family unicast undo synchronizationimport-route direct peer 1.1.1.1 enable

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 5 QPPB Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

5-13

Page 130: 00399154-Configuration Guide - QoS(V300R003_03).pdf

peer 1.1.1.1 route-policy aa export peer 1.1.1.1 advertise-community quit#ospf 1 area 0.0.0.0 network 2.2.2.2 0.0.0.0 network 100.1.1.0 0.0.0.255#route-policy aa permit node 10 if-match ip-prefix bb apply community 10:10# ip ip-prefix bb index 10 permit 66.1.1.1 32#return

l Configuration file on Router C# sysname RouterC#interface gigabitethernet1/0/0undo shutdown ip address 200.1.1.1 255.255.255.0#bgp 100 peer 200.1.1.2 as-number 100 # ipv4-family unicast undo synchronization import-route direct peer 200.1.1.2 enable#ospf 1 area 0.0.0.0 network 200.1.1.0 0.0.0.255#return

5.4 Maintaining QPPB ConfigurationThis section describes the methods for fault analysis and troubleshooting QPPB.

5.4.1 Troubleshooting

5.4.1 Troubleshooting

Fault Description

QoS does not take effect on packets according to the QPPB configuration.

Fault Analysis

The possible causes for the fault are as follows:

l BGP routes fail to be received or BGP routes are obtained through other protocols that havea higher precedence than BGP.

l The routing policy is not applied.

l QoS parameters are not delivered to the FIB table.

5 QPPB ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

5-14 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 131: 00399154-Configuration Guide - QoS(V300R003_03).pdf

l The routing policy is wrong.

l No QPPB policy is applied on the interface.

Troubleshooting Procedure1. Use the display ip routing-table command to check whether the route is received. If the

route is not received, there is a fault with BGP. As a result, BGP configuration fails.If the route exists but it is received through other routing protocols, modify the configurationof other routing protocols.

2. Use the display fib command to check whether QoS parameters are delivered correctly. Ifthe parameters are not delivered correctly, the routing policy fails.

3. Use the display current-configuration command to check if the QPPB policy isconfigured correctly on the interface.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 5 QPPB Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

5-15

Page 132: 00399154-Configuration Guide - QoS(V300R003_03).pdf
Page 133: 00399154-Configuration Guide - QoS(V300R003_03).pdf

6 VPN QoS Configuration

About This Chapter

This chapter describes the implementation and configuration of QoS policies in VPN.

6.1 IntroductionThis section describes the basic concepts of VPN QoS.

6.2 Configuring QPPB in L3VPNsThis section describes the procedure of configuring QPPB in an L3VPN.

6.3 Configuring Hierarchical Resource Reserved L3VPNsThis section describes the procedure of configuring a hierarchical resource reserved L3VPN.

6.4 Configuring Hierarchical Resource Reserved L2VPNsThis section describes the procedure of configuring a hierarchical resource reserved L2VPN.

6.5 Example For Configuring VPN QoSThis section provides examples for configuring VPN QoS.

6.6 Maintaining VPN QoS ConfigurationThis section describes the method for the fault analysis and troubleshooting, when QPPB cannotbe used.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-1

Page 134: 00399154-Configuration Guide - QoS(V300R003_03).pdf

6.1 IntroductionThis section describes the basic concepts of VPN QoS.

6.1.1 VPN QoS Overview

6.1.2 VPN QoS Features Supported by the NE80E/40E

6.1.1 VPN QoS Overview

With the development and maturity of Virtual Private Network (VPN) services, service providersand users pose pressing demands on VPN QoS similar to that provided by dedicated physicallines. The NE80E/40Ecombines Multi-protocol Label Switch (MPLS), VPN, Integrated Service(IntServ), and Differentiated Service (DiffServ) features, providing customers with VPN QoSdeployment solutions to the entire network.

QPPB on VPN

To deploy end-to-end QoS services on a VPN, especially on a large and complex network, youneed to configure many attributes related to traffic classification. You are unable to configuretraffic classification according to the community attributes, Access Control List (ACL), prefix,or Autonomous System–path (AS-path). If the network architecture changes frequently, networkadministrators have to make tremendous configurations, which are impractical for them.

You can, however, reduce the workload of configurations by deploying the QoS PolicyPropagation through the Border Gateway Protocol (QPPB) on the Layer 3 VPN (L3VPN). Withthe QPPB technology, the BGP route sender can classify routes by setting BGP attributes inadvance; the BGP route receiver can use different local QoS policies on BGP routes accordingto the attributes set by the BGP route sender. As a result, in a complex networking environment,when the network topology changes, the route receiver only needs to change the routing policieson the BGP route sender, making the configuration simpler.

Resource Reserved VPN

MPLS TE tunnels can provide VPN services with guaranteed QoS. Sometimes multiple VPNsshare the same MPLS TE tunnel, but VPNs demand different resources. When a tunnel carriesExpedited Forwarding (EF), Assured Forwarding (AF), and Best-Effort (BE) services at thesame time, these services interference each other. When VPNs compete for the resources, theservice quality decreases. For example, if one VPN is attacked, other VPNs cannot communicatenormally.

To solve this problem, you can set up a dedicated MPLS TE tunnel with guaranteed QoS foreach CE-to-CE connection. In this mode, however, the backbone network needs many LabelSwitching Paths (LSPs), resulting in resources waste.

The resource reserved VPN can solve the preceding problem. The resource reserved VPN canidentify both VPN users in an MPLS TE tunnel and services of a VPN user, provides VPNsusers with reasonable bandwidth, and thus end-to-end QoS.

6.1.2 VPN QoS Features Supported by the NE80E/40E

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-2 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 135: 00399154-Configuration Guide - QoS(V300R003_03).pdf

QPPB on VPNAs a QoS policy, QPPB on L3VPN can transmit private network routes through BGP. Thisextends QPPB application in L3VPN. The policy of QPPB on L3VPN can be applied to VPNinstances and VPNv4. When QPPB is implemented on the private network route of a specificVPN instance, the inbound and outbound routing policy should be implemented on the VPNinstance. If QPPB is implemented on the private network route of all VPN instances, the inboundand outbound routing policy should be applied to VPNv4 neighbors of BGP, as shown in Figure6-1.

Figure 6-1 Networking diagram of QPPB on L3VPN

PE1 is connected with CE1 and CE2, and PE2 is connected with CE3 and CE4. CE1 and CE3are located in VPN1, and CE2 and CE4 are located in VPN2.

The process of implementing QPPB on L3VPN in the VPN instance is as follows:

l Use the outbound routing policy for VPN1 instance to set the community attribute of VPNroutes from CE1. Then PE1 can send the VPN routes to PE2 when PE1 receives the routefrom CE1.

l After PE2 receives the VPN routes sent from PE1, it sets traffic behavior for the VPN routesto CE3 by matching the inbound routing policy of VPN1 instance when it imports the routesto its local VPN routing table.

The process for implementing VPN QoS in the VPNv4 is as follows:

l When PE1 sends VPNv4 routes to PE2, it sets the community attribute for the routes byusing the outbound routing policy for its VPNv4 neighbors.

l After PE2 receives the VPNv4 routes from PE1, it sets traffic behavior for the routes bymatching the inbound routing policy for its VPNv4 neighbors.

Hierarchical Resource Reserved VPNThe NE80E/40Esupports hierarchical resource reserved VPNs. The routers can allocatebandwidth resources for different VPNs, or services of different priorities from the same VPN,over one MPLS TE tunnel. This solves the problems of service interference and bandwidthcompetition over one MPLS TE tunnel and provides VPN users with end-to-end QoS guarantee.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-3

Page 136: 00399154-Configuration Guide - QoS(V300R003_03).pdf

The hierarchical resource reserved VPN adopts the tunnel multiplex technology.

l To solve the problem of resources competition among multiple VPNs sharing one MPLSTE tunnel between two provider edge routers (PEs), configure traffic policing on theinbound interface of an MPLS TE tunnel for each VPN. To provide services for a VPNuser, a service provider signs a QoS service agreement with the user to specify thebandwidth required by the VPN user.

l To solve the problem of interference among services of VPN users, classify the traffic fromVPN users and arrange the different types of traffic into the corresponding queues, whichare provided with committed bandwidths.

l To solve the problem of resources competition between VPN traffic and non-VPN trafficin an MPLS TE tunnel, configure committed bandwidths for MPLS TE tunnels and all VPNtraffic. The total bandwidth of an MPLS TE tunnel is the sum of both the bandwidth of allVPN traffic and that of the non-VPN traffic.

l The traffic from different VPNs is implemented with statistical multiplexing. If the trafficof one VPN does not occupy all the preset bandwidth, traffic of other VPNs can use theremaining bandwidth.

Figure 6-2 Principle diagram for hierarchical resource reserved VPNs

As shown in Figure 6-2, PE1 and PE2 connect the two VPNs (VPN A and VPN B). CE1 andCE3 are in VPN A, and CE2 and CE4 are in VPN B. VPN A and VPN B share the tunnel betweenPE1 and PE2.

Suppose the total configured bandwidth of the tunnel is 10 Mbit/s. VPN A needs a bandwidthof 2 Mbit/s and VPN B needs a bandwidth of 3 Mbit/s. The remaining bandwidth for non-VPNtraffic is 5 Mbit/s. The voice services in VPN A demand short latency; these service packets arearranged into the EF queue for privileged scheduling and are provided with 1 Mbit/s committedbandwidth. When no voice services exist, video or other data services are allowed to use the freebandwidth preset for voice services. You can configure hierarchical resource reserved VPNs sothat the bandwidths of VPN A and VPN B, and the bandwidth for the voice services in VPN Aare all guaranteed.

The resource reserved VPN also supports TE Fast Reroute (FRR), hot backup of active/standbyLabel Switch Paths (LSPs), and Bidirectional Forwarding Detection (BFD) of active/standbyLSPs.

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-4 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 137: 00399154-Configuration Guide - QoS(V300R003_03).pdf

NOTE

In the case of Label Distribution Protocol (LDP) over TE, even though the bandwidth of an MPLS TEtunnel is limited, the LDP traffic in the MPLS tunnel is not limited.

The resource reserved VPN enables one MPLS TE tunnel to transport L3VPN, VLL, and VPLS servicesat the same time, with the bandwidth resources being reserved.

Introduction to MPLS DiffServ ModelsThe DSCP field (6 bits) in the header of the IP packet is used to define the Class of Service(CoS). In the MPLS label, the EXP field (3 bits) is also used to define the CoS. See Figure6-3.

Figure 6-3 The DSCP field in the IP packet and the EXP field in the MPLS packet

In the MPLS DiffServ model, packets are processed in the following steps:

l When a packet enters the MPLS network, a label is added to the packet. The DSCP fieldin the packet is copied to the EXP field.

l In the MPLS network, the PHB is chosen according to the EXP value in the packet. EachEXP value is mapped with a PHB.

l When the packet leaves the MPLS network, the label is stripped. Then, the PHB is chosenaccording to the DSCP or EXP field. Each DSCP value is also mapped with a PHB.

The MPLS DiffServ model defines the following factors for the packets that pass through anMPLS network: the manner in which the DSCP field and the EXP field are propagated and PHBsuch as CoS and color after the packet leaves the MPLS network. Thus, transmission withdifferentiated QoS is carried out.

In the RFC 3270, three MPLS DiffServ models are defined: Uniform, Pipe, and Short Pipe.

l Uniform ModelThe ingress PE adds a label to the packet by copying the DSCP value to the EXP field. Ifthe EXP value is changed in the MPLS network, the change affects the PHB adopted whenthe packet leaves the MPLS network. That is, the egress PE adopts the PHB according tothe EXP value. See Figure 6-4.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-5

Page 138: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Figure 6-4 Uniform model

l Pipe ModelIn the Pipe model, the user-defined CoS and color together determine the EXP value thatis added to the MPLS label by the ingress PE. The default mapping between the CoS valueand the EXP value is shown in Table 6-1. If the EXP value is changed in the MPLS network,the change is valid only in the MPLS network. The egress PE selects the PHB accordingto the EXP value. When the packet leaves the MPLS network, the DSPC value becomeseffective again. See Figure 6-5.

NOTE

The Pipe model does not support the Penultimate Hop Popping of the MPLS label.

Table 6-1 Default mapping between the CoS value and the EXP value

Service Color MPLS EXP

BE Green 0

AF1 Green, Yellow, Red 1

AF2 Green, Yellow, Red 2

AF3 Green, Yellow, Red 3

AF4 Green, Yellow, Red 4

EF Green 5

CS6 Green 6

CS7 Green 7

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-6 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 139: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Figure 6-5 Pipe model

l Short Pipe ModelIn the Short Pipe model, the user-defined CoS and color together determine the EXP valuethat is added to the MPLS label by the ingress PE. If the EXP value is changed in the MPLSnetwork, the change is valid only in the MPLS network. The egress PE selects the PHBaccording to the DSCP value. When the packet leaves the MPLS network, the DSPC valuebecomes effective again. See Figure 6-6.

Figure 6-6 Short Pipe model

End-to-End VPN QoS SolutionsThe NE80E/40E s provide customers with end-to-end VPN QoS solutions.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-7

Page 140: 00399154-Configuration Guide - QoS(V300R003_03).pdf

l Implement the simple traffic classification, forcible traffic classification, or complex trafficclassification of VPN service packets on the user interface side of an ingress PE. The trafficflowing through each inbound interface is configured to go to a subscriber queue (SQ). Thetraffic of each priority is configured to go to a flow queue (FQ). In this manner, traffic fromdifferent VPNs and traffic of different services from the same VPN are identified andscheduled with different priorities.

l Perform traffic policing on the network side of an ingress PE over the traffic coming fromVPN users and flowing through the MPLS TE tunnel and allocate SQs for VPNs in anMPLS TE tunnel.

l Add MPLS labels on an ingress PE to map the precedence of an IP packet to the EXP fieldof an MPLS label. Mappings are either in the Uniform model or in the Pipe (or Short Pipe)model.

NOTE

When both the simple traffic classification and the Pipe (or Short Pipe) model are configured, the Pipe (orShort Pipe) model takes effect.

l Provide committed bandwidths on an ingress PE for traffic from different VPNs that flowinto one MPLS TE tunnel and traffic of different services from the same VPN that flowinto one MPLS TE tunnel.

l Implement the mapping of MPLS EXP and DSCP of IP packets according to the configuredmapping model on an egress PE. Perform priority scheduling and traffic shaping over thetraffic on the interface of the user side.

l Perform differentiated queue scheduling according to the EXP field of the MPLS label onthe P node.

6.2 Configuring QPPB in L3VPNsThis section describes the procedure of configuring QPPB in an L3VPN.

6.2.1 Establishing the Configuration Task

6.2.2 Configuring a Routing Policy on the BGP Route Sender

6.2.3 Advertising a Routing Policy on the Route Sender

6.2.4 Configuring a Traffic Behavior on the Route Receiver

6.2.5 Configuring a Routing Policy on the Route Receiver

6.2.6 Applying a Routing Policy on the Route Receiver

6.2.7 Applying QPPB on the Interface

6.2.8 Checking the Configuration

6.2.1 Establishing the Configuration Task

Applicable EnvironmentTo deploy end-to-end QoS services in the large-scale VPN network as shown in Figure 6-7,complex traffic classification is necessary. In addition, it is unable to classify packets based onthe community attributes. If the network structure is not very stable, it is very difficult to modifythe network configuration.

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-8 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 141: 00399154-Configuration Guide - QoS(V300R003_03).pdf

In this case, applying QPPB on L3VPN can decrease the workload for modifying theconfiguration. QPPB enables the BGP route sender to classify routes in ahead by setting BGPattributes. Thus, the route receiver only needs to configure BGP routing policies when thenetwork topology changes. This simplifies the policy modification at the route receiver.

QPPB on L3VPN can carry out both the outbound policy of routes on the public network andthat of the VPN routes.

It applies to both VPN instance and VPNv4, but it can be configured only on L3VPN.

When configuring QPPB on L3VPN, note the following:

l To advertise all the routing policy of PE1, advertise the policy in the BGP VPNv4.

l To advertise the routing policy of PE1 for a specific VPN instance, advertise the policyonly in that VPN instance. In addition, advertise the community attribute in the VPNv4view to the peers.

Figure 6-7 Typical networking for QPPB on L3VPN

Pre-configuration Tasks

Before configuring QPPB on L3VPN, complete the following tasks:

l Configuring the physical parameters and link attributes to ensure normal operation of theinterfaces

l Configuring the basic BGP functions

l Configuring the local routes advertised by BGP

l Configuring the interfaces used for setting up BGP connections

l Configuring the BGP/MPLS IP VPN to carry out communication on the L3VPN

l Configuring ACLs, AS path list, IP prefix list, or community attribute list.

Data Preparation

To configure QPPB on L3VPN, you need the following data.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-9

Page 142: 00399154-Configuration Guide - QoS(V300R003_03).pdf

No. Data

1 Routing policy name

2 ACL number, AS path list number, community attribute list number, route cost, andIP prefix list number

3 Traffic behavior name, committed information rate (CIR), committed burst size(CBS), peak information rate (PIR), and peak bust size (PBS)

6.2.2 Configuring a Routing Policy on the BGP Route Sender

ContextAs shown in Figure 6-7, configure PE1 as follows:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:route-policy route-policy-name { permit | deny } node node-number

The node of the routing policy is created and the policy view is displayed

Step 3 Choose one of the following commands to configure the matching rule of the routing policy:l To match ACL rules, run:

if-match acl acl-number.

l To match the AS path list in the BGP route, run:if-match as-path-filter as-path-filter &<1-16>.

l To match the community attribute in the BGP route, run:if-match community-filter { basic-comm-filter-num [ whole-match ] | ext-comm-filter-num } * &<1-16>.

Orif-match community-filter comm-filter-name [ whole-match ]

l To match the route cost, run:if-match cost cost.

l To match the IP address prefix list, run:if-match ip-prefix ip-prefix.

Step 4 Choose one of the following commands to set the community attribute for BGP routes bymatching the routing policy:l To set the AS path list number, run:

apply as-path as-number &<1-10> [ additive ].

l To set the community attribute, run:

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-10 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 143: 00399154-Configuration Guide - QoS(V300R003_03).pdf

apply community { [ community-number | aa:nn ] &<1-16> | internet | no-advertise | no-export | no-export-subconfed } * [ additive ].

l To set the route cost, run:apply cost [ + | - ] cost.

l To set the extended community attribute, run:apply extcommunity rt { as-number : nn | ipv4-address : nn } [ additive ]

AS path list number, community attribute, and the extended community attribute are used to setthe BGP route attribute for the routes that match the routing policy. You need to configure onlyone of them.

----End

6.2.3 Advertising a Routing Policy on the Route Sender

ContextNOTE

l To advertise all the routing policies of PE1, advertise them in the BGP VPNv4.

l To advertise the routing policy of PE1 for a specific VPN instance, advertise the policy only in thatVPN instance. In addition, advertise the community attribute in the VPNv4 view to the peers.

Procedurel Advertising the routing policy in the BGP VPNv4 view

NOTE

Before the following configuration, set up the peer relationship in the BGP VPNv4 sub-address view.

As shown in Figure 6-7, configure PE1 as follows:

1. Run:system-view

The system view is displayed.2. Run:

bgp as-number

BGP is run and the BGP view is displayed.3. Run:

ipv4-family vpnv4 [ unicast ]

The BGP VPNv4 sub-address family view is displayed.4. Run:

peer ip-address route-policy policy-name export

The routing policy for advertising VPNv4 routes to the peer PE2 is set.5. Run:

peer ip-address advertise-community

The community attribute is advertised to the peer.

By default, BGP does not advertise the community attribute to the peer. When youset QoS policies to enable the peers to match the routing policy based on thecommunity attribute, you need to enable advertising the community attribute to the

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-11

Page 144: 00399154-Configuration Guide - QoS(V300R003_03).pdf

peer. For detailed configuration, refer to the method for advertising routing policiesin the BGP VPNv4 view.

l Advertising the routing policy in the VPN instance view

As shown in Figure 6-7, configure PE1 as follows:

1. Run:system-view

The system view is displayed.2. Run:

ip vpn-instance vpn-instance-name

The VPN instance view is displayed.3. Run:

export route-policy route-policy-name

The specified routing policy is applied to the VPN instance advertised by the peerPE2.

When a routing policy is advertised in the VPN instance view, the local BGPcommunity attribute must be advertised in the BGP VPNv4 view to the peer.

----End

6.2.4 Configuring a Traffic Behavior on the Route Receiver

ContextAs shown in Figure 6-7, configure PE2 as follows:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:traffic behavior behavior–name

A traffic behavior is defined and the traffic behavior view is displayed.

Step 3 Do as follows as required:l To set the traffic policing action, run:

car { cir cir-value [ pir pir-value] } [ cbs cbs-value pbs pbs-value ] [ green { discard | pass [ service-class class color color ] } | yellow { discard | pass [ service-class class color color ] } | red { discard | pass [ service-class class color color ] } ]*

l To allow all the matched packets to pass, run:permitTo deny all the matched packets, run:deny.

l To set the precedence of IP packets again, run:

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-12 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 145: 00399154-Configuration Guide - QoS(V300R003_03).pdf

remark ip-precedence ip-precedence.l To set the DSCP value of IP packets again, run:

remark dscp dscp-value.

----End

6.2.5 Configuring a Routing Policy on the Route Receiver

ContextAs shown in Figure 6-7, configure PE2 as follows:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:route-policy route-policy-name { permit | deny } node node-number

The routing policy is created and the policy view is displayed

Step 3 Choose one of the following commands to configure the matching rule on the route receiver forreceiving routes:l To match the AS path list in the BGP route, run:

if-match as-path-filter as-path-filter &<1-16>.l To match the community attribute in the BGP route, run:

if-match community-filter { basic-comm-filter-num [ whole-match ] | ext-comm-filter-num } * &<1-16>.

l To match the route cost, run:if-match cost cost.

NOTEThe route attribute of the BGP routes received by the BGP receiver must be the same as that advertised bythe BGP sender.

Step 4 Run:apply behavior behavior-name

The specified traffic behavior is associated with the matched routing policy.

NOTEThe traffic behavior to be associated with the routing policy must be defined in advance.

A routing policy consists of several nodes and one of the nodes consists of multiple if-matchand apply clauses.

You can set multiple if-match clauses for one node. The logical relation of the clauses for thesame node is AND. That is, a packet can pass the routing policy only when it matches all theclauses.

The logical relation of the clauses for different nodes is OR. That is, a packet can pass the routingpolicy if it matches any one of the clauses.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-13

Page 146: 00399154-Configuration Guide - QoS(V300R003_03).pdf

In step 3, you can choose one or more matching rules as per the requirements of the trafficclassification:l To classify traffic based on ACL list, choose acl acl-number.

l To classify traffic based on AS path list of BGP routes, choose as-path-filter as-path-filter &<1-16>. You can set up to 16 path filters.

l To classify traffic on the basis of community attribute list of BGP routes (basic or extended),choose community-filter. You can specify up to 16 community attribute lists. You can alsochoose whole-match to classify traffic based on all the basic community attribute lists.

l To classify traffic based on the cost of routes, choose cost cost.

l To classify traffic based on the IP address prefix list, choose ip-prefix ip-prefix-name.

In step 4, the specified traffic behavior must be defined in advance.

----End

6.2.6 Applying a Routing Policy on the Route Receiver

ContextNOTE

l To apply a routing policy to all received routes of all the VPN instances on PE1, you can apply therouting policy in the BGP VPNv4 view.

l To apply a routing policy to the received routes of a specific VPN instance, you can apply the routingpolicy only to that VPN instance.

Procedurel Applying a routing policy in the BGP VPNv4 view

As shown in Figure 6-7, configure PE2 as follows:

1. Run:system-view

The system view is displayed.2. Run:

bgp as-number

BGP is run and the BGP view is displayed.3. Run:

ipv4-family vpnv4 [ unicast ]

The BGP VPNv4 sub-address family view is displayed.4. Run:

peer ip-address route-policy policy-name import

The routing policy is applied to all BGP VPNv4 routes received from peer PE1.l Applying a routing policy in the VPN instance view

As shown in Figure 6-7, configure PE2 as follows:

1. Run:system-view

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-14 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 147: 00399154-Configuration Guide - QoS(V300R003_03).pdf

The system view is displayed.2. Run:

ip vpn-instance vpn-instance-name

The VPN instance view is displayed.3. Run:

import route-policy route-policy-name

The routing policy is applied to the received routes of that VPN instance.

If you apply a routing policy to VPNv4 and another to a VPN instance at the sametime, the policy that is actually applied is the combination of the two policies.

----End

6.2.7 Applying QPPB on the Interface

ContextAs shown in Figure 6-7, configure PE1 as follows:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:interface interface-type interface-number

The specified interface view is displayed.

Step 3 Run:qppb-policy behavior { source | destination }

QPPB is applied. The router looks up FIB based on the source or destination IP address to findtraffic behaviors.

NOTEThe key words destination and source indicate the traffic direction in which QPPB is applied. For example,PE1 shown in Figure 6-7 advertises routes that carry route attributes to PE2; PE2 applies traffic behaviorsto all matched traffic.

l If the traffic flows from PE1 to PE2, run the qppb-policy behavior source command on the inboundinterface.

l If the traffic flows from PE2 to PE1, run the qppb-policy behavior destination command on theoutbound interface.

QPPB and QoS actions can be applied only to the inbound interface.

The QPPB configured at the outbound interface has an effect on all the packets that match therules.

BGP route in QPPB refers to only public BGP routes. In private networks, QPPB is applied inL3VPN.

----End

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-15

Page 148: 00399154-Configuration Guide - QoS(V300R003_03).pdf

6.2.8 Checking the Configuration

In any view, use the following display command to view the operating information about QPPBon L3VPN and check the configuration. For description of the operating information, refer to"IP Service Commands" in the Quidway NetEngine80E/40E Router Command Reference.

Action Command

Display QPPB on L3VPN. display fib vpn-instance vpn-instance-name ip-addressverbose

Check information on routingpolicies.

display route-policy [ route-policy-name ]

If the configuration succeeds, the QosInfo item in the display of FIB information is0x20000001. The following information is displayed when you run the above command:

<Quidway> display fib vpn-instance vpn1 172.11.10.0 verboseDestination: 172.11.10.0/24 Mask : 255.255.255.0 Nexthop : 22.22.22.22 OutIf : NULL0 LocalAddr : 100.1.1.1 LocalMask: 255.255.255.0 Flags : DGU Age : 928sec ATIndex : 0 Slot : 1 LspFwdFlag : 1 LspToken : 0x2E001 InLabel : 1024 OriginAs : 0 BGPNextHop : 22.22.22.22 PeerAs : 300 QosInfo : 0x20000001 OriginQos: 0x0 NexthopBak : 0.0.0.0 OutIfBak : [No Intf] LspTokenBak: 0x0 InLabelBak : 0 LspToken_ForInLabelBak : 0x0 LspTokenBak_ForInLabelBak : 0x0 EntryRefCount

6.3 Configuring Hierarchical Resource Reserved L3VPNsThis section describes the procedure of configuring a hierarchical resource reserved L3VPN.

6.3.1 Establishing the Configuration Task

6.3.2 Configuring a Flow Queue

6.3.3 (Optional) Enabling an L3VPN to Support DiffServ Models

6.3.4 (Optional) Configuring a Class Queue

6.3.5 Configuring a Tunnel Policy and Apply It to a VPN Instance

6.3.6 Configuring a Bandwidth for an MPLS TE Tunnel

6.3.7 Binding an MPLS TE Tunnel to a VPN Instance and Specifying a QoS Policy

6.3.8 Checking the Configuration

6.3.1 Establishing the Configuration Task

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-16 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 149: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Applicable EnvironmentIn an L3VPN environment, sometimes multiple VPNs share one MPLS TE tunnel. This mayresult in the following problems: VPNs compete for resources. Services of high priorities froma VPN are not provided with guaranteed bandwidth so that packets are discarded improperly.

l In an MPLS TE tunnel, non-VPN traffic preempts the bandwidth for VPN traffic.

l In an MPLS TE tunnel, VPN traffic demands different supplies of resources. To solve theproceeding problems, you need to configure the hierarchical resource reserved L3VPN.

The hierarchical resource reserved L3VPN enables a device to reserve bandwidth resources fordifferent VPNs or for services of different priorities from the same VPN in one MPLS TE tunneland separate the bandwidth resources among them. This solves the problems of serviceinterference and bandwidth preemption in one MPLS TE tunnel and provides VPN users withend-to-end QoS guarantee.

NOTE

l The hierarchical resource reserved L3VPN is configured on an ingress PE device. After the specifiedconfiguration, you can further configure interface-specific HQoS on the interface of the user side onthe egress PE.

l Network traffic is bi-directional; therefore, you can configure hierarchical resource reserved L3VPNfor the opposite traffic on the peer PE.

Pre-configuration TasksBefore configuring the hierarchical resource reserved L3VPN, complete the following tasks:

l Configuring the physical parameters and link attributes to ensure normal operation of theinterfaces.

l Configuring an MPLS TE tunnel between PEsFor details, refer to "MPLS TEConfiguration" in the Quidway NetEngine80E/40E Router Configuration Guide –MPLS.

l Configuring BGP/MPLS IP VPN to enable normal communications between L3VPNs. Fordetails, refer to "BGP MPLS IP VPN Configuration" in the Quidway NetEngine80E/40ERouter Configuration Guide – VPN.

l Configuring the simple traffic classification or complex traffic classification on theinterface on the user side of the ingress PE. For details, refer to "Class-based QoSConfiguration" in the Quidway NetEngine80E/40E Router Configuration Guide – QoS.

NOTE

In configuration of the hierarchical resource reserved VPN, the simple traffic classification configurationis an optional pre-configuration task.

l If both the simple traffic classification and the Pipe (or Short Pipe) model are configured on the interfaceon the user side of an ingress PE, the L3VPN prefers the Pipe (or Short Pipe) model.

l If you have configured the L3VPN to support the Pipe model, you are unnecessary to configure thesimple traffic classification.

l If you configure the L3VPN to support the Short Pipe model, it is recommended that you configurethe simple traffic classification. The reason is that the egress PE performs queue scheduling accordingto the original DSCP value.

Data PreparationTo configure the hierarchical resource reserved L3VPN, you need the following data.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-17

Page 150: 00399154-Configuration Guide - QoS(V300R003_03).pdf

No. Data

1 Parameters for flow-wred packet discarding, flow-queue scheduling algorithm, andparameters for flow-queue scheduling

2 (Optional) CoS and color for IP packets when the system is in a DiffServ model

3 (Optional) Port-wred parameters of class queues, scheduling algorithms andparameters of class queues, and shaping values

4 Names and parameters of tunnel policies

5 Bandwidth of the MPLS TE tunnel and the flow-queue template

6 CIR and PIR for the VPN and referenced flow-queue template

6.3.2 Configuring a Flow Queue

ContextFlow queues to be configured are divided into VPN flow queues and non-VPN flow queues onMPLS TE tunnels.

l In terms of VPN flow queues, VPN traffic is organized into queues according to the servicepriorities resulting from the simple traffic classification or the complex trafficclassification. The VPN service packets of different priorities are then provided withproportional bandwidths.

l Non-VPN flow queues in MPLS TE tunnels accept non-VPN packets of different prioritiesin MPLS TE tunnels. As a result, the non-VPN packets of different priorities are thenprovided with proportional bandwidths.

l The VPN packets and non-VPN packets in the MPLS TE tunnels can be either configuredwith the same flow queue or configured separately.

l If you do not configure flow queues for the VPN packets and non-VPN packets in the MPLSTE tunnel, the system uses the default flow-queue template. It is recommended that youconfigure flow queues according to the actual conditions.

For detailed information about flow queues, refer to the Quidway NetEngine80E/40E RouterConfiguration Guide – QoS.

Do as follows on the ingress PE device where resources are reserved:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:flow-wred flow-wred-name

A flow WRED object is created and the flow WRED view is displayed.

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-18 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 151: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Step 3 Run:color { green | yellow | red } low-limit low-limit-value high-limit high-limit-value discard-percentage discard-percentage-value

A flow WRED object is configured and the upper limit, the lower limit, and the discardingprobability are set for packets of different colors.

NOTE

l If you do not configure a flow WRED object, the system uses the default tail-drop policy.

l You can create multiple flow WRED objects for being referenced by flow queues as required. You canconfigure up to 127 flow WRED objects in the system.

Step 4 Run:quit

You return to the system view.

Step 5 Run:flow-queue flow-queue-name

The flow queue view is displayed.

Step 6 Run:queue cos-value { [ pq | wfq weight weight-value | lpq ] | shaping shaping-value | flow-wred wred-name } *

A flow queue is configured and a scheduling policy is set for queues of different priorities.

NOTE

You can configure scheduling parameters in one flow-queue template for the eight flow queues of asubscriber respectively.

If you do not configure a flow-queue template, the system uses the default flow-queue template. The defaultflow-queue template contains the following parameters:

l By default, the system performs PQ on the flow queues with the priorities of ef, cs6, and cs7.

l The system defaults the flow queues with the priorities of be, af1, af2, af3, and af4 to WFQ. Thescheduling weight is 10:10:10:15:15.

l The default shaping value is the maximum bandwidth of the interface.

l The default discarding policy is the tail drop.

----End

6.3.3 (Optional) Enabling an L3VPN to Support DiffServ Models

Context

Do as follows on the ingress PE device where resources are reserved:

Procedure

Step 1 Run:system-view

The system view is displayed.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-19

Page 152: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Step 2 Run:ip vpn-instance vpn-instance-name

A VPN instance is created and the VPN instance view is displayed.

Step 3 Run:diffserv-mode { pipe service-class color | short-pipe service-class color [ domain ds-name ] | uniform }

A DiffServ model for a VPN instance is set.

NOTE

l Enabling the L3VPN to support the DiffServ model is an optional setting. You can perform thisconfiguration according to the actual conditions of networks. If you do not enable VPNs to support aspecific DiffServ model, the system defaults the Uniform model.

l If the DiffServ model is set to Uniform, you need to configure simple traffic classification. Otherwise,this configuration does not take effect.

l When both the simple traffic classification and the Pipe or Short Pipe model are configured, the Pipeor Short Pipe model takes effect.

The three DiffServ models are Pipe, Short Pipe, and Uniform.l If the Pipe model is set for a VPN, the EXP value of the MPLS label pushed on the ingress

PE device is determined by both the class of service (CoS) and the color specified by users.After an MPLS label is popped out by the egress PE device, the DSCP value of an IP packetis not changed. Then the EXP value of the MPLS label determines the packet forwardingbehavior of the egress node.

l If the Short Pipe model is set for a VPN, the EXP value of the MPLS label pushed on theingress PE device is determined by both the CoS and the color specified by users. After anMPLS label is popped out by the egress PE device, the DSCP value of an IP packet is notchanged. Then the DSCP value of the IP packet determines the packet forwarding behaviorof the egress node.

l If the Uniform model is set for a VPN, the EXP value of the MPLS label pushed on theingress PE device is determined by the mapped DSCP value of an IP packet. After an MPLSlabel is popped out by the egress PE device, the EXP value is mapped as the DSCP value ofan IP packet. Then the mapped DSCP value of the IP packet determines the packet forwardingbehavior of the egress node. The default model is Uniform.

When you configure a DiffServ model,l If you want the MPLS network to differentiate service priorities, you can choose the Uniform

model.l If you do not want the MPLS network to differentiate service priorities, you can choose the

Pipe or Short Pipe model.

----End

6.3.4 (Optional) Configuring a Class Queue

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-20 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 153: 00399154-Configuration Guide - QoS(V300R003_03).pdf

ContextNOTE

l This step is optional. It is recommended, however, that you configure the scheduling and bandwidthlimits for class queues so that packets are not dropped when the public network is congested. The reasonis that packets sent from the interface, of an ingress PE device, on the network side can be VPN packets,non-VPN packets, MPLS TE packets, and non-MPLS TE packets.

l If the packets of one VPN access the ingress from multiple sites, you need to configure the class queueto avoid congestion on the public network.

l For detailed information about class queues, refer to "HQoS Configuration" in the QuidwayNetEngine80E/40E Router Configuration Guide – QoS.

Do as follows on the interface on the network side of the ingress PE device where resources arereserved:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:port-wred port-wred-name

A port WRED object is created and the port WRED view is displayed.

Step 3 Run:color { green | yellow | red } low-limit low-limit-value high-limit high-limit-value discard-percentage discard-percentage-value

A WRED object for a class queue is configured and the upper limit, the lower limit, and thediscarding probability are set for packets of different colors.

NOTE

l If you do not configure a WRED object for a class queue, the system uses the default tail-drop policy.

l You can create multiple port-wred objects for being referenced by class queues as required. The systemprovides one port-wred object. You can configure a maximum of seven more port-wred objects.

Step 4 Run:quit

You return to the system view.

Step 5 Run:interface interface-type interface-number

The interface view is displayed.

Step 6 Run:port-queue cos-value { { pq | wfq weight weight-value | lpq} | shaping { shaping-value | shaping-percentage shaping-percentage-value } | port-wred wred-name } * outbound

A class queue is configured and a scheduling policy is set for queues of different priorities.

You can configure scheduling parameters for eight class queues respectively on one interface.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-21

Page 154: 00399154-Configuration Guide - QoS(V300R003_03).pdf

If you do not configure a class queue template, the system uses the default class queue template.The default class queue template contains the following parameters:

l By default, the system performs PQ on the prioritized class queues ef, cs6, and cs7.

l The system defaults the scheduling algorithm of the prioritized class queues be, af1, af2, af3,and af4 to WFQ. The scheduling weight is 10:10:10:15:15.

l The default shaping value is the maximum bandwidth of the interface.

l The default discarding policy is the tail drop.

----End

6.3.5 Configuring a Tunnel Policy and Apply It to a VPN Instance

Context

Do as follows on the ingress PE device where resources are reserved:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:tunnel-policy policy-name

A tunnel policy is created and the tunnel policy view is displayed.

Step 3 Run:tunnel binding destination destination-address te tunnel interface-number

The specified L3VPN is bound to the MPLS TE tunnel.

Step 4 Run:quit

You return to the system view.

Step 5 Run:ip vpn-instance vpn-instance-name

The VPN instance view is displayed.

Step 6 Run:tnl-policy policy-name

A tunnel policy is applied to a VPN instance.

----End

6.3.6 Configuring a Bandwidth for an MPLS TE Tunnel

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-22 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 155: 00399154-Configuration Guide - QoS(V300R003_03).pdf

ContextDo as follows on the ingress PE device where resources are reserved:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:interface tunnel tunnel-number

The TE tunnel interface view is displayed.

Step 3 Run:mpls te bandwidth [ bc0 | bc1 ] bandwidth [ flow-queue flow-queue-name ]

The bandwidth proportion of the total bandwidth of the MPLS TE tunnel to the bandwidth ofnon-VPN service packets in the tunnel is configured.

NOTE

l The mpls te bandwith command configures the bandwidth of an MPLS TE tunnel or the flow-queuetemplate of the non-VPN packets in an MPLS TE tunnel. A flow-queue template specifies theguaranteed bandwidth proportion of non-VPN packets of different priorities in an MPLS TE tunnel.

l If the configured bandwidth value of an MPLS TE tunnel is greater than 28630 kbit/s, it may result ininaccurate allocation of the bandwidth of the MPLS TE tunnel. The MPLS TE tunnel, however, canstill be established.

l The value of the parameter bandwidth must be less than the maximum bandwidth and maximumreservable bandwidth of the MPLS TE link.

----End

6.3.7 Binding an MPLS TE Tunnel to a VPN Instance and Specifyinga QoS Policy

ContextDo as follows on the ingress PE device where resources are reserved:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:interface tunnel interface-number

The TE tunnel interface view is displayed.

Step 3 Run:mpls te reserved-for-binding

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-23

Page 156: 00399154-Configuration Guide - QoS(V300R003_03).pdf

The MPLS TE tunnel is enabled to bind VPNs.

Step 4 Run:mpls te vpn-binding vpn-instance vpn-instance-name cir cir pir pir [ flow-queue flow-queue-name ]

An L3VPN is bound to the MPLS TE tunnel, and the bandwidth of the VPN and the bandwidthsof the packets of different types in the VPN are limited.

NOTEThe CIR is the committed bandwidth of a VPN. The PIR is the peak information rate that controls the burstbandwidth of a VPN. The PIR must be no more than the bandwidth of the MPLS TE tunnel. The flow-queue template contains the configuration of the bandwidth proportion and scheduling parameters of thetraffic for different priorities in a VPN.

Step 5 Run:mpls te commit

The current configuration of the MPLS TE tunnel is committed.

NOTEWhen the parameters of an MPLS TE tunnel change, you need to run the mpls te commit command tomake the changes take effect.

----End

6.3.8 Checking the Configuration

Run the following commands to check the previous configuration.

Action Command

Check the statistics about the L3VPNtraffic of an MPLS TE tunnel.

display traffic statistics interface tunnel interface-number vpn-instance vpn-instance-name

Run the display traffic statistics interface tunnel-name vpn-instance vpn-instance-namecommand. If the output statistics of the L3VPN traffic in an MPLS TE tunnel are the same asthe configured values, it means that the configuration succeeds.

<Quidway> display traffic statistics interface tunnel3/0/0 vpn-instance vpnaThe RRVPN Traffic Statistics: Transit packets :239453968 Transit bytes :24918416800 Discard packets :0 Discard bytes :0 Transit packets rate:33000 packets/sec Transit bytes rate :4070000 packets/sec

6.4 Configuring Hierarchical Resource Reserved L2VPNsThis section describes the procedure of configuring a hierarchical resource reserved L2VPN.

6.4.1 Establishing the Configuration Task

6.4.2 Configuring a Flow Queue

6.4.3 (Optional) Enabling an L2VPN to Support DiffServ Models

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-24 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 157: 00399154-Configuration Guide - QoS(V300R003_03).pdf

6.4.4 (Optional) Configuring a Class Queue

6.4.5 Configuring a Tunnel Policy

6.4.6 Applying an MPLS TE Tunnel Policy to an MPLS L2VPN

6.4.7 Configuring the Bandwidth of an MPLS TE Tunnel

6.4.8 Associating an MPLS TE Tunnel with an L2VPN and Specifying a QoS Policy

6.4.9 Checking the Configuration

6.4.1 Establishing the Configuration Task

Applicable EnvironmentIn an L2VPN environment, sometimes multiple VPNs share one MPLS TE tunnel. This mayresult in the following problems: VPNs compete for resources. Services of high priorities froma VPN are not provided with guaranteed bandwidth so that packets are discarded improperly.In an MPLS TE tunnel, non-VPN traffic preempts the bandwidth of VPN traffic. In an MPLSTE tunnel, VPN traffic demands different supplies of resources. To solve the proceedingproblems, you need to configure the hierarchical resource reserved L2VPN.

The hierarchical resource reserved L2VPN enables a device to reserve bandwidth resources fordifferent VPNs or for services of different priorities from the same VPN in one MPLS TE tunneland separate the bandwidth resources among them. This solves the problems of serviceinterference and bandwidth preemption in one MPLS TE tunnel and provides VPN users withend-to-end QoS guarantee.

Hierarchical resource reserved L2VPNs support the VLL networking mode and the VPLSnetworking mode.

NOTE

l The hierarchical resource reserved L2VPN is configured on an ingress PE device. After theconfiguration of the hierarchical resource reserved L2VPN, you can further configure interface-specificHQoS on the interface of the user side on the egress PE device.

l Network traffic is bi-directional; therefore, you can configure hierarchical resource reserved L2VPNfor the opposite traffic on the opposite PE.

Pre-configuration TasksBefore configuring the hierarchical resource reserved L2VPN, complete the following tasks:

l Configuring the physical parameters and link attributes to ensure normal operation of theinterfaces.

l Configuring an MPLS TE tunnel between PEs. For details, refer to "MPLS TEConfiguration" in the Quidway NetEngine80E/40E Router Configuration Guide –MPLS.

l Configuring VLL or VPLS to enable communications between Layer 2 VPNs. For details,refer to "VLL Configuration" and "VPLS Configuration" in the Quidway NetEngine80E/40E Router Configuration Guide – VPN.

l If the access type of CEs is VLAN, you need to configure sub-interfaces or VLANIFinterfaces; if the access type of CEs is ATM, you need to configure virtual circuits.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-25

Page 158: 00399154-Configuration Guide - QoS(V300R003_03).pdf

l Configuring the simple traffic classification, forcible traffic classification, or complextraffic classification on the interface on the user side of the ingress PE. For details, refer to"Class-based QoS Configuration" in the Quidway NetEngine80E/40E RouterConfiguration Guide – QoS.

NOTE

In configuration of the hierarchical resource reserved VPN, the simple traffic classification or forcibletraffic classification is an optional pre-configuration task.

l If both the simple traffic classification and the Pipe (or Short Pipe) mode are configured on the interfaceon the user side of an ingress PE, the L2VPN prefers the Pipe (or Short Pipe) DiffServ model.

l If you have configured the L2VPN to support the Pipe model, you are unnecessary to configure thesimple traffic classification.

l If you configure the L2VPN to support the Short Pipe model, it is recommended that you configurethe simple traffic classification. The reason is that the egress PE performs queue scheduling accordingto the original DSCP value.

Data PreparationTo configure the hierarchical resource reserved L2VPN, you need the following data.

No. Data

1 Parameters for flow-wred packet discarding, flow-queue scheduling algorithm, andparameters for flow-queue scheduling

2 (Optional) CoSs and colors for IP packets when the system is in the DiffServ model

3 (Optional) Port-wred parameters referenced by class queues, scheduling algorithmsand parameters of class queues, and shaping values

4 Names and parameters of tunnel policies

5 Bandwidth of the MPLS TE tunnel and the referenced flow-queue template

6 CIR and PIR for the VPN and the referenced flow-queue template

6.4.2 Configuring a Flow Queue

ContextFlow queues to be configured are divided into VPN flow queues and non-VPN flow queues inthe MPLS TE tunnel.

l VPN flow queues organize VPN traffic into queues according to the service prioritiesresulting from the simple traffic classification or the complex traffic classification. TheVPN service packets of different priorities are then provided with proportional bandwidths.

l Non-VPN flow queues on MPLS TE tunnels accept non-VPN packets of different prioritieson MPLS TE tunnels. As a result, the non-VPN packets of different priorities in the MPLSTE tunnel are then provided with proportional bandwidths.

l The VPN packets and non-VPN packets in the MPLS TE tunnel can be either configuredwith the same flow queue or configured separately.

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-26 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 159: 00399154-Configuration Guide - QoS(V300R003_03).pdf

l If you do not configure flow queues for the VPN packets and non-VPN packets in the MPLSTE tunnel, the system uses the default flow-queue template. It is recommended that youconfigure flow queues according to the actual conditions.

For detailed information about flow queues, refer to the Quidway NetEngine80E/40E RouterConfiguration Guide – QoS.

Do as follows on the ingress PE device where resources are reserved:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:flow-wred flow-wred-name

A flow WRED object is created and the flow WRED view is displayed.

Step 3 Run:color { green | yellow | red } low-limit low-limit-value high-limit high-limit-value discard-percentage discard-percentage-value

A flow WRED object is configured and the upper limit, the lower limit, and the discardprobability are set for packets of different colors.

NOTE

l If you do not configure a flow WRED object, the system uses the default tail-drop policy.

l You can create multiple flow WRED objects for being referenced by flow queues as required. You canconfigure up to 127 flow WRED objects in the system.

Step 4 Run:quit

You return to the system view.

Step 5 Run:flow-queue flow-queue-name

A flow-queue template is created and the flow queue view is displayed.

Step 6 Run:queue cos-value { [ pq | wfq weight weight-value | lpq ] | shaping shaping-value | flow-wred wred-name } *

A flow queue is configured and a scheduling policy is set for queues of different priorities.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-27

Page 160: 00399154-Configuration Guide - QoS(V300R003_03).pdf

NOTE

You can configure scheduling parameters in one flow-queue template for the eight flow queues of asubscriber respectively.

If you do not configure a flow-queue template, the system uses the default flow-queue template. The defaultflow-queue template contains the following parameters:

l By default, the system performs PQ on the flow queues with the priorities of ef, cs6, and cs7.

l The system defaults the flow queues with the priorities of be, af1, af2, af3, and af4 to WFQ. Thescheduling weight is 10:10:10:15:15.

l The default shaping value is the maximum bandwidth of the interface.

l The default discarding policy is the tail drop.

----End

6.4.3 (Optional) Enabling an L2VPN to Support DiffServ Models

Procedurel In the VLL Networking Mode

Do as follows on the interface on the user side of the ingress PE device where resourcesare reserved:

1. Run:system-view

The system view is displayed.2. Run:

interface interface-type interface-number

The view of the interface on the user side is displayed.

NOTE

This interface is a user-side interface configured with L2VPN services.

3. Run:diffserv-mode { pipe service-class color | uniform }

A DiffServ model in the VLL networking mode is set.

NOTE

If the DiffServ model is set to Uniform, you need to configure simple traffic classification.Otherwise, this configuration does not take effect.

l In the VPLS Networking Mode

Do as follows on the ingress PE device where resources are reserved:

1. Run:system-view

The system view is displayed.2. Run:

vsi vsi-name [ auto | static ]

A virtual switching instance (VSI) is created and the VSI view is displayed.

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-28 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 161: 00399154-Configuration Guide - QoS(V300R003_03).pdf

3. Run:diffserv-mode { pipe service-class color | short-pipe service-class color [ domain ds-name ] | uniform }

The DiffServ model for a VSI is set.

NOTE

l Enabling the L2VPN to support the DiffServ model is an optional setting. You can performthis configuration according to the actual conditions of networks. If you do not enable VPNsto support a specific DiffServ model, the system defaults the Uniform model.

l If the DiffServ model is set to Uniform, you need to configure simple traffic classification.Otherwise, this configuration does not take effect.

l When the simple traffic classification, forcible traffic classification, and the Pipe or ShortPipe model are configured, the Pipe or Short Pipe model takes effect.

The three DiffServ models are Pipe, Short Pipe, and Uniform.

l If the Pipe model is set for a VPN, the EXP value of the MPLS label pushed on the ingressPE device is determined by both the CoS and the color specified by users. After an MPLSlabel is popped out by the egress PE device, the DSCP value of an IP packet is not changed.Then the EXP value of the MPLS label determines the packet forwarding behaviorperformed by the egress node.

l If the Short Pipe model is set for a VPN, the EXP value of the MPLS label pushed on theingress PE device is determined by both the CoS and the color specified by users. After anMPLS label is popped out by the egress PE device, the DSCP value of an IP packet is notchanged. Then the DSCP value of the IP packet determines the packet forwarding behaviorof the egress node.

l If the Uniform model is set for a VPN, the EXP value of the MPLS label pushed on theingress PE device is determined by the mapped DSCP value of an IP packet. After an MPLSlabel is popped out by the egress PE device, the EXP value is mapped as the DSCP valueof an IP packet. Then the mapped DSCP value of the IP packet determines the packetforwarding behavior of the egress node. The default model is Uniform.

When you configure a DiffServ model,

l If you want to the MPLS network to differentiate service priorities, you can choose theUniform model.

l If you do not want the MPLS network to differentiate service priorities, you can choosethe Pipe or Short Pipe model.

----End

6.4.4 (Optional) Configuring a Class Queue

ContextNOTE

l This step is optional. It is recommended, however, that you configure the scheduling and bandwidthlimits for class queues so that packets are not dropped when the public network is congested. The reasonis that packets sent from the interface, of an ingress PE device, on the network side can be VPN packets,non-VPN packets, MPLS TE packets, and non-MPLS TE packets.

l If the packets of one VPN access the ingress from multiple sites, you need to configure the class queueto avoid congestion on the public network.

l For detailed information about class queues, refer to "HQoS Configuration" in the QuidwayNetEngine80E/40E Router Configuration Guide – QoS.

Do as follows on the interface on the network side of the ingress PE device where resources arereserved:

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-29

Page 162: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:port-wred port-wred-name

A port WRED object is created and the port WRED view is displayed.

Step 3 Run:color { green | yellow | red } low-limit low-limit-value high-limit high-limit-value discard-percentage discard-percentage-value

A WRED object for a class queue is configured and the upper limit, the lower limit, and thediscarding probability are set for packets of different colors.

NOTE

l If you do not configure a WRED object for a class queue, the system uses the default tail-drop policy.

l You can create multiple port-wred objects for being referenced by class queues as required. The systemprovides one port-wred object. You can configure a maximum of seven more port-wred objects.

Step 4 Run:quit

You return to the system view.

Step 5 Run:interface interface-type interface-number

The interface view is displayed.

Step 6 Run:port-queue cos-value { { pq | wfq weight weight-value | lpq} | shaping { shaping-value | shaping-percentage shaping-percentage-value } | port-wred wred-name } * outbound

A class queue is configured and a scheduling policy is set for queues of different priorities.

You can configure scheduling parameters for eight class queues respectively on one interface.

If you do not configure a class queue template, the system uses the default class queue template.The default class queue template contains the following parameters:

l By default, the system performs PQ on the prioritized class queues ef, cs6, and cs7.

l The system defaults scheduling algorithm of the prioritized class queues be, af1, af2, af3,and af4 to WFQ. The scheduling weight is 10:10:10:15:15.

l The default shaping value is the maximum bandwidth of the interface.

l The default discarding policy is the tail drop.

----End

6.4.5 Configuring a Tunnel Policy

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-30 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 163: 00399154-Configuration Guide - QoS(V300R003_03).pdf

ContextDo as follows on the ingress PE device where resources are reserved:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:tunnel-policy policy-name

A tunnel policy is created and the tunnel policy view is displayed.

Step 3 Run:tunnel binding destination destination-address te tunnel interface-number

The specified L3VPN is bound to the MPLS TE tunnel.

----End

6.4.6 Applying an MPLS TE Tunnel Policy to an MPLS L2VPN

ContextNOTE

Here only the configuration of applying tunnel policies in Martini mode is provided. For information aboutthe configurations of applying tunnel policies in other modes such as SVC, Kompella, and PWE3 modes,refer to "VPN Tunnel Management Configuration" in the Quidway NetEngine80E/40E RouterConfiguration Guide – VPN.

Procedurel In the VLL Networking Mode

Do as follows on the ingress PE device where resources are reserved:

1. Run:system-view

The system view is displayed.2. Run:

interface interface-type interface-number

The view of the interface on the user side is displayed.3. Run:

mpls l2vc dest-ip-address vc-id tunnel-policy policy-name

A tunnel policy is applied to the virtual circuit (VC) in Martini L2VPN.l In the VPLS Networking Mode

Do as follows on the ingress PE device where resources are reserved:

1. Run:system-view

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-31

Page 164: 00399154-Configuration Guide - QoS(V300R003_03).pdf

The system view is displayed.

2. Run:vsi vsi-name

A VSI is created and the VSI view is displayed.

3. Run:tnl-policy policy-name

A tunnel policy is applied to the VSI.

----End

6.4.7 Configuring the Bandwidth of an MPLS TE Tunnel

Context

Do as follows on the ingress PE device where resources are reserved:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:interface tunnel tunnel-number

The TE tunnel interface view is displayed.

Step 3 Run:mpls te bandwidth [ bc0 | bc1 ] bandwidth [ flow-queue flow-queue-name ]

The bandwidth proportion of the total bandwidth of the MPLS TE tunnel to the bandwidth ofnon-VPN service packets in the tunnel is configured.

NOTE

l The mpls te bandwith command configures the bandwidth of an MPLS TE tunnel or the flow-queuetemplate of the non-VPN packets in an MPLS TE tunnel. A flow-queue template specifies theguaranteed bandwidth proportion of non-VPN packets of different priorities in an MPLS TE tunnel.

l If the configured bandwidth value of an MPLS TE tunnel is greater than 28630 kbit/s, it may result ininaccurate allocation of the bandwidth of the MPLS TE tunnel. The MPLS TE tunnel, however, canstill be established.

l The value of the parameter bandwidth must be less than the maximum bandwidth and maximumreservable bandwidth of the MPLS TE link.

----End

6.4.8 Associating an MPLS TE Tunnel with an L2VPN andSpecifying a QoS Policy

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-32 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 165: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Procedurel In the VLL Networking Mode

Do as follows on the ingress PE device where resources are reserved:

1. Run:system-view

The system view is displayed.2. Run:

interface tunnel interface-number

The MPLS TE tunnel interface view is displayed.3. Run:

mpls te reserved-for-binding

The MPLS TE tunnel is enabled to bind VPNs.4. Run:

mpls te vpn-binding l2vpn interface interface-type interface-number cir cir pir pir [ flow-queue flow-queue-name ]

A VLL L2VPN is bound to an MPLS TE tunnel, limiting the bandwidth for VPNpackets that are forwarded through the MPLS TE tunnel and the bandwidths fordifferent types of VPN packets that are forwarded through the MPLS TE tunnel.

NOTEThis command statically binds a VLL interface on the user side to an MPLS TE tunnel so thatthe traffic of VLL L2VPN is forwarded through the MPLS TE tunnel.

5. Run:mpls te commit

The current configuration of the MPLS TE tunnel is committed.

NOTEWhen the parameters of an MPLS TE tunnel change (for example, when interface at the VLLuser side that are statically bound to MPLS TE tunnels are delete), you need to run the mplste commit command to make the changes take effect.

l In the VSI Networking Mode

Do as follows on the ingress PE device where resources are reserved:

1. Run:system-view

The system view is displayed.2. Run:

interface tunnel interface-number

The tunnel interface view is displayed.3. Run:

mpls te vpn-binding l2vpn vsi vsi-name cir cir pir pir [ flow-queue flow-queue-name ]

A VPLS L2VPN is bound to an MPLS TE tunnel, limiting the bandwidth for VPNpackets that are forwarded through the MPLS TE tunnel and the bandwidths fordifferent types of VPN packets that are forwarded through the MPLS TE tunnel.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-33

Page 166: 00399154-Configuration Guide - QoS(V300R003_03).pdf

4. Run:mpls te commit

The current configuration of the MPLS TE tunnel is committed.

NOTEWhen the parameters of an MPLS TE tunnel change, you need to run the mpls te commitcommand to make the changes take effect.

In both the VLL and the VPLS networking modes, you can use the command to staticallybind an L2VPN to an MPLS TE tunnel. CIR is the committed bandwidth of a VPN. PIR isthe permitted burst rate of a VPN. The value should be no more than the set bandwidth ofthe MPLS TE tunnel. The flow-queue template contains the configuration of the bandwidthproportion and scheduling parameters of the traffic for different priorities. ResourceReserved VPN can provide guaranteed bandwidths forTraffic in the MPLS TE tunnel

– All VPN traffic

– Non-VPN traffic in the MPLS TE tunnel

----End

6.4.9 Checking the Configuration

Run the following commands to check the previous configuration.

Action Command

Check the statistics about the VLLL2VPN traffic of an MPLS TE tunnel.

display traffic statistics interface tunnelinterface-number vll interface-type interface-number

Check the statistics about the VPLSL2VPN traffic of an MPLS TE tunnel.

display traffic statistics interface tunnelinterface-number vsi vsi-name

Run the display traffic statistics interface tunnel interface-number [ vsi vsi-name | vllinterface-type interface-number ] command. If the output statistics of the VPLS or VLL L2VPNtraffic in an MPLS TE tunnel are the same as the configured values, it means that theconfiguration succeeds.

<Quidway> display traffic statistics interface tunnel3/0/0 vsi vpnaThe RRVPN Traffic Statistics: Transit packets :239453968 Transit bytes :24918416800 Discard packets :0 Discard bytes :0 Transit packets rate:33000 packets/sec Transit bytes rate :4070000 bytes/sec <Quidway> display traffic statistics interface tunnel3/0/0 vll gigabitethernet3/0/3The RRVPN Traffic Statistics: Transit packets :239453968 Transit bytes :24918416800 Discard packets :0 Discard bytes :0 Transit packets rate:33000 packets/sec Transit bytes rate :4070000 bytes/sec

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-34 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 167: 00399154-Configuration Guide - QoS(V300R003_03).pdf

6.5 Example For Configuring VPN QoSThis section provides examples for configuring VPN QoS.

6.5.1 Example for Applying a Routing Policy with QoS Parameters in VPNv4

6.5.2 Example for Applying Routing Policies with QoS Parameters to a VPN Instance

6.5.3 Example for Configuring a Hierarchical Resource Reserved L3VPN

6.5.4 Example for Configuring a Hierarchical Resource Reserved L2VPN (VLL)

6.5.5 Example for Configuring a Hierarchical Resource Reserved L2VPN (VPLS)

6.5.6 Example for Configuring Hierarchical Resource Reserved VPNs (with Both L3VPNs andL2VPNs Deployed)

6.5.7 Example for Configuring an MPLS DiffServ Model on the VPLS over TE

6.5.1 Example for Applying a Routing Policy with QoS Parametersin VPNv4

Networking RequirementsAs shown in Figure 6-8, CE1, CE2, CE3, CE4, PE1, PE2, and P are used to establish the BGPMPLS IP VPN. CE1 and CE4 are in VPN1; CE2 and CE3 are in VPN2. QoS is required torestrict the bandwidth of VPN packets sent by CE3 and CE4 to be 30 Mbit/s.

To carry out that, you need to configure QPPB in an L3VPN. Set the community attribute forBGP VPNv4 routes sent from PE1 to PE2. When PE2 receives BGP VPNv4 routes sent fromPE1, it matches the community attribute based on the routing policy and sets QoS parametersfor the matched routes. When it imports VPN routes, it imports the QoS parameters to the VPNFIB table.

To restrict the bandwidth for packets of all VPN instances on PE2, configure QPPB to apply therouting policy with QoS parameters to all VPN instances on PE2.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-35

Page 168: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Figure 6-8 Networking diagram for configuring QPPB in an L3VPN (VPNv4)

Configuration RoadmapThe configuration roadmap is as follows:

1. Configure the basic BGP/MPLS IP VPN functions to enable interworking among therouters.

2. Create a routing policy on PE1 to enable the matched route to carry the community attribute.3. Configure traffic behaviors on PE2 to restrict the bandwidth of packets of VPN1 and VPN2

to be 30 Mbit/s.4. On PE2, configure a routing policy for imported routes to apply the traffic behavior to the

routes that are sent from PE1 and match the community attribute.5. Apply QPPB to the inbound interface Ethernet 1/0/0 and Ethernet 2/0/0 of PE2.

Data PreparationTo complete the configuration, you need the following data:

l Names of VPN instances and those of routing policies

l Numbers of community attribute lists and IP prefixes

l Names of traffic behaviors and traffic actions

l Interfaces where QPPB is applied

Configuration Procedure1. Configure BGP MPLS IP VPN.

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-36 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 169: 00399154-Configuration Guide - QoS(V300R003_03).pdf

# Assign IP addresses to the interface of CE1, CE2, CE3, and CE4.<CE1> system-view[CE1] interface ethernet 1/0/0[CE1-Ethernet1/0/0] undo shutdown[CE1-Ethernet1/0/0] ip address 10.1.1.1 255.255.255.0[CE1-Ethernet1/0/0] return<CE2> system-view[CE2] interface ethernet 2/0/0[CE2-Ethernet2/0/0] undo shutdown[CE2-Ethernet2/0/0] ip address 40.1.1.1 255.255.255.0[CE2-Ethernet2/0/0] return<CE3> system-view[CE3] interface ethernet 2/0/0[CE3-Ethernet2/0/0] undo shutdown[CE3-Ethernet2/0/0] ip address 30.1.1.1 255.255.255.0[CE3-Ethernet2/0/0] return<CE4> system-view[CE4] interface ethernet 1/0/0[CE4-Ethernet1/0/0] undo shutdown[CE4-Ethernet1/0/0] ip address 20.1.1.1 255.255.255.0[CE4-Ethernet1/0/0] return# Configure the loopback interfaces of PE1, P, and PE2.<PE1> system-view[PE1] interface loopback0[PE1-LoopBack0] ip address 11.11.11.11 255.255.255.255[PE1-LoopBack0] return<P> system-view[P] interface loopback0[P-LoopBack0] ip address 33.33.33.33 255.255.255.255[P-LoopBack0] return<PE2> system-view[PE2] interface loopback0[PE2-LoopBack0] ip address 22.22.22.22 255.255.255.255[PE2-LoopBack0] return# Enable OSPF on PE1, P, and PE2. Advertise the route of the loopback interface.<PE1> system-view[PE1] ospf 10[PE1-ospf-10] area 0.0.0.0[PE1-ospf-10-area-0.0.0.0] network 100.1.1.0 0.0.0.255[PE1-ospf-10-area-0.0.0.0] network 11.11.11.11 0.0.0.0[PE1-ospf-10-area-0.0.0.0] return<P> system-view[P] ospf 10[P-ospf-10] area 0.0.0.0[P-ospf-10-area-0.0.0.0] network 100.1.1.0 0.0.0.255[P-ospf-10-area-0.0.0.0] network 110.1.1.0 0.0.0.255[P-ospf-10-area-0.0.0.0] network 33.33.33.33 0.0.0.0[P-ospf-10-area-0.0.0.0] return<PE2> system-view[PE2] ospf 10[PE2-ospf-10] area 0.0.0.0[PE2-ospf-10-area-0.0.0.0] network 100.1.1.0 0.0.0.255[PE2-ospf-10-area-0.0.0.0] network 22.22.22.22 0.0.0.0[PE2-ospf-10-area-0.0.0.0] return# Set up MPLS LDP sessions between PE1, P, and PE2.<PE1> system-view[PE1] mpls lsr-id 11.11.11.11[PE1] mpls[PE1-mpls] quit[PE1] mpls ldp[PE1-mpls-ldp] quit[PE1] interface pos 3/0/0[PE1-Pos3/0/0] undo shutdown[PE1-Pos3/0/0] ip address 100.1.1.1 255.255.255.0[PE1-Pos3/0/0] mpls[PE1-Pos3/0/0] mpls ldp

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-37

Page 170: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[PE1-Pos3/0/0] return<P> system-view[P] mpls lsr-id 33.33.33.33[P] mpls[P-mpls] quit[P] mpls ldp[P-mpls-ldp] quit[P] interface pos 1/0/0[P-Pos1/0/0] undo shutdown[P-Pos1/0/0] mpls[P-Pos1/0/0] mpls ldp[P-Pos1/0/0] quit[P] interface pos 2/0/0[P-Pos2/0/0] undo shutdown[P-Pos2/0/0] mpls[P-Pos2/0/0] mpls ldp[P-Pos2/0/0] return<PE2> system-view[PE2] mpls lsr-id 22.22.22.22[PE2] mpls[PE2-mpls] mpls ldp[PE2-mpls-ldp] quit[PE2] interface pos 3/0/0[PE2-Pos3/0/0] undo shutdown[PE2-Pos3/0/0] ip address 100.1.1.2 255.255.255.0[PE2-Pos3/0/0] mpls[PE2-Pos3/0/0] mpls ldp[PE2-Pos3/0/0] return

# Set up the IBGP peer relationship between PE1 and PE2.<PE1> system-view[PE1] bgp 500[PE1-bgp] peer 22.22.22.22 as-number 500[PE1-bgp] peer 22.22.22.22 connect-interface loopback0[PE1-bgp] ipv4-family vpnv4[PE1-bgp-af-vpnv4] peer 22.22.22.22 enable[PE1-bgp-af-vpnv4] return<PE2> system-view[PE2] bgp 500[PE2-bgp] peer 11.11.11.11 as-number 500[PE2-bgp] peer 11.11.11.11 connect-interface LoopBack0[PE2-bgp] ipv4-family vpnv4[PE2-bgp-af-vpnv4] peer 11.11.11.11 enable[PE2-bgp-af-vpnv4] return

# On PE1 and PE2, create VPN instances and bind the VPN instances to the interfaces thatare connected to CE.<PE1> system-view[PE1] ip vpn-instance vpn1[PE1-vpn-instance-vpn1] route-distinguisher 1:1[PE1-vpn-instance-vpn1] vpn-target 1:1 export-extcommunity[PE1-vpn-instance-vpn1] vpn-target 1:1 import-extcommunity[PE1-vpn-instance-vpn1] quit[PE1] interface ethernet1/0/0[PE1-Ethernet1/0/0] undo shutdown[PE1-Ethernet1/0/0] ip binding vpn-instance vpn1[PE1-Ethernet1/0/0] ip address 10.1.1.2 255.255.255.0[PE1-Ethernet1/0/0] quit[PE1] ip vpn-instance vpn2[PE1-vpn-instance-vpn2] route-distinguisher 2:2[PE1-vpn-instance-vpn2] vpn-target 2:2 export-extcommunity[PE1-vpn-instance-vpn2] vpn-target 2:2 import-extcommunity[PE1-vpn-instance-vpn2] quit[PE1] interface ethernet2/0/0[PE1-Ethernet2/0/0] undo shutdown[PE1-Ethernet2/0/0] ip binding vpn-instance vpn2[PE1-Ethernet2/0/0] ip address 40.1.1.2 255.255.255.0[PE1-Ethernet2/0/0] return<PE2> system-view

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-38 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 171: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[PE2] ip vpn-instance vpn1[PE2-vpn-instance-vpn1] route-distinguisher 1:1[PE2-vpn-instance-vpn1] vpn-target 1:1 export-extcommunity[PE2-vpn-instance-vpn1] vpn-target 1:1 import-extcommunity[PE2-vpn-instance-vpn1] quit[PE2] interface ethernet1/0/0[PE2-Ethernet1/0/0] undo shutdown[PE2-Ethernet1/0/0] ip binding vpn-instance vpn1[PE2-Ethernet1/0/0] ip address 20.1.1.2 255.255.255.0[PE2-Ethernet1/0/0] quit[PE2] ip vpn-instance vpn2[PE2-vpn-instance-vpn2] route-distinguisher 2:2[PE2-vpn-instance-vpn2] vpn-target 2:2 export-extcommunity[PE2-vpn-instance-vpn2] vpn-target 2:2 import-extcommunity[PE2-vpn-instance-vpn2] quit[PE2] interface ethernet2/0/0[PE2-Ethernet2/0/0] undo shutdown[PE2-Ethernet2/0/0] ip binding vpn-instance vpn2[PE2-Ethernet2/0/0] ip address 30.1.1.2 255.255.255.0[PE2-Ethernet2/0/0] return# Set up the EBGP peer relationship among PE1, CE1, and CE2, and that among PE2, CE3,and CE4.<CE1> system-view[CE1] bgp 100[CE1-bgp] peer 10.1.1.2 as-number 500[CE1-bgp] import-route direct[CE1-bgp] quit<CE2> system-view[CE2] bgp 200[CE2-bgp] peer 40.1.1.2 as-number 500[CE2-bgp] import-route direct[CE2-bgp] quit<PE1> system-view[PE1] bgp 500[PE1-bgp] ipv4-family vpn-instance vpn1[PE1-bgp-vpn1] peer 10.1.1.1 as-number 100[PE1-bgp-vpn1] import-route direct[PE1-bgp-vpn1] quit[PE1-bgp] ipv4-family vpn-instance vpn2[PE1-bgp-vpn2] peer 40.1.1.1 as-number 200[PE1-bgp-vpn2] import-route direct[PE1-bgp-vpn2] return<CE3> system-view[CE3] bgp 300[CE3-bgp] peer 30.1.1.2 as-number 500[CE3-bgp] import-route direct[CE3-bgp] quit<CE4> system-view[CE4] bgp 400[CE4-bgp] peer 20.1.1.2 as-number 500[CE4-bgp] import-route direct[CE4-bgp] quit<PE2> system-view[PE2] bgp 500[PE2-bgp] ipv4-family vpn-instance vpn1[PE2-bgp-vpn1] peer 20.1.1.1 as-number 400[PE2-bgp-vpn1] import-route direct[PE2-bgp-vpn1] quit[PE2-bgp] ipv4-family vpn-instance vpn2[PE2-bgp-vpn1] peer 30.1.1.1 as-number 300[PE2-bgp-vpn1] import-route direct[PE2-bgp-vpn1] returnAfter the configuration, CE1 and CE4 can ping through each other; CE2 and CE3 can pingthrough each other; two CEs in different VPNs cannot ping through each other.

2. Configure routing policies between PE1 and PE2; advertise the routing policy through BGP.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-39

Page 172: 00399154-Configuration Guide - QoS(V300R003_03).pdf

# On PE1, configure the routing policy so that the routes sent from 10.1.1.0 and 40.1.1.0carry the community attribute 10:10.<PE1> system-view[PE1] ip ip-prefix aa index 10 permit 10.1.1.0 24[PE1] ip ip-prefix aa index 20 permit 40.1.1.0 24[PE1] route-policy aa permit node 10[PE1-route-policy] if-match ip-prefix aa[PE1-route-policy] apply community 10:10[PE1-route-policy] return# On PE1, apply the routing policy to the route sent to PE2 and advertise the communityattribute to its peer.<PE1> system-view[PE1] bgp 500[PE1-bgp] ipv4-family vpnv4[PE1-bgp-af-vpnv4] peer 22.22.22.22 route-policy aa export[PE1-bgp-af-vpnv4] peer 22.22.22.22 advertise-community[PE1-bgp-af-vpnv4] return

3. On PE2, configure the routing policy for the received route. Create the traffic behavior forthe routes that match the community attribute.# Create the traffic behavior for the routes that match the community attribute.<PE2> system-view[PE2] traffic behavior dd[PE2-behavior-dd] car cir 30000 green pass yellow pass red discard [PE2-behavior-dd] return

NOTE

The traffic behavior to be associated with the routing policy must be defined in advance.

# On PE2, create a routing policy to apply the traffic behavior to the received routes thatmatch the community attribute 10:10.<PE2> system-view[PE2] ip community-filter 10 permit 10:10[PE2] route-policy bb permit node 10[PE2-route-policy] if-match community-filter 10[PE2-route-policy] apply behavior dd[PE2-route-policy] return# On PE2, apply the routing policy to the route received from PE1.<PE2> system-view[PE2] bgp 500[PE2-bgp] ipv4-family vpnv4[PE2-bgp-af-vpnv4] peer 11.11.11.11 route-policy bb import[PE2-bgp-af-vpnv4] return# Run display bgp vpnv4 all routing-table on PE2. The community attribute of routessent from 10.1.1.0/24 and 0.1.1.0/24 is 10:10.[PE2] display bgp vpnv4 all routing-table 10.1.1.0BGP local router ID : 22.22.22.22Local AS number : 500 Total routes of Route Distinguisher(1:1): 1 BGP routing table entry information of 10.1.1.0/24: Label information (Received/Applied): 15361/NULL From: 11.11.11.11 (11.11.11.11) Original nexthop: 11.11.11.11 Community:<10:10> Ext-Community: <1 : 1> Convergence Priority: 0 AS-path Nil, origin incomplete, MED 0, localpref 100, pref-val 0, valid, internal, best, pre 255 Not advertised to any peer yet Total routes of vpn-instance vpn1: 1 BGP routing table entry information of 10.1.1.0/24: Label information (Received/Applied): 15361/NULL From: 11.11.11.11 (11.11.11.11)

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-40 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 173: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Relay Nexthop: 0.0.0.0 Original nexthop: 11.11.11.11 Community:<10:10> Ext-Community: <1 : 1> Convergence Priority: 0 AS-path Nil, origin incomplete, MED 0, localpref 100, pref-val 0, valid, internal, best, pre 255 Advertised to such 1 peers: 20.1.1.1

4. On PE2, apply QPPB to inbound interfaces Ethernet 1/0/0 and Ethernet 2/0/0.<PE2> system-view[PE2]interface ethernet1/0/0[PE2-Ethernet1/0/0] qppb-policy behavior destination[PE2-Ethernet1/0/0] quit[PE2]interface ethernet2/0/0[PE2-Ethernet2/0/0] qppb-policy behavior destination[PE2-Ethernet2/0/0] return

5. Verify the configuration.# On PE2, display the FIB information of the VPN. If the configuration succeeds, you cansee that the value of the QosInfo field in the output information is 0x20000001.[PE2] display fib vpn-instance vpn1 10.1.1.0 verbose Route Entry Count: 1 Destination: 10.1.1.0 Mask : 255.255.255.0Nexthop : 11.11.11.11 OutIf : POS3/0/0LocalAddr : 100.1.1.2 LocalMask: 0.0.0.0 Flags : DGU Age : 2227sec ATIndex : 0 Slot : 3 LspFwdFlag : 1 LspToken : 0x76002001 InLabel : 15360 OriginAs : 100 BGPNextHop : 11.11.11.11 PeerAs : 100 QosInfo : 0x20000001 OriginQos: 0x0 NexthopBak : 0.0.0.0 OutIfBak : [No Intf] LspTokenBak: 0x0 InLabelBak : NULL LspToken_ForInLabelBak : 0x0 EntryRefCount : 1 rt_ulVlanId : 0x0 rt_ulVlinkBak : NULL

Configuration Filesl Configuration file of CE1

# sysname CE1#interface Ethernet1/0/0 undo shutdown ip address 10.1.1.1 255.255.255.0#bgp 100 peer 10.1.1.2 as-number 500 # undo synchronization import-route direct peer 10.1.1.2 enable#return

l Configuration file of CE2# sysname CE2#interface Ethernet2/0/0 undo shutdown ip address 40.1.1.1 255.255.255.0#

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-41

Page 174: 00399154-Configuration Guide - QoS(V300R003_03).pdf

bgp 200 peer 40.1.1.2 as-number 500 #undo synchronization import-route direct peer 40.1.1.2 enable#return

l Configuration file of CE3# sysname CE3#interface Ethernet2/0/0 undo shutdown ip address 30.1.1.1 255.255.255.0#bgp 300 peer 30.1.1.2 as-number 500 #undo synchronization import-route direct peer 30.1.1.2 enable#return

l Configuration file of CE4# sysname CE4#interface Ethernet1/0/0 undo shutdown ip address 20.1.1.1 255.255.255.0#bgp 400 peer 20.1.1.2 as-number 500 #undo synchronization import-route direct peer 20.1.1.2 enable#return

l Configuration file of PE1# sysname PE1#ip vpn-instance vpn1 route-distinguisher 1:1 vpn-target 1:1 export-extcommunity vpn-target 1:1 import-extcommunity#ip vpn-instance vpn2 route-distinguisher 2:2 vpn-target 2:2 export-extcommunity vpn-target 2:2 import-extcommunity#mpls lsr-id 11.11.11.11 mpls#mpls ldp#interface Ethernet1/0/0 undo shutdown ip binding vpn-instance vpn1 ip address 10.1.1.2 255.255.255.0#interface Ethernet2/0/0 undo shutdown ip binding vpn-instance vpn2

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-42 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 175: 00399154-Configuration Guide - QoS(V300R003_03).pdf

ip address 40.1.1.2 255.255.255.0#interface Pos3/0/0undo shutdownlink-protocol ppp ip address 100.1.1.1 255.255.255.0 mpls mpls ldp#interface LoopBack0 ip address 11.11.11.11 255.255.255.255#bgp 500 peer 22.22.22.22 as-number 500 peer 22.22.22.22 connect-interface LoopBack0 # ipv4-family unicast undo synchronization peer 22.22.22.22 enable# ipv4-family vpnv4 policy vpn-targetpeer 22.22.22.22 enablepeer 22.22.22.22 route-policy aa exportpeer 22.22.22.22 advertise-community# ipv4-family vpn-instance vpn1 peer 10.1.1.1 as-number 100 import-route direct#ipv4-family vpn-instance vpn2 peer 40.1.1.1 as-number 200 import-route direct#ospf 10 area 0.0.0.0 network 100.1.1.0 0.0.0.255 network 11.11.11.11 0.0.0.0#route-policy aa permit node 10 if-match ip-prefix aa apply community 10:10# ip ip-prefix aa index 10 permit 10.1.1.0 24ip ip-prefix aa index 20 permit 40.1.1.0 24#return

l Configuration file of PE2# sysname PE2#ip vpn-instance vpn1 route-distinguisher 1:1vpn-target 1:1 export-extcommunity vpn-target 1:1 import-extcommunity#ip vpn-instance vpn2 route-distinguisher 2:2 vpn-target 2:2 export-extcommunity vpn-target 2:2 import-extcommunity# mpls lsr-id 22.22.22.22 mpls#mpls ldp#traffic behavior ddcar cir 30000 green pass yellow pass red discard#

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-43

Page 176: 00399154-Configuration Guide - QoS(V300R003_03).pdf

interface Ethernet1/0/0 undo shutdown ip binding vpn-instance vpn1 ip address 20.1.1.2 255.255.255.0qppb-policy behavior destination#interface Ethernet2/0/0 undo shutdown ip binding vpn-instance vpn2 ip address 30.1.1.2 255.255.255.0qppb-policy behavior destination#interface Pos3/0/0undo shutdownlink-protocol ppp ip address 110.1.1.1 255.255.255.0 mpls mpls ldp#interface LoopBack0 ip address 22.22.22.22 255.255.255.255#bgp 500 peer 11.11.11.11 as-number 500 peer 11.11.11.11 connect-interface LoopBack0 # ipv4-family unicast undo synchronization peer 11.11.11.11 enable# ipv4-family vpnv4 policy vpn-target peer 11.11.11.11 enable peer 11.11.11.11 route-policy bb import # ipv4-family vpn-instance vpn1 peer 20.1.1.1 as-number 400 import-route direct# ipv4-family vpn-instance vpn2 peer 30.1.1.1 as-number 300 import-route direct#ospf 10 area 0.0.0.0 network 110.1.1.0 0.0.0.255 network 22.22.22.22 0.0.0.0#route-policy bb permit node 10 if-match community-filter 10 apply behavior dd# ip community-filter 10 permit 10:10#return

l Configuration file of the P# sysname P# mpls lsr-id 33.33.33.33 mpls#mpls ldp#interface Pos1/0/0 undo shutdownlink-protocol ppp ip address 100.1.1.2 255.255.255.0 mpls

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-44 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 177: 00399154-Configuration Guide - QoS(V300R003_03).pdf

mpls ldp#interface Pos2/0/0undo shutdownlink-protocol ppp ip address 110.1.1.1 255.255.255.0 mpls mpls ldp#interface LoopBack0 ip address 33.33.33.33 255.255.255.255#ospf 1 area 0.0.0.0 network 100.1.1.0 0.0.0.255 network 110.1.1.0 0.0.0.255 network 33.33.33.33 0.0.0.0#return

6.5.2 Example for Applying Routing Policies with QoS Parametersto a VPN Instance

Networking RequirementsAs shown in Figure 6-9, CE1, CE2, CE3, CE4, PE1, PE2, and P are used to establish the BGPMPLS IP VPN. CE1 and CE4 are in VPN1; CE2 and CE3 are in VPN2. QoS is required torestrict the bandwidth for the packets sent by CE4 to 30 Mbit/s. The bandwidth for VPN2 packetssent by CE3 is not restricted.

The community attribute is set for the BGP route sent from PE1 to PE2. When receiving theBGP route sent from PE1, PE2 sets QoS parameters for the BGP VPN route based on the routingpolicy. After it imports the VPN route, it imports the QoS parameters to the VPN FIB table.

To restrict the bandwidth only for packets of VPN1, you need to apply the routing policy onlyto the VPN instance of VPN1.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-45

Page 178: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Figure 6-9 Networking diagram for configuring QPPB in an L3VPN (VPN instance)

Configuration RoadmapThe configuration roadmap is as follows:

1. Configure the basic BGP/MPLS IP VPN functions to enable interworking among therouters.

2. Create routing policy on PE1 to enable the matched route to carry community attribute.3. Configure traffic behaviors on PE2 to restrict the bandwidth for packets of VPN1 to 30Mbit/

s.4. On PE2, configure a routing policy for imported routes to apply the traffic behavior to the

routes that are sent from PE1 and match the community attribute.5. Apply QPPB to inbound Ethernet 1/0/0 on PE2.

Data PreparationTo complete the configuration, you need the following data:

l Names of VPN instances and those of routing policies

l Numbers of community attribute lists and IP prefixes

l Names of traffic behaviors and traffic actions

l Interfaces where QPPB is applied

Configuration Procedure1. Configure BGP MPLS IP VPN.

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-46 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 179: 00399154-Configuration Guide - QoS(V300R003_03).pdf

# Assign IP addresses to the interfaces of CE1, CE2, CE3, and CE4.<CE1> system-view[CE1] interface ethernet 1/0/0[CE1-Ethernet1/0/0 undo shutdown[CE1-Ethernet1/0/0] ip address 10.1.1.1 255.255.255.0[CE1-Ethernet1/0/0] return<CE2> system-view[CE2] interface ethernet 2/0/0[CE2-Ethernet2/0/0] undo shutdown[CE2-Ethernet2/0/0] ip address 40.1.1.1 255.255.255.0[CE2-Ethernet2/0/0] return<CE3> system-view[CE3] interface ethernet 2/0/0[CE3-Ethernet2/0/0] undo shutdown[CE3-Ethernet2/0/0] ip address 30.1.1.1 255.255.255.0[CE3-Ethernet2/0/0] return<CE4> system-view[CE4] interface ethernet 1/0/0[CE4-Ethernet1/0/0] undo shutdown[CE4-Ethernet1/0/0] ip address 20.1.1.1 255.255.255.0[CE4-Ethernet1/0/0] return# Configure the loopback interfaces of PE1, P, and PE2.<PE1> system-view[PE1] interface loopback0[PE1-LoopBack0] ip address 11.11.11.11 255.255.255.255[PE1-LoopBack0] return<P> system-view[P] interface loopback0[P-LoopBack0] ip address 33.33.33.33 255.255.255.255[P-LoopBack0] return<PE2> system-view[PE2] interface loopback0[PE2-LoopBack0] ip address 22.22.22.22 255.255.255.255[PE2-LoopBack0] return# Enable OSPF on PE1, P, and PE2. Advertise the route of the loopback interface.<PE1> system-view[PE1] ospf 10[PE1-ospf-10] area 0.0.0.0[PE1-ospf-10-area-0.0.0.0] network 100.1.1.0 0.0.0.255[PE1-ospf-10-area-0.0.0.0] network 11.11.11.11 0.0.0.0[PE1-ospf-10-area-0.0.0.0] return<P> system-view[P] ospf 10[P-ospf-10] area 0.0.0.0[P-ospf-10-area-0.0.0.0] network 100.1.1.0 0.0.0.255[P-ospf-10-area-0.0.0.0] network 110.1.1.0 0.0.0.255[P-ospf-10-area-0.0.0.0] network 33.33.33.33 0.0.0.0[P-ospf-10-area-0.0.0.0] return<PE2> system-view[PE2] ospf 10[PE2-ospf-10] area 0.0.0.0[PE2-ospf-10-area-0.0.0.0] network 110.1.1.0 0.0.0.255[PE2-ospf-10-area-0.0.0.0] network 22.22.22.22 0.0.0.0[PE2-ospf-10-area-0.0.0.0] return# Set up MPLS LDP sessions among PE1, P, and PE2.<PE1> system-view[PE1] mpls lsr-id 11.11.11.11[PE1] mpls[PE1-mpls] quit[PE1] mpls ldp[PE1-mpls-ldp] quit[PE1] interface pos 3/0/0[PE1-Pos3/0/0] undo shutdown[PE1-Pos3/0/0] ip address 100.1.1.1 255.255.255.0[PE1-Pos3/0/0] mpls[PE1-Pos3/0/0] mpls ldp

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-47

Page 180: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[PE1-Pos3/0/0] return<P> system-view[P] mpls lsr-id 33.33.33.33[P] mpls[P-mpls] quit[P] mpls ldp[P-mpls-ldp] quit[P] interface pos 1/0/0[P-Pos1/0/0] mpls[P-Pos1/0/0] undo shutdown[P-Pos1/0/0] mpls ldp[P-Pos1/0/0] quit[P] interface pos 2/0/0[P-Pos2/0/0] undo shutdown[P-Pos2/0/0] mpls[P-Pos2/0/0] mpls ldp[P-Pos2/0/0] return<PE2> system-view[PE2] mpls lsr-id 22.22.22.22[PE2] mpls[PE2-mpls] quit[PE2] mpls ldp[PE2-mpls-ldp] quit[PE2] interface pos 3/0/0[PE2-Pos3/0/0] undo shutdown[PE2-Pos3/0/0] ip address 110.1.1.2 255.255.255.0[PE2-Pos3/0/0] mpls[PE2-Pos3/0/0] mpls ldp[PE2-Pos3/0/0] return

# Set up the IBGP peer relationship between PE1 and PE2.<PE1> system-view[PE1] bgp 500[PE1-bgp] peer 22.22.22.22 as-number 500[PE1-bgp] peer 22.22.22.22 connect-interface loopback0[PE1-bgp] ipv4-family vpnv4[PE1-bgp-af-vpnv4] peer 22.22.22.22 enable[PE1-bgp-af-vpnv4] return<PE2> system-view[PE2] bgp 500[PE2-bgp] peer 11.11.11.11 as-number 500[PE2-bgp] peer 11.11.11.11 connect-interface LoopBack0[PE2-bgp] ipv4-family vpnv4[PE2-bgp-af-vpnv4] peer 11.11.11.11 enable[PE2-bgp-af-vpnv4] return

# On PE1 and PE2, create VPN instances and bind the VPN instances to the interfaces thatare connected to CE.<PE1> system-view[PE1] ip vpn-instance vpn1[PE1-vpn-instance-vpn1] route-distinguisher 1:1[PE1-vpn-instance-vpn1] vpn-target 1:1 export-extcommunity[PE1-vpn-instance-vpn1] vpn-target 1:1 import-extcommunity[PE1-vpn-instance-vpn1] quit[PE1] interface ethernet1/0/0[PE1-Ethernet1/0/0] undo shutdown[PE1-Ethernet1/0/0] ip binding vpn-instance vpn1[PE1-Ethernet1/0/0] ip address 10.1.1.2 255.255.255.0[PE1-Ethernet1/0/0] quit[PE1] ip vpn-instance vpn2[PE1-vpn-instance-vpn2] route-distinguisher 2:2[PE1-vpn-instance-vpn2] vpn-target 2:2 export-extcommunity[PE1-vpn-instance-vpn2] vpn-target 2:2 import-extcommunity[PE1-vpn-instance-vpn2] quit[PE1] interface ethernet2/0/0[PE1-Ethernet2/0/0] undo shutdown[PE1-Ethernet2/0/0] ip binding vpn-instance vpn2[PE1-Ethernet2/0/0] ip address 40.1.1.2 255.255.255.0[PE1-Ethernet2/0/0] return

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-48 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 181: 00399154-Configuration Guide - QoS(V300R003_03).pdf

<PE2> system-view[PE2] ip vpn-instance vpn1[PE2-vpn-instance-vpn1] route-distinguisher 1:1[PE2-vpn-instance-vpn1] vpn-target 1:1 export-extcommunity[PE2-vpn-instance-vpn1] vpn-target 1:1 import-extcommunity[PE2-vpn-instance-vpn1] quit[PE2] interface ethernet1/0/0[PE2-Ethernet1/0/0] undo shutdown[PE2-Ethernet1/0/0] ip binding vpn-instance vpn1[PE2-Ethernet1/0/0] ip address 20.1.1.2 255.255.255.0[PE2-Ethernet1/0/0] quit[PE2] ip vpn-instance vpn2[PE2-vpn-instance-vpn2] route-distinguisher 2:2[PE2-vpn-instance-vpn2] vpn-target 2:2 export-extcommunity[PE2-vpn-instance-vpn2] vpn-target 2:2 import-extcommunity[PE2-vpn-instance-vpn2] quit[PE2] interface ethernet2/0/0[PE2-Ethernet2/0/0] undo shutdown[PE2-Ethernet2/0/0] ip binding vpn-instance vpn2[PE2-Ethernet2/0/0] ip address 30.1.1.2 255.255.255.0[PE2-Ethernet2/0/0] return# Set up EBGP peer relationship between PE1, CE1, and CE2, and that between PE2, CE3,and CE4.<CE1> system-view[CE1] bgp 100[CE1-bgp] peer 10.1.1.2 as-number 500[CE1-bgp] import-route direct[CE1-bgp] quit<CE2> system-view[CE2] bgp 200[CE2-bgp] peer 40.1.1.2 as-number 500[CE2-bgp] import-route direct[CE2-bgp] quit<PE1> system-view[PE1] bgp 500[PE1-bgp] ipv4-family vpn-instance vpn1[PE1-bgp-vpn1] peer 10.1.1.1 as-number 100[PE1-bgp-vpn1] import-route direct[PE1-bgp-vpn1] quit[PE1-bgp] ipv4-family vpn-instance vpn2[PE1-bgp-vpn2] peer 40.1.1.1 as-number 200[PE1-bgp-vpn2] import-route direct[PE1-bgp-vpn2] return<CE3> system-view[CE3] bgp 300[CE3-bgp] peer 30.1.1.2 as-number 500[CE3-bgp] import-route direct[CE3-bgp] quit<CE4> system-view[CE4] bgp 400[CE4-bgp] peer 20.1.1.2 as-number 500[CE4-bgp] import-route direct[CE4-bgp] quit<PE2> system-view[PE2] bgp 500[PE2-bgp] ipv4-family vpn-instance vpn1[PE2-bgp-vpn1] peer 20.1.1.1 as-number 400[PE2-bgp-vpn1] import-route direct[PE2-bgp-vpn1] quit[PE2-bgp] ipv4-family vpn-instance vpn2[PE2-bgp-vpn1] peer 30.1.1.1 as-number 300[PE2-bgp-vpn1] import-route direct[PE2-bgp-vpn1] returnAfter the configuration, CE1 and CE4 can ping through each other; CE2 and CE3 can pingthrough each other; two CEs in different VPNs cannot ping through each other.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-49

Page 182: 00399154-Configuration Guide - QoS(V300R003_03).pdf

2. Configure a routing policy on PE1 for sending routes and advertise the routing policythrough BGP.# On PE1, configure the routing policy so that the routes sent from 10.1.1.0 carry thecommunity attribute 10:10.<PE1> system-view[PE1] ip ip-prefix aa index 10 permit 10.1.1.0 24[PE1] route-policy aa permit node 10[PE1-route-policy] if-match ip-prefix aa[PE1-route-policy] apply community 10:10[PE1-route-policy] return# On PE1, apply the routing policy to the routes sent out by VPN1 instance and advertisethe routing policy to its peer.<PE1> system-view[PE1] ip vpn-instance vpn1[PE1-vpn-instance-vpn1] export route-policy aa[PE1-vpn-instance-vpn1] return# Configure PE1 to advertise the community attribute to its peer. By default, PE1 does notadvertise the community attribute to the peer.<PE1> system-view[PE1] bgp 500[PE1-bgp] ipv4-family vpnv4[PE1-bgp-af-vpnv4] peer 22.22.22.22 advertise-community[PE1-bgp-af-vpnv4] return

3. On PE2, configure the routing policy for the received route. Create the traffic behavior forthe routes that match the community attribute.# Create the traffic behavior for the routes that match the community attribute.<PE2> system-view[PE2] traffic behavior dd[PE2-behavior-dd] car cir 30000 yellow pass red discard [PE2-behavior-dd] return

NOTE

The traffic behavior to be associated with the routing policy must be defined in advance.

# On PE2, create a routing policy to apply the traffic behavior to the received routes thatmatch the community attribute 10:10.<PE2> system-view[PE2] ip community-filter 10 permit 10:10[PE2] route-policy bb permit node 10[PE2-route-policy] if-match community-filter 10[PE2-route-policy] apply behavior dd[PE2-route-policy] return# On PE2, apply the routing policy to the received route of the VPN instance.<PE2> system-view[PE2] ip vpn-instance vpn1[PE2-vpn-instance-vpn1] import route-policy bb[PE2-vpn-instance-vpn1] return# Run the display bgp vpnv4 all routing-table command on PE2. The community attributeof routes sent from 10.1.1.0/24 is 10:10.[PE2] display bgp vpnv4 all routing-table 10.1.1.0BGP local router ID : 22.22.22.22Local AS number : 500 Total routes of Route Distinguisher(1:1): 1 BGP routing table entry information of 10.1.1.0/24: Label information (Received/Applied): 15361/NULL From: 11.11.11.11 (11.11.11.11) Original nexthop: 11.11.11.11 Community:<10:10> Ext-Community: <1 : 1>

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-50 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 183: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Convergence Priority: 0 AS-path Nil, origin incomplete, MED 0, localpref 100, pref-val 0, valid, internal, best, pre 255 Not advertised to any peer yet Total routes of vpn-instance vpn1: 1 BGP routing table entry information of 10.1.1.0/24: Label information (Received/Applied): 15361/NULL From: 11.11.11.11 (11.11.11.11) Relay Nexthop: 0.0.0.0 Original nexthop: 11.11.11.11 Community:<10:10> Ext-Community: <1 : 1> Convergence Priority: 0 AS-path Nil, origin incomplete, MED 0, localpref 100, pref-val 0, valid, internal, best, pre 255 Advertised to such 1 peers: 20.1.1.1

4. On the inbound interface Ethernet 1/0/0 of PE2, apply QPPB to the traffic from CE4.<PE2> system-view[PE2]interface ethernet1/0/0[PE2-Ethernet1/0/0] qppb-policy behavior destination[PE2-Ethernet1/0/0] return

5. Verify the configuration.# On PE2, display the FIB information of the VPN. If the configuration succeeds, you cansee that the value of the QosInfo in the output information is 0x20000001.[PE2] display fib vpn-instance vpn1 10.1.1.0 verbose Route Entry Count: 1 Destination: 10.1.1.0 Mask : 255.255.255.0Nexthop : 11.11.11.11 OutIf : POS3/0/0LocalAddr : 100.1.1.2 LocalMask: 0.0.0.0 Flags : DGU Age : 2227sec ATIndex : 0 Slot : 3 LspFwdFlag : 1 LspToken : 0x76002001 InLabel : 15360 OriginAs : 100 BGPNextHop : 11.11.11.11 PeerAs : 100 QosInfo : 0x20000001 OriginQos: 0x0 NexthopBak : 0.0.0.0 OutIfBak : [No Intf] LspTokenBak: 0x0 InLabelBak : NULL LspToken_ForInLabelBak : 0x0 EntryRefCount : 1 rt_ulVlanId : 0x0 rt_ulVlinkBak : NULL

Configuration Filesl Configuration file of CE1

# sysname CE1#interface Ethernet1/0/0 undo shutdown ip address 10.1.1.1 255.255.255.0#bgp 100 peer 10.1.1.2 as-number 500 # undo synchronization import-route direct peer 10.1.1.2 enable#return

l Configuration file of CE2# sysname CE2

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-51

Page 184: 00399154-Configuration Guide - QoS(V300R003_03).pdf

#interface Ethernet2/0/0 undo shutdown ip address 40.1.1.1 255.255.255.0#bgp 200 peer 40.1.1.2 as-number 500 #undo synchronization import-route direct peer 40.1.1.2 enable#return

l Configuration file of CE3# sysname CE3#interface Ethernet2/0/0 undo shutdown ip address 30.1.1.1 255.255.255.0#bgp 300 peer 30.1.1.2 as-number 500 #undo synchronization import-route direct peer 30.1.1.2 enable#return

l Configuration file of CE4# sysname CE4#interface Ethernet1/0/0 undo shutdown ip address 20.1.1.1 255.255.255.0#bgp 400 peer 20.1.1.2 as-number 500 #undo synchronization import-route direct peer 20.1.1.2 enable#return

l Configuration file of PE1# sysname PE1#ip vpn-instance vpn1 route-distinguisher 1:1export route-policy aa vpn-target 1:1 export-extcommunity vpn-target 1:1 import-extcommunity#ip vpn-instance vpn2 route-distinguisher 2:2 vpn-target 2:2 export-extcommunity vpn-target 2:2 import-extcommunity# mpls lsr-id 11.11.11.11 mpls#mpls ldp#interface Ethernet1/0/0 undo shutdown

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-52 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 185: 00399154-Configuration Guide - QoS(V300R003_03).pdf

ip binding vpn-instance vpn1 ip address 10.1.1.2 255.255.255.0#interface Ethernet2/0/0 undo shutdown ip binding vpn-instance vpn2 ip address 40.1.1.2 255.255.255.0#interface Pos3/0/0undo shutdownlink-protocol ppp ip address 100.1.1.1 255.255.255.0 mpls mpls ldp#interface LoopBack0 ip address 11.11.11.11 255.255.255.255#bgp 500 peer 22.22.22.22 as-number 500 peer 22.22.22.22 connect-interface LoopBack0 # ipv4-family unicast undo synchronization peer 22.22.22.22 enable# ipv4-family vpnv4 policy vpn-target peer 22.22.22.22 enablepeer 22.22.22.22 advertise-community# ipv4-family vpn-instance vpn1 peer 10.1.1.1 as-number 100 import-route direct#ospf 10 area 0.0.0.0 network 100.1.1.0 0.0.0.255 network 11.11.11.11 0.0.0.0#route-policy aa permit node 10 if-match ip-prefix aa apply community 10:10# ip ip-prefix aa index 10 permit 10.1.1.0 24#return

l Configuration file of PE2# sysname PE2#ip vpn-instance vpn1 route-distinguisher 1:1import route-policy bb vpn-target 1:1 export-extcommunity vpn-target 1:1 import-extcommunity#ip vpn-instance vpn2 route-distinguisher 2:2 vpn-target 2:2 export-extcommunity vpn-target 2:2 import-extcommunity# mpls lsr-id 22.22.22.22 mpls#mpls ldp#traffic behavior ddcar cir 30000 green pass yellow pass red discard

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-53

Page 186: 00399154-Configuration Guide - QoS(V300R003_03).pdf

#interface Ethernet1/0/0 undo shutdown ip binding vpn-instance vpn1 ip address 20.1.1.1 255.255.255.0qppb-policy behavior destination#interface Ethernet2/0/0 undo shutdown ip binding vpn-instance vpn2 ip address 30.1.1.2 255.255.255.0#interface Pos3/0/0undo shutdownlink-portocol ppp ip address 110.1.1.2 255.255.255.0 mpls mpls ldp#interface LoopBack0 ip address 22.22.22.22 255.255.255.255#bgp 500 peer 11.11.11.11 as-number 500 peer 11.11.11.11 connect-interface LoopBack0 # ipv4-family unicast undo synchronization peer 11.11.11.11 enable # ipv4-family vpnv4 policy vpn-target peer 11.11.11.11 enable# ipv4-family vpn-instance vpn1 peer 20.1.1.1 as-number 400 import-route direct#ospf 10 area 0.0.0.0 network 110.1.1.0 0.0.0.255 network 22.22.22.22 0.0.0.0#route-policy bb permit node 10 if-match community-filter 10 apply behavior dd# ip community-filter 10 permit 10:10#return

l Configuration file of the P# sysname P# mpls lsr-id 33.33.33.33 mpls#mpls ldp#interface Pos1/0/0undo shutdownlink-protocol ppp ip address 100.1.1.2 255.255.255.0 mpls mpls ldp#interface Pos2/0/0undo shutdownlink-protocol ppp

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-54 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 187: 00399154-Configuration Guide - QoS(V300R003_03).pdf

ip address 110.1.1.1 255.255.255.0 mpls mpls ldp#interface LoopBack0 ip address 33.33.33.33 255.255.255.255#ospf 1 area 0.0.0.0 network 100.1.1.0 0.0.0.255 network 110.1.1.0 0.0.0.255 network 33.33.33.33 0.0.0.0#Return

6.5.3 Example for Configuring a Hierarchical Resource ReservedL3VPN

Networking RequirementsAs shown in Figure 6-10, CE1 and CE2 are in VPN A, and CE3 and CE4 are in VPN B. VPNA and VPN B share the same MPLS TE tunnel that connects the public edge routers PE1 andPE2. You are required to reserve bandwidths for packets from VPN A and VPN B that go throughthe MPLS TE tunnel, and for packets of different services within a VPN. In addition, thebandwidth resources are reserved.

OSPF is used as the IGP on the MPLS backbone network. VPN A and VPN B are configuredwith L3VPN services.

The specific requirements are as follows:

l Use RSVP-TE to establish an MPLS TE tunnel that connects PE1 and PE2. The tunnelcarries L3VPN services. The bandwidth of the tunnel is 100 Mbit/s. The maximumbandwidth of the links along the tunnel is 200 Mbit/s and the maximum reservablebandwidth is 120 Mbit/s.

l VPN A is guaranteed with a bandwidth of 50 Mbit/s in the MPLS TE tunnel. The VoIPpackets of VPN A are forwarded in the traffic type of EF and are guaranteed with abandwidth of 12 Mbit/s. The video packets of VPN A are forwarded in the traffic type ofAF4 and guaranteed with a bandwidth of 8 Mbit/s. The important data packets of VPN Aare forwarded in the traffic type of AF3 and are guaranteed with a bandwidth of 5 Mbit/s.

l VPN B is guaranteed with a bandwidth of 30 Mbit/s in the MPLS TE tunnel. The voicepackets in VPN B are forwarded in the traffic type of EF and are guaranteed with abandwidth of 10 Mbit/s. Other service packets share the remaining bandwidth for packetsof VPN B according to the default settings of the system.

l The packets from VPN A and VPN B are forwarded in the Uniform model in the MPLSTE tunnel. On the outbound interface of the MPLS domain, the packets are scheduledaccording to the DSCP priorities that are mapped from the EXP priorities.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-55

Page 188: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Figure 6-10 Networking diagram for configuring a hierarchical resource reserved L3VPN

Configuration Roadmap

The configuration roadmap is as follows:

1. Configure the IP addresses and routes for the interfaces to ensure they can interwork at thenetwork layer.

2. Configure an MPLS TE tunnel between the PEs. Create a tunnel interface on the PE1 sideonly (because the MPLS TE tunnel is unidirectional).

3. Configure L3VPN services.4. Configure the simple traffic classification: trusting DSCP values carried by the upstream

packets.5. Configure that the traffic in the MPLS TE tunnel from VPN A and VPN B is applied with

the Uniform model .6. Configure reserved resources and guaranteed bandwidths for the traffic from VPN A and

VPN B.

NOTE

The hierarchical resource reserved L3VPN is configured on an ingress PE device. After the specifiedconfiguration, you can further configure interface-specific HQoS on the interface of the network side orthe user side on the egress PE device so that HQoS is applied to the traffic going out of an MPLS network.

In this example, resource separation is applied only to the VPN data coming from PE1 to PE2. Networktraffic is bi-directional; therefore, you can configure hierarchical resource reserved L3VPN for the oppositetraffic on the peer PE.

Data Preparation

To complete the configuration, you need the following data:

l IP addresses of the interfaces

l MPLS LSR IDs on the PE and P devices, maximum usable bandwidth of the physical linkalong the MPLS TE tunnel, and the maximum reservable bandwidth

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-56 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 189: 00399154-Configuration Guide - QoS(V300R003_03).pdf

l Tunnel interfaces, MPLS TE tunnel encapsulation protocol, tunnel ID, and RSVP tunnelsignaling

l Name and VPN-target of the VPN instance

l Service types and colors of the packets from VPN A and VPN B for label mapping at theingress of the MPLS TE tunnel

l Guaranteed bandwidths and scheduling parameters for flow queues that accept non-VPNpackets from VPN A, VPN B, and the MPLS TE tunnel

l Bandwidth limits for VPN A, VPN B, and MPLS TE

Configuration Procedure1. Configure the IP addresses of the interfaces on the MPLS backbone network and the IGP

(OSPF) to ensure that PE1, P, and PE2 can interwork.# Configure PE1.<PE1> system-view[PE1] interface loopback 1[PE1-LoopBack1] ip address 1.1.1.9 32[PE1-LoopBack1] quit[PE1] interface pos 1/0/0[PE1-Pos1/0/0] undo shutdown[PE1-Pos1/0/0] ip address 100.1.1.1 24[PE1-Pos1/0/0] quit[PE1] ospf[PE1-ospf-1] area 0[PE1-ospf-1-area-0.0.0.0] network 100.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] return

# Configure the P device.<P> system-view[P] interface loopback 1[P-LoopBack1] ip address 3.3.3.9 32[P-LoopBack1] quit[P] interface pos 1/0/0[P-Pos1/0/0] undo shutdown[P-Pos1/0/0] ip address 100.1.1.2 24[P-Pos1/0/0] quit[P] interface pos 2/0/0[P-Pos2/0/0] undo shutdown[P-Pos2/0/0] ip address 200.1.1.1 24[P-Pos2/0/0] quit[P] ospf[P-ospf-1] area 0[P-ospf-1-area-0.0.0.0] network 100.1.1.0 0.0.0.255[P-ospf-1-area-0.0.0.0] network 200.1.1.0 0.0.0.255[P-ospf-1-area-0.0.0.0] network 3.3.3.9 0.0.0.0[P-ospf-1-area-0.0.0.0] return

# Configure PE2.<PE2> system-view[PE2] interface loopback 1[PE2-LoopBack1] ip address 2.2.2.9 32[PE2-LoopBack1] quit[PE2] interface pos 1/0/0[PE2-Pos1/0/0] undo shutdown[PE2-Pos1/0/0] ip address 200.1.1.2 24[PE2-Pos1/0/0] quit[PE2] ospf[PE2-ospf-1] area 0[PE2-ospf-1-area-0.0.0.0] network 200.1.1.0 0.0.0.255[PE2-ospf-1-area-0.0.0.0] network 2.2.2.9 0.0.0.0[PE2-ospf-1-area-0.0.0.0] return

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-57

Page 190: 00399154-Configuration Guide - QoS(V300R003_03).pdf

After the configuration, the OSPF adjacency is established among PE1, P, and PE2. Usingthe display ospf peer command, you should find that the adjacency state is Full. Runningthe display ip routing-table command, you should find that the PEs have learnt theloopback1 routes from each other.The following is the display on PE1:[PE1] display ip routing-tableRoute Flags: R - relied, D - download to fib------------------------------------------------------------------------------Routing Tables: Public Destinations : 9 Routes : 9Destination/Mask Proto Pre Cost Flags NextHop Interface 1.1.1.9/32 Direct 0 0 D 127.0.0.1 InLoopBack1 2.2.2.9/32 OSPF 10 2 D 100.1.1.2 POS1/0/0 3.3.3.9/32 OSPF 10 3 D 100.1.1.2 POS1/0/0 100.1.1.0/24 Direct 0 0 D 100.1.1.1 POS1/0/0 100.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack1 100.1.1.2/32 Direct 0 0 D 100.1.1.2 POS1/0/0200.1.1.0/24 OSPF 10 2 D 100.1.1.2 POS1/0/0[PE1] display ospf peer OSPF Process 1 with Router ID 1.1.1.9 NeighborsArea 0.0.0.0 interface 100.1.1.1(POS1/0/0)'s neighborsRouter ID: 3.3.3.9 Address: 100.1.1.2 GR State: Normal State: Full Mode:Nbr is Master Priority: 1 DR: None BDR: None MTU: 1500 Dead timer due in 38 sec Neighbor is up for 00:02:44 Authentication Sequence: [ 0 ]

2. Configure MPLS TE.Configure the basic MPLS functions on the MPLS backbone network.l Configure PE1.

<PE1> system-view[PE1] mpls lsr-id 1.1.1.9[PE1] mpls[PE1-mpls] quit

l Configure the P.<P> system-view[P] mpls lsr-id 3.3.3.9[P] mpls[P-mpls] quit

l Configure PE2.<PE2> system-view[PE2] mpls lsr-id 2.2.2.9[PE2] mpls[PE2-mpls] quit

# Enable MPLS TE, RSVP-TE, CSPF, and OSPF TE.l Configure PE1.

<PE1> system-view[PE1] mpls[PE1-mpls] mpls te[PE1-mpls] mpls rsvp-te[PE1-mpls] mpls te cspf[PE1-mpls] quit[PE1] interface pos 1/0/0[PE1-Pos1/0/0] mpls te[PE1-Pos1/0/0] mpls rsvp-te[PE1-Pos1/0/0] quit[PE1] ospf[PE1-ospf-1] opaque-capability enable[PE1-ospf-1] area 0[PE1-ospf-1-area-0.0.0.0] mpls-te enable

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-58 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 191: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[PE1-ospf-1-area-0.0.0.0] return

l Configure the P.<P> system-view[P] mpls[P-mpls] mpls te[P-mpls] mpls rsvp-te[P-mpls] mpls te cspf[P-mpls] quit[P] interface pos 1/0/0[P-Pos1/0/0] mpls te[P-Pos1/0/0] mpls rsvp-te[P-Pos1/0/0] quit[P] interface pos 2/0/0[P-Pos2/0/0] mpls te[P-Pos2/0/0] mpls rsvp-te[P-Pos2/0/0] quit[P] ospf[P-ospf-1] opaque-capability enable[P-ospf-1] area 0[P-ospf-1-area-0.0.0.0] mpls-te enable[P-ospf-1-area-0.0.0.0] return

l Configure PE2.<PE2> system-view[PE2] mpls[PE2-mpls] mpls te[PE2-mpls] mpls rsvp-te[PE2-mpls] mpls te cspf[PE2-mpls] quit[PE2] interface pos 1/0/0[PE2-Pos1/0/0] mpls te[PE2-Pos1/0/0] mpls rsvp-te[PE2-Pos1/0/0] quit[PE2] ospf[PE2-ospf-1] opaque-capability enable[PE2-ospf-1] area 0[PE2-ospf-1-area-0.0.0.0] mpls-te enable[PE2-ospf-1-area-0.0.0.0] return

# Configure the maximum usable bandwidth for the physical link along the MPLS TEtunnel and the maximum reservable bandwidth.

NOTE

When you configure an MPLS TE tunnel, you need to specify the maximum usable bandwidth forthe physical link and the maximum reservable bandwidth; then you also need to specify the bandwidthof the tunnel.

The maximum reservable bandwidth of the physical link should not exceed the maximum usablebandwidth. The bandwidth of a tunnel should not exceed the maximum reservable bandwidth for thephysical link.

l Configure PE1.<PE1> system-view[PE1] interface pos 1/0/0[PE1-Pos1/0/0] mpls te max-link-bandwidth 200000[PE1-Pos1/0/0] mpls te max-reservable-bandwidth 120000[PE1-Pos1/0/0] return

l Configure the P.<P> system-view[P] interface pos 1/0/0[P-Pos1/0/0] mpls te max-link-bandwidth 200000[P-Pos1/0/0] mpls te max-reservable-bandwidth 120000[P-Pos1/0/0] quit[P] interface pos 2/0/0[P-Pos2/0/0] mpls te max-link-bandwidth 200000[P-Pos2/0/0] mpls te max-reservable-bandwidth 120000

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-59

Page 192: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[P-Pos2/0/0] returnl Configure PE2.

<PE2> system-view[PE2] interface pos 1/0/0[PE2-Pos1/0/0] mpls te max-link-bandwidth 200000[PE2-Pos1/0/0] mpls te max-reservable-bandwidth 120000[PE2-Pos1/0/0] returnConfigure the MPLS TE tunnel on PE1.<PE1> system-view[PE1] interface tunnel 1/0/0[PE1-Tunnel1/0/0] ip address unnumbered interface loopback 1[PE1-Tunnel1/0/0] tunnel-protocol mpls te[PE1-Tunnel1/0/0] destination 2.2.2.9[PE1-Tunnel1/0/0] mpls te tunnel-id 100[PE1-Tunnel1/0/0] mpls te signal-protocol rsvp-te[PE1-Tunnel1/0/0] mpls te commit[PE1-Tunnel1/0/0] return

NOTE

In this example, the MPLS TE tunnel is configured only in the direction from PE1 to PE2. If an MPLSTE tunnel is bi-directional, you also need to configure the MPLS TE tunnel on PE2.

After the preceding configuration, run the display interface tunnel command and you canfind that the state of the interface is Up.[PE1] display interface tunnelTunnel6/0/0 current state : UPLine protocol current state : UPLast up time: 2007-10-31, 15:19:53Description:HUAWEI, Quidway Series, Tunnel1/0/0 InterfaceRoute Port,The Maximum Transmit Unit is 1500Internet Address is unnumbered, using address of LoopBack1(1.1.1.9/32)Encapsulation is TUNNEL, loopback not setTunnel destination 2.2.2.9Tunnel up/down statistics 1Tunnel protocol/transport MPLS/MPLS, ILM is available,primary tunnel id is 0x40c18000, secondary tunnel id is 0x0 300 minutes output rate 0 bytes/sec, 0 packets/sec 0 packets output, 0 bytes0 output errorRun the display mpls te tunnel-interface command on PE1 and you can view detailedinformation about the tunnel.<PE1> display mpls te tunnel-interface Tunnel Name : Tunnel1/0/0 Tunnel Desc : HUAWEI, Quidway Series, Tunnel1/0/0 Interface Tunnel State Desc : CR-LSP is Up Tunnel Attributes : LSP ID : 1.1.1.9:1 Session ID : 100 Admin State : UP Oper State : UP Ingress LSR ID : 1.1.1.9 Egress LSR ID: 2.2.2.9 Signaling Protocol : RSVP Resv Style : SE Class Type : CLASS 0 Tunnel BW : 0 kbps Reserved BW : 1200 kbps Setup Priority : 7 Hold Priority: 7 Hop Limit : - Secondary Hop Limit : - BestEffort Hop Limit: -Affinity Prop/Mask : 0x0/0x0 Explicit Path Name : - Secondary Affinity Prop/Mask: 0x0/0x0 Secondary Explicit Path Name: - BestEffort Affinity Prop/Mask: 0x0/0x0 Tie-Breaking Policy : None Metric Type : None Record Route : Disabled Record Label : Disabled

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-60 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 193: 00399154-Configuration Guide - QoS(V300R003_03).pdf

FRR Flag : Disabled BackUpBW Flag: Not Supported BackUpBW Type : - BackUpBW : - Route Pinning : Disabled Retry Limit : 5 Retry Interval: 10 sec Reopt : Disabled Reopt Freq : - Back Up Type : None Back Up LSPID : - Auto BW : Disabled Auto BW Freq : - Min BW : - Max BW : - Current Collected BW: - Interfaces Protected: - ACL Bind Value : VRF Bind Value : L2VPN Bind Value : Car Policy : Disabled Tunnel Group : Primary Primary Tunnel Sum : - Primary Tunnel : - Backup Tunnel : - IPTN InLabel : - Group Status : Up Oam Status : Up Bfd Capability : NoneBestEffort : Disabled IsBestEffortPath: Non-existentRunning the display mpls te cspf tedb all command on PE1, you can view the linkinformation about TEDB.[PE1] display mpls te cspf tedb allMaximum Node Supported: 2048 Maximum Link Supported: 8192Current Total Node Number: 3 Current Total Link Number: 4ID Router-ID IGP Process-ID Area Link-Count1 3.3.3.9 OSPF 1 0 22 1.1.1.9 OSPF 1 0 13 2.2.2.9 OSPF 1 0 1

3. Configure L3VPN.# Configure VPN instances on PEs and bind them to the interfaces that connect CEs.l Configure CE1.

<CE1> system-view[CE1] interface gigabitethernet 1/0/0[CE1-GigabitEthernet1/0/0] undo shutdown[CE1-GigabitEthernet1/0/0] ip address 10.1.1.1 255.255.255.0[CE1-GigabitEthernet1/0/0] return

l Configure CE3.<CE3> system-view[CE3] interface gigabitethernet 1/0/0[CE3-GigabitEthernet1/0/0] undo shutdown[CE3-GigabitEthernet1/0/0] ip address 10.3.1.1 255.255.255.0[CE3-GigabitEthernet1/0/0] return

l Configure VPN instances on PE1.<PE1> system-view[PE1] ip vpn-instance vpna[PE1-vpn-instance-vpna] route-distinguisher 1:1[PE1-vpn-instance-vpna] vpn-target 1:1 export-extcommunity[PE1-vpn-instance-vpna] vpn-target 1:1 import-extcommunity[PE1-vpn-instance-vpna] quit[PE1] interface gigabitethernet2/0/0[PE1-GigabitEthernet2/0/0] undo shutdown[PE1-GigabitEthernet2/0/0] ip binding vpn-instance vpna[PE1-GigabitEthernet2/0/0] ip address 10.1.1.2 255.255.255.0[PE1-GigabitEthernet2/0/0] quit[PE1] ip vpn-instance vpnb[PE1-vpn-instance-vpnb] route-distinguisher 2:2[PE1-vpn-instance-vpnb] vpn-target 2:2 export-extcommunity[PE1-vpn-instance-vpnb] vpn-target 2:2 import-extcommunity

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-61

Page 194: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[PE1-vpn-instance-vpnb] quit[PE1] interface gigabitethernet3/0/0[PE1-GigabitEthernet3/0/0] undo shutdown[PE1-GigabitEthernet3/0/0] ip binding vpn-instance vpnb[PE1-GigabitEthernet3/0/0] ip address 10.3.1.2 255.255.255.0[PE1-GigabitEthernet3/0/0] return

l Configure CE2.<CE2> system-view[CE2] interface gigabitethernet 1/0/0[CE2-GigabitEthernet1/0/0] undo shutdown[CE2-GigabitEthernet1/0/0] ip address 10.2.1.1 255.255.255.0[CE2-GigabitEthernet1/0/0] return

l Configure CE4.<CE4> system-view[CE4] interface gigabitethernet 1/0/0[CE4-GigabitEthernet1/0/0] undo shutdown[CE4-GigabitEthernet1/0/0] ip address 10.4.1.1 255.255.255.0[CE4-GigabitEthernet1/0/0] return

l Configure VPN instances on PE2.<PE2> system-view[PE2] ip vpn-instance vpna[PE2-vpn-instance-vpna] route-distinguisher 1:1[PE2-vpn-instance-vpna] vpn-target 1:1 export-extcommunity[PE2-vpn-instance-vpna] vpn-target 1:1 import-extcommunity[PE2-vpn-instance-vpna] quit[PE2] interface gigabitethernet2/0/0[PE2-GigabitEthernet2/0/0] undo shutdown[PE2-GigabitEthernet2/0/0] ip binding vpn-instance vpna[PE2-GigabitEthernet2/0/0] ip address 10.2.1.2 255.255.255.0[PE2-GigabitEthernet2/0/0] quit[PE2] ip vpn-instance vpnb[PE2-vpn-instance-vpnb] route-distinguisher 2:2[PE2-vpn-instance-vpnb] vpn-target 2:2 export-extcommunity[PE2-vpn-instance-vpnb] vpn-target 2:2 import-extcommunity[PE2-vpn-instance-vpnb] quit[PE2] interface gigabitethernet3/0/0[PE2-GigabitEthernet3/0/0] undo shutdown[PE2-GigabitEthernet3/0/0] ip binding vpn-instance vpnb[PE2-GigabitEthernet3/0/0] ip address 10.4.1.2 255.255.255.0[PE2-GigabitEthernet3/0/0] return

After the preceding configuration, run the display ip vpn-instance verbose commandon a PE and you can view the configurations of the VPN instances.The following is the display on PE1:[PE1] display ip vpn-instance verbose Total VPN-Instances configured : 2 VPN-Instance Name and ID : vpna, 1 Create date : 2007/07/21 11:30:35 Up time : 0 days, 00 hours, 05 minutes and 19 seconds Route Distinguisher : 1:1 Export VPN Targets : 1:1 Import VPN Targets : 1:1 Label policy: label per route The diffserv-mode Information is : uniform The ttl-mode Information is : pipe Interfaces : GigabitEthernet2/0/0 VPN-Instance Name and ID : vpnb, 2 Create date : 2007/07/21 11:31:18 Up time : 0 days, 00 hours, 04 minutes and 36 seconds Route Distinguisher : 2:2 Export VPN Targets : 2:2 Import VPN Targets : 2:2 The diffserv-mode Information is : uniform The ttl-mode Information is : pipe Interfaces : GigabitEthernet3/0/0

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-62 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 195: 00399154-Configuration Guide - QoS(V300R003_03).pdf

On a PE, you can ping through the connected CEs.# Establish an IBGP adjacency between PE1 and PE2.l Configure PE1

<PE1> system-view[PE1] bgp 500[PE1-bgp] peer 2.2.2.9 as-number 500[PE1-bgp] peer 2.2.2.9 connect-interface loopback1[PE1-bgp] ipv4-family vpnv4[PE1-bgp-af-vpnv4] peer 2.2.2.9 enable[PE1-bgp-af-vpnv4] return

l Configure PE2<PE2> system-view[PE2] bgp 500[PE2-bgp] peer 1.1.1.9 as-number 500[PE2-bgp] peer 1.1.1.9 connect-interface LoopBack1[PE2-bgp] ipv4-family vpnv4[PE2-bgp-af-vpnv4] peer 1.1.1.9 enable[PE2-bgp-af-vpnv4] return

# Establish an EBGP adjacency between PE1 and CE1, PE1 and CE3, PE2 and CE2, andPE2 and CE4.l Configure CE1.

<CE1> system-view[CE1] bgp 100[CE1-bgp] peer 10.1.1.2 as-number 500[CE1-bgp] import-route direct[CE1-bgp] quit

l Configure CE3.<CE3> system-view[CE3] bgp 300[CE3-bgp] peer 10.3.1.2 as-number 500[CE3-bgp] import-route direct[CE3-bgp] quit

l Configure PE1.<PE1> system-view[PE1] bgp 500[PE1-bgp] ipv4-family vpn-instance vpna[PE1-bgp-vpna] peer 10.1.1.1 as-number 100[PE1-bgp-vpna] import-route direct[PE1-bgp-vpna] quit[PE1-bgp] ipv4-family vpn-instance vpnb[PE1-bgp-vpnb] peer 10.3.1.1 as-number 300[PE1-bgp-vpnb] import-route direct[PE1-bgp-vpnb] return

l Configure CE2.<CE2> system-view[CE2] bgp 200[CE2-bgp] peer 10.2.1.2 as-number 500[CE2-bgp] import-route direct[CE2-bgp] quit

l Configure CE4.<CE4> system-view[CE4] bgp 400[CE4-bgp] peer 10.4.1.2 as-number 500[CE4-bgp] import-route direct[CE4-bgp] quit

l Configure PE2.<PE2> system-view[PE2] bgp 500[PE2-bgp] ipv4-family vpn-instance vpna

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-63

Page 196: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[PE2-bgp-vpna] peer 10.2.1.1 as-number 200[PE2-bgp-vpna] import-route direct[PE2-bgp-vpna] quit[PE2-bgp] ipv4-family vpn-instance vpnb[PE2-bgp-vpnb] peer 10.4.1.1 as-number 400[PE2-bgp-vpnb] import-route direct[PE2-bgp-vpnb] return

After the proceeding configuration, run the display bgp peer and display bgp vpnv4peer command on a PE, you can find that BGP peer relations between PEs, and betweenPEs and CEs have been established: The state should be Established.The following is the display on PE1:[PE1] display bgp peer BGP local router ID : 1.1.1.9 Local AS number : 500 Total number of peers : 1 Peers in established state : 1 Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv 2.2.2.9 4 500 3 3 0 00:00:11 Established 0 [PE1] display bgp vpnv4 all peerBGP local router ID : 1.1.1.9 Local AS number : 500 Total number of peers : 3 Peers in established state : 3 Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv2.2.2.9 4 500 12 18 0 00:09:38 Established 0 Peer of vpn instance: vpn instance vpna :10.1.1.1 4 100 25 25 0 00:17:57 Established 1 vpn instance vpnb :10.3.1.1 4 300 21 22 0 00:17:10 Established 1

CE1 can ping through CE2; CE3 can ping through CE4. CEs in different VPNs cannotping through each other.

4. Configure a tunnel policy: specifying that VPNs communicate through the MPLS TE tunneland applying the tunnel policy to the VPN instances.<PE1> system-view[PE1] tunnel-policy policy1[PE1-tunnel-policy-policy1] tunnel binding destination 2.2.2.9 te tunnel 1/0/0[PE1-tunnel-policy-policy1] quit[PE1] ip vpn-instance vpna[PE1-vpn-instance-vpna] tnl-policy policy1[PE1-vpn-instance-vpna] quit[PE1] ip vpn-instance vpnb[PE1-vpn-instance-vpnb] tnl-policy policy1[PE1-vpn-instance-vpnb] return

NOTE

In this example, the TE tunnel is configured only in the direction from PE1 to PE2. If an MPLS TEtunnel is bi-directional, you also need to configure the tunnel policy on PE2 and apply it to the VPNinstances.

Run the display mpls forwarding-table command on PE1, you can find an LSP destinedfor 2.2.2.9/32 in the MPLS forwarding table.[PE1] display mpls forwarding-tableFec Outlabel Out-IF Nexthop LspIndex3.3.3.9/32 3 POS1/0/0 100.1.1.2 307352.2.2.9/32 1025 POS1/0/0 100.1.1.2 30743

Running the display tunnel-info all command on PE1, you can find an MPLS TE tunneldestined for 2.2.2.9 has been established on PE1.[PE1] display tunnel-info all * -> Allocated VC TokenTunnel ID Type Destination Token----------------------------------------------------------------------0x1808027 lsp 3.3.3.9 39

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-64 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 197: 00399154-Configuration Guide - QoS(V300R003_03).pdf

0x1808028 lsp 20.20.20.9 400x1808029 lsp 30.30.30.9 410x180802a lsp -- 420x180802b lsp -- 430x180802c lsp -- 440x180802d lsp -- 450x61818003 cr lsp 2.2.2.9 327710x41818005 lsp -- 327730x41818006 lsp -- 32774

5. Configure the simple traffic classification on the inbound interface of PE1: trusting theDSCP values of upstream IP packets.<PE1> system-view[PE1] interface gigabitethernet 2/0/0[PE1-GigabitEthernet2/0/0] trust upstream default[PE1-GigabitEthernet2/0/0] quit[PE1] interface gigabitethernet 3/0/0[PE1-GigabitEthernet3/0/0] trust upstream default[PE1-GigabitEthernet3/0/0] return

NOTE

Although the L3VPN is configured to support the Short Pipe model, it is recommended that youenable the simple traffic classification. The reason is that the egress PE performs queue schedulingaccording to the original DSCP values.

6. Configure flow queues on PE1 for non-VPN packets from VPN A, VPN B, and the MPLSTE tunnel.# Configure a WRED object referenced by a flow queue.<PE1> system-view[PE1] flow-wred test[PE1-flow-wred-test] color green low-limit 30 high-limit 50 discard-percentage 100[PE1-flow-wred-test] color yellow low-limit 20 high-limit 40 discard-percentage 100[PE1-flow-wred-test] color red low-limit 10 high-limit 30 discard-percentage 100[PE1-flow-wred-test] return# Configure the scheduling algorithms, WRED parameters, and shaping values for flowqueues.<PE1> system-view[PE1] flow-queue vpna[PE1-flow-queue-template-vpna] queue ef pq flow-wred test shaping 12000[PE1-flow-queue-template-vpna] queue af4 wfq weight 15 flow-wred test shaping 8000[PE1-flow-queue-template-vpna] queue af3 wfq weight 10 flow-wred test shaping 5000[PE1-flow-queue-template-vpna] quit[PE1] flow-queue vpnb[PE1-flow-queue-template-vpnb] queue ef pq flow-wred test shaping 10000[PE1-flow-queue-template-vpnb] quit[PE1] flow-queue te[PE1-flow-queue-template-te] queue ef pq flow-wred test shaping 25000[PE1-flow-queue-template-te] queue af4 wfq weight 15 flow-wred test shaping 15000[PE1-flow-queue-template-te] queue af3 wfq weight 10 flow-wred test shaping 10000[PE1-flow-queue-template-te] return

7. Configure DiffServ models supported by L3VPNs.<PE1> system-view[PE1] ip vpn-instance vpna[PE1-vpn-instance-vpna] diffserv-mode uniform [PE1-vpn-instance-vpna] quit[PE1] ip vpn-instance vpnb[PE1-vpn-instance-vpnb] diffserv-mode uniform[PE1-vpn-instance-vpnb] quit

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-65

Page 198: 00399154-Configuration Guide - QoS(V300R003_03).pdf

NOTE

l If the configuration of VPN supporting the Uniform model is done for the first time, you can usethe default Uniform model rather than configure the model with the command.

l If the VPN instances on VPN have been configured to support the Pipe or Short Pipe model andnow you want to configure them to support the Uniform model, you need to perform the precedingconfiguration.

8. Configure class queues on the interfaces on the network side of PE1.<PE1> system-view[PE1] interface pos 1/0/0[PE1-Pos1/0/0] port-queue ef pq shaping 25 outbound[PE1-Pos1/0/0] port-queue af4 wfq weight 15 shaping 15 outbound[PE1-Pos1/0/0] port-queue af3 wfq weight 10 shaping 10 outbound[PE1-Pos1/0/0] return

9. Configure a bandwidth for the MPLS TE tunnel and bind statically the VPN instances tothe MPLS TE tunnel.<PE1> system-view[PE1] interface tunnel 1/0/0[PE1-Tunnel1/0/0] mpls te bandwidth 100000 flow-queue te[PE1-Tunnel1/0/0] mpls te reserved-for-binding[PE1-Tunnel1/0/0] mpls te vpn-binding vpn-instance vpna cir 50000 pir 100000 flow-queue vpna[PE1-Tunnel1/0/0] mpls te vpn-binding vpn-instance vpnb cir 30000 pir 100000 flow-queue vpnb[PE1-Tunnel1/0/0] mpls te commit

10. Verify the configuration.After the preceding configuration of resource reserved VPNs, run the display trafficstatistics interface tunnel interface-number vpn-instance vpn-instance-namecommandand you can view the traffic information about the L3VPN. For example:[PE1] display traffic statistics interface tunnel 1/0/0 vpn-instance vpnaThe RRVPN Traffic Statistics: Transit packets :239453968 Transit bytes :24918416800 Discard packets :0 Discard bytes :0 Transit packets rate:33000 packets/sec Transit bytes rate :4070000 bytes/sec

Configuration Filesl Configuration file of PE1

# sysname PE1#flow-wred testcolor green low-limit 30 high-limit 50 discard-percentage 100color yellow low-limit 20 high-limit 40 discard-percentage 100color red low-limit 10 high-limit 30 discard-percentage 100#flow-queue vpnaqueue ef pq shaping 12000 flow-wred testqueue af4 wfq weight 15 shaping 8000 flow-wred testqueue af3 wfq weight 10 shaping 5000 flow-wred test#flow-queue vpnbqueue ef pq shaping 10000 flow-wred test#flow-queue tequeue ef pq shaping 25000 flow-wred testqueue af4 wfq weight 15 shaping 15000 flow-wred testqueue af3 wfq weight 10 shaping 10000 flow-wred test#

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-66 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 199: 00399154-Configuration Guide - QoS(V300R003_03).pdf

ip vpn-instance vpna route-distinguisher 1:1 tnl-policy policy1vpn-target 1:1 export-extcommunityvpn-target 1:1 import-extcommunity#ip vpn-instance vpnb route-distinguisher 2:2tnl-policy policy1vpn-target 2:2 export-extcommunityvpn-target 2:2 import-extcommunity# mpls lsr-id 1.1.1.9 mpls mpls te mpls rsvp-te mpls te cspf#diffserv domain default#interface Pos1/0/0undo shutdownlink-protocol pppip address 100.1.1.1 255.255.255.0 mpls mpls te mpls te max-link-bandwidth 200000 mpls te max-reservable-bandwidth 120000mpls rsvp-teport-queue ef pq shaping 25 outboundport-queue af4 wfq weight 15 shaping 15 outboundport-queue af3 wfq weight 10 shaping 10 outbound#interface GigabitEthernet2/0/0 undo shutdown ip binding vpn-instance vpna ip address 10.1.1.2 255.255.255.0 trust upstream default#interface GigabitEthernet3/0/0 undo shutdown ip binding vpn-instance vpnb ip address 10.3.1.2 255.255.255.0 trust upstream default#interface LoopBack1 ip address 1.1.1.9 255.255.255.252#interface Tunnel1/0/0 ip address unnumbered interface LoopBack1 tunnel-protocol mpls te destination 2.2.2.9 mpls te tunnel-id 100mpls te bandwidth bc0 100000 flow-queue templs te reserved-for-bindingmpls te vpn-binding vpn-instance vpna cir 50000 pir 100000 flow-queue vpnampls te vpn-binding vpn-instance vpnb cir 30000 pir 100000 flow-queue vpnb mpls te commit#bgp 500 peer 2.2.2.9 as-number 500 peer 2.2.2.9 connect-interface LoopBack1#ipv4-family unicast undo synchronization peer 2.2.2.9 enable # ipv4-family vpnv4 policy vpn-target

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-67

Page 200: 00399154-Configuration Guide - QoS(V300R003_03).pdf

peer 2.2.2.9 enable# ipv4-family vpn-instance vpna peer 10.1.1.1 as-number 100 import-route direct#ipv4-family vpn-instance vpnbpeer 10.3.1.1 as-number 300import-route direct#ospf 1 opaque-capability enable area 0.0.0.0 network 100.1.1.0 0.0.0.255 network 1.1.1.9 0.0.0.0 mpls-te enable#tunnel-policy policy1tunnel binding destination 2.2.2.9 te Tunnel 1/0/0#return

l Configuration file of the P# sysname P# mpls lsr-id 3.3.3.9 mpls mpls te mpls rsvp-te mpls te cspf#interface Pos1/0/0undo shutdownlink-protocol ppp ip address 100.1.1.2 255.255.255.0 mpls mpls te mpls te max-link-bandwidth 200000 mpls te max-reservable-bandwidth 120000 mpls rsvp-te#interface Pos2/0/0undo shutdownlink-protocol pppip address 200.1.1.1 255.255.255.0 mpls mpls te mpls te max-link-bandwidth 200000 mpls te max-reservable-bandwidth 120000mpls rsvp-te#interface LoopBack1 ip address 2.2.2.9 255.255.255.252#domain default#ospf 1 opaque-capability enable area 0.0.0.0 network 100.1.1.0 0.0.0.255 network 200.1.1.0 0.0.0.255 network 3.3.3.9 0.0.0.0 mpls-te enable#return

l Configuration file of PE2# sysname PE2

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-68 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 201: 00399154-Configuration Guide - QoS(V300R003_03).pdf

#ip vpn-instance vpna route-distinguisher 1:1vpn-target 1:1 export-extcommunityvpn-target 1:1 import-extcommunity#ip vpn-instance vpnb route-distinguisher 2:2vpn-target 2:2 export-extcommunityvpn-target 2:2 import-extcommunity# mpls lsr-id 2.2.2.9 mpls mpls te mpls rsvp-te mpls te cspf#interface Pos1/0/0undo shutdownlink-protocol ppp ip address 200.1.1.2 255.255.255.0 mpls mpls te mpls te max-link-bandwidth 200000 mpls te max-reservable-bandwidth 120000 mpls rsvp-te#interface GigabitEthernet2/0/0 undo shutdown ip binding vpn-instance vpna ip address 10.2.1.2 255.255.255.0#interface GigabitEthernet3/0/0 undo shutdown ip binding vpn-instance vpnb ip address 10.4.1.2 255.255.255.0#interface LoopBack1 ip address 2.2.2.9 255.255.255.252#bgp 500 peer 1.1.1.9 as-number 500 peer 1.1.1.9 connect-interface LoopBack1#ipv4-family unicast undo synchronization peer 1.1.1.9 enable #ipv4-family vpnv4 policy vpn-target peer 1.1.1.9 enable#ipv4-family vpn-instance vpnapeer 10.2.1.1 as-number 200import-route direct#ipv4-family vpn-instance vpnbpeer 10.4.1.1 as-number 300import-route direct#domain default#ospf 1 opaque-capability enable area 0.0.0.0 network 200.1.1.0 0.0.0.255 network 2.2.2.9 0.0.0.0 mpls-te enable#

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-69

Page 202: 00399154-Configuration Guide - QoS(V300R003_03).pdf

return

l Configuration file of CE1# sysname CE1#interface GigabitEthernet1/0/0 undo shutdown ip address 10.1.1.1 255.255.255.0#bgp 100 peer 10.1.1.2 as-number 500 # ipv4-family unicast undo synchronization import-route direct peer 10.1.1.2 enable#return

l Configuration file of CE2# sysname CE2#interface GigabitEthernet1/0/0 undo shutdown ip address 10.2.1.1 255.255.255.0#bgp 200 peer 10.2.1.2 as-number 500 # ipv4-family unicast undo synchronization import-route direct peer 10.2.1.2 enable#return

l Configuration file of CE3# sysname CE3#interface GigabitEthernet1/0/0 undo shutdown ip address 10.3.1.1 255.255.255.0#bgp 300 peer 10.3.1.2 as-number 500 # ipv4-family unicast undo synchronization import-route direct peer 10.3.1.2 enable#return

l Configuration file of CE4# sysname CE4#interface GigabitEthernet1/0/0 undo shutdown ip address 10.4.1.1 255.255.255.0#bgp 400 peer 10.4.1.2 as-number 500 # ipv4-family unicast undo synchronization

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-70 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 203: 00399154-Configuration Guide - QoS(V300R003_03).pdf

import-route direct peer 10.4.1.2 enable#return

6.5.4 Example for Configuring a Hierarchical Resource ReservedL2VPN (VLL)

Networking RequirementsAs shown in Figure 6-11, CE1 and CE2 are in VPN A, and CE3 and CE4 are in VPN B. VPNA and VPN B share the same MPLS TE tunnel that connects the public edge routers PE1 andPE2. You are required to reserve bandwidths for packets from VPN A and VPN B that go throughthe MPLS TE tunnel, and for packets of different services within a VPN. In addition, thebandwidth resources are reserved. You are required to separate bandwidth resources betweenVPN A and VPN B and provide guaranteed bandwidth resources for different types of packetswithin a VPN.

OSPF is used as the IGP on the MPLS backbone network. CE1 and CE2 belong to the sameVPLS VLL; CE3 and CE4 belong to the same VPLS VLL.

The specific requirements are as follows:

l Use the RSVP-TE to establish an MPLS TE tunnel that connects PE1 and PE2. The tunnelforwards VPLS VLL service packets. The bandwidth of the tunnel is 100 Mbit/s. Themaximum bandwidth of the link along the tunnel is 200 Mbit/s and the maximum reservablebandwidth is 120 Mbit/s.

l CE1 connects PE1 and CE2 connects PE2. ATM cells are transparently transmitted throughthe network in N-to-1 VCC mode. CE3 connects PE1 and CE4 connects PE2. Theconnection is in VLAN mode.

l The data from VPN A is ATM cells. Configure forcible traffic classification for ATM onthe inbound interface of PE1. The packets of VPN A in the MPLS TE tunnel are appliedwith the Uniform model.

l Packets from VPN B are IP packets. The packets of VPN A and VPN B in the MPLS TEtunnel are applied with the Uniform model.

l VPN A is guaranteed with a bandwidth of 50 Mbit/s in the MPLS TE tunnel. The VoIPpackets of VPN A are forwarded in the traffic type of EF and are guaranteed with abandwidth of 12 Mbit/s. The video packets of VPN A are forwarded in the traffic type ofAF4 and guaranteed with a bandwidth of 8 Mbit/s. The important data packets of VPN Aare forwarded in the traffic type of AF3 and are guaranteed with a bandwidth of 5 Mbit/s.

l VPN B is guaranteed with a bandwidth of 30 Mbit/s in the MPLS TE tunnel. The voicepackets in VPN B are forwarded in the traffic type of EF and are guaranteed with abandwidth of 10 Mbit/s. Other service packets share the remaining bandwidth for packetsof VPN B according to the default settings of the system.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-71

Page 204: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Figure 6-11 Networking diagram for configuring a hierarchical resource reserved L2VPN(VLL)

Configuration Roadmap

The configuration roadmap is as follows:

1. Configure the IP addresses and routes for the interfaces to ensure they interwork at thenetwork layer.

2. Configure an MPLS TE tunnel between the PEs. Create a tunnel interface on the PE1 sideonly (because the MPLS TE is unidirectional).

3. Configure Martini VLL.

4. Configure the ATM forcible traffic classification for packets going from VPN A to PE1and the simple traffic classification for packets going from VPN B to PE1 so that the servicepriorities of packets are re-set on MPLS networks.

5. Configure that the traffic in the MPLS TE tunnel from VPN A and VPN B is applied withthe Uniform model.

6. Configure resource separation and guaranteed bandwidths for the traffic from VPN A andVPN B.

NOTE

The hierarchical resource reserved L2VPN is configured on an ingress PE device. After the specifiedconfiguration, you can further configure interface-specific HQoS on the interface of the network side orthe user side on the egress PE device so that HQoS is applied to the traffic going out of an MPLS network.

In this example, resource separation is applied only to the VPN data coming from PE1 to PE2. Networktraffic is bi-directional; therefore, you can configure hierarchical resource reserved L2VPN for the oppositetraffic on the peer PE.

Data Preparation

To complete the configuration, you need the following data:

l Name of the remote PE peer and the VC ID

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-72 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 205: 00399154-Configuration Guide - QoS(V300R003_03).pdf

l VPI or VCI values of CE1 and CE2; VLAN IDs of CE3 and CE4

l Service types of ATM forcible traffic classification in VPN A and the interior priorities ofrouters; mapped service priorities of the packets from VPN B through the simple trafficclassification.

l Service types and colors of the packets from VPN B for label mapping at the ingress of theMPLS TE tunnel

l Guaranteed bandwidths and scheduling parameters for flow queues that accept non-VPNpackets from VPN A, VPN B, and the MPLS TE tunnel

l Bandwidth limits for VPN A, VPN B, and MPLS TE

Configuration Procedure1. Configure the IP addresses of the interfaces on the MPLS backbone network and the IGP

(OSPF) and ensure that PE1, P, and PE2 can interwork.For detailed description of the configuration, see "6.5.3 Example for Configuring aHierarchical Resource Reserved L3VPN."

2. Configure MPLS TE.Configure the basic MPLS functions and MPLS LDP on the MPLS backbone network andestablish LDP.l Configure PE1.

<PE1> system-view[PE1] mpls lsr-id 1.1.1.9[PE1] mpls[PE1-mpls] lsp-trigger all[PE1-mpls] quit[PE1] mpls ldp[PE1-mpls-ldp] quit

l Configure PE2.<PE2> system-view[PE2] mpls lsr-id 2.2.2.9[PE2] mpls[PE2-mpls] quit[PE2] mpls ldp[PE2-mpls-ldp] quit

# Establish a remote peer session between PE1 and PE2.l Configure PE1.

<PE1> system-view[PE1] mpls ldp remote-peer 2.2.2.9[PE1-mpls-ldp-remote-2.2.2.9] remote-ip 2.2.2.9[PE1-mpls-ldp-remote-2.2.2.9] return

l Configure PE2.<PE2> system-view[PE2] mpls ldp remote-peer 1.1.1.9[PE2-mpls-ldp-remote-1.1.1.9] remote-ip 1.1.1.9[PE2-mpls-ldp-remote-1.1.1.9] return

After the preceding configuration, LDP sessions can be established between PE1 and P,between P and PE2. Running the display mpls ldp session command, you can find in theoutput information that the status is Operational. Using the display mpls ldp lspcommand, you can check the establishment of the LDP LSP.The following is the display on PE1:[PE1] display mpls ldp session LDP Session(s) in Public Network

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-73

Page 206: 00399154-Configuration Guide - QoS(V300R003_03).pdf

------------------------------------------------------------------------------ Peer-ID Status LAM SsnRole SsnAge KA-Sent/Rcv ------------------------------------------------------------------------------ 2.2.2.9:0 Operational DU Passive 000:00:22 89/89 3.3.3.9:0 Operational DU Passive 000:00:24 98/98 ------------------------------------------------------------------------------ TOTAL: 2 session(s) Found. LAM : Label Advertisement Mode SsnAge Unit : DDD:HH:MM # Enable MPLS TE, RSVP-TE, CSPF, and OSPF TE.l Configure PE1.

<PE1> system-view[PE1] mpls[PE1-mpls] mpls te[PE1-mpls] mpls rsvp-te[PE1-mpls] mpls te cspf[PE1-mpls] quit[PE1] interface pos 1/0/0[PE1-Pos1/0/0] mpls te[PE1-Pos1/0/0] mpls rsvp-te[PE1-Pos1/0/0] quit[PE1] ospf[PE1-ospf-1] opaque-capability enable[PE1-ospf-1] area 0[PE1-ospf-1-area-0.0.0.0] mpls-te enable[PE1-ospf-1-area-0.0.0.0] return

l Configure the P.<P> system-view[P] mpls[P-mpls] mpls te[P-mpls] mpls rsvp-te[P-mpls] mpls te cspf[P-mpls] quit[P] interface pos 1/0/0[P-Pos1/0/0] mpls te[P-Pos1/0/0] mpls rsvp-te[P-Pos1/0/0] quit[P] interface pos 2/0/0[P-Pos2/0/0] mpls te[P-Pos2/0/0] mpls rsvp-te[P-Pos2/0/0] quit[P] ospf[P-ospf-1] opaque-capability enable[P-ospf-1] area 0[P-ospf-1-area-0.0.0.0] mpls-te enable[P-ospf-1-area-0.0.0.0] return

l Configure PE2.<PE2> system-view[PE2] mpls[PE2-mpls] mpls te[PE2-mpls] mpls rsvp-te[PE2-mpls] mpls te cspf[PE2-mpls] quit[PE2] interface pos 1/0/0[PE2-Pos1/0/0] mpls te[PE2-Pos1/0/0] mpls rsvp-te[PE2-Pos1/0/0] quit[PE2] ospf[PE2-ospf-1] opaque-capability enable[PE2-ospf-1] area 0[PE2-ospf-1-area-0.0.0.0] mpls-te enable[PE2-ospf-1-area-0.0.0.0] return

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-74 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 207: 00399154-Configuration Guide - QoS(V300R003_03).pdf

# Configure the maximum usable bandwidth for the physical link along the MPLS TEtunnel and the maximum reservable bandwidth.

NOTE

When you configure an MPLS TE tunnel, you need to specify the maximum usable bandwidth forthe physical link and the maximum reservable bandwidth; then you also need to specify the bandwidthof the tunnel.

The maximum reservable bandwidth of the physical link should not exceed the maximum usablebandwidth. The bandwidth of a tunnel should not exceed the maximum reservable bandwidth for thephysical link.

l Configure PE1.<PE1> system-view[PE1] interface pos 1/0/0[PE1-Pos1/0/0] mpls te max-link-bandwidth 200000[PE1-Pos1/0/0] mpls te max-reservable-bandwidth 120000[PE1-Pos1/0/0] return

l Configure the P.<P> system-view[P] interface pos 1/0/0[P-Pos1/0/0] mpls te max-link-bandwidth 200000[P-Pos1/0/0] mpls te max-reservable-bandwidth 120000[P-Pos1/0/0] quit[P] interface pos 2/0/0[P-Pos2/0/0] mpls te max-link-bandwidth 200000[P-Pos2/0/0] mpls te max-reservable-bandwidth 120000[P-Pos2/0/0] return

l Configure PE2.<PE2> system-view[PE2] interface pos 1/0/0[PE2-Pos1/0/0] mpls te max-link-bandwidth 200000[PE2-Pos1/0/0] mpls te max-reservable-bandwidth 120000[PE2-Pos1/0/0] returnConfigure the MPLS TE tunnel on PE1.<PE1> system-view[PE1] interface tunnel 1/0/0[PE1-Tunnel1/0/0] ip address unnumbered interface loopback 1[PE1-Tunnel1/0/0] tunnel-protocol mpls te[PE1-Tunnel1/0/0] destination 2.2.2.9[PE1-Tunnel1/0/0] mpls te tunnel-id 100[PE1-Tunnel1/0/0] mpls te signal-protocol rsvp-te[PE1-Tunnel1/0/0] mpls te commit[PE1-Tunnel1/0/0] return

NOTE

In this example, the MPLS TE tunnel is configured only in the direction from PE1 to PE2. If an MPLSTE tunnel is bi-directional, you also need to configure the MPLS TE tunnel on PE2.

After the preceding configuration, run the display interface tunnel command and you canfind that the state of the interface is Up.[PE1] display interface tunnelTunnel6/0/0 current state : UPLine protocol current state : UPLast up time: 2007-10-31, 15:19:53Description:HUAWEI, Quidway Series, Tunnel1/0/0 InterfaceRoute Port,The Maximum Transmit Unit is 1500Internet Address is unnumbered, using address of LoopBack1(1.1.1.9/32)Encapsulation is TUNNEL, loopback not setTunnel destination 2.2.2.9Tunnel up/down statistics 1Tunnel protocol/transport MPLS/MPLS, ILM is available,primary tunnel id is 0x40c18000, secondary tunnel id is 0x0 300 minutes output rate 0 bytes/sec, 0 packets/sec

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-75

Page 208: 00399154-Configuration Guide - QoS(V300R003_03).pdf

0 packets output, 0 bytes0 output error

Run the display mpls te tunnel-interface command on PE1 and you can view detailedinformation about the tunnel.<PE1> display mpls te tunnel-interface Tunnel Name : Tunnel1/0/0 Tunnel Desc : HUAWEI, Quidway Series, Tunnel1/0/0 Interface Tunnel State Desc : CR-LSP is Up Tunnel Attributes : LSP ID : 1.1.1.9:1 Session ID : 100 Admin State : UP Oper State : UP Ingress LSR ID : 1.1.1.9 Egress LSR ID: 2.2.2.9 Signaling Protocol : RSVP Resv Style : SE Class Type : CLASS 0 Tunnel BW : 0 kbps Reserved BW : 1200 kbps Setup Priority : 7 Hold Priority: 7 Hop Limit : - Secondary Hop Limit : - BestEffort Hop Limit: -Affinity Prop/Mask : 0x0/0x0 Explicit Path Name : - Secondary Affinity Prop/Mask: 0x0/0x0 Secondary Explicit Path Name: - BestEffort Affinity Prop/Mask: 0x0/0x0 Tie-Breaking Policy : None Metric Type : None Record Route : Disabled Record Label : Disabled FRR Flag : Disabled BackUpBW Flag: Not Supported BackUpBW Type : - BackUpBW : - Route Pinning : Disabled Retry Limit : 5 Retry Interval: 10 sec Reopt : Disabled Reopt Freq : - Back Up Type : None Back Up LSPID : - Auto BW : Disabled Auto BW Freq : - Min BW : - Max BW : - Current Collected BW: - Interfaces Protected: - ACL Bind Value : VRF Bind Value : L2VPN Bind Value : Car Policy : Disabled Tunnel Group : Primary Primary Tunnel Sum : - Primary Tunnel : - Backup Tunnel : - IPTN InLabel : - Group Status : Up Oam Status : Up Bfd Capability : NoneBestEffort : Disabled IsBestEffortPath: Non-existent

Running the display mpls te cspf tedb all command on PE1, you can view the linkinformation about TEDB.[PE1] display mpls te cspf tedb allMaximum Node Supported: 2048 Maximum Link Supported: 8192Current Total Node Number: 3 Current Total Link Number: 4ID Router-ID IGP Process-ID Area Link-Count1 3.3.3.9 OSPF 1 0 22 1.1.1.9 OSPF 1 0 13 2.2.2.9 OSPF 1 0 1

3. Configure Martini VLL.# Configure CEs. CE1 connects PE1 and CE2 connects PE2, both over an ATM link. CE3connects PE1 and CE4 connects PE2. The connection is in VLAN mode.

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-76 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 209: 00399154-Configuration Guide - QoS(V300R003_03).pdf

l Configure CE1.<CE1> system-view[CE1] interface Virtual-Ethernet 1/0/0 [CE1-Virtual-Ethernet1/0/0] ip address 10.1.1.1 24[CE1-Virtual-Ethernet1/0/0] quit[CE1] interface atm 1/0/0[CE1-Atm1/0/0] undo shutdown[CE1] interface atm 1/0/0.1[CE1-Atm1/0/0.1] ip address 10.1.1.1 24[CE1-Atm1/0/0.1] pvc 1/100[CE1-atm-pvc-Atm1/0/0.1-1/100] map bridge Virtual-Ethernet 1/0/0[CE1-atm-pvc-Atm1/0/0.1-1/100] quit[CE1-Atm1/0/0.1] pvc 1/101[CE1-atm-pvc-Atm1/0/0.1-1/101] map bridge Virtual-Ethernet 1/0/0[CE1-atm-pvc-Atm1/0/0.1-1/101] quit[CE1-Atm1/0/0.1] pvc 1/102[CE1-atm-pvc-Atm1/0/0.1-1/102] map bridge Virtual-Ethernet 1/0/0[CE1-atm-pvc-Atm1/0/0.1-1/102] return

l Configure CE2.<CE2> system-view[CE2] interface Virtual-Ethernet 1/0/0 [CE2-Virtual-Ethernet1/0/0] ip address 10.1.1.2 24[CE2-Virtual-Ethernet1/0/0] quit[CE2] interface atm 1/0/0[CE2-Atm1/0/0] undo shutdown[CE2] interface atm 1/0/0.1[CE2-Atm1/0/0.1] pvc 1/100[CE2-atm-pvc-Atm1/0/0.1-1/100] map bridge Virtual-Ethernet 1/0/0[CE2-atm-pvc-Atm1/0/0.1-1/100] quit[CE2-Atm1/0/0.1] pvc 1/101[CE2-atm-pvc-Atm1/0/0.1-1/101] map bridge Virtual-Ethernet 1/0/0[CE2-atm-pvc-Atm1/0/0.1-1/101] quit[CE2-Atm1/0/0.1] pvc 1/102[CE2-atm-pvc-Atm1/0/0.1-1/102] map bridge Virtual-Ethernet 1/0/0[CE2-atm-pvc-Atm1/0/0.1-1/102] return

l Configure CE3.<CE3> system-view[CE3] interface gigabitethernet 1/0/0.1[CE3-GigabitEthernet1/0/0.1] vlan-type dot1q 10[CE3-GigabitEthernet1/0/0.1] ip address 10.3.1.1 24[CE3-GigabitEthernet1/0/0.1] return

l Configure CE4.<CE4> system-view[CE4] interface gigabitethernet 1/0/0.1[CE4-GigabitEthernet1/0/0.1] vlan-type dot1q 20[CE4-GigabitEthernet1/0/0.1] ip address 10.3.1.2 24[CE4-GigabitEthernet1/0/0.1] return

# Enable MPLS L2VPN on PEs and then create VC connections.l Configure PE1. Configure transparent transmission of ATM cells in N-to-1 VCC mode

on the interface that connects CE1. Create a VC on the interface that connects CE3.<PE1> system-view[PE1] mpls l2vpn[PE1-l2vpn] quit[PE1] interface atm2/0/0.1[PE1-Atm2/0/0.1] atm cell transfer[PE1-Atm2/0/0.1] pvc 1/100[PE1-atm-pvc-Atm2/0/0.1-1/100] quit[PE1-Atm2/0/0.1] pvc 1/101[PE1-atm-pvc-Atm2/0/0.1-1/101] quit[PE1-Atm2/0/0.1] pvc 1/102[PE1-atm-pvc-Atm2/0/0.1-1/102] quit[PE1-Atm2/0/0.1] mpls l2vc 3.3.3.9 102[PE1-Atm2/0/0.1] undo shutdown[PE1-Atm2/0/0.1] quit

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-77

Page 210: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[PE1] interface gigabitethernet 3/0/0.1[PE1-GigabitEthernet3/0/0.1] vlan-type dot1q 10[PE1-GigabitEthernet3/0/0.1] mpls l2vc 2.2.2.9 101[PE1-GigabitEthernet3/0/0.1] quit

l Configure PE2. Configure transparent transmission of ATM cells in N-to-1 VCC modeon the interface that connects CE2. Create a VC on the interface that connects CE4.<PE2> system-view[PE2] mpls l2vpn[PE2-l2vpn] quit[PE2] interface gigabitethernet 3/0/0.1[PE2-GigabitEthernet3/0/0.1] vlan-type dot1q 20[PE2-GigabitEthernet3/0/0.1] mpls l2vc 1.1.1.9 101[PE2-GigabitEthernet3/0/0.1] quit[PE2] interface atm2/0/0.1[PE2-Atm2/0/0.1] atm cell transfer[PE2-Atm2/0/0.1] pvc 1/100[PE2-atm-pvc-Atm2/0/0.1-1/100] quit[PE2-Atm2/0/0.1] pvc 1/101[PE2-atm-pvc-Atm2/0/0.1-1/101] quit[PE2-Atm2/0/0.1] pvc 1/102[PE2-atm-pvc-Atm2/0/0.1-1/102] quit[PE2-Atm2/0/0.1] mpls l2vc 1.1.1.9 102[PE2-Atm2/0/0.1] undo shutdown[PE2-Atm2/0/0.1] return

# Configure service types of ATM PVC on PE1.<PE1> system-view[PE1] atm service voice cbr 12000 20[PE1] atm service video nrt-vbr 9000 8000 20 50[PE1] atm service data rt-vbr 6000 5000 20 50[PE1] interface atm 2/0/0.1[PE1-Atm2/0/0.1] pvc 1/100[PE1-atm-pvc-Atm2/0/0.1-1/100] shutdown[PE1-atm-pvc-Atm2/0/0.1-1/100] service output voice[PE1-atm-pvc-Atm2/0/0.1-1/100] undo shutdown[PE1-atm-pvc-Atm2/0/0.1-1/100] quit[PE1-Atm2/0/0.1] pvc 1/101[PE1-atm-pvc-Atm2/0/0.1-1/101] shutdown[PE1-atm-pvc-Atm2/0/0.1-1/101] service output video[PE1-atm-pvc-Atm2/0/0.1-1/101] undo shutdown[PE1-atm-pvc-Atm2/0/0.1-1/101] quit[PE1-Atm2/0/0.1] pvc 1/102[PE1-atm-pvc-Atm2/0/0.1-1/102] shutdown[PE1-atm-pvc-Atm2/0/0.1-1/102] service output data[PE1-atm-pvc-Atm2/0/0.1-1/102] undo shutdown[PE1-atm-pvc-Atm2/0/0.1-1/102] returnAfter the preceding configuration, running the display mpls l2vc command, you can viewinformation about the L2VPN connections: Two L2 VCs are established; their states areUp. The following is the display on PE1:[PE1] display mpls l2vcTotal ldp vc : 2 2 up 0 down *Client Interface : GigabitEthernet3/0/0.1 Session State : up AC Status : up VC State : up VC ID : 101 VC Type : vlan Destination : 2.2.2.9 Local VC Label : 1025 Remote VC Label : 1024 Control Word : Disable forwarding entry : existent local group ID : 0 manual fault : not set active state : active link state : up Local VC MTU : 1500

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-78 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 211: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Remote VC MTU : 1500 Tunnel Policy Name : policy1 Traffic Behavior Name: -- PW Template Name : -- primary or secondary : primary Create time : 0 days, 0 hours, 3 minutes, 14 seconds UP time : 0 days, 0 hours, 1 minutes, 48 seconds Last change time : 0 days, 0 hours, 1 minutes, 48 seconds*Client Interface : Atm2/0/0.1 Session State : up AC Status : up VC State : up VC ID : 102 VC Type : atm nto1 vcc Destination : 2.2.2.9 Local VC Label : 17408 Remote VC Label : 17408 Control Word : Disable forwarding entry : existent local group ID : 0 manual fault : not set active state : active link state : up Local ATM Cells : 1 Remote ATM Cells : 1 Tunnel Policy Name : policy1 Traffic Behavior Name: -- PW Template Name : -- primary or secondary : primary Create time : 0 days, 0 hours, 3 minutes, 14 seconds UP time : 0 days, 0 hours, 1 minutes, 48 seconds Last change time : 0 days, 0 hours, 1 minutes, 48 secondsCE1 and CE2 can ping through each other; CE3 and CE4 can ping through each other.

4. Configure a tunnel policy: specifying that VPNs communicate through the MPLS TEtunnel; then apply the tunnel policy to the VLLs.<PE1> system-view[PE1] tunnel-policy policy1[PE1-tunnel-policy-policy1] tunnel binding destination 2.2.2.9 te tunnel 1/0/0[PE1-tunnel-policy-policy1] quit[PE1] interface atm2/0/0.1[PE1-Atm2/0/0.1] undo mpls l2vc[PE1-Atm2/0/0.1] mpls l2vc 2.2.2.9 102 tunnel-policy policy1[PE1-Atm2/0/0.1] quit[PE1] interface gigabitethernet 3/0/0.1[PE1-GigabitEthernet3/0/0.1] undo mpls l2vc[PE1-GigabitEthernet3/0/0.1] mpls l2vc 2.2.2.9 101 tunnel-policy policy1[PE1-GigabitEthernet3/0/0.1] return

NOTE

In this example, the TE tunnel is configured only in the direction from PE1 to PE2. If an MPLS TEtunnel is bi-directional, you also need to configure the tunnel policy on PE2 and apply it to the VLLs.

5. On the inbound interface of PE1, configure the ATM simple traffic classification and theforcible traffic classification for VPN A and configure the simple traffic classification forVPN B.Map the service types of voice, video, and data services to EF, AF4, and AF3 respectively.Map the DSCP value of 34 carried in the packets from VPN B to the EXP priority of 3 inthe MPLS domain.<PE1> system-view[PE1] interface atm 2/0/0.1[PE1-Atm2/0/0.1] trust upstream default[PE1-Atm2/0/0.1] pvc 1/100[PE1-atm-pvc-Atm2/0/0.1-1/100] traffic queue ef green[PE1-atm-pvc-Atm2/0/0.1-1/100] quit[PE1-GigabitEthernet2/0/0.1] pvc 1/101

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-79

Page 212: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[PE1-atm-pvc-Atm2/0/0.1-1/101] traffic queue af4 green[PE1-atm-pvc-Atm2/0/0.1-1/101] quit[PE1-GigabitEthernet2/0/0.1] pvc 1/102[PE1-atm-pvc-Atm2/0/0.1-1/102] traffic queue af3 green[PE1-atm-pvc-Atm2/0/0.1-1/102] return

6. Configure flow queues on PE1 for non-VPN packets from VPN A, VPN B, and the MPLSTE tunnel.# Configure a WRED object referenced by a flow queue.<PE1> system-view[PE1] flow-wred test[PE1-flow-wred-test] color green low-limit 30 high-limit 50 discard-percentage 100[PE1-flow-wred-test] color yellow low-limit 20 high-limit 40 discard-percentage 100[PE1-flow-wred-test] color red low-limit 10 high-limit 30 discard-percentage 100[PE1-flow-wred-test] return

# Configure the scheduling algorithms, WRED parameters, and shaping values for flowqueues.<PE1> system-view[PE1] flow-queue vpna[PE1-flow-queue-template-vpna] queue ef pq flow-wred test shaping 12000[PE1-flow-queue-template-vpna] queue af4 wfq weight 15 flow-wred test shaping 8000[PE1-flow-queue-template-vpna] queue af3 wfq weight 10 flow-wred test shaping 5000[PE1-flow-queue-template-vpna] quit[PE1] flow-queue vpnb[PE1-flow-queue-template-vpnb] queue af3 pq flow-wred test shaping 10000[PE1-flow-queue-template-vpnb] quit[PE1] flow-queue te[PE1-flow-queue-template-te] queue ef pq flow-wred test shaping 25000[PE1-flow-queue-template-te] queue af4 wfq weight 15 flow-wred test shaping 15000[PE1-flow-queue-template-te] queue af3 wfq weight 10 flow-wred test shaping 10000[PE1-flow-queue-template-te] return

7. Configure DiffServ models supported by the VLL.

NOTE

l If the configuration of VPN A supporting the Uniform model is done for the first time, you canuse the default Uniform model rather than configure the model with the command.

l If VPN A has been configured to support the Pipe or Short Pipe model and now you want toconfigure them to support the Uniform model, you need to perform the following configuration.

<PE1> system-view[PE1] interface atm 2/0/0.1[PE1-Atm2/0/0.1] diffserv-mode uniform[PE1-Atm2/0/0.1] quit[PE1] interface gigabitethernet 3/0/0.1[PE1-GigabitEthernet3/0/0.1] diffserv-mode uniform[PE1-GigabitEthernet3/0/0.1] return

NOTE

You do not need to configure the simple traffic classification for traffic from VPN B on the ingressPE because VPN B has been configured to support the Pipe model in the MPLS TE tunnel.

8. Configure class queues on the interfaces on the network side of PE1.<PE1> system-view[PE1] interface pos 1/0/0[PE1-Pos1/0/0] port-queue ef pq shaping 25 outbound[PE1-Pos1/0/0] port-queue af4 wfq weight 15 shaping 15 outbound[PE1-Pos1/0/0] port-queue af3 wfq weight 10 shaping 10 outbound

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-80 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 213: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[PE1-Pos1/0/0] return9. Configure a bandwidth for the MPLS TE tunnel and bind statically the VLLs to the MPLS

TE tunnel.<PE1> system-view[PE1] interface tunnel 1/0/0[PE1-Tunnel1/0/0] mpls te bandwidth 100000 flow-queue te[PE1-Tunnel1/0/0] mpls te reserved-for-binding[PE1-Tunnel1/0/0] mpls te vpn-binding l2vpn interface atm 2/0/0.1 cir 50000 pir 100000 flow-queue vpna[PE1-Tunnel1/0/0] mpls te vpn-binding l2vpn interface gigabitethernet 3/0/0.1 cir 30000 pir 100000 flow-queue vpnb[PE1-Tunnel1/0/0] mpls te commit

10. Verify the configuration.Running the display traffic statistics interface tunnel interface-numbertunnel-name vllinterface-type interface-number command, you can view the traffic information about theVLL in the MPLS TE tunnel. For example:[PE1] display traffic statistics interface tunnel 1/0/0 vll atm 2/0/0.1The RRVPN Traffic Statistics: Transit packets :239453968 Transit bytes :24918416800 Discard packets :0 Discard bytes :0 Transit packets rate:33000 packets/sec Transit bytes rate :4070000 bytes/sec

Configuration Filesl Configuration file of PE1

# sysname PE1#flow-wred testcolor green low-limit 30 high-limit 50 discard-percentage 100color yellow low-limit 20 high-limit 40 discard-percentage 100color red low-limit 10 high-limit 30 discard-percentage 100#flow-queue vpnaqueue ef pq shaping 12000 flow-wred testqueue af4 wfq weight 15 shaping 8000 flow-wred testqueue af3 wfq weight 10 shaping 5000 flow-wred test#flow-queue vpnbqueue ef pq shaping 10000 flow-wred test#flow-queue tequeue ef pq shaping 25000 flow-wred testqueue af4 wfq weight 15 shaping 15000 flow-wred testqueue af3 wfq weight 10 shaping 10000 flow-wred test#atm service voice cbr 12000 20atm service video nrt-vbr 9000 8000 20 50atm service data rt-vbr 6000 5000 20 50 #mpls lsr-id 1.1.1.9 mpls mpls te mpls rsvp-te mpls te cspfmpls l2vpn#mpls ldp#mpls ldp remote-peer 2.2.2.9 remote-ip 2.2.2.9#

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-81

Page 214: 00399154-Configuration Guide - QoS(V300R003_03).pdf

interface Pos1/0/0 undo shutdownlink-protocol pppip address 100.1.1.1 255.255.255.0 mpls mpls te mpls te max-link-bandwidth 200000 mpls te max-reservable-bandwidth 120000mpls rsvp-teport-queue ef pq shaping 25 outboundport-queue af4 wfq weight 15 shaping 15 outboundport-queue af3 wfq weight 10 shaping 10 outbound#interface Atm2/0/0undo shutdown#interface Atm2/0/0.1 atm cell transfer trust upstream default pvc 1/100 service output voice traffic queue ef green pvc 1/101 service output video traffic queue af4 green pvc 1/102 service output data traffic queue af3 green mpls l2vc 2.2.2.9 102 tunnel-policy policy1#interface GigabitEthernet3/0/0 undo shutdown#interface GigabitEthernet3/0/0.1vlan-type dot1q 10mpls l2vc 2.2.2.9 101 tunnel-policy policy1#interface LoopBack1 ip address 1.1.1.9 255.255.255.252#interface Tunnel1/0/0 ip address unnumbered interface LoopBack1 tunnel-protocol mpls te destination 2.2.2.9 mpls te tunnel-id 100mpls te bandwidth bc0 100000 flow-queue templs te reserved-for-bindingmpls te vpn-binding vpn-instance vpna cir 50000 pir 100000 flow-queue vpnampls te vpn-binding vpn-instance vpnb cir 30000 pir 100000 flow-queue vpnb mpls te commit# ipv4-family vpnv4 peer 2.2.2.9 enable#ospf 1 opaque-capability enable area 0.0.0.0 network 100.1.1.0 0.0.0.255 network 1.1.1.9 0.0.0.0 mpls-te enable#tunnel-policy policy1 tunnel binding destination 2.2.2.9 te Tunnel 1/0/0#return

l Configuration file of the P# sysname P#

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-82 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 215: 00399154-Configuration Guide - QoS(V300R003_03).pdf

mpls mpls te mpls rsvp-te mpls te cspf#diffserv domain default#interface Pos1/0/0 undo shutdownlink-protocol ppp ip address 100.1.1.2 255.255.255.0 mpls mpls te mpls te max-link-bandwidth 200000 mpls te max-reservable-bandwidth 120000 mpls rsvp-te#interface Pos2/0/0 undo shutdownlink-protocol pppip address 200.1.1.1 255.255.255.0 mpls mpls te mpls te max-link-bandwidth 200000 mpls te max-reservable-bandwidth 120000mpls rsvp-te#interface LoopBack1 ip address 2.2.2.9 255.255.255.252#ospf 1 opaque-capability enable area 0.0.0.0 network 100.1.1.0 0.0.0.255 network 200.1.1.0 0.0.0.255 network 3.3.3.9 0.0.0.0 mpls-te enable#return

l Configuration file of PE2# sysname PE2# mpls lsr-id 2.2.2.9 mpls mpls te mpls rsvp-te mpls te cspfmpls l2vpn#mpls ldp#mpls ldp remote-peer 1.1.1.9 remote-ip 1.1.1.9#interface Pos1/0/0 undo shutdown ip address 200.1.1.2 255.255.255.0 mpls mpls te mpls te max-link-bandwidth 200000 mpls te max-reservable-bandwidth 120000 mpls rsvp-te#interface Atm2/0/0 undo shutdown#interface Atm2/0/0.1 atm cell transfer

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-83

Page 216: 00399154-Configuration Guide - QoS(V300R003_03).pdf

mpls l2vc 1.1.1.9 102pvc 1/100pvc 1/101pvc 1/102#interface GigabitEthernet3/0/0 undo shutdown#interface GigabitEthernet3/0/0.1vlan-type dot1q 20mpls l2vc 1.1.1.9 101#interface LoopBack1 ip address 2.2.2.9 255.255.255.252#ospf 1 opaque-capability enable area 0.0.0.0 network 200.1.1.0 0.0.0.255 network 2.2.2.9 0.0.0.0 mpls-te enable#return

l Configuration file of CE1# sysname CE1#interface Virtual-Ethernet 1/0/0 ip address 10.1.1.1 255.255.255.0#interface Atm1/0/0 undo shutdown#interface Atm1/0/0.1 ip address 10.1.1.1 255.255.255.0pvc 1/100map bridge Virtual-Ethernet 1/0/0pvc 1/101map bridge Virtual-Ethernet 1/0/0pvc 1/102map bridge Virtual-Ethernet 1/0/0#return

l Configuration file of CE2# sysname CE2#interface Virtual-Ethernet 1/0/0 ip address 10.1.1.2 255.255.255.0# interface Atm1/0/0 undo shutdown#interface Atm1/0/0.1 ip address 10.1.1.2 255.255.255.0pvc 1/100map bridge Virtual-Ethernet 1/0/0pvc 1/101map bridge Virtual-Ethernet 1/0/0pvc 1/102map bridge Virtual-Ethernet 1/0/0#return

l Configuration file of CE3# sysname CE3#

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-84 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 217: 00399154-Configuration Guide - QoS(V300R003_03).pdf

interface Ethernet1/0/0 undo shutdown#interface Ethernet1/0/0.1 ip address 10.3.1.1 255.255.255.0 vlan-type dot1q 10#return

l Configuration file of CE4# sysname CE4#interface Ethernet1/0/0 undo shutdown#interface Ethernet1/0/0.1 ip address 10.3.1.2 255.255.255.0 vlan-type dot1q 20#return

6.5.5 Example for Configuring a Hierarchical Resource ReservedL2VPN (VPLS)

Networking RequirementsAs shown in Figure 6-12, CE1 and CE2 are in VPN A, and CE3 and CE4 are in VPN B. VPNA and VPN B share the same MPLS TE tunnel that connects the public edge devices PE1 andPE2. You are required to reserve bandwidths for packets from VPN A and VPN B that go throughthe MPLS TE tunnel, and for packets of different services within a VPN. In addition, thebandwidth resources are reserved. You are required to separate bandwidth resources betweenVPN A and VPN B and provide guaranteed bandwidth resources for different types of packetswithin a VPN.

OSPF is used as the IGP on the MPLS backbone network. CE1 and CE2 belong to the sameVPLS; CE3 and CE4 belong to the same VPLS.

The specific requirements are as follows:

l Use the RSVP-TE to establish an MPLS TE tunnel that connects PE1 and PE2. The tunnelforwards VPLS service packets. The bandwidth of the tunnel is 100 Mbit/s. The maximumbandwidth of the link along the tunnel is 200 Mbit/s and the maximum reservable bandwidthis 120 Mbit/s.

l CE1 and CE3 connect PE1; CE2 and CE4 connect PE2. The connections are in VLANmode.

l Packets from VPN A carry VLAN tags. The simple traffic classification mappings from802.1p priorities to EXP priorities are configured on the inbound interface of PE1.

l Packets from VPN B are IP packets. Configure the simple traffic classification on theinbound interface of PE1: The DSCP priorities of IP packets are mapped to EXP priorities.

l The packets from VPN A and VPN B are forwarded in the Uniform model, which is thedefault DiffServ model of the system, in the MPLS TE tunnel. On the outbound interfaceof the MPLS domain, the packets are scheduled according to DSCP priorities that aremapped from the EXP priorities.

l VPN A is guaranteed with a bandwidth of 50 Mbit/s in the MPLS TE tunnel. The VoIPpackets of VPN A are forwarded in the traffic type of EF and are guaranteed with a

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-85

Page 218: 00399154-Configuration Guide - QoS(V300R003_03).pdf

bandwidth of 12 Mbit/s. The video packets of VPN A are forwarded in the traffic type ofAF4 and guaranteed with a bandwidth of 8 Mbit/s. The important data packets of VPN Aare forwarded in the traffic type of AF3 and are guaranteed with a bandwidth of 5 Mbit/s.

l VPN B is guaranteed with a bandwidth of 30 Mbit/s in the MPLS TE tunnel. The voicepackets in VPN B are forwarded in the traffic type of EF and are guaranteed with abandwidth of 10 Mbit/s. Other service packets share the remaining bandwidth for packetsof VPN B according to the default settings of the system.

NOTE

Packets from VPN A are VLAN packets. After you configure the trunk interface on CE1, packets carryingVLAN tags head for the inbound sub-interface of PE1. One sub-interface on PE1 admits all traffic withina VLAN. If actual traffic of VPN users is from multiple VLANs, the traffic can access PE1 through multiplesub-interfaces.

The simple traffic classification mappings and complex traffic classification re-marking actions configuredmanually are incompatible with the Pipe or Short Pipe model. That is, if you have configured simple trafficclassification mappings or complex traffic classification re-marking actions, the traffic in an MPLS TEtunnel from VPNs is only in the default Uniform model.

Figure 6-12 Networking diagram for configuring a hierarchical resource reserved L2VPN(VPLS)

Configuration RoadmapThe configuration roadmap is as follows:

1. Configure the IP addresses and routes for the interfaces to ensure that they interwork at thenetwork layer.

2. Configure an MPLS TE tunnel between the PEs. Create a tunnel interface on the PE1 sideonly (because the MPLS TE is unidirectional).

3. Configure Martini VPLS.4. Configure simple traffic classification mappings for packets going from VPN A and VPN

B to PE1 so that the service priorities of packets are re-set on MPLS networks.5. Configure that the traffic in the MPLS TE tunnel from VPN A and VPN B is applied with

the Uniform model.

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-86 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 219: 00399154-Configuration Guide - QoS(V300R003_03).pdf

NOTE

l If the configuration of VPLS supporting the Uniform model is done for the first time, you canuse the default Uniform model rather than configure the model with the command.

l If VPLSs have been configured to support the Pipe or Short Pipe model and now you want toconfigure them to support the Uniform model, you need to perform the following configuration.

6. Configure resource separation and guaranteed bandwidths for the traffic from VPN A andVPN B.

NOTE

The hierarchical resource reserved L2VPN is configured on an ingress PE device. After the specifiedconfiguration, you can further configure interface-specific HQoS on the interface of the network sideor the user side on the egress PE device so that HQoS is applied to the traffic going out of an MPLSnetwork.In this example, resource separation is applied only to the VPN data coming from PE1 to PE2.Network traffic is bi-directional; therefore, you can configure hierarchical resource reserved L2VPNfor the opposite traffic on the peer PE.

Data PreparationTo complete the configuration, you need the following data:

l VSI name and VSI ID; VLAN ID of AC sub-interface; VLAN ID for packets from VPNA.

l Service priorities of packets from VPN A and VPN B used for the simple trafficclassification

l Guaranteed bandwidths and scheduling parameters for flow queues that accept non-VPNpackets from VPN A, VPN B, and the MPLS TE tunnel

l Bandwidth limits for VPN A, VPN B, and MPLS TE

Configuration Procedure1. Configure the IP addresses of the interfaces on the MPLS backbone network and the IGP

(OSPF) to ensure that PE1, P, and PE2 interwork.For detailed description of the configuration, see "6.5.3 Example for Configuring aHierarchical Resource Reserved L3VPN."

2. Configure MPLS TE.For detailed description of the configuration, see "6.5.4 Example for Configuring aHierarchical Resource Reserved L2VPN (VLL)."

3. Configure Martini VPLS.# Enable MPLS L2VPN on PEs and configure VSIs.l Configure PE1.

<PE1> system-view[PE1] mpls l2vpn[PE1-l2vpn] quit[PE1] vsi vpna static[PE1-vsi-vpna] pwsignal ldp[PE1-vsi-vpna-ldp] vsi-id 1[PE1-vsi-vpna-ldp] peer 2.2.2.9[PE1-vsi-vpna-ldp] quit[PE1-vsi-vpna] quit[PE1] vsi vpnb static[PE1-vsi-vpnb] pwsignal ldp[PE1-vsi-vpnb-ldp] vsi-id 2[PE1-vsi-vpnb-ldp] peer 2.2.2.9

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-87

Page 220: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[PE1-vsi-vpna-ldp] return

l Configure PE2.<PE2> system-view[PE2] mpls l2vpn[PE2-l2vpn] quit[PE2] vsi vpna static[PE2-vsi-vpna] pwsignal ldp[PE2-vsi-vpna-ldp] vsi-id 1[PE2-vsi-vpna-ldp] peer 1.1.1.9[PE2-vsi-vpna-ldp] quit[PE2-vsi-vpna] quit[PE2] vsi vpnb static[PE2-vsi-vpnb] pwsignal ldp[PE2-vsi-vpnb-ldp] vsi-id 2[PE2-vsi-vpnb-ldp] peer 1.1.1.9[PE2-vsi-vpna-ldp] return

# Bind VSIs to interfaces on PE.l Configure PE1.

<PE1> system-view[PE1] interface gigabitethernet2/0/0.1[PE1-GigabitEthernet2/0/0.1] vlan-type dot1q 10[PE1-GigabitEthernet2/0/0.1] l2 binding vsi vpna[PE1-GigabitEthernet2/0/0.1] quit[PE1] interface gigabitethernet3/0/0.1[PE1-GigabitEthernet3/0/0.1] vlan-type dot1q 20[PE1-GigabitEthernet3/0/0.1] l2 binding vsi vpnb[PE1-GigabitEthernet3/0/0.1] return

l Configure PE2.<PE2> system-view[PE2] interface gigabitethernet2/0/0.1[PE2-GigabitEthernet2/0/0.1] vlan-type dot1q 10[PE2-GigabitEthernet2/0/0.1] l2 binding vsi vpna[PE2-GigabitEthernet2/0/0.1] quit[PE2] interface gigabitethernet3/0/0.1[PE2-GigabitEthernet3/0/0.1] vlan-type dot1q 20[PE2-GigabitEthernet3/0/0.1] l2 binding vsi vpnb[PE2-GigabitEthernet3/0/0.1] return

l Configure CE1.<CE1> system-view[CE1] interface gigabitethernet1/0/0[CE1-GigabitEthernet1/0/0] undo shutdown[CE1-GigabitEthernet1/0/0] portswitch[CE1-GigabitEthernet1/0/0] port link-type trunk[CE1-GigabitEthernet1/0/0] port trunk allow-pass vlan 10[CE1-GigabitEthernet1/0/0] return

l Configure CE2.<CE2> system-view[CE2] interface gigabitethernet1/0/0[CE2-GigabitEthernet1/0/0] undo shutdown[CE2-GigabitEthernet1/0/0] portswitch[CE2-GigabitEthernet1/0/0] port link-type trunk[CE2-GigabitEthernet1/0/0] port trunk allow-pass vlan 10[CE2-GigabitEthernet1/0/0] return

l Configure CE3.<CE3> system-view[CE3] interface gigabitethernet1/0/0.1[CE3-GigabitEthernet1/0/0.1] vlan-type dot1q 20[CE3-GigabitEthernet1/0/0.1] ip address 10.3.1.1 255.255.255.0[CE3-GigabitEthernet1/0/0.1] return

l Configure CE4.<CE4> system-view

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-88 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 221: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[CE4] interface gigabitethernet1/0/0.1[CE4-GigabitEthernet1/0/0.1] vlan-type dot1q 20[CE4-GigabitEthernet1/0/0.1] ip address 10.3.1.2 255.255.255.0[CE4-GigabitEthernet1/0/0.1] return

After the preceding configuration, run the display vsi name vsi-name verbosecommand on PE1 and you can find that a PW has been established from the VSI named"vpna" to PE2 and that the VSI state is Up.[PE1] display vsi name vpna verbose ***VSI Name : vpna Administrator VSI : no Isolate Spoken : disable VSI Index : 0 PW Signaling : ldp Member Discovery Style : static PW MAC Learn Style : unqualify Encapsulation Type : vlan MTU : 1500 Mode : uniform Service Class : -- Color : -- DomainId : 0 Domain Name : VSI State : up VSI ID : 1 *Peer Router ID : 2.2.2.9 VC Label : 142336 Peer Type : dynamic Session : up Tunnel ID : 0xc08002, Interface Name : GigabitEthernet2/0/0.1 State : up **PW Information: *Peer Ip Address : 2.2.2.9 PW State : up Local VC Label : 142336 Remote VC Label : 142336 PW Type : label Tunnel ID : 0xc08002

CE1 and CE2 can ping through each other; CE3 and CE4 can ping through each other.

4. Configure a tunnel policy: specifying that VPNs communicate through the MPLS TEtunnel; then apply the tunnel policy to the VSI instances.<PE1> system-view[PE1] tunnel-policy policy1[PE1-tunnel-policy-policy1] tunnel binding destination 2.2.2.9 te tunnel 1/0/0[PE1-tunnel-policy-policy1] quit[PE1] vsi vpna[PE1-vsi-vpna] tnl-policy policy1[PE1-vsi-vpna] quit[PE1] vsi vpnb[PE1-vsi-vpnb] tnl-policy policy1[PE1-vsi-vpnb] return

NOTE

In this example, the TE tunnel is configured only in the direction from PE1 to PE2. If an MPLS TEtunnel is bi-directional, you also need to configure the tunnel policy on PE2 and apply it to the VSIinstances.

Running the display mpls forwarding-table command on PE1, you can find an LSPdestined for 2.2.2.9/32 in the MPLS forwarding table. [PE1] display mpls forwarding-tableFec Outlabel Out-IF Nexthop LspIndex3.3.3.9/32 3 POS1/0/0 100.1.1.2 307352.2.2.9/32 1025 POS1/0/0 100.1.1.2 30743

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-89

Page 222: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Run the display tunnel-info all command on PE1 and you can find that an MPLS TE tunneldestined for 2.2.2.9 has been established on PE1.[PE1] display tunnel-info all * -> Allocated VC TokenTunnel ID Type Destination Token----------------------------------------------------------------------0x1808027 lsp 3.3.3.9 390x180802a lsp -- 420x180802b lsp -- 430x180802c lsp -- 440x180802d lsp -- 450x61818003 cr lsp 2.2.2.9 327710x41818005 lsp -- 327730x41818006 lsp -- 32774

5. Configure the simple traffic classification on the inbound interface of PE1.

Map the 802.1p priorities of 3 and 2 of VLAN packets respectively to the EXP prioritiesof 4 and 3 in the MPLS domain. Map the DSCP value of 34 carried in the packets fromVPN B to the EXP priority of 3 in the MPLS domain.<PE1> system-view[PE1] diffserv domain vpna[PE1-dsdomain-vpna] 8021p-inbound 3 phb af4 green[PE1-dsdomain-vpna] 8021p-inbound 2 phb af3 green[PE1-dsdomain-vpna] quit[PE1] interface gigabitethernet 2/0/0.1[PE1-GigabitEthernet2/0/0.1] trust upstream vpna[PE1-GigabitEthernet2/0/0.1] trust 8021p[PE1-GigabitEthernet2/0/0.1] quit[PE1] diffserv domain vpnb[PE1-dsdomain-vpnb] ip-dscp-inbound 34 phb af3 green[PE1-dsdomain-vpnb] quit[PE1] interface gigabitethernet 3/0/0.1[PE1-GigabitEthernet3/0/0.1] trust upstream vpnb[PE1-GigabitEthernet3/0/0.1] return

6. Configure flow queues on PE1 for non-VPN packets from VPN A, VPN B, and the MPLSTE tunnel.

# Configure a WRED object referenced by a flow queue.<PE1> system-view[PE1] flow-wred test[PE1-flow-wred-test] color green low-limit 30 high-limit 50 discard-percentage 100[PE1-flow-wred-test] color yellow low-limit 20 high-limit 40 discard-percentage 100[PE1-flow-wred-test] color red low-limit 10 high-limit 30 discard-percentage 100[PE1-flow-wred-test] return

# Configure the scheduling algorithms, WRED parameters, and shaping values for flowqueues.<PE1> system-view[PE1] flow-queue vpna[PE1-flow-queue-template-vpna] queue ef pq flow-wred test shaping 12000[PE1-flow-queue-template-vpna] queue af4 wfq weight 15 flow-wred test shaping 8000[PE1-flow-queue-template-vpna] queue af3 wfq weight 10 flow-wred test shaping 5000[PE1-flow-queue-template-vpna] quit[PE1] flow-queue vpnb[PE1-flow-queue-template-vpnb] queue af3 pq flow-wred test shaping 10000[PE1-flow-queue-template-vpnb] quit[PE1] flow-queue te[PE1-flow-queue-template-te] queue ef pq flow-wred test shaping 25000[PE1-flow-queue-template-te] queue af4 wfq weight 15 flow-wred test shaping 15000

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-90 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 223: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[PE1-flow-queue-template-te] queue af3 wfq weight 10 flow-wred test shaping 10000[PE1-flow-queue-template-te] return

7. (Optional) Configure Uniform models supported by the VPLS.

NOTE

l If the configuration of VPLS supporting the Uniform model is done for the first time, you canuse the default Uniform model rather than configure the model with the command.

l If VPLSs have been configured to support the Pipe or Short Pipe model and now you want toconfigure them to support the Uniform model, you need to perform the following configuration.

<PE1> system-view[PE1] vsi vpna[PE1-vsi-vpna] diffserv-mode uniform[PE1-vsi-vpna] quit[PE1] vsi vpnb[PE1-vsi-vpnb] diffserv-mode uniform[PE1-vsi-vpnb] return

8. Configure class queues on the interfaces on the network side of PE1.<PE1> system-view[PE1] interface pos 1/0/0[PE1-Pos1/0/0] port-queue ef pq shaping 25 outbound[PE1-Pos1/0/0] port-queue af4 wfq weight 15 shaping 15 outbound[PE1-Pos1/0/0] port-queue af3 wfq weight 10 shaping 10 outbound[PE1-Pos1/0/0] return

9. Configure a bandwidth for the MPLS TE tunnel and statically bind the VSI instances tothe MPLS TE tunnel.<PE1> system-view[PE1] interface tunnel 1/0/0[PE1-Tunnel1/0/0] mpls te bandwidth 100000 flow-queue te[PE1-Tunnel1/0/0] mpls te reserved-for-binding[PE1-Tunnel1/0/0] mpls te vpn-binding l2vpn vsi vpna cir 50000 pir 100000 flow-queue vpna[PE1-Tunnel1/0/0] mpls te vpn-binding l2vpn vsi vpnb cir 30000 pir 100000 flow-queue vpnb[PE1-Tunnel1/0/0] mpls te commit

10. Verify the configuration.Running the display traffic statistics interface tunnel interface-numbertunnel-name[ vsi vsi-name ] command, you can view the traffic information about the VPLS in theMPLS TE tunnel. For example:[PE1] display traffic statistics interface tunnel 1/0/0 vsi vpnaThe RRVPN Traffic Statistics: Transit packets :239453968 Transit bytes :24918416800 Discard packets :0 Discard bytes :0 Transit packets rate :33000 packets/sec Transit bytes rate :4070000 bytes/sec

Configuration Filesl Configuration file of PE1

# sysname PE1#flow-wred testcolor green low-limit 30 high-limit 50 discard-percentage 100color yellow low-limit 20 high-limit 40 discard-percentage 100color red low-limit 10 high-limit 30 discard-percentage 100#flow-queue vpnaqueue ef pq shaping 12000 flow-wred test

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-91

Page 224: 00399154-Configuration Guide - QoS(V300R003_03).pdf

queue af4 wfq weight 15 shaping 8000 flow-wred testqueue af3 wfq weight 10 shaping 5000 flow-wred test#flow-queue vpnbqueue ef pq shaping 10000 flow-wred test#flow-queue tequeue ef pq shaping 25000 flow-wred testqueue af4 wfq weight 15 shaping 15000 flow-wred testqueue af3 wfq weight 10 shaping 10000 flow-wred test#mpls lsr-id 1.1.1.9 mpls mpls te mpls rsvp-te mpls te cspf mpls l2vpn#vsi vpna staticpwsignal ldpvsi-id 1peer 2.2.2.9tnl-policy policy1diffserv-mode uniform#vsi vpnb staticpwsignal ldpvsi-id 2peer 2.2.2.9tnl-policy policy1diffserv-mode uniform#mpls ldp#mpls ldp remote-peer 2.2.2.9 remote-ip 2.2.2.9#diffserv domain vpna8021p-inbound 3 phb af4 green8021p-inbound 2 phb af3 green#diffserv domain vpnb ip-dscp-inbound 34 phb af3 green#interface Pos1/0/0undo shutdownlink-protocol pppip address 100.1.1.1 255.255.255.0 mpls mpls te mpls te max-link-bandwidth 200000 mpls te max-reservable-bandwidth 120000mpls rsvp-teport-queue ef pq shaping 25 outboundport-queue af4 wfq weight 15 shaping 15 outboundport-queue af3 wfq weight 10 shaping 10 outbound#interface GigabitEthernet2/0/0 undo shutdown#interface GigabitEthernet2/0/0.1vlan-type dot1q 10l2 binding vsi vpnatrust upstream vpnatrust 8021p#interface GigabitEthernet3/0/0 undo shutdown#

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-92 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 225: 00399154-Configuration Guide - QoS(V300R003_03).pdf

interface GigabitEthernet3/0/0.1vlan-type dot1q 20l2 binding vsi vpnbtrust upstream vpnb#interface LoopBack1 ip address 1.1.1.9 255.255.255.252#interface Tunnel1/0/0 ip address unnumbered interface LoopBack1 tunnel-protocol mpls te destination 2.2.2.9 mpls te tunnel-id 100mpls te bandwidth bc0 100000 flow-queue templs te reserved-for-bindingmpls te vpn-binding l2vpn vsi vpna cir 50000 pir 100000 flow-queue vpnampls te vpn-binding l2vpn vsi vpnb cir 30000 pir 100000 flow-queue vpnb mpls te commit#ospf 1 opaque-capability enable area 0.0.0.0 network 100.1.1.0 0.0.0.255 network 1.1.1.9 0.0.0.0 mpls-te enable#tunnel-policy policy1tunnel binding destination 2.2.2.9 te Tunnel 1/0/0#return

l Configuration file of the P# sysname P# mpls lsr-id 3.3.3.9 mpls mpls te mpls rsvp-te mpls te cspf#diffserv domain default#interface Pos1/0/0undo shutdownlink-protocol ppp ip address 100.1.1.2 255.255.255.0 mpls mpls te mpls te max-link-bandwidth 200000 mpls te max-reservable-bandwidth 120000 mpls rsvp-te#interface Pos2/0/0undo shutdownlink-protocol pppip address 200.1.1.1 255.255.255.0 mpls mpls te mpls te max-link-bandwidth 200000 mpls te max-reservable-bandwidth 120000mpls rsvp-te#interface LoopBack1 ip address 2.2.2.9 255.255.255.252#ospf 1 opaque-capability enable area 0.0.0.0 network 100.1.1.0 0.0.0.255

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-93

Page 226: 00399154-Configuration Guide - QoS(V300R003_03).pdf

network 200.1.1.0 0.0.0.255 network 3.3.3.9 0.0.0.0 mpls-te enable#return

l Configuration file of PE2# sysname PE2# mpls lsr-id 2.2.2.9 mpls mpls te mpls rsvp-te mpls te cspfmpls l2vpn#vsi vpna staticpwsignal ldpvsi-id 1peer 1.1.1.9#vsi vpnb staticpwsignal ldpvsi-id 2peer 1.1.1.9#mpls ldp#mpls ldp remote-peer 1.1.1.9 remote-ip 1.1.1.9#interface Pos1/0/0undo shutdownlink-protocol ppp ip address 200.1.1.2 255.255.255.0 mpls mpls te mpls te max-link-bandwidth 200000 mpls te max-reservable-bandwidth 120000 mpls rsvp-te#interface GigabitEthernet2/0/0 undo shutdown#interface GigabitEthernet2/0/0.1 vlan-type dot1q 10l2 binding vsi vpna#interface GigabitEthernet3/0/0 undo shutdown#interface GigabitEthernet3/0/0.1vlan-type dot1q 20l2 binding vsi vpnb#interface LoopBack1 ip address 2.2.2.9 255.255.255.252#ospf 1 opaque-capability enable area 0.0.0.0 network 200.1.1.0 0.0.0.255 network 2.2.2.9 0.0.0.0 mpls-te enable#return

l Configuration file of CE1#

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-94 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 227: 00399154-Configuration Guide - QoS(V300R003_03).pdf

sysname CE1#interface GigabitEthernet1/0/0 undo shutdownportswitchport link-type trunkport trunk allow-pass vlan 10#return

l Configuration file of CE2# sysname CE2#interface GigabitEthernet1/0/0 undo shutdownportswitchport link-type trunkport trunk allow-pass vlan 10#return

l Configuration file of CE3# sysname CE3#interface GigabitEthernet1/0/0 undo shutdown#interface GigabitEthernet1/0/0.1 ip address 10.3.1.1 255.255.255.0 vlan-type dot1q 20#return

l Configuration file of CE4# sysname CE4#interface GigabitEthernet1/0/0 undo shutdown#interface GigabitEthernet1/0/0.1 undo shutdown ip address 10.3.1.2 255.255.255.0 vlan-type dot1q 20#return

6.5.6 Example for Configuring Hierarchical Resource ReservedVPNs (with Both L3VPNs and L2VPNs Deployed)

Networking Requirements

As shown in Figure 6-13, CE1 and CE2 belong to VPN A; CE3 and CE4 belong to VPN B;CE5 and CE6 belong to VPN C. VPN A, VPN B, and VPN C share the two MPLS TE tunnelsthat connect the public edge devices PE1 and PE2. In the MPLS TE tunnels:

l On VPN A, CE1 and CE2 can access each other through the BGP/MPLS IP VPN.

l On VPN B, a Martini VLL is established between CE3 and CE4.

l On VPN C, a Martini VPLS is established between CE5 and CE6.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-95

Page 228: 00399154-Configuration Guide - QoS(V300R003_03).pdf

You are required to reserve bandwidths for packets from VPN A, VPN B, and VPN C that gothrough the MPLS TE tunnels, and for packets of different services within a VPN. The bandwidthresources also need to be separated from each other.

To be specific:

l Use RSVP-TE to establish one MPLS TE tunnel connecting the devices from PE1 to PE2,and the other from PE2 to PE1. These MPLS TE tunnels carry VPN services. The bandwidthof each tunnel is 100 Mbit/s. The maximum bandwidth of the link along the tunnel is 200Mbit/s and the maximum reservable bandwidth is 120 Mbit/s.

l VPN A is guaranteed with a bandwidth of 30 Mbit/s in the MPLS TE tunnel. The VoIPpackets of VPN A are forwarded as EF packets and are guaranteed with a bandwidth of 10Mbit/s. The video packets of VPN A are forwarded as AF4 packets and guaranteed with abandwidth of 5 Mbit/s. The important data packets of VPN A are forwarded as AF3 packetsand are guaranteed with a bandwidth of 5 Mbit/s.

l VPN B is guaranteed with a bandwidth of 20 Mbit/s in the MPLS TE tunnel. The voicepackets in VPN B are forwarded as EF packets and are guaranteed with a bandwidth of 8Mbit/s. Other data packets share the remaining bandwidth for the packets of VPN Baccording to the default settings of the system.

l VPN C is guaranteed with a bandwidth of 20 Mbit/s in the MPLS TE tunnel. VPN C isguaranteed with a bandwidth of 10 Mbit/s for voice packets of the EF type, a bandwidth of5 Mbit/s for important data packets of the AF4 type. Other data packets share the remainingbandwidth for the packets of VPN C according to the default settings of the system.

l The packets from VPN A, VPN B and VPN C are forwarded in the Uniform model alongthe MPLS TE tunnel. On the outbound interface of the MPLS domain, the packets arescheduled according to the DSCP priorities that are mapped from the EXP priorities.

Figure 6-13 Networking diagram for configuring hierarchical resource reserved VPNs

Device Interface IP addressCE1 GE1/0/0 10.1.1.1/24CE2 GE1/0/0 10.2.1.1/24CE3 GE1/0/0.1 10.3.1.1/24CE4 GE1/0/0.1 10.3.1.2/24

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-96 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 229: 00399154-Configuration Guide - QoS(V300R003_03).pdf

CE5 GE1/0/0.1 10.4.1.1/24CE6 GE1/0/0.1 10.4.1.2/24PE1 Loopback1 1.1.1.9/32

POS1/0/0 100.1.1.1/24GE2/0/0 10.1.1.2/24

P Loopback1 3.3.3.9/32POS1/0/0 100.1.1.2/24POS2/0/0 200.1.1.1/24

PE2 Loopback1 2.2.2.9/32POS1/0/0 200.1.1.2/24GE2/0/0 10.2.1.2/24

Configuration Roadmap

The configuration roadmap is as follows:

1. Configure the IP addresses and routes for the interfaces to ensure that they interwork at thenetwork layer.

2. Configure MPLS TE tunnels between the PEs.3. Configure VPN services. Configure CE1 and CE2 to access each other through the BGP

MPLS IP VPN; CE3; configure the Martini VLL on CE3 and CE4; configure the MartiniVPLS on CE5 and CE6.

4. Configure the simple traffic classification: trusting DSCP values carried by upstreampackets.

5. Configure the packets from VPN A, VPN B and VPN C to use the Uniform model in theMPLS TE tunnel.

6. Configure resource reservation and bandwidth guarantee for the traffic from VPN A, VPNB, and VPN C.

NOTE

l The hierarchical resource reserved VPN is configured only on an ingress PE. After the configurationof the hierarchical resource reserved VPN, you can further configure interface-specific HQoS on theinterface of the user side on the egress PE.

l Network traffic is bi-directional; therefore, you can configure hierarchical resource reserved VPN forthe opposite traffic on the peer PE. In this example, the resource reserved VPN is configured only forpackets from PE1 to PE2. The configuration of resource reserved VPN for packets from PE2 to PE1is contained in the configuration file.

Data Preparation

To complete the configuration, you need the following data:

l IP addresses of the interfaces

l MPLS LSR IDs on the PE and P devices, maximum usable bandwidth of the physical linkalong the MPLS TE tunnel, and the maximum reservable bandwidth

l Tunnel interfaces, MPLS TE tunnel encapsulation protocol, tunnel ID, and RSVP tunnelsignaling

l Name of the VPN instance, VPN-target, and RD for VPN A

l Name of the remote PE peer, VC ID, and VLAN ID for VPN B

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-97

Page 230: 00399154-Configuration Guide - QoS(V300R003_03).pdf

l VSI name, VSI ID, and VLAN ID of the AC sub-interface for VPN C

l Service types and colors of the packets from VPN B and VPN C for label mapping at theingress of the MPLS TE tunnel

l Guaranteed bandwidths and scheduling parameters for flow queues that accept non-VPNpackets from VPN A, VPN B, VPN C, and the MPLS TE tunnel

l Bandwidth limits for VPN A, VPN B, VPN C, and the MPLS TE tunnel

Configuration Procedure1. Configure the IP addresses of the interfaces on the MPLS backbone network and the IGP

(OSPF) to ensure interworking between PE1, P, and PE2.The details are not mentioned here. For detailed description of the configuration, see "6.5.3Example for Configuring a Hierarchical Resource Reserved L3VPN."

2. Configuring MPLS TE tunnels# Configure the basic MPLS functions and MPLS LDP on the MPLS backbone network.l Configure PE1.

<PE1> system-view[PE1] mpls lsr-id 1.1.1.9[PE1] mpls[PE1-mpls] quit[PE1] mpls ldp[PE1-mpls-ldp] quit

l Configure PE2.<PE2> system-view[PE2] mpls lsr-id 2.2.2.9[PE2] mpls[PE2-mpls] quit[PE2] mpls ldp[PE2-mpls-ldp] quit

# Establish a remote peer session between PE1 and PE2.l Configure PE1.

<PE1> system-view[PE1] mpls ldp remote-peer 2.2.2.9[PE1-mpls-ldp-remote-2.2.2.9] remote-ip 2.2.2.9[PE1-mpls-ldp-remote-2.2.2.9] return

l Configure PE2.<PE2> system-view[PE2] mpls ldp remote-peer 1.1.1.9[PE2-mpls-ldp-remote-1.1.1.9] remote-ip 1.1.1.9[PE2-mpls-ldp-remote-1.1.1.9] return

# Enable MPLS TE, RSVP-TE, CSPF, and OSPF TE.l Configure PE1.

<PE1> system-view[PE1] mpls[PE1-mpls] mpls te[PE1-mpls] mpls rsvp-te[PE1-mpls] mpls te cspf[PE1-mpls] quit[PE1] interface pos 1/0/0[PE1-Pos1/0/0] mpls[PE1-Pos1/0/0] mpls te[PE1-Pos1/0/0] mpls rsvp-te[PE1-Pos1/0/0] quit[PE1] ospf[PE1-ospf-1] opaque-capability enable[PE1-ospf-1] area 0

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-98 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 231: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[PE1-ospf-1-area-0.0.0.0] mpls-te enable[PE1-ospf-1-area-0.0.0.0] return

l Configure the P.<P> system-view[P] mpls[P-mpls] mpls te[P-mpls] mpls rsvp-te[P-mpls] mpls te cspf[P-mpls] quit[P] interface pos 1/0/0[P-Pos1/0/0] mpls[P-Pos1/0/0] mpls te[P-Pos1/0/0] mpls rsvp-te[P-Pos1/0/0] quit[P] interface pos 2/0/0[P-Pos2/0/0] mpls[P-Pos2/0/0] mpls te[P-Pos2/0/0] mpls rsvp-te[P-Pos2/0/0] quit[P] ospf[P-ospf-1] opaque-capability enable[P-ospf-1] area 0[P-ospf-1-area-0.0.0.0] mpls-te enable[P-ospf-1-area-0.0.0.0] return

l Configure PE2.<PE2> system-view[PE2] mpls[PE2-mpls] mpls te[PE2-mpls] mpls rsvp-te[PE2-mpls] mpls te cspf[PE2-mpls] quit[PE2] interface pos 1/0/0[PE2-Pos1/0/0] mpls[PE2-Pos1/0/0] mpls te[PE2-Pos1/0/0] mpls rsvp-te[PE2-Pos1/0/0] quit[PE2] ospf[PE2-ospf-1] opaque-capability enable[PE2-ospf-1] area 0[PE2-ospf-1-area-0.0.0.0] mpls-te enable[PE2-ospf-1-area-0.0.0.0] return

# Configure the maximum usable bandwidth for the physical link along the MPLS TEtunnel and the maximum reservable bandwidth.

NOTE

When you configure an MPLS TE tunnel, you need to specify the maximum usable bandwidth andthe maximum reservable bandwidth for the physical link; then you also need to specify the bandwidthof the tunnel.The maximum reservable bandwidth of the physical link should not be greater than the maximumusable bandwidth. The bandwidth of a tunnel should not be greater than the maximum reservablebandwidth for the physical link.

l Configure PE1.<PE1> system-view[PE1] interface pos 1/0/0[PE1-Pos1/0/0] mpls te max-link-bandwidth 200000[PE1-Pos1/0/0] mpls te max-reservable-bandwidth 120000[PE1-Pos1/0/0] return

l Configure the P.<P> system-view[P] interface pos 1/0/0[P-Pos1/0/0] mpls te max-link-bandwidth 200000[P-Pos1/0/0] mpls te max-reservable-bandwidth 120000[P-Pos1/0/0] quit

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-99

Page 232: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[P] interface pos 2/0/0[P-Pos2/0/0] mpls te max-link-bandwidth 200000[P-Pos2/0/0] mpls te max-reservable-bandwidth 120000[P-Pos2/0/0] return

l Configure PE2.<PE2> system-view[PE2] interface pos 1/0/0[PE2-Pos1/0/0] mpls te max-link-bandwidth 200000[PE2-Pos1/0/0] mpls te max-reservable-bandwidth 120000[PE2-Pos1/0/0] return

# Configure MPLS TE tunnels and tunneling policies on PEs.l Configure PE1.

<PE1> system-view[PE1] interface tunnel 1/0/0[PE1-Tunnel1/0/0] ip address unnumbered interface loopback 1[PE1-Tunnel1/0/0] tunnel-protocol mpls te[PE1-Tunnel1/0/0] destination 2.2.2.9[PE1-Tunnel1/0/0] mpls te tunnel-id 100[PE1-Tunnel1/0/0] mpls te signal-protocol rsvp-te[PE1-Tunnel1/0/0] mpls te reserved-for-binding[PE1-Tunnel1/0/0] mpls te commit[PE1-Tunnel1/0/0] quit[PE1] tunnel-policy policy1[PE1-tunnel-policy-policy1] tunnel binding destination 2.2.2.9 te tunnel 1/0/0[PE1-tunnel-policy-policy1] return

l Configure PE2.<PE2> system-view[PE2] interface tunnel 1/0/0[PE2-Tunnel1/0/0] ip address unnumbered interface loopback 1[PE2-Tunnel1/0/0] tunnel-protocol mpls te[PE2-Tunnel1/0/0] destination 1.1.1.9[PE2-Tunnel1/0/0] mpls te tunnel-id 100[PE2-Tunnel1/0/0] mpls te signal-protocol rsvp-te[PE2-Tunnel1/0/0] mpls te reserved-for-binding[PE2-Tunnel1/0/0] mpls te commit[PE2-Tunnel1/0/0] quit[PE2] tunnel-policy policy1[PE2-tunnel-policy-policy1] tunnel binding destination 1.1.1.9 te tunnel 1/0/0[PE2-tunnel-policy-policy1] returnRun the display interface tunnel command. You can view that the status of the interfaceis Up.[PE1] display interface tunnelTunnel1/0/0 current state : UPLine protocol current state : UPDescription:HUAWEI, Quidway Series, Tunnel1/0/0 InterfaceRoute Port,The Maximum Transmit Unit is 1500Internet Address is unnumbered, using address of LoopBack1(1.1.1.9/32)Encapsulation is TUNNEL, loopback not setTunnel destination 2.2.2.9Tunnel up/down statistics 1Tunnel protocol/transport MPLS/MPLS, ILM is available,primary tunnel id is 0x40c18000, secondary tunnel id is 0x0 300 minutes output rate 0 bytes/sec, 0 packets/sec 0 packets output, 0 bytes 0 output errorRun the display mpls te tunnel-interface command on PE1 and you can view detailedinformation about the tunnel.<PE1> display mpls te tunnel-interface Tunnel Name : Tunnel1/0/0 Tunnel Desc : HUAWEI, Quidway Series, Tunnel1/0/0 Interface Tunnel State Desc : CR-LSP is Up

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-100 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 233: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Tunnel Attributes : LSP ID : 1.1.1.9:1 Session ID : 100 Admin State : UP Oper State : UP Ingress LSR ID : 1.1.1.9 Egress LSR ID: 2.2.2.9 Signaling Protocol : RSVP Resv Style : SE Class Type : CLASS 0 Tunnel BW : 0 kbps Reserved BW : 1200 kbps Setup Priority : 7 Hold Priority: 7 Hop Limit : - Secondary Hop Limit : - BestEffort Hop Limit: - Affinity Prop/Mask : 0x0/0x0 Explicit Path Name : - Secondary Affinity Prop/Mask: 0x0/0x0 Secondary Explicit Path Name: - BestEffort Affinity Prop/Mask: 0x0/0x0 Tie-Breaking Policy : None Metric Type : None Record Route : Disabled Record Label : Disabled FRR Flag : Disabled BackUpBW Flag: Not Supported BackUpBW Type : - BackUpBW : - Route Pinning : Disabled Retry Limit : 5 Retry Interval: 10 sec Reopt : Disabled Reopt Freq : - Back Up Type : None Back Up LSPID : - Auto BW : Disabled Auto BW Freq : - Min BW : - Max BW : - Current Collected BW: - Interfaces Protected: - ACL Bind Value : VRF Bind Value : L2VPN Bind Value : Car Policy : Disabled Tunnel Group : Primary Primary Tunnel Sum : - Primary Tunnel : - Backup Tunnel : - IPTN InLabel : - Group Status : Up Oam Status : Up Bfd Capability : None BestEffort : Disabled IsBestEffortPath: Non-existent

3. Configure BGP MPLS IP VPN for VPN A.# Configure VPN instances on PEs and bind the VPN instances to the interfaces that connectCEs.l Configure CE1.

<CE1> system-view[CE1] interface gigabitethernet 1/0/0[CE1-GigabitEthernet1/0/0] undo shutdown[CE1-GigabitEthernet1/0/0] ip address 10.1.1.1 255.255.255.0[CE1-GigabitEthernet1/0/0] return

l Configure CE2.<CE2> system-view[CE2] interface gigabitethernet 1/0/0[CE2-GigabitEthernet1/0/0] undo shutdown[CE2-GigabitEthernet1/0/0] ip address 10.2.1.1 255.255.255.0[CE2-GigabitEthernet1/0/0] return

l Configure VPN instances on PE1.<PE1> system-view[PE1] ip vpn-instance vpna[PE1-vpn-instance-vpna] route-distinguisher 100:1[PE1-vpn-instance-vpna] vpn-target 111:1 export-extcommunity

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-101

Page 234: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[PE1-vpn-instance-vpna] vpn-target 111:1 import-extcommunity[PE1-vpn-instance-vpna] quit[PE1] interface gigabitethernet2/0/0[PE1-GigabitEthernet2/0/0] undo shutdown[PE1-GigabitEthernet2/0/0] ip binding vpn-instance vpna[PE1-GigabitEthernet2/0/0] ip address 10.1.1.2 255.255.255.0[PE1-GigabitEthernet2/0/0] return

l Configure VPN instances on PE2.<PE2> system-view[PE2] ip vpn-instance vpna[PE2-vpn-instance-vpna] route-distinguisher 200:1[PE2-vpn-instance-vpna] vpn-target 111:1 export-extcommunity[PE2-vpn-instance-vpna] vpn-target 111:1 import-extcommunity[PE2-vpn-instance-vpna] quit[PE2] interface gigabitethernet2/0/0[PE2-GigabitEthernet2/0/0] undo shutdown[PE2-GigabitEthernet2/0/0] ip binding vpn-instance vpna[PE2-GigabitEthernet2/0/0] ip address 10.2.1.2 255.255.255.0[PE2-GigabitEthernet2/0/0] returnRun the display ip vpn-instance verbose command on a PE. You can view theconfigurations of the VPN instances.The following is the output on PE1:[PE1] display ip vpn-instance verbose Total VPN-Instances configured : 1 VPN-Instance Name and ID : vpna, 1 Create date : 2007/07/21 11:30:35 Up time : 0 days, 00 hours, 05 minutes and 19 seconds Route Distinguisher : 1:1 Export VPN Targets : 1:1 Import VPN Targets : 1:1 Label policy: label per route Interfaces : GigabitEthernet2/0/0On a PE, you can ping through the connected CEs.

# Apply tunneling policies to the VPN instances and specify that VPN A uses the MPLSTE tunnel.l Configure PE1.

<PE1> system-view[PE1] ip vpn-instance vpna[PE1-vpn-instance-vpna] tnl-policy policy1[PE1-vpn-instance-vpna] return

l Configure PE2.<PE2> system-view[PE2] ip vpn-instance vpna[PE2-vpn-instance-vpna] tnl-policy policy1[PE2-vpn-instance-vpna] return

# Establish an IBGP adjacency between PE1 and PE2.l Configure PE1.

<PE1> system-view[PE1] bgp 500[PE1-bgp] peer 2.2.2.9 as-number 500[PE1-bgp] peer 2.2.2.9 connect-interface loopback 1[PE1-bgp] ipv4-family vpnv4[PE1-bgp-af-vpnv4] peer 2.2.2.9 enable[PE1-bgp-af-vpnv4] return

l Configure PE2.<PE2> system-view[PE2] bgp 500[PE2-bgp] peer 1.1.1.9 as-number 500[PE2-bgp] peer 1.1.1.9 connect-interface loopback 1[PE2-bgp] ipv4-family vpnv4

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-102 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 235: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[PE2-bgp-af-vpnv4] peer 1.1.1.9 enable[PE2-bgp-af-vpnv4] return

# Establish EBGP adjacencies between PE1 and CE1, and between PE2 and CE2.l Configure CE1.

<CE1> system-view[CE1] bgp 65410[CE1-bgp] peer 10.1.1.2 as-number 500[CE1-bgp] import-route direct[CE1-bgp] quit

l Configure CE2.<CE2> system-view[CE2] bgp 65420[CE2-bgp] peer 10.2.1.2 as-number 500[CE2-bgp] import-route direct[CE2-bgp] quit

l Configure PE1.<PE1> system-view[PE1] bgp 500[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] return

l Configure PE2.<PE2> system-view[PE2] bgp 500[PE2-bgp] ipv4-family vpn-instance vpna[PE2-bgp-vpna] peer 10.2.1.1 as-number 65420[PE2-bgp-vpna] import-route direct[PE2-bgp-vpna] returnRunning the display bgp peer and the display bgp vpnv4 peer commands on a PE,you can view that BGP peer relations between PEs, and between PEs and CEs havebeen established: The state should be Established.The following is the output on PE1:[PE1] display bgp peer BGP local router ID : 1.1.1.9 Local AS number : 500 Total number of peers : 1 Peers in established state : 1 Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv 2.2.2.9 4 500 3 3 0 00:00:11 Established 0 [PE1] display bgp vpnv4 all peerBGP local router ID : 1.1.1.9 Local AS number : 500 Total number of peers : 2 Peers in established state : 2 Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv2.2.2.9 4 500 12 18 0 00:09:38 Established 0 Peer of vpn instance: vpn instance vpna :10.1.1.1 4 65410 25 25 0 00:17:57 Established 1CE1 and CE2 can ping through each other. CEs in different VPNs cannot ping througheach other.

4. Configure Martini VLL on VPN B.# Configure CEs.l Configure CE3.

<CE3> system-view[CE3] interface gigabitethernet 1/0/0.1[CE3-GigabitEthernet1/0/0.1] vlan-type dot1q 10[CE3-GigabitEthernet1/0/0.1] ip address 10.3.1.1 24

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-103

Page 236: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[CE3-GigabitEthernet1/0/0.1] returnl Configure CE4.

<CE4> system-view[CE4] interface gigabitethernet 1/0/0.1[CE4-GigabitEthernet1/0/0.1] vlan-type dot1q 20[CE4-GigabitEthernet1/0/0.1] ip address 10.3.1.2 24[CE4-GigabitEthernet1/0/0.1] return

# Enable MPLS L2VPN on PEs, and then create VC connections.l Configure PE1: Create a VC on the interface connecting CE3 and apply the tunneling

policy on the interface; then specify that VPN B uses the MPLS TE tunnel.<PE1> system-view[PE1] mpls l2vpn[PE1-l2vpn] mpls l2vpn default martini[PE1-l2vpn] quit[PE1] interface gigabitethernet 3/0/0.1[PE1-GigabitEthernet3/0/0.1] vlan-type dot1q 10[PE1-GigabitEthernet3/0/0.1] mpls l2vc 2.2.2.9 101 tunnel-policy policy1[PE1-GigabitEthernet3/0/0.1] return

l Configure PE2: Create a VC on the interface connecting CE4.<PE2> system-view[PE2] mpls l2vpn[PE2-l2vpn] mpls l2vpn default martini[PE2-l2vpn] quit[PE2] interface gigabitethernet 3/0/0.1[PE2-GigabitEthernet3/0/0.1] vlan-type dot1q 20[PE2-GigabitEthernet3/0/0.1] mpls l2vc 1.1.1.9 101 tunnel-policy policy1[PE2-GigabitEthernet3/0/0.1] quitRun the display mpls l2vc command on a PE. You can view that two L2 VCs areestablished and the state is Up. The following is the output on PE1:[PE1] display mpls l2vcTotal ldp vc : 1 1 up 0 down *Client Interface : GigabitEthernet3/0/0.1 Session State : up AC Status : up VC State : up VC ID : 101 VC Type : vlan Destination : 2.2.2.9 Local VC Label : 1025 Remote VC Label : 1024 Control Word : Disableforwarding entry : existent local group ID : 0 manual fault : not set active state : active link state : up Local VC MTU : 1500 Remote VC MTU : 1500 Tunnel Policy Name : policy1 Traffic Behavior Name: -- PW Template Name : --primary or secondary : primary Create time : 0 days, 0 hours, 3 minutes, 14 seconds UP time : 0 days, 0 hours, 1 minutes, 48 seconds Last change time : 0 days, 0 hours, 1 minutes, 48 secondsCE3 and CE4 can ping through each other.

5. Configure Martini VPLS.# Enable MPLS L2VPN on PEs and configure VSIs.l Configure PE1.

<PE1> system-view[PE1] mpls l2vpn

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-104 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 237: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[PE1-l2vpn] quit[PE1] vsi vpnc static[PE1-vsi-vpnc] pwsignal ldp[PE1-vsi-vpnc-ldp] vsi-id 1[PE1-vsi-vpnc-ldp] peer 2.2.2.9[PE1-vsi-vpnc-ldp] return

l Configure PE2.<PE2> system-view[PE2] mpls l2vpn[PE2-l2vpn] quit[PE2] vsi vpnc static[PE2-vsi-vpnc] pwsignal ldp[PE2-vsi-vpnc-ldp] vsi-id 1[PE2-vsi-vpnc-ldp] peer 1.1.1.9[PE2-vsi-vpnc-ldp] return

# Apply tunneling policies to VSIs and specify that VPN C uses the MPLS TE tunnel.l Configure PE1.

<PE1> system-view[PE1] vsi vpnc[PE1-vsi-vpnc] tnl-policy policy1[PE1-vsi-vpnc] return

l Configure PE2.<PE2> system-view[PE2] vsi vpnc[PE2-vsi-vpnc] tnl-policy policy1[PE2-vsi-vpnc] return

# Bind VSIs to interfaces on PE2.l Configure CE5.

<CE5> system-view[CE5] interface gigabitethernet1/0/0.1[CE5-GigabitEthernet1/0/0.1] vlan-type dot1q 20[CE5-GigabitEthernet1/0/0.1] ip address 10.4.1.1 255.255.255.0[CE5-GigabitEthernet1/0/0.1] return

l Configure CE6.<CE6> system-view[CE6] interface gigabitethernet1/0/0.1[CE6-GigabitEthernet1/0/0.1] vlan-type dot1q 30[CE6-GigabitEthernet1/0/0.1] ip address 10.4.1.2 255.255.255.0[CE6-GigabitEthernet1/0/0.1] return

l Configure PE1.<PE1> system-view[PE1] interface gigabitethernet4/0/0.1[PE1-GigabitEthernet4/0/0.1] vlan-type dot1q 20[PE1-GigabitEthernet4/0/0.1] l2 binding vsi vpnc[PE1-GigabitEthernet4/0/0.1] return

l Configure PE2.<PE2> system-view[PE2] interface gigabitethernet4/0/0.1[PE2-GigabitEthernet4/0/0.1] vlan-type dot1q 30[PE2-GigabitEthernet4/0/0.1] l2 binding vsi vpnc[PE2-GigabitEthernet4/0/0.1] returnRun the display vsi name vpnc verbose command on PE1. You can view that a PW toPE2 is established for the VSI vpna and that the VSI status is Up.[PE1] display vsi name vpnc verbose ***VSI Name : vpnc Administrator VSI : no Isolate Spoken : disable VSI Index : 0 PW Signaling : ldp

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-105

Page 238: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Member Discovery Style : static PW MAC Learn Style : unqualify Encapsulation Type : vlan MTU : 1500 Mode : uniform Service Class : -- Color : -- DomainId : 0 Domain Name : VSI State : up VSI ID : 2 *Peer Router ID : 2.2.2.9 VC Label : 142336 Peer Type : dynamic Session : up Tunnel ID : 0xc08002, Tunnel Policy Name : policy1 Interface Name : GigabitEthernet4/0/0.1 State : up **PW Information: *Peer Ip Address : 2.2.2.9 PW State : up Local VC Label : 142336 Remote VC Label : 142336 PW Type : label Tunnel ID : 0xc08002CE5 and CE6 can ping through each other.

6. Configure the simple traffic classification on the inbound interface of PE1: trusting theDSCP values of upstream IP packets.<PE1> system-view[PE1] interface gigabitethernet 2/0/0[PE1-GigabitEthernet2/0/0] trust upstream default[PE1-GigabitEthernet2/0/0] quit[PE1] interface gigabitethernet 3/0/0.1[PE1-GigabitEthernet3/0/0.1] trust upstream default[PE1-GigabitEthernet3/0/0.1] quit[PE1] interface gigabitethernet 4/0/0.1[PE1-GigabitEthernet4/0/0.1] trust upstream default[PE1-GigabitEthernet4/0/0.1] returnThe configuration on PE2 is the same as that on PE1.

7. Configure flow queues on PE1 for non-VPN packets from VPN A, VPN B, and the MPLSTE tunnel.# Configure a WRED object used by a flow queue.<PE1> system-view[PE1] flow-wred test[PE1-flow-wred-test] color green low-limit 30 high-limit 50 discard-percentage 100[PE1-flow-wred-test] color yellow low-limit 20 high-limit 40 discard-percentage 100[PE1-flow-wred-test] color red low-limit 10 high-limit 30 discard-percentage 100[PE1-flow-wred-test] returnThe configuration on PE2 is the same as that on PE1.# Configure the scheduling algorithms, WRED parameters, and shaping values for flowqueues.<PE1> system-view[PE1] flow-queue vpna[PE1-flow-queue-template-vpna] queue ef pq flow-wred test shaping 10000[PE1-flow-queue-template-vpna] queue af4 wfq weight 15 flow-wred test shaping 5000[PE1-flow-queue-template-vpna] queue af3 wfq weight 10 flow-wred test shaping 5000[PE1-flow-queue-template-vpna] quit

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-106 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 239: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[PE1] flow-queue vpnb[PE1-flow-queue-template-vpnb] queue ef pq flow-wred test shaping 8000[PE1-flow-queue-template-vpnb] quit[PE1] flow-queue vpnc[PE1-flow-queue-template-vpnc] queue ef pq flow-wred test shaping 10000[PE1-flow-queue-template-vpnc] queue af4 wfq weight 15 flow-wred test shaping 5000[PE1-flow-queue-template-vpnb] quit[PE1] flow-queue non-vpn[PE1-flow-queue-template-non-vpn] queue ef pq flow-wred test shaping 3000[PE1-flow-queue-template-non-vpn] queue af4 wfq weight 15 flow-wred test shaping 2000[PE1-flow-queue-template-non-vpn] queue af3 wfq weight 10 flow-wred test shaping 1000[PE1-flow-queue-template-non-vpn] returnThe configuration on PE2 is the same as that on PE1.

8. Configure VPNs to support a DiffServ model.<PE1> system-view[PE1] ip vpn-instance vpna[PE1-vpn-instance-vpna] diffserv-mode uniform [PE1-vpn-instance-vpna] quit[PE1] interface gigabitethernet 3/0/0.1[PE1-GigabitEthernet3/0/0.1] diffserv-mode uniform[PE1-GigabitEthernet3/0/0.1] quit[PE1] vsi vpnc[PE1-vsi-vpnc] diffserv-mode uniform[PE1-vsi-vpnc] return

NOTE

l If for the first time you configure a VPN support the Uniform model, you can use the defaultUniform model rather than configure the model with the command.

l If a VPN instance has been configured to support the Pipe or Short Pipe model and then you wantto configure them to support the Uniform model, you need to perform the preceding configurationin this step.

The configuration on PE2 is the same as that on PE1.9. Configure class queues on the interfaces on the network side of PE1.

<PE1> system-view[PE1] interface pos 1/0/0[PE1-Pos1/0/0] port-queue ef pq shaping 35 outbound[PE1-Pos1/0/0] port-queue af4 wfq weight 15 shaping 15 outbound[PE1-Pos1/0/0] port-queue af3 wfq weight 10 shaping 10 outbound[PE1-Pos1/0/0] returnThe configuration on PE2 is the same as that on PE1.

10. Configure a bandwidth for the MPLS TE tunnel and statically bind VPN A, VPN B, andVPN C to the MPLS TE tunnel.<PE1> system-view[PE1] interface tunnel 1/0/0[PE1-Tunnel1/0/0] mpls te bandwidth 100000 flow-queue non-vpn[PE1-Tunnel1/0/0] mpls te vpn-binding vpn-instance vpna cir 30000 pir 100000 flow-queue vpna[PE1-Tunnel1/0/0] mpls te vpn-binding l2vpn interface gigabitethernet 3/0/0.1 cir 20000 pir 100000 flow-queue vpnb[PE1-Tunnel1/0/0] mpls te vpn-binding l2vpn vsi vpnc cir 20000 pir 100000 flow-queue vpnc[PE1-Tunnel1/0/0] mpls te commitThe configuration on PE2 is the same as that on PE1.

11. Verify the configuration.Run the display traffic statistics interface tunnel interface-number command. You canview the traffic statistics of an MPLS TE tunnel on an interface. For example, the followingdisplays the traffic statistics of the tunnel 1/0/0:

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-107

Page 240: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[PE1] display traffic statistics interface tunnel 1/0/0Tunnel1/0/0 Traffic Statistics : Transit packets :718361906 Transit bytes :49836833844 Discard packets :0 Discard bytes :0 Transit packets rate :2435000 packets/sec Transit bytes rate :100154000 bytes/sec *********L3VPN RRVPN Traffic Statistics********* VPN Instance :vpna Transit packets :239453968 Transit bytes :24918416800 Discard packets :0 Discard bytes :0 Transit packets rate:39000 packets/sec Transit bytes rate :3650000 bytes/sec *********VLL RRVPN Traffic Statistics********* VPN Instance :GigabitEthernet3/0/0.1 Transit packets :239453970 Transit bytes :29213384340 Discard packets :0 Discard bytes :0 Transit packets rate:26000 packets/sec Transit bytes rate :2470000 bytes/sec *********VPLS RRVPN Traffic Statistics********* VPN Instance :vpnc Transit packets :239453970 Transit bytes :29213384340 Discard packets :0 Discard bytes :0 Transit packets rate :26000 packets/sec Transit bytes rate :2470000 bytes/sec *********Other Traffic Statistics********* Transit packets :0 Transit bytes :0 Discard packets :0 Discard bytes :0 Transit packets rate :0 packets/sec Transit bytes rate :0 bytes/sec

Configuration Filesl Configuration file of PE1

# sysname PE1#flow-wred testcolor green low-limit 30 high-limit 50 discard-percentage 100color yellow low-limit 20 high-limit 40 discard-percentage 100color red low-limit 10 high-limit 30 discard-percentage 100#flow-queue vpnaqueue ef pq shaping 10000 flow-wred testqueue af4 wfq weight 15 shaping 5000 flow-wred testqueue af3 wfq weight 10 shaping 5000 flow-wred test#flow-queue vpnbqueue ef pq shaping 8000 flow-wred test#flow-queue vpncqueue ef pq shaping 10000 flow-wred testqueue af4 wfq weight 15 shaping 5000 flow-wred test

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-108 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 241: 00399154-Configuration Guide - QoS(V300R003_03).pdf

#flow-queue non-vpnqueue ef pq shaping 3000 flow-wred testqueue af4 wfq weight 15 shaping 2000 flow-wred testqueue af3 wfq weight 10 shaping 1000 flow-wred test#ip vpn-instance vpna route-distinguisher 100:1 tnl-policy policy1vpn-target 111:1 export-extcommunityvpn-target 111:1 import-extcommunity# mpls lsr-id 1.1.1.9 mpls mpls te mpls rsvp-te mpls te cspf#vsi vpnc staticpwsignal ldpvsi-id 1peer 2.2.2.9tnl-policy policy1#mpls ldp#mpls ldp remote-peer 2.2.2.9 remote-ip 2.2.2.9#diffserv domain default#interface Pos1/0/0undo shutdownlink-protocol pppip address 100.1.1.1 255.255.255.0 mpls mpls te mpls te max-link-bandwidth 200000 mpls te max-reservable-bandwidth 120000mpls rsvp-teport-queue ef pq shaping 35 outboundport-queue af4 wfq weight 15 shaping 15 outboundport-queue af3 wfq weight 10 shaping 10 outbound#interface GigabitEthernet2/0/0 undo shutdown ip binding vpn-instance vpna ip address 10.1.1.2 255.255.255.0 trust upstream default#interface GigabitEthernet3/0/0undo shutdown#interface GigabitEthernet3/0/0.1vlan-type dot1q 10mpls l2vc 2.2.2.9 101 tunnel-policy policy1trust upstream default#interface GigabitEthernet4/0/0undo shutdown#interface GigabitEthernet4/0/0.1vlan-type dot1q 20l2 binding vsi vpnctrust upstream default#interface LoopBack1 ip address 1.1.1.9 255.255.255.252#

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-109

Page 242: 00399154-Configuration Guide - QoS(V300R003_03).pdf

interface Tunnel1/0/0 ip address unnumbered interface LoopBack1 tunnel-protocol mpls te destination 2.2.2.9 mpls te tunnel-id 100mpls te bandwidth bc0 100000 flow-queue non-vpnmpls te reserved-for-bindingmpls te vpn-binding vpn-instance vpna cir 30000 pir 100000 flow-queue vpnampls te vpn-binding l2vpn interface gigabitethernet 3/0/0.1 cir 20000 pir 100000 flow-queue vpnbmpls te vpn-binding l2vpn vsi vpnc cir 20000 pir 100000 flow-queue vpnc mpls te commit#bgp 500 peer 2.2.2.9 as-number 500 peer 2.2.2.9 connect-interface LoopBack1 # ipv4-family vpnv4 peer 2.2.2.9 enable# ipv4-family vpn-instance vpna peer 10.1.1.1 as-number 65410 import-route direct#ospf 1 opaque-capability enable area 0.0.0.0 network 100.1.1.0 0.0.0.255 network 1.1.1.9 0.0.0.0 mpls-te enable#tunnel-policy policy1tunnel binding destination 2.2.2.9 te Tunnel 1/0/0#return

l Configuration file of P# sysname P# mpls mpls te mpls rsvp-te mpls te cspf#diffserv domain default#interface Pos1/0/0undo shutdownlink-protocol ppp ip address 100.1.1.2 255.255.255.0 mpls mpls te mpls te max-link-bandwidth 200000 mpls te max-reservable-bandwidth 120000 mpls rsvp-te#interface Pos2/0/0undo shutdownlink-protocol pppip address 200.1.1.1 255.255.255.0 mpls mpls te mpls te max-link-bandwidth 200000 mpls te max-reservable-bandwidth 120000mpls rsvp-te#interface LoopBack1 ip address 2.2.2.9 255.255.255.252#

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-110 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 243: 00399154-Configuration Guide - QoS(V300R003_03).pdf

domain default#ospf 1 opaque-capability enable area 0.0.0.0 network 100.1.1.0 0.0.0.255 network 200.1.1.0 0.0.0.255 network 3.3.3.9 0.0.0.0 mpls-te enable#return

l Configuration file of PE2# sysname PE2#flow-wred testcolor green low-limit 30 high-limit 50 discard-percentage 100color yellow low-limit 20 high-limit 40 discard-percentage 100color red low-limit 10 high-limit 30 discard-percentage 100#flow-queue vpnaqueue ef pq shaping 10000 flow-wred testqueue af4 wfq weight 15 shaping 5000 flow-wred testqueue af3 wfq weight 10 shaping 5000 flow-wred test#flow-queue vpnbqueue ef pq shaping 8000 flow-wred test#flow-queue vpncqueue ef pq shaping 10000 flow-wred testqueue af4 wfq weight 15 shaping 5000 flow-wred test#flow-queue non-vpnqueue ef pq shaping 3000 flow-wred testqueue af4 wfq weight 15 shaping 2000 flow-wred testqueue af3 wfq weight 10 shaping 1000 flow-wred test#ip vpn-instance vpna route-distinguisher 200:1 tnl-policy policy1vpn-target 111:1 export-extcommunityvpn-target 111:1 import-extcommunity#mpls lsr-id 2.2.2.9 mpls mpls te mpls rsvp-te mpls te cspf#vsi vpnc staticpwsignal ldpvsi-id 1peer 1.1.1.9tnl-policy policy1#mpls ldp#mpls ldp remote-peer 1.1.1.9 remote-ip 1.1.1.9##diffserv domain default#interface Pos1/0/0undo shutdownlink-protocol ppp ip address 200.1.1.2 255.255.255.0 mpls mpls te

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-111

Page 244: 00399154-Configuration Guide - QoS(V300R003_03).pdf

mpls te max-link-bandwidth 200000 mpls te max-reservable-bandwidth 120000 mpls rsvp-teport-queue ef pq shaping 35 outboundport-queue af4 wfq weight 15 shaping 15 outboundport-queue af3 wfq weight 10 shaping 10 outbound#interface GigabitEthernet2/0/0 undo shutdown ip binding vpn-instance vpna ip address 10.2.1.2 255.255.255.0 trust upstream default#interface GigabitEthernet3/0/0undo shutdown#interface GigabitEthernet3/0/0.1vlan-type dot1q 20mpls l2vc 2.2.2.9 101 tunnel-policy policy1trust upstream default#interface GigabitEthernet4/0/0undo shutdown#interface GigabitEthernet4/0/0.1vlan-type dot1q 30l2 binding vsi vpnctrust upstream default#interface LoopBack1 ip address 2.2.2.9 255.255.255.252#interface Tunnel1/0/0 ip address unnumbered interface LoopBack1 tunnel-protocol mpls te destination 2.2.2.9 mpls te tunnel-id 100 mpls te bandwidth bc0 100000 flow-queue non-vpnmpls te reserved-for-bindingmpls te vpn-binding vpn-instance vpna cir 30000 pir 100000 flow-queue vpnampls te vpn-binding l2vpn interface gigabitethernet 3/0/0.1 cir 20000 pir 100000 flow-queue vpnbmpls te vpn-binding l2vpn vsi vpnc cir 20000 pir 100000 flow-queue vpnc mpls te commit#bgp 500 peer 1.1.1.9 as-number 500 peer 1.1.1.9 connect-interface LoopBack1# ipv4-family vpnv4 peer 1.1.1.9 enable#ipv4-family vpn-instance vpna peer 10.2.1.1 as-number 65420 import-route direct#ospf 1 opaque-capability enable area 0.0.0.0 network 200.1.1.0 0.0.0.255 network 2.2.2.9 0.0.0.0 mpls-te enable#return

l Configuration file of CE1# sysname CE1#interface GigabitEthernet1/0/0

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-112 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 245: 00399154-Configuration Guide - QoS(V300R003_03).pdf

undo shutdown ip address 10.1.1.1 255.255.255.0#bgp 65410 peer 10.1.1.2 as-number 500 # undo synchronization import-route direct peer 10.1.1.2 enable#return

l Configuration file of CE2# sysname CE2#interface GigabitEthernet1/0/0 undo shutdown ip address 10.2.1.1 255.255.255.0#bgp 65420 peer 10.2.1.2 as-number 500 # undo synchronization import-route direct peer 10.2.1.2 enable#return

l Configuration file of CE3# sysname CE3#interface GigabitEthernet1/0/0undo shutdown#interface GigabitEthernet1/0/0.1 ip address 10.3.1.1 255.255.255.0 vlan-type dot1q 10#return

l Configuration file of CE4# sysname CE4#interface GigabitEthernet1/0/0undo shutdown#interface GigabitEthernet1/0/0.1 ip address 10.3.1.2 255.255.255.0 vlan-type dot1q 20#return

l Configuration file of CE5# sysname CE5#interface GigabitEthernet1/0/0undo shutdown#interface GigabitEthernet1/0/0.1 ip address 10.4.1.1 255.255.255.0 vlan-type dot1q 20#return

l Configuration file of CE6

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-113

Page 246: 00399154-Configuration Guide - QoS(V300R003_03).pdf

# sysname CE6#interface GigabitEthernet1/0/0undo shutdown#interface GigabitEthernet1/0/0.1 ip address 10.4.1.2 255.255.255.0 vlan-type dot1q 30#return

6.5.7 Example for Configuring an MPLS DiffServ Model on theVPLS over TE

Networking Requirements

As shown in Figure 6-14, CE1 and CE2 belong to the same VPLS and access the MPLSbackbone network respectively through PE1 and PE2. In the MPLS backbone network, OSPFis taken as the IGP protocol.

On PE1, the bandwidth for VPN traffic of CE1 is 1 Mbit/s. Set the Pipe model on PE1 to carryout MPLS DiffServ. VPN services are forwarded in the MPLS network with the priorityconfigured by the service carrier. The egress router of the MPLS network does not change the8021p value of the packet and only performs queue scheduling according to the EXP value inthe MPLS label.

Figure 6-14 Networking diagram for configuring an MPLS DiffServ model

Configuration Roadmap

The configuration roadmap is as follows:

1. Configuring routing protocols and enabling MPLS on the PE and P devices

2. Creating the MPLS TE tunnel and configuring the tunnel policy. For detailed configuration,refer to the "MPLS TE Configuration" in the Quidway NetEngine80E/40E RouterConfiguration – MPLS

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-114 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 247: 00399154-Configuration Guide - QoS(V300R003_03).pdf

3. Configuring VPLS over TE. For detailed configuration, refer to the "VPLS Configuration"in the Quidway NetEngine80E/40E Router Configuration – VPN.

4. Configuring traffic policing based on the complex traffic classification on PE1.5. Setting the MPLS DiffServ model on PE1.

Data PreparationsTo complete the configuration, you need the following data:

l Name of the traffic classifier, behavior, and the traffic policy

l CIR used in traffic policing

l CoS and color of IP packets in the Pipe model

Configuration Procedures1. Set the IP addresses on the interfaces and configure OSPF.

The detailed configuration is not mentioned here.2. Enable MPLS, MPLS TE, MPLS RSVP-TE, and MPLS CSPF. Configure OSPF TE.

On the nodes along the MPLS TE tunnel, enable MPLS, MPLS TE, and MPLS RSVP-TEboth in the system view and the interface view. On the ingress node of the tunnel, enableMPLS CSPF in the system view.# Configure PE1.[PE1] mpls lsr-id 1.1.1.9[PE1] mpls[PE1-mpls] mpls te[PE1-mpls] mpls rsvp-te[PE1-mpls] mpls te cspf[PE1-mpls] quit[PE1] interface pos1/0/0[PE1-Pos1/0/0] undo shutdown[PE1-Pos1/0/0] mpls[PE1-Pos1/0/0] mpls te[PE1-Pos1/0/0] mpls rsvp-te[PE1-Pos1/0/0] quit[PE1] ospf[PE1-ospf-1] opaque-capability enable[PE1-ospf-1] area 0.0.0.0[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] network 100.1.1.0 0.0.0.255[PE1-ospf-1-area-0.0.0.0] mpls-te enable[PE1-ospf-1-area-0.0.0.0] quit

# Configure the P.[P] mpls lsr-id 2.2.2.9[P] mpls[P-mpls] mpls te[P-mpls] mpls rsvp-te[P-mpls] quit[P] interface pos1/0/0[P-Pos1/0/0] undo shutdown[P-Pos1/0/0] mpls[P-Pos1/0/0] mpls te[P-Pos1/0/0] mpls rsvp-te[P-Pos1/0/0] quit[P] interface pos2/0/0[P-Pos2/0/0] undo shutdown[P-Pos2/0/0] mpls[P-Pos2/0/0] mpls te[P-Pos2/0/0] mpls rsvp-te

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-115

Page 248: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[P-Pos2/0/0] quit[P] ospf[P-ospf-1] opaque-capability enable[P-ospf-1] area 0.0.0.0[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] network 100.1.1.0 0.0.0.255[P-ospf-1-area-0.0.0.0] network 100.2.1.0 0.0.0.255[P-ospf-1-area-0.0.0.0] mpls-te enable[P-ospf-1-area-0.0.0.0] quit# Configure PE2.The configuration of PE2 is similar to that of PE1, and is not mentioned here.

3. Configure the Tunnel interface.# Create tunnel interfaces on the PE devices. Set tunneling protocol to MPLS TE and thesignaling protocol to RSVP-TE.# Configure PE1.[PE1] interface tunnel 1/0/0[PE1-Tunnel1/0/0] ip address unnumbered interface loopback1[PE1-Tunnel1/0/0] tunnel-protocol mpls te[PE1-Tunnel1/0/0] mpls te signal-protocol rsvp-te[PE1-Tunnel1/0/0] destination 3.3.3.9[PE1-Tunnel1/0/0] mpls te tunnel-id 100[PE1-Tunnel1/0/0] mpls te reserved-for-binding[PE1-Tunnel1/0/0] mpls te commit# Configure PE2.[PE2] interface tunnel 1/0/0[PE2-Tunnel1/0/0] ip address unnumbered interface loopback1[PE2-Tunnel1/0/0] tunnel-protocol mpls te[PE2-Tunnel1/0/0] mpls te signal-protocol rsvp-te[PE2-Tunnel1/0/0] destination 1.1.1.9[PE2-Tunnel1/0/0] mpls te tunnel-id 100[PE2-Tunnel1/0/0] mpls te reserved-for-binding[PE2-Tunnel1/0/0] mpls te commitAfter the said configuration, run the display this interface command in the tunnel interfaceview. In the output, the value of "Line protocol current state" is UP. It indicates that theMPLS TE tunnel is set up successfully. Take PE1 for an example:[PE1-Tunnel1/0/0] display this interfaceTunnel1/0/0 current state : UPLine protocol current state : UPDescription : HUAWEI, Quidway Series, Tunnel1/0/0 Interface, Route PortThe Maximum Transmit Unit is 1500 bytesInternet Address is unnumbered, using address of LoopBack1(1.1.1.9/32)Encapsulation is TUNNEL, loopback not setTunnel destination 3.3.3.9Tunnel protocol/transport MPLS/MPLS, ILM is available,primary tunnel id is 0x1002003, secondary tunnel id is 0x0 5 minutes output rate 0 bytes/sec, 0 packets/sec 0 packets output, 0 bytes 0 output error

4. Set up LDP sessions.Set up LDP sessions between PE1 and PE2.# Configure PE1.[PE1] mpls ldp[PE1-mpls-ldp] quit[PE1] mpls ldp remote-peer 3.3.3.9[PE1-mpls-ldp-remote-3.3.3.9] remote-ip 3.3.3.9[PE1-mpls-ldp-remote-3.3.3.9] quit# Configure PE2.[PE2] mpls ldp[PE2-mpls-ldp] quit

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-116 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 249: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[PE2] mpls ldp remote-peer 1.1.1.9[PE2-mpls-ldp-remote-1.1.1.9] remote-ip 1.1.1.9[PE2-mpls-ldp-remote-1.1.1.9] quitAfter the above configuration, the LDP session should be set up between the PE devices.Take PE1 for an example:[PE1] display mpls ldp session LDP Session(s) in Public Network---------------------------------------------------------------------- Peer-ID Status LAM SsnRole SsnAge KA-Sent/Rcv---------------------------------------------------------------------- 3.3.3.9:0 Operational DU Passive 000:00:06 26/26---------------------------------------------------------------------- TOTAL: 1 session(s) Found. LAM : Label Advertisement Mode SsnAge Unit : DDD:HH:MM

5. Create the VSI on the PE devices and configure the tunnel policies.# Configure PE1.[PE1] tunnel-policy policy1[PE1-tunnel-policy-policy1] tunnel binding destination 3.3.3.9 te tunnel1/0/0[PE1-tunnel-policy-policy1] quit[PE1] mpls l2vpn[PE1] vsi a2 static[PE1-vsi-a2] pwsignal ldp[PE1-vsi-a2-ldp] vsi-id 2[PE1-vsi-a2-ldp] peer 3.3.3.9[PE1-vsi-a2-ldp] quit[PE1-vsi-a2] tnl-policy policy1# Configure PE2.[PE2] tunnel-policy policy1[PE2-tunnel-policy-policy1] tunnel binding destination 1.1.1.9 te tunnel1/0/0[PE2-tunnel-policy-policy1] quit[PE2] mpls l2vpn[PE2] vsi a2 static[PE2-vsi-a2] pwsignal ldp[PE2-vsi-a2-ldp] vsi-id 2[PE2-vsi-a2-ldp] peer 1.1.1.9[PE2-vsi-a2-ldp] quit[PE2-vsi-a2] tnl-policy policy1

6. Bind the VSI with the interface on the PEs.# Configure PE1.[PE1] interface gigabitethernet2/0/0.1[PE1-GigabitEthernet2/0/0.1] vlan-type dot1q 10[PE1-GigabitEthernet2/0/0.1] l2 binding vsi a2# Configure PE2.[PE2] interface gigabitethernet2/0/0.1[PE2-GigabitEthernet2/0/0.1] vlan-type dot1q 10[PE2-GigabitEthernet2/0/0.1] l2 binding vsi a2# Configure CE1.<Quidway> sysname CE1[CE1] interface gigabitethernet1/0/0.1[CE1-GigabitEthernet1/0/0.1] vlan-type dot1q 10[CE1-GigabitEthernet1/0/0.1] ip address 10.1.1.1 255.255.255.0# Configure CE2.<Quidway> sysname CE2[CE2] interface gigabitethernet1/0/0.1[CE2-GigabitEthernet1/0/0.1] vlan-type dot1q 10[CE2-GigabitEthernet1/0/0.1] ip address 10.1.1.2 255.255.255.0

7. On PE1, configure traffic policing for VPN traffic of CE1.<PE1> system-view[PE1] traffic classifier car

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-117

Page 250: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[PE1-classifier-car] if-match any[PE1-classifier-car] quit[PE1] traffic behavior car[PE1-behavior-car] car cir 1000 green pass red discard[PE1-behavior-car] quit[PE1] traffic policy car[PE1-trafficpolicy-car] classifier car behavior car[PE1-trafficpolicy-car] quit[PE1] interface gigabitethernet2/0/0.1[PE1-GigabitEthernet2/0/0.1] undo shutdown[PE1-GigabitEthernet2/0/0.1] traffic-policy car inbound[PE1-GigabitEthernet2/0/0.1] quit

8. Set the MPLS DiffServ model on PE1 and PE2.# Configure PE1.[PE1] vsi a2[PE1-vsi-a2] diffserv-mode pipe af3 green[PE1-vsi-a2] quit[PE1] mpls[PE1-mpls] label advertise non-null[PE1-mpls] quit# Configure PE1.[PE2] vsi a2[PE2-vsi-a2] diffserv-mode pipe af3 green[PE2-vsi-a2] quit[PE2] mpls[PE2-mpls] label advertise non-null[PE2-mpls] quit

9. Verify the configuration.Run the display vsi verbose command on PE1. The output shows that the MPLS DiffServmodel is Pipe.<PE1> display vsi verbose***VSI Name : a2 Administrator VSI : no Isolate Spoken : disable VSI Index : 0 PW Signaling : ldp Member Discovery Style : static PW MAC Learn Style : unqualify Encapsulation Type : vlan MTU : 1500 Mode : pipe Service Class : af3 Color : green DomainId : 0 Domain Name : Tunnel Policy Name : policy1 VSI State : up VSI ID : 2 *Peer Router ID : 3.3.3.9 VC Label : 117760 Peer Type : dynamic Session : up Tunnel ID : 0x60018000, Interface Name : GigabitEthernet2/0/0.1 State : up**PW Information: *Peer Ip Address : 3.3.3.9 PW State : up Local VC Label : 117760 Remote VC Label : 117759 PW Type : label Tunnel ID : 0x60618013

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-118 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 251: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Configuration Filesl Configuration file of PE1

# sysname PE1# mpls lsr-id 1.1.1.9 mpls mpls te mpls rsvp-te mpls te cspf label advertise non-null# mpls l2vpn#vsi a2 static pwsignal ldp vsi-id 2 peer 3.3.3.9 tnl-policy policy1 diffserv-mode pipe af3 green#mpls ldp#mpls ldp remote-peer 3.3.3.9 remote-ip 3.3.3.9#traffic classifier car if-match any#traffic behavior car car cir 1000 cbs 10000 pbs 0 green pass red discard#traffic policy car classifier car behavior car# mpls ldp remote-peer 3.3.3.9 remote-ip 3.3.3.9#interface Pos1/0/0undo shutdown link-protocol ppp ip address 100.1.1.1 255.255.255.0 mpls mpls te mpls rsvp-te#interface GigabitEthernet2/0/0undo shutdown#interface GigabitEthernet2/0/0.1 vlan-type dot1q 10 l2 binding vsi a2traffic-policy car inbound#interface LoopBack1 ip address 1.1.1.9 255.255.255.255#interface Tunnel1/0/0 ip address unnumbered interface LoopBack1 tunnel-protocol mpls te destination 3.3.3.9 mpls te tunnel-id 100 mpls te reserved-for-binding mpls te commit#ospf 1 opaque-capability enable area 0.0.0.0

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-119

Page 252: 00399154-Configuration Guide - QoS(V300R003_03).pdf

network 1.1.1.9 0.0.0.0 network 100.1.1.0 0.0.0.255 mpls-te enable#tunnel-policy policy1 tunnel binding destination 3.3.3.9 te tunnel1/0/0#return

l Configuration file of the P# sysname P#mpls lsr-id 2.2.2.9 mpls mpls te mpls rsvp-te#interface Pos1/0/0undo shutdownlink-protocol ppp ip address 100.1.1.2 255.255.255.0 mpls mpls te mpls rsvp-te#interface Pos2/0/0undo shutdownlink-protocol ppp ip address 100.2.1.1 255.255.255.0 mpls mpls te mpls rsvp-te#interface LoopBack1 ip address 2.2.2.9 255.255.255.255#ospf 1 opaque-capability enable area 0.0.0.0 network 2.2.2.9 0.0.0.0 network 100.1.1.0 0.0.0.255 network 100.2.1.0 0.0.0.255 mpls-te enable#return

l Configuration file of PE2# sysname PE2# mpls lsr-id 3.3.3.9 mpls mpls te mpls rsvp-te mpls te cspf label advertise non-null# mpls l2vpn#vsi a2 static pwsignal ldp vsi-id 2 peer 1.1.1.9 tnl-policy policy1diffserv-mode pipe af3 green#mpls ldp# mpls ldp remote-peer 1.1.1.9

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-120 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 253: 00399154-Configuration Guide - QoS(V300R003_03).pdf

remote-ip 1.1.1.9#interface Pos1/0/0undo shutdownlink-protocol ppp ip address 100.2.1.2 255.255.255.0 mpls mpls te mpls rsvp-te mpls te cspf#interface GigabitEthernet2/0/0undo shutdown#interface GigabitEthernet2/0/0.1 vlan-type dot1q 10 l2 binding vsi a2#interface LoopBack1 ip address 3.3.3.9 255.255.255.255#interface Tunnel1/0/0 ip address unnumbered interface LoopBack1 tunnel-protocol mpls te destination 1.1.1.9 mpls te tunnel-id 100 mpls te reserved-for-binding mpls te commit#ospf 1 opaque-capability enable area 0.0.0.0 network 3.3.3.9 0.0.0.0 network 100.2.1.0 0.0.0.255 mpls-te enable#tunnel-policy policy1 tunnel binding destination 1.1.1.9 te tunnel1/0/0#return

l Configuration file of CE1# sysname CE1#interface GigabitEthernet1/0/0undo shutdown#interface GigabitEthernet1/0/0.1 vlan-type dot1q 10 ip address 10.1.1.1 255.255.255.0#return

l Configuration file of CE2# sysname CE2#interface GigabitEthernet1/0/0undo shutdown#interface GigabitEthernet1/0/0.1 vlan-type dot1q 10 ip address 10.1.1.2 255.255.255.0#return

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 6 VPN QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-121

Page 254: 00399154-Configuration Guide - QoS(V300R003_03).pdf

6.6 Maintaining VPN QoS ConfigurationThis section describes the method for the fault analysis and troubleshooting, when QPPB cannotbe used.

6.6.1 Troubleshooting

6.6.1 Troubleshooting

Fault DescriptionThe VPN QoS feature fails to be applied.

Fault AnalysisThe possible causes of the fault are as follows:

l BGP VPNv4 routes cannot be received.

l VPN instance has been configured incorrectly.

l LSP has been set up incorrectly.

l Wrong routing policy has been applied.

l QoS parameters are not delivered to FIB.

l The QoS policy is created wrongly.

l No QPPB policy is applied on the interface.

Troubleshooting Procedure1. Use the display mpls lsp command to check whether LSP has been created between PEs.

If the LSP has not been created, there is a fault with MPLS. As a result, MPLS configurationfails.

2. Use the display ip route vpn-instance vpn-name command to check whether the route onthe private network is received. If the route is not received, there is a fault with the BGP.As a result, BGP configuration fails.

3. Use the display ip routing-table vpn-instance vpn-name verbose command to checkwhether QoS parameters are delivered correctly. If the parameters are not deliveredcorrectly, there is a fault with the configuration of the routing policy. As a result, the routingpolicy configuration fails.

4. Use the display current interface [ interface-type interface-number ] command to displaywhether QPPB policy is configured correctly at the physical egress of LSP.

6 VPN QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

6-122 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 255: 00399154-Configuration Guide - QoS(V300R003_03).pdf

7 ATM QoS Configuration

About This Chapter

This chapter describes the configuration of simple ATM traffic classification and forced ATMtraffic classification.

7.1 OverviewThis section describes the basic concepts and principle of ATM QoS.

7.2 Configuring ATM Simple Traffic ClassificationThis section describes the procedure of configuring the ATM simple traffic classification.

7.3 Configuring Forced ATM Traffic ClassificationThis section describes the procedure of configuring the forced ATM traffic classification.

7.4 Configuring ATM Complex Traffic ClassificationThis section describes the procedure of configuring the ATM Complex Traffic Classification.

7.5 Configuring the ATM Traffic ShapingThis section describes the procedure of configuring the ATM traffic shaping.

7.6 Configuring the Priority of an ATM PVCThis section describes the procedure of configuring the priority of an ATM PVC.

7.7 Configuring Congestion Management of the ATM PVCThis section describes the procedure of configuring the congestion management of an ATMPVC.

7.8 Configuration ExamplesThis section provides some examples of configuring ATM QoS.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 7 ATM QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-1

Page 256: 00399154-Configuration Guide - QoS(V300R003_03).pdf

7.1 OverviewThis section describes the basic concepts and principle of ATM QoS.

7.1.1 Introduction to ATM QoS

7.1.2 ATM QoS Features Supported by the NE80E/40E

7.1.1 Introduction to ATM QoS

The Asynchronous Transfer Mode (ATM) is a traditional multi-service bearing technology thatis used on the backbone network. It is used to bear IP, FR, voice, conference call, and ISDN/DSL. It has powerful QoS capability. The existing ATM networks have been used to bear crucialservices.

Limited by the transfer mode and class of services, however, the ATM nowadays is poorer thanIP in the expansibility, upgradeability, and compatibility. In the process of network upgrade, theATM faces the problem of how to use existing resources to combine the ATM network with thePacket Switched Network (PSN).

The ATM network has powerful QoS capability. In combination with the PSN network, the QoScapability of the ATM network must be remained and the mapping between the IP precedence,MPLS precedence, VLAN precedence and the ATM precedence must be set so that packets aretransmitted with the same priority in the two networks.

Combination of the ATM network and the PSN network applies to the following two situations:

l Transparent transmission of ATM cells: In the transition from the ATM network to thePSN network, the MPLS tunnel is taken as the PW to connect the ATM network at bothends. Over the PW, AAL5 data frames or ATM cells are encapsulated and transparentlytransmitted in MPLS packets.

l IPoEoA encapsulated with 1483B and IPoA encapsulated with 1483R: The router is locatedat the edge of the ATM network to carry out access to the IP network. When data packetsare transmitted on the ATM network, they are encapsulated in AAL5 frames. The routerperforms ATM termination to forward IP packets to other types of interfaces or forwardLayer 2 Ethernet frames to the Ethernet interface.

NOTE

To configure the data described in this chapter, you need to have the ATM and QoS knowledge. Forinformation about the ATM concept and the ATM configuration, refer to the Quidway NetEngine80E/40E Router Configuration Guide – WAN Access. This chapter describes the ATM QoS configuration only.

7.1.2 ATM QoS Features Supported by the NE80E/40E

When the ATM network transits to the PSN network or serves as the bearer layer of the IPnetwork, QoS of the ATM network and QoS of the IP network should be integrated to provideend to end QoS.

7 ATM QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

7-2 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 257: 00399154-Configuration Guide - QoS(V300R003_03).pdf

ATM Simple Traffic ClassificationATM QoS supports simple traffic classification in three modes, that is, ATM transparenttransmission, 1483R, and 1483B. The NE40E supports ATM simple traffic classification on theATM sub-interface, VE interface or PVC, and PVP.

ATM transparent transmission consists of transparent transmission of ATM cells and that ofATM frames.

l VCC and VPC transparent transmission modes are for ATM cells. In these two modes, thebasic transmission unit is ATM cell with a fixed size, 53 bytes. This accords with thetransmission unit over standard ATM links.

l SDU transparent transmission is for ATM frames. The basic transmission unit is frame andthe size depends on the user-defined MTU and the packet received by the upstream PE.

The 1483R protocol is used to encapsulate IP packets to carry out IPoA service. The 1483Bprotocol is used to encapsulate Ethernet packets to carry out IPoEoA service.

l Principle of ATM simple traffic classification for transparent transmissionOn the AC side of the ingress PE in the MPLS network, the CoS and CLP values of theATM network are mapped to the internal priority of the router. On the PW side of theingress PE in the MPLS network, the internal priority is mapped back to the EXP value.Thus, QoS parameters of the ATM network can be transmitted in the MPLS network.(ForSDU transparent transmission, the CLP in the SDU is 1 only if any one of the CLP valueis 1 on the AC side of the ingress PE on the MPLS network. Otherwise, the CLP in theSDU is 0. The CLP value, in combination with the CoS of PVC, is mapped to the internalpriority of the router. On the PW side of the ingress PE, the CLP value is the same as thatin transparent transmission of other modes.)On the PW side of the egress PE in the MPLS network, the router forwards packetsaccording to the MPLS EXP field. On the AC side of the egress PE in the MPLS network,the router forwards packets according to the priority of the ATM cells. On the PW side ofthe egress PE, the transparent transmission of SDU is the same as that of other modes. Onthe AC side of the egress PE in the MPLS network, if the CLP is 1, the CLP values of allATM cells are set to 1. Otherwise, the CLP values of all ATM cells are set to 0.Based on the said simple traffic classification, the QoS parameters of the ATM networkare transparently transmitted from one ATM network to another through the PSN network.

l Principle of 1483R and 1483B simple traffic classificationAt the edge of the ATM network, simple traffic classification is enabled to set the mappingfrom the DSCP field to the ATM precedence on the router that carries out access to the IPnetwork.On the upstream PVC of the access router, the precedence of the 1483R and 1483B packetsdepend on the encapsulated DSCP value.On the downstream PVC of the access router, the internal priority inside the router ismapped to the ATM CLP to map the DSCP values to ATM precedence.

Forced ATM Traffic ClassificationAlthough ATM cells in the ATM network hold the precedence information, it is very difficultto carry out IPoA, transparent transmission of cells and IWF simple traffic classification basedon the precedence information. Forced ATM traffic classification does not concern the servicetype and precedence. On the upstream interface on the router at the ATM network edge, you canconfigure forced traffic classification to set the precedence and color manually for IP packets of

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 7 ATM QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-3

Page 258: 00399154-Configuration Guide - QoS(V300R003_03).pdf

a PVC, an interface or a PVP. You can also apply QoS policies on the downstream interface ofthe router at the ATM network edge.

As shown in Figure 7-1, you can set the precedence and color for a specific flow on the upstreamATM interface of Router A. Then, the downstream interface can specify the queue andscheduling mode for the flow according to the precedence and the color. In this way, ATM QoSis carried out.

Figure 7-1 Forced ATM traffic classification

ATM physical interface, ATM sub-interfaces, ATM PVC, ATM PVP and Virtual Ethernet (VE)interfaces all support forced traffic classification.

ATM Complex Traffic ClassificationIn the deployment of IP over ATM (IPoA) or IP over Ethernet over AAL5 (IPoEoA) services,sometimes you need to classify and limit the traffic that enters an ATM network or that is on anATM network, for example:

l To differentiate packet types, such as voice packets, video packets, and data packets andprovide different bandwidths and latencies for those packet types

l To handle traffic coming from different users and provide different bandwidths andpriorities for those packet types

To do so, you need to classify packets according to parameters such as the DSCP value, theprotocol type, the IP address, or the port number, provide differentiated services, and configureQoS traffic policies based on the ATM complex traffic classification.

The ATM complex traffic classification is carried out through the application of QoS trafficpolicies. To provide QoS guarantee on an ATM interface, you can define a QoS policy whichcontains traffic classifiers associated with traffic behaviors and then apply the QoS policy to theATM interface.

To do so, perform the following procedures:

1. Define traffic classifiers.

7 ATM QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

7-4 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 259: 00399154-Configuration Guide - QoS(V300R003_03).pdf

2. Define traffic behaviors.3. Define traffic policies and associate the traffic classifiers with the traffic behaviors.4. Apply the traffic policies to the ATM interfaces (or sub-interfaces) or VE interfaces.

NOTE

The NE80E/40E does not support the ATM complex traffic classification of IPv6 packets or IPv4 multicastpackets because ATM does not support IPv6 or IPv4 multicast protocols.

ATM Traffic ShapingWhen an ATM network is congested so that the traffic rate exceeds the threshold, the subsequentexcessive packets are discarded. To prevent a downstream network from being congested ordropping directly numerous packets because of too heavy traffic on an upstream network, youcan configure ATM traffic shaping (TS) on the outbound interface of the upstream router. TSlimits the traffic rate and burst size of traffic that goes out of a network so that this type of packetsare sent out at a uniform rate. This benefits the bandwidth match between an upstream networkand a downstream network.

To configure ATM TS, perform the following procedures:

l Configure the ATM service type and shaping parameters in the system view. You canconfigure the service types of the Constant Bit Rate (CBR), Non Real Time-Variable BitRate (NRT-VBR), or Real Time-Variable Bit Rate (RT-VBR).

l Specify a ATM service type on a PVC or a PVP and apply the TS parameters.

Congestion Management of ATM PVCOn an ATM network, when the traffic rate exceeds the threshold, the excessive packets arebuffered instead of being discarded. When the network is not busy, the buffered packets are thenforwarded. With the congestion management of ATM PVC, the packets are organized into eightPVC queues according to a specified algorithm. The packets then are forwarded according tothe queue scheduling mechanism. The configuration of ATM PVC queues involves the PQconfiguration and the WFQ configuration.

7.2 Configuring ATM Simple Traffic ClassificationThis section describes the procedure of configuring the ATM simple traffic classification.

7.2.1 Establishing the Configuration Task

7.2.2 Enabling ATM Simple Traffic Classification

7.2.3 Configuring Mapping Rules for ATM QoS

7.2.4 Checking the Configuration

7.2.1 Establishing the Configuration Task

Applicable EnvironmentsATM simple traffic classification is mainly applied to the following two situations:

l Two ATM networks are connected through the PSN network (ATM transparenttransmission)

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 7 ATM QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-5

Page 260: 00399154-Configuration Guide - QoS(V300R003_03).pdf

As shown in Figure 7-2, Router A and Router B are the edge routers of two ATM networks.The existing ATM networks have been used to bear crucial services. The two ATMnetworks are connected through the PSN backbone network. An MPLS tunnel serves asthe PW to connect the two ATM networks. Over the PW, MPLS packets are used toencapsulate AAL5 data frames or ATM cells.

Figure 7-2 Networking diagram for connecting two ATM networks with the PSN network

l Ethernet or IP packets are carried over the existing ATM network (1483R or 1483Btransparent transmission)As shown in Figure 7-3, Router A and Router B are edge routers of two ATM networksto carry out access to the IP network. On the ATM network, IP packets are transmitted inAAL5 frames. When IP packets are sent out of the ATM network, the router performs ATMtermination and forwards IP packets to other types of interfaces or forwards Layer 2Ethernet frames to the Ethernet interface.

Figure 7-3 Networking diagram for transmitting Ethernet or IP packets over the ATMnetwork

You can configure ATM simple traffic classification on an interface, or on a PVC or PVP. Notethat:

l If ATM simple traffic classification is configured on an interface, it takes effect on all thePVC or PVP under the interface.

l If ATM simple traffic classification is configured not on the interface but only on a specificPVC or PVP, it takes effect only on the PVC or PVP.

l If a PVC is bound with a VE interface, ATM simple traffic classification takes effect onlywhen it is configured on both the PVC and the VE interface.

l If ATM simple traffic classification is configured on both ATM interface or VE interfaceand PVC or PVP, the configuration on PVC or PVP takes effect.

Pre-configuration Tasks

Before configuring ATM simple traffic classification, complete the following tasks:

l Configuring link attributes of the interface

l Allocating IP addresses for the interface

l Configuring PVC or PVP and the related parameters

7 ATM QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

7-6 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 261: 00399154-Configuration Guide - QoS(V300R003_03).pdf

l Configuring ATM services (ATM transparent transmission, IPoA, or IPoEoA)

Data Preparation

To configure ATM simple traffic classification, you need the following data.

No. Data

1 Number of interface, PVC, or PVP where ATM simple traffic classification is enabled

2 Mapping rules for ATM simple traffic classification

7.2.2 Enabling ATM Simple Traffic Classification

Context

Do as follows on the router on which ATM simple traffic classification is required:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Do as follows on the router as required:l To create an ATM sub-interface and enter the view of the ATM sub-interface, run:

interface atm atm-number.sub-interface

l To create a PVC or PVP and enter the PVC or PVP view, on the sub-interface view, run:pvc [ pvc-name ] vpi/vci

orpvp vpi

l To create a VE interface and enter the view of the VE interface, run:interface virtual-ethernet ve-name

Step 3 Run:trust upstream { ds-domain-name | default }

The specified DS domain is bound with the interface and simple traffic classification is enabled.

----End

7.2.3 Configuring Mapping Rules for ATM QoS

Context

Do as follows on the router on which ATM simple traffic classificatin is enabled:

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 7 ATM QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-7

Page 262: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:diffserv domain default

A DS domain is defined and the DS domain view is displayed.

Step 3 Do as follows on the router as required:l To set ATM simple traffic classification for upstream ATM cells, run:

atm-inbound service-type clp-value phb service-class [ color ]

l To set ATM simple traffic classification for downstream ATM cells, run:atm-outbound service-class [ color ] map clp-value

l To define mapping rules for simple traffic classification of ATM control cells, run:atm-inbound oam-cell phb service-class [ color ]

CLP is a bit indicating the cell priority in an ATM cell header. A cell with CLP being 0 is innormal priority. A cell with CLP being 1 is in low priority; this cell is discarded in congestion.ATM defines five services types, namely, CBR, rt-VBR, nrt-VBR, ABR, and UBR. The ATMsimple traffic classification supports traffic classification on the basis of ATM service types andCLP.

----End

7.2.4 Checking the Configuration

Run the following commands to check the previous configuration.

Action Command

Check the configuration of the DSdomain.

display diffserv domain [ ds-domain-name ]

If the configuration succeeds and when you run this command, you can see the configuration ofthe precedence mapping for simple traffic classification in the DS domain.

7.3 Configuring Forced ATM Traffic ClassificationThis section describes the procedure of configuring the forced ATM traffic classification.

7.3.1 Establishing the Configuration Task

7.3.2 Configuring ATM Services

7.3.3 Configuring Forced ATM Traffic Classification

7.3.4 Checking the Configuration

7 ATM QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

7-8 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 263: 00399154-Configuration Guide - QoS(V300R003_03).pdf

7.3.1 Establishing the Configuration Task

Applicable EnvironmentsForced ATM traffic classification can be applied to the following situations:

l Transparent transmission of ATM cellsAs shown in Figure 7-4, set ATM cell transmission on Router A and Router B for ATMtraffic from DSLAM. Router A transmits the received ATM cells to Router B over a PW.Router B continues to forward the ATM cells on its ATM links.On the upstream sub-interface, PVP or PVC of Router A, forced traffic classification canbe set to classify traffic and mark the traffic with specific color. Then the downstreaminterface, PVP or PVC of Router A can schedule queues on the basis of classification andcolor.

Figure 7-4 Forced traffic classification for transparent transmission of ATM cells

l 1483B traffic accessAs shown in Figure 7-5, the DSLAM processes 1483B traffic. The outbound interface ofRouter B is an Ethernet port. According to the design of ATM-Ethernet IWF, configureIWF function on Router A and Router B. This allows you to map VPN to the outer VLANID and map VCI to inner VLAN ID. The 1483B traffic can then be transmitted transparentlyto the BRAS. The 1483B-based ATM cells are transparently transmitted to the Ethernetlink through the PW between Router A and Router B.In the upstream sub-interface view of Router A, set forced traffic classification and colormarking. Then the downstream interface of Router A can perform queue scheduling basedon the traffic classification and marked color.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 7 ATM QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-9

Page 264: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Figure 7-5 Forced traffic classification of 1483B traffic

NOTE

l Forced traffic classification based on PVC supports such services as transparent transmission of ATMcells, IPoA and IPoEoA.

l Forced traffic classification based on PVP supports such services as transparent transmission of ATMcells.

l Forced traffic classification based on sub-interface supports such services as transparent transmissionof ATM cells, IPoA, and ATM IWF.

l Forced traffic classification based on the primary interface is valid to only PVC or PVP of the interfaceand supports transparent transmission of ATM cells and IPoA.

Pre-configuration TasksBefore configuring forced ATM traffic classification, complete the following tasks:

l Configure link attributes of the interface

l Allocating IP addresses for the interface

l Configuring L2VPN between PEs at both ends and binding L2VPN on the PE's interfacethat connects CE

l Configuring PVC on CE and configuring cell transmission, IWF at the ATM side on PE

Data PreparationTo configuring forced ATM traffic classification, you need the following data.

No. Data

1 Precedence and color of PVC

7.3.2 Configuring ATM Services

ContextATM services may be cell transmission, IWF or IPoA.

7 ATM QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

7-10 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 265: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Procedure

Step 1 To configure ATM cell transmission, see the chapter "PWE3 Configuration" in the QuidwayNetEngine80E/40E Router Operation Manual, VPN Volume.

Step 2 To configure ATM IWF, see the chapter "ATM IWF Configuration" in the QuidwayNetEngine80E/40E Router Operation Manual, VPN Volume.

Step 3 To configure IPoA, see the chapter "ATM Configuration" in the Quidway NetEngine80E/40ERouter Operation Manual, Access Volume.

----End

7.3.3 Configuring Forced ATM Traffic Classification

ContextDo as follows on the upstream interface of the router on which forced ATM traffic classificationis required:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Do as follows as required:l To enter the ATM interface, view, run:

interface atm interface-numberl To create an ATM sub-interface and enter the sub-interface view, run:

interface atm interface-number.sub-interfacel To credate a PVC or PVP and enter the PVC or PVP view, run the following command in

the sub-interface view:pvc [ pvc-name ] vpi/vciorpvp vpi

Step 3 Runtraffic queue service-class { green | red | yellow }

Forced traffic classification is set on the upstream ATM interface of the PE.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 7 ATM QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-11

Page 266: 00399154-Configuration Guide - QoS(V300R003_03).pdf

NOTE

l If the service class is AF1, AF2, AF3 or AF4, you must specify the color of the packets.

l If the service class is CS7, CS6, EF or BE, you need not specify the color of the packets.

l green: indicates the actions to the data packet when the packet traffic complies with the committedrate. The default value is pass.

l yellow: indicates the actions to the data packet when the packet traffic complies with the committedburst rate. The default value is pass.

l red: indicates the actions to the data packet when the packet traffic exceeds the committed burst rate.The default value is discard.

----End

7.3.4 Checking the Configuration

Run the following command to check the previous configuration.

Action Command

From one CE, ping the other CE. ping ip-address

If the configuration is successful, you can get the following result when you run the abovecommand:

l The CE at both the ends can ping through each other.

l Traffic is classified according to the service class.

7.4 Configuring ATM Complex Traffic ClassificationThis section describes the procedure of configuring the ATM Complex Traffic Classification.

7.4.1 Establishing the Configuration Task

7.4.2 Defining Traffic Classifiers

7.4.3 Defining Traffic Behaviors

7.4.4 Defining Traffic Policies

7.4.5 Applying Traffic Policies

7.4.6 Checking the Configuration

7.4.1 Establishing the Configuration Task

Applicable Environment

You are required to classify and limit the traffic that enters an ATM network or that is on anATM network, for example:

7 ATM QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

7-12 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 267: 00399154-Configuration Guide - QoS(V300R003_03).pdf

l To differentiate packet types such as voice packets, video packets, and data packets, andprovide different bandwidths and latencies for those packet types

l To handle traffic coming from different users and provide different bandwidths andpriorities for those packet types

You can classify packets according to parameters such as the DSCP value, the protocol type,the IP address, or the port number, and then provide differentiated services and configure QoStraffic policies based on the ATM complex traffic classification.

Pre-configuration TasksBefore configuring the ATM complex traffic classification, complete the following tasks:

l Configuring the link attributes of ATM interfaces

l Configuring the IP addresses of ATM interfaces or VE interfaces

l Configuring PVC or PVP parameters

l Configuring IPoA or IPoEoA services

NOTE

An ATM interface configured with IPoA or IPoEoA services supports the ATM complex trafficclassification whereas that configured with ATM transparent cell transport services or IWF does not supportthe ATM complex traffic classification.

Data PreparationTo configure the ATM complex traffic classification, you need the following data.

No. Data

1 Names of traffic classifiers

2 Data for matching rules

3 Names of traffic behaviors

4 Data for traffic behaviors

5 Names of traffic policies

6 Types and numbers of the interfaces where traffic policies are applied

7.4.2 Defining Traffic Classifiers

ContextDo as follows on the router:

Procedure

Step 1 Run:system-view

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 7 ATM QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-13

Page 268: 00399154-Configuration Guide - QoS(V300R003_03).pdf

The system view is displayed.

Step 2 Run:traffic classifier classifier-name [ operator { and | or } ]

A traffic classifier is defined and the traffic classifier view is displayed.

Step 3 Run the following command as required to define a traffic policy.l To define an ACL rule, run:

if-match acl acl-number

NOTEOnly ACLs to be matched based on Layer 3 or Layer 4 information are supported.

l To define a DSCP rule, run:if-match dscp dscp-value

l To define a TCP flag rule, run:if-match tcp syn-flag tcpflag-value

l To define a matching rule based on IP precedence, run:if-match ip-precedence ip-precedence

l To define a rule for matching all packets, run:if-match any

l To define a rule for matching packets based on the MPLS EXP value, run:if-match mpls-exp exp-value

----End

7.4.3 Defining Traffic Behaviors

ContextDo as follows on the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:traffic behavior behavior–name

A traffic behavior is defined and the traffic behavior view is displayed.

Step 3 Run one of the following commands as required.l To allow packets to pass the device, run:

permitl To discard matched packets, run:

denyl To re-configure the traffic shaping, run:

car { cir cir-value [ pir pir-value] } [ cbs cbs-value pbs pbs-value ] [ green { discard | pass [ service-class class color color ] } | yellow { discard |

7 ATM QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

7-14 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 269: 00399154-Configuration Guide - QoS(V300R003_03).pdf

pass [ service-class class color color ] } | red { discard | pass [ service-class class color color ] } ]*

l To re-configure the IP precedence of an IP packet, run:remark ip-precedence ip-precedence

l To re-configure the DSCP value of an IP packet, run:remark dscp dscp-value

l To re-configure the priority of an MPLS packet, run:remark mpls-exp exp

NOTEThe remark mpls-exp exp command can be applied to only upstream traffic on a router.

l To configure the Class of Service (CoS) of packets, run:service-class service-class color color

l To configure a load-balancing mode (per flow or per packet) of packets, run:load-balance { flow | packet }

l To configure to redirect packets to a single next hop device, run:redirect ip-nexthop ip-address [ interface interface-type interface-number ]

l To redirect IP packets to a target LSP on the public network, run:redirect lsp public dest-ipv4-address [ nexthop-address | interface interface-type interface-number | secondary ]

----End

7.4.4 Defining Traffic Policies

ContextDo as follows on the router:

ProcedureStep 1 Run:

system-view

The system view is displayed.

Step 2 Run:traffic policy policy-name

A traffic policy is defined and the policy view is displayed.

Step 3 Run:classifier classifier-name behavior behavior-name

A traffic behavior is associated with a specified traffic classifier in the traffic policy.

----End

7.4.5 Applying Traffic Policies

ContextDo as follows on the router:

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 7 ATM QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-15

Page 270: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run one of the following commands as required.

l To enter the ATM interface (or sub-interface) view, run:interface atm interface-number [.sub-interface ]

l To enter the VE interface view, run:interface virtual-ethernet interface-number

Step 3 Run:traffic-policy policy-name { inbound | outbound }

The traffic policy is applied to the interface.

NOTE

l After a traffic policy is applied to an interface, you cannot modify the shared or unshared mode ofthe traffic policy. Before modifying the shared or unshared mode of a traffic policy, you must cancelthe application of the traffic policy from the interface.

l A traffic policy with the shared attribute: Although a traffic policy is applied to different interfaces,the statistics information to be displayed is the sum of the statistics of all interfaces. Therefore, theoriginal data for each individual interface is not identified.

l A traffic policy with the unshared attribute: You can identify the statistics of a traffic policy accordingthe interface where the traffic policy is applied.

l Whether a traffic policy is shared or unshared depends on the PAF file. The inbound and outboundattributes can be identified in traffic statistics, no matter a policy is of the shared attribute or theunshared attribute.

l An ATM interface configured with ATM transparent cell transport services or IWF does not supportthe ATM complex traffic classification and this command.

----End

7.4.6 Checking the Configuration

Run the following commands to check the previous configuration.

Action Command

Check the configuration of a trafficbehavior.

display traffic behavior { system-defined | user-defined } [ behavior-name ]

Check the configuration of a trafficclassifier.

display traffic classifier { system-defined | user-defined } [ classifier-name ]

Check information about theassociations of all traffic classifiers withtraffic behaviors, or information aboutthe association of a particular trafficclassifier with a traffic behavior.

display traffic policy { system-defined | user-defined } [ policy-name [ classifier classifier-name ] ]

7 ATM QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

7-16 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 271: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Action Command

Check information about the trafficpolicy statistics on an interface.

display traffic policy statistics interfaceinterface-type interface-number [ .sub-interface ]{ inbound | outbound } [ verbose { classifier-based | rule-based } [ class class-name ] ]

l Run the display traffic behavior command. If correct traffic behaviors, it means that theconfiguration succeeds.

l Run the display traffic classifier command. If correct rules for traffic classifier aredisplayed, it means that the configuration succeeds.

l Run the display traffic policy command. If correct traffic policy names and the bindingrelations between traffic classifiers and traffic behaviors are displayed, it means that theconfiguration succeeds.

l Run the display traffic policy statistics command. If correct statistics about the specifiedinterface defined in a traffic policy are displayed, it means that the configuration succeeds.

For example:

<Quidway> display traffic policy statistics interface atm 1/0/0 inboundInterface: Atm1/0/0 Traffic policy inbound: test Traffic policy applied at 2007-08-30 18:30:20 Statistics enabled at 2007-08-30 18:30:20Statistics last cleared: NeverRule number: 7 IPv4, 0 IPv6 Current status: OK!Item Packets Bytes-------------------------------------------------------------------Matched 1,000 100,000 +--Passed 500 50,000 +--Dropped 500 50,000 +--Filter 100 10,000 +--CAR 300 30,000Missed 500 50,000Last 30 seconds rateItem pps bps-------------------------------------------------------------------Matched 1,000 100,000 +--Passed 500 50,000 +--Dropped 500 50,000 +--Filter 100 10,000 +--CAR 300 30,000Missed 500 50,000

7.5 Configuring the ATM Traffic ShapingThis section describes the procedure of configuring the ATM traffic shaping.

7.5.1 Establishing the Configuration Task

7.5.2 Configuring ATM Traffic Shaping Parameters

7.5.3 Applying ATM Traffic Shaping Parameters

7.5.4 Checking the Configuration

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 7 ATM QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-17

Page 272: 00399154-Configuration Guide - QoS(V300R003_03).pdf

7.5.1 Establishing the Configuration Task

Applicable EnvironmentTo keep the traffic over an ATM network within a reasonable scope to avoid abnormal operationof the network in the case of heavy and bursting traffic, you can configure ATM traffic shapingto limit the outgoing traffic rate. The configuration can better utilize the network resources.

Pre-configuration TasksBefore configuring the ATM traffic shaping, complete the following tasks:

l Configuring the physical parameters of ATM interfaces to ensure normal operation of theinterfaces

l Configuring IP addresses of the ATM interfaces

Data PreparationTo configure ATM traffic shaping, you need the following data:

No. Data

1 Names of service types and service type on the PVC

2 Peak Cell Rate, Sustainable Cell Rate, Maximum Burst Size, and Cell DelayVariation Tolerance

3 VPI or VCI of PVC used for traffic shaping

7.5.2 Configuring ATM Traffic Shaping Parameters

ContextDo as follows on the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:atm service service-name { cbr output-pcr cdvt-value | nrt-vbr output-pcr output-scr output-mbs cdvt-value | rt-vbr output-pcr output-scr output-mbs cdvt-value }

The PVC or PVP service types and related parameters are configured.

To configure PVC service types, you need to create service types in the system view; then applythe service types to specific PVCs.

7 ATM QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

7-18 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 273: 00399154-Configuration Guide - QoS(V300R003_03).pdf

The default PVC service type is UBR; therefore, you do not need to create the service type ofUBR.

----End

7.5.3 Applying ATM Traffic Shaping Parameters

ContextDo as follows on the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:interface atm interface-number[.subinterface ]

The ATM interface view or sub-interface view is displayed.

Step 3 Run the following command as required:l To create PVP and display the PVP view, run:

pvp vpi

l To create PVC and display the PVC view, run:pvc { pvc-name vpi/vci | vpi/vci }

NOTE

l PVP can be configured on ATM sub-interfaces only.

l PVP and PVC should not coexist on the same ATM sub-interface.

Step 4 Run:shutdown

The PVC or PVP is shut down.

Step 5 Run:service output service-name

The service type of PVC or PVP is specified and the traffic shaping parameters are applied tothe PVC or PVP.

NOTETo specify a service type of PVC or PVP with the service output command, you need to run theshutdown command to shut down the PVC or PVC and then run the undo shutdown command to re-enable the PVC or PVP. In this manner, the configuration can be ensured to take effect.

Step 6 Run:undo shutdown

The traffic shaping is enabled on the PVC or PVP.

----End

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 7 ATM QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-19

Page 274: 00399154-Configuration Guide - QoS(V300R003_03).pdf

7.5.4 Checking the Configuration

Run the following commands to check the previous configuration.

Action Command

Check the configuration of traffic shapingparameters.

display atm service [ service-name ]

Run the display atm service [ service-name ] command. If the correct configuration of the trafficshaping parameters is displayed, it means that the configuration succeeds. For example:

<Quidway> display atm serviceAtm Service Config: Service Name: cbr State: VALID Index: 0 ServiceType: CBR PCR: 111 SCR: 0 MBS: 0 CDVT: 111 Traffic Type: Shaper

7.6 Configuring the Priority of an ATM PVCThis section describes the procedure of configuring the priority of an ATM PVC.

7.6.1 Establshing the Configuration Task

7.6.2 Configuring the Priority of an ATM PVC

7.6.1 Establshing the Configuration Task

Applicable Environment

To ensure the bandwidth for user services with different priorities in an ATM network, you canconfigure the priorities of the traffic in ATM PVCs so that traffic scheduling is performed basedon the priorities.

Pre-configuration Tasks

Before configuring the priority of an ATM PVC, complete the following task:

l Configuring the physical parameters of ATM interfaces to ensure normal operation of theinterfaces

l Configuring IP addresses of the ATM interfaces

Data Preparation

To configure the priority of an ATM PVC, you need the following data.

7 ATM QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

7-20 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 275: 00399154-Configuration Guide - QoS(V300R003_03).pdf

No. Data

1 The VPI and VCI of the PVC to be configured with a priority

2 Priority of the PVC

7.6.2 Configuring the Priority of an ATM PVC

ContextDo as follows on the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:interface atm interface-number.sub-interface

The ATM sub-interface view is displayed.

NOTETo configure the priorities of all PVCs in the interface view, you can run the service output priorityhigher command on the interface.

Step 3 Run:pvc { pvc-name [ vpi/vci ] | vpi/vci }

The PVC view is displayed.

Step 4 Run:service output priority higher

The priority of the PVC or PVP is specified to higher.

NOTEYou can use this command to configure priorities of only UBR-type PVCs. Thus, the system can schedulethe traffic in the PVCs with different priorities.

----End

7.7 Configuring Congestion Management of the ATM PVCThis section describes the procedure of configuring the congestion management of an ATMPVC.

7.7.1 Establshing the Configuration Task

7.7.2 Configuring the Queue Scheduling of an ATM PVC

7.7.3 Checking the Configuration

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 7 ATM QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-21

Page 276: 00399154-Configuration Guide - QoS(V300R003_03).pdf

7.7.1 Establshing the Configuration Task

Applicable EnvironmentOn an ATM network, when the traffic rate exceeds the threshold, the excessive packets arebuffered instead of being discarded. When the network is not busy, the buffered packets are thenforwarded. After the congestion management of ATM PVC is configured, the packets areorganized into queues according to a specified algorithm. The packets then are forwardedaccording to the queue scheduling mechanism.

The configuration of ATM PVC queues involves the PQ configuration and the WFQconfiguration.

Pre-configuration TasksBefore configuring the traffic shaping of the ATM PVC, complete the following task:

l Configuring the physical parameters of ATM interfaces to ensure normal operation of theinterfaces

l Configuring IP addresses of the ATM interfaces

l Configuring a PVC

l Configuring the traffic shaping of the ATM PVC

Data PreparationTo configure congestion management of the ATM PVC, you need the following data.

No. Data

1 Interface type and ID, PVC name, and VPI or VCI number

2 Queue names for queue scheduling

3 (Optional) WFQ weights. (If the queue scheduling is configured to PQ, this parameteris unnecessary.)

7.7.2 Configuring the Queue Scheduling of an ATM PVC

ContextDo as follows on the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

7 ATM QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

7-22 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 277: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Step 2 Run:interface atm interface-number [.sub-interface ]

The ATM interface view or sub-interface view is displayed.

Step 3 Run:pvc { pvc-name [ vpi/vci ] | vpi/vci }

The PVC view is displayed.

Step 4 Run:shutdown

The PVC is shut down.

Step 5 Run:pvc-queue cos-value { pq | wfq weight weight } outbound

The queue scheduling parameter of the ATM PVC is configured.

NOTE

l Of the eight queues for a PVC, only one queue can be configured for the PQ scheduling.

l If one PVC queue is configured with the PQ or WFQ scheduling, the rest queues default the WFQscheduling. The default scheduling parameter is 20.

l Queue scheduling of ATM PVCs can be configured only to downstream packets.

Step 6 Run:undo shutdown

The queue scheduling parameter for the PVC is enabled.

By default, the ATM PVC is not configured with a queue scheduling algorithm. Beforeconfiguring the queue scheduling parameter of an ATM PVC, you must run the shutdowncommand to shut down the PVC.

----End

7.7.3 Checking the Configuration

Run the following command to check the previous configuration.

Action Command

Check queue scheduling information onall PVCs or one PVC on an ATMinterface.

display atm pvc-queue [ interface interface-type interface-number [.sub-interface ] [ pvc vpi/vci ] ]

Check information of PVCs on an ATMinterface.

display atm pvc-info [ interface atm interface-number [ pvc { pvc-name [ vpi/vci ] | vpi/vci } ] ]

Run the display atm pvc-queue command. If correct queue scheduling information on all PVCsor one PVC on an ATM interface is displayed, it means that the configuration succeeds. Forexample:

<Quidway> display atm pvc-queue interface atm 4/0/1

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 7 ATM QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-23

Page 278: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Show CBQ PVC configeration of interface Atm4/0/1 PVC 0/1: be distribute OutBound wfq Weight 20 af1 distribute OutBound pq af2 distribute OutBound wfq Weight 50 af3 distribute OutBound wfq Weight 20 af4 distribute OutBound wfq Weight 20 ef distribute OutBound wfq Weight 20 cs6 distribute OutBound wfq Weight 20 cs7 distribute OutBound wfq Weight 20Show CBQ PVC configeration of interface Atm4/0/1 PVC 0/2: be distribute OutBound wfq Weight 20 af1 distribute OutBound pq af2 distribute OutBound wfq Weight 20 af3 distribute OutBound wfq Weight 20 af4 distribute OutBound wfq Weight 20 ef distribute OutBound wfq Weight 20 cs6 distribute OutBound wfq Weight 20

Run the display atm pvc-info command after queue scheduling of PVCs configured. Theinformation of PVCs is displayed, including information of traffic queue. For example:

<Quidway> display atm pvc-info interface atm 7/1/3.24 pvc 24/24 Atm7/1/3.24, VPI: 24, VCI: 24, INDEX: 275 AAL5 Encaps: SNAP, Protocol: IP OAM interval: 0 sec(disabled), OAM retry interval: 0 sec OAM retry count (up/down): 0/0 input pkts: 0, input bytes: 0, input pkt errors: 0 output pkts: 0, output bytes: 0, output pkt errors: 0 [be] output pkts: 2222123, output bytes: 0 [af1] output pkts: 0, output bytes: 0 [af2] output pkts: 0, output bytes: 0 [af3] output pkts: 0, output bytes: 0 [af4] output pkts: 0, output bytes: 0 [ef] output pkts: 0, output bytes: 0 [cf6] output pkts: 0, output bytes: 0 [cf7] output pkts: 0, output bytes: 0 Interface State: DOWN, PVC State: DOWN

7.8 Configuration ExamplesThis section provides some examples of configuring ATM QoS.

7.8.1 Example for Configuring Simple Traffic Classification for 1-to-1 VCC ATM TransparentTransmission

7.8.2 Example for Configuring Simple Traffic Classification for 1-to-1 VPC ATM TransparentTransmission

7.8.3 Example for Configuring Simple Traffic Classification for AAL5 SDU ATM TransparentTransmission

7.8.4 Example of Configuring for 1483R-based ATM Simple Traffic Classification

7.8.5 Example for Configuring 1483B-Based ATM Simple Traffic Classificaiton

7.8.6 Example for Configuring Forced ATM Traffic Classification

7.8.7 Example for Configuring the ATM Complex Traffic Classification

7.8.8 Example for Configuring Queue Scheduling for an ATM PVC

7 ATM QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

7-24 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 279: 00399154-Configuration Guide - QoS(V300R003_03).pdf

7.8.1 Example for Configuring Simple Traffic Classification for 1-to-1 VCC ATM Transparent Transmission

Networking RequirementsAs shown in Figure 7-6, the ATM interface of CE1 is connected to the MPLS network throughPE1, and is connected to CE2 through PE2. A VC is established between CE1 and CE2 over theMPLS network.

Simple traffic classification is required for the upstream traffic on PE1. PE1 maps the PVCservice type and the CLP of upstream traffic to its internal precedence. For downstream traffic,it maps the internal precedence to the MPLS EXP field. The precedence of ATM cells istransmitted transparently over the MPLS network.

Figure 7-6 Networking diagram for configuring ATM simple traffic classification for 1-to-1VCC ATM transparent transmission

Configuration RoadmapThe configuration roadmap is as follows:

1. Configure the IP addresses and PVC parameters for the interfaces.2. Configure IGP on the P and PE devices in the MPLS network to achieve IP connectivity.3. Configure basic MPLS functions on the P and PE devices.4. Configure MPLS LDP on the P and PE devices.5. Establish LDP sessions between the two PEs.6. Enable MPSL L2VPN on the PE devices.7. Configure 1-to-1 VCC ATM transparent transmission.8. Configure mapping rules for ATM simple traffic classification.9. Enable simple traffic classification.

Data PreparationTo complete the configuration, you need the following data:

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 7 ATM QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-25

Page 280: 00399154-Configuration Guide - QoS(V300R003_03).pdf

l Data for configuring OSPF

l Remote peer name of the PE

l VC ID

l VPI/VCI value on the CE

l Service type and CLP value

Configuration Procedure1. Configure the ATM interfaces on the CEs.

# Configure CE1.<CE1> system-view[CE1] interface atm 1/0/0[CE1-Atm1/0/0] undo shutdown[CE1-Atm1/0/0] quit[CE1] interface atm 1/0/0.1[CE1-Atm1/0/0.1] ip address 202.38.160.1 24[CE1-Atm1/0/0.1] pvc 1/100[CE1-atm-pvc-Atm1/0/0.1-1/100] map ip 202.38.160.2[CE1-atm-pvc-Atm1/0/0.1-1/100] return# Configure CE2.<CE2> system-view[CE2] interface atm 2/0/0[CE2-Atm2/0/0] undo shutdown[CE2-Atm2/0/0] quit[CE2] interface atm 2/0/0.1[CE2-Atm2/0/0.1] ip address 202.38.160.2 24[CE2-Atm2/0/0.1] pvc 1/100[CE2-atm-pvc-Atm2/0/0.1-1/100] map ip 202.38.160.1[CE2-atm-pvc-Atm2/0/0.1-1/100] return

2. Configure IGP on the MPLS network (In this example, OSPF is used).# Assign IP addresses for the interfaces on the PE1, PE2, and P devices (not mentioned).# Configure PE1.<PE1> system-view[PE1] ospf 1 router-id 1.1.1.9[PE1-ospf-1] area 0.0.0.0[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] network 10.1.1.0 0.0.0.255[PE1-ospf-1-area-0.0.0.0] quit[PE1-ospf-1] quit# Configure the P.<P> system-view[P] ospf 1 router-id 2.2.2.9[P-ospf-1] area 0.0.0.0[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] network 10.1.1.0 0.0.0.255[P-ospf-1-area-0.0.0.0] network 10.1.2.0 0.0.0.255[P-ospf-1-area-0.0.0.0] quit[P-ospf-1] quit# Configure PE2.<PE2> system-view[PE2] ospf 1 router-id 3.3.3.9[PE2-ospf-1] area 0.0.0.0[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] network 10.1.2.0 0.0.0.255[PE2-ospf-1-area-0.0.0.0] quit[PE2-ospf-1] quit

3. Configure based MPLS and LDP on the MPLS network.

7 ATM QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

7-26 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 281: 00399154-Configuration Guide - QoS(V300R003_03).pdf

# Configure PE1.<PE1> system-view[PE1] mpls lsr-id 1.1.1.9[PE1] mpls[PE1-mpls] lsp-trigger all[PE1-mpls] quit[PE1] mpls ldp[PE1-mpls-ldp] quit[PE1] interface pos 2/0/0[PE1-Pos2/0/0] undo shutdown[PE1-Pos2/0/0] mpls[PE1-Pos2/0/0] mpls ldp[PE1-Pos2/0/0] return# Configure the P.<P> system-view[P] mpls lsr-id 2.2.2.9[P] mpls[P-mpls] lsp-trigger all[P-mpls] quit[P] mpls ldp[P-mpls-ldp] quit[P] interface pos 1/0/0[P-Pos1/0/0] undo shutdown[P-Pos1/0/0] mpls[P-Pos1/0/0] mpls ldp[P-Pos1/0/0] quit[P] interface pos 2/0/0[P-Pos2/0/0] undo shutdown[P-Pos2/0/0] mpls[P-Pos2/0/0] mpls ldp[P-Pos2/0/0] quit# Configure PE2.<PE2> system-view[PE2] mpls lsr-id 3.3.3.9[PE2] mpls[PE2-mpls] lsp-trigger all[PE2-mpls] quit[PE2] mpls ldp[PE2-mpls-ldp] quit[PE2] interface pos 2/0/0[PE2-Pos2/0/0] undo shutdown[PE2-Pos2/0/0] mpls[PE2-Pos2/0/0] mpls ldp[PE2-Pos2/0/0] quit

4. Establish LDP sessions between the two PEs.# Configure PE1.<PE1> system-view[RouterC] mpls ldp remote-peer 1[PE1-mpls-ldp-remote-1] remote-ip 3.3.3.9[PE1-mpls-ldp-remote-1] return# Configure PE2.<PE2> system-view[PE2] mpls ldp remote-peer 1[PE2-mpls-ldp-remote-1] remote-ip 1.1.1.9[PE2-mpls-ldp-remote-1] return

5. On the PE, enable MPLS L2VPN and configure 1-to-1 VCC ATM transmission.# Configure PE1.<PE1> system-view[PE1] mpls l2vpn[PE1-l2vpn] quit[PE1] interface atm 3/0/0 p2p[PE1-Atm3/0/0] undo shutdown

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 7 ATM QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-27

Page 282: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[PE1-Atm3/0/0] quit[PE1] interface atm 3/0/0.1 p2p[PE1-Atm3/0/0.1] atm cell transfer[PE1-Atm3/0/0.1] pvc 1/100[PE1-atm-pvc-Atm3/0/0.1-1/100] quit[PE1-Atm3/0/0.1] mpls l2vc 3.3.3.9 101[PE1-Atm3/0/0.1] return# Configure PE2.<PE2> system-view[PE2] mpls l2vpn[PE2-l2vpn] quit[PE2] interface atm 4/0/0 p2p[PE2-Atm4/0/0] undo shutdown[PE2-Atm4/0/0] quit[PE2] interface atm 4/0/0.1 p2p[PE2-Atm4/0/0.1] atm cell transfer[PE2-Atm4/0/0.1] pvc 1/100[PE2-atm-pvc-Atm4/0/0.1-1/100] quit[PE2-Atm4/0/0.1] mpls l2vc 1.1.1.9 101[PE2-Atm4/0/0.1] return

6. Set the service type for the ATM PVC on PE1.<PE1> system-view[PE1] atm service cbr-name cbr 100 2000[PE1] interface atm 3/0/0.1[PE1-Atm3/0/0.1] pvc 1/100[PE1-atm-pvc-Atm3/0/0.1-1/100] shutdown[PE1-atm-pvc-Atm3/0/0.1-1/100] service output cbr-name[PE1-atm-pvc-Atm3/0/0.1-1/100] undo shutdown[PE1-atm-pvc-Atm3/0/0.1-1/100] return

NOTE

Before running the service output command on a PVC or PVP, run the shutdown command to shutdown it. Otherwise, the configuration does not take effect.

7. On PE1, configure mapping rules for ATM simple traffic classification and enable simpletraffic classification.<PE1> system-view[PE1] diffserv domain default[PE1-dsdomain-default] atm-inbound cbr 0 phb af2 green[PE1-dsdomain-default] quit[PE1] interface atm 3/0/0.1[PE1-Atm3/0/0.1] pvc 1/100[PE1-atm-pvc-Atm3/0/0.1-1/100] trust upstream default[PE1-atm-pvc-Atm3/0/0.1-1/100] quit[PE1-Atm3/0/0.1] quit[PE1] interface pos 2/0/0[PE1-pos2/0/0] trust upstream default[PE1-pos2/0/0] return

NOTE

On PE2, you also need to configure ATM simple traffic classification for the reverse traffic. Theconfiguration is similar to that on PE1 and is not mentioned in this example.

8. Verify the configurationl On the PE devices, view the L2VPN connections. The output shows that an L2VC is

set up and the status is Up.Take PE1 for an example:[PE1] display mpls l2vc Total ldp vc : 1 1 up 0 down*Client Interface : Atm3/0/0.1 Session State : up AC Status : up VC State : up VC ID : 101

7 ATM QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

7-28 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 283: 00399154-Configuration Guide - QoS(V300R003_03).pdf

VC Type : atm 1to1 vcc Destination : 3. 3. 3.9 Local VC Label : 138240 Remote VC Label : 138240 Control Word : Disable Local VC MTU : 1500 Remote VC MTU : 0 Tunnel Policy Name : -- Traffic Behavior Name: -- PW Template Name : -- Create time : 0 days, 0 hours, 5 minutes, 22 seconds UP time : 0 days, 0 hours, 5 minutes, 22 seconds Last change time : 0 days, 0 hours, 5 minutes, 22 seconds

l CE1 and CE2 can ping through each other.

l Traffic mapping succeeds.[PE1] display port-queue statistics interface pos 2/0/0 af2 outbound af2 Traffic statistics OutBound: Last 1 second rate(pps): 118647 Last 1 second rate(Bps): 9017172 Pass packets: 271004559 Pass bytes: 20596342912 Discard packets: 0

Configuration Filesl Configuration file of CE1

# sysname CE1#interface Atm1/0/0 undo shutdown#interface Atm1/0/0.1pvc 1/100 map ip 202.38.160.2 ip address 202.38.160.1 255.255.255.0#return

l Configuration file of CE2# sysname CE2#interface Atm2/0/0 undo shutdown#interface Atm2/0/0.1pvc 1/100 map ip 202.38.160.1 ip address 202.38.160.2 255.255.255.0#return

l Configuration file of PE1# sysname PE1# atm service cbr-name cbr 100 2000# mpls lsr-id 1.1.1.9 mpls lsp-trigger all mpls l2vpn#mpls ldp#

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 7 ATM QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-29

Page 284: 00399154-Configuration Guide - QoS(V300R003_03).pdf

mpls ldp remote-peer 1 remote-ip 3.3.3.9#diffserv domain default atm-inbound cbr 0 phb af2 green#interface Atm3/0/0 p2p undo shutdown#interface Atm3/0/0.1 p2p atm cell transfer pvc 1/100 trust upstream default service output cbr-name mpls l2vc 3.3.3.9 101#interface Pos2/0/0 undo shutdown link-protocol ppp ip address 10.1.1.1 255.255.255.0 mpls mpls ldp trust upstream default#interface LoopBack1 ip address 1.1.1.9 255.255.255.255#ospf 1 area 0.0.0.0 network 1.1.1.9 0.0.0.0 network 10.1.1.0 0.0.0.255#return

l Configuration file of P# sysname P# mpls lsr-id 2.2.2.9 mpls lsp-trigger all#mpls ldp#interface Pos1/0/0 undo shutdown link-protocol ppp ip address 10.1.1.2 255.255.255.0 mpls mpls ldp#interface Pos2/0/0 undo shutdown link-protocol ppp ip address 10.1.2.1 255.255.255.0 mpls mpls ldp#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 10.1.1.0 0.0.0.255 network 10.1.2.0 0.0.0.255#return

l Configuration file of PE2

7 ATM QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

7-30 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 285: 00399154-Configuration Guide - QoS(V300R003_03).pdf

# sysname PE2#mpls lsr-id 3.3.3.9 mpls lsp-trigger all mpls l2vpn#mpls ldp#mpls ldp remote-peer 1 remote-ip 1.1.1.9#interface Atm4/0/0 p2p undo shutdown#interface Atm4/0/0.1 p2p atm cell transfer pvc 1/100 mpls l2vc 1.1.1.9 101#interface Pos2/0/0 undo shutdown ip address 10.1.2.2 255.255.255.0 mpls mpls ldp#interface LoopBack1 ip address 3.3.3.9 255.255.255.255#ospf 1 area 0.0.0.0 network 1.1.1.9 0.0.0.0 network 10.1.2.0 0.0.0.255#return

7.8.2 Example for Configuring Simple Traffic Classification for 1-to-1 VPC ATM Transparent Transmission

Networking RequirementsAs shown in Figure 7-7, the ATM interface of CE1 is connected to the MPLS network throughPE1, and is connected to CE2 through PE2. A VP is established between CE1 an CE2 over theMPLS network. Two VCs are established in the VP.

Simple traffic classification is required for the upstream traffic on PE1. PE1 maps the PVCservice type and the CLP of upstream traffic to its internal precedence. For downstream traffic,it maps the internal precedence to the MPLS EXP field. The precedence of ATM cells istransmitted transparently over the MPLS network.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 7 ATM QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-31

Page 286: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Figure 7-7 Networking diagram for configuring simple traffic classification for 1-to-1 VPCATM transparent transmission

Configuration RoadmapThe configuration roadmap is as follows:

1. Configure the IP addresses and PVC parameters for the interfaces.2. Configure IGP on the P and PE devices in the MPLS network to achieve IP connectivity.3. Configure basic MPLS functions on the P and PE devices.4. Configure MPLS LDP on the P and PE devices.5. Establish LDP sessions between the two PEs.6. Enable MPSL L2VPN on the PE devices.7. Configure 1-to-1 VPC ATM transparent transmission.8. Configure mapping rules for ATM simple traffic classification.9. Enable simple traffic classification.

Data PreparationTo complete the configuration, you need the following data:

l Data for configuring OSPF

l Remote peer name of the PE

l VC ID

l VPI/VCI value on the CE

l Service type and CLP value

Configuration Procedure1. Configure the ATM interfaces on the CEs.

# Configure CE1.<CE1> system-view[CE1] interface atm 1/0/0[CE1-Atm1/0/0] undo shutdown

7 ATM QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

7-32 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 287: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[CE1-Atm1/0/0] quit[CE1] interface atm 1/0/0.1[CE1-Atm1/0/0.1] ip address 202.38.160.1 24[CE1-Atm1/0/0.1] pvc 2/300[CE1-atm-pvc-Atm1/0/0.1-2/300] map ip 202.38.160.2[CE1-atm-pvc-Atm1/0/0.1-2/300] quit[CE1-Atm1/0/0.1] quit[CE1] interface atm 1/0/0.2[CE1-Atm1/0/0.2] ip address 202.37.10.1 24[CE1-Atm1/0/0.2] pvc 2/200[CE1-atm-pvc-Atm1/0/0.2-2/200] map ip 202.37.10.2[CE1-atm-pvc-Atm1/0/0.2-2/200] return# Configure CE2.<CE2> system-view[CE2] interface atm 2/0/0[CE2-Atm2/0/0] undo shutdown[CE2-Atm2/0/0] quit[CE2] interface atm 2/0/0.1[CE2-Atm2/0/0.1] ip address 202.38.160.2 24[CE2-Atm2/0/0.1] pvc 2/300[CE2-Atm2/0/0.1-2/300] map ip 202.38.160.1[CE2-Atm2/0/0.1-2/300] quit[CE2-Atm2/0/0.1] interface atm 2/0/0.2[CE2-Atm2/0/0.2] ip address 202.37.10.2 24[CE2-Atm2/0/0.2] pvc 2/200[CE2-Atm2/0/0.2-2/200] map ip 202.37.10.1[CE2-Atm2/0/0.2-2/200] quit

2. Configure IGP on the MPLS network (In this example, OSPF is used).See Example for Configuring Simple Traffic Classification for 1-to-1 VCC ATMTransparent Transmission step 2.

3. Configure MPLS and LDP on the MPLS network.See Example for Configuring Simple Traffic Classification for 1-to-1 VCC ATMTransparent Transmission step 3.

4. Establish LDP sessions between the two PEs.See Example for Configuring Simple Traffic Classification for 1-to-1 VCC ATMTransparent Transmission step 4.

5. On the PE, enable MPLS L2VPN and configure 1-to-1 VPC ATM transmission.# Configure PE1.<PE1> system-view[PE1] mpls l2vpn[PE1-l2vpn] quit[PE1] interface atm 3/0/0 p2p[PE1-Atm3/0/0] undo shutdown[PE1-Atm3/0/0] quit[PE1] interface atm 3/0/0.1 p2p[PE1-Atm3/0/0.1] atm cell transfer[PE1-Atm3/0/0.1] pvp 2[PE1-atm-pvp-Atm3/0/0.1-2] quit[PE1-Atm3/0/0.1] mpls l2vc 3.3.3.9 101[PE1-Atm3/0/0.1] return# Configure PE2.<PE2> system-view[PE2] mpls l2vpn[PE2-l2vpn] quit[PE2] interface atm 4/0/0 p2p[PE2-Atm4/0/0] undo shutdown[PE2-Atm4/0/0] quit[PE2] interface atm 4/0/0.1 p2p[PE2-Atm4/0/0.1] atm cell transfer[PE2-Atm4/0/0.1] pvp 2[PE2-atm-pvp-Atm4/0/0.1-2] quit

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 7 ATM QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-33

Page 288: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[PE2-Atm4/0/0.1] mpls l2vc 1.1.1.9 101[PE2-Atm4/0/0.1] return

6. On PE1, set the CoS of the PVP.<PE1> system-view[PE1] atm service cbr-name cbr 100 2000[PE1] interface atm 3/0/0.1[PE1-Atm3/0/0.1] pvp 2[PE1-atm-pvp-Atm3/0/0.1-2] shutdown[PE1-atm-pvp-Atm3/0/0.1-2] service output cbr-name[PE1-atm-pvp-Atm3/0/0.1-2] undo shutdown[PE1-atm-pvp-Atm3/0/0.1-2] return

NOTE

Before running the service output command on a PVC or PVP, run the shutdown command to shutdown it. Otherwise, the configuration does not take effect.

7. On PE1, configure mapping rules for ATM simple traffic classification and enable simpletraffic classification.<PE1> system-view[PE1] diffserv domain default[PE1-dsdomain-default] atm-inbound cbr 0 phb af2 green[PE1-dsdomain-default] quit[PE1] interface atm 3/0/0.1[PE1-Atm3/0/0.1] pvp 2[PE1-atm-pvc-Atm3/0/0.1-2/0] trust upstream default[PE1-atm-pvc-Atm3/0/0.1-2/0] quit[PE1-Atm3/0/0.1] quit[PE1] interface pos 2/0/0[PE1-pos2/0/0] undo shutdown[PE1-pos2/0/0] trust upstream default[PE1-pos2/0/0] return

NOTE

On PE2, you also need to configure ATM simple traffic classification for the reverse traffic. Theconfiguration is similar to that on PE1 and is not mentioned in this example.

8. Verify the configurationl On the PE devices, view the L2VPN connections. The output shows that an L2VC is

set up and the status is Up.Take PE1 for an example:[PE1] display mpls l2vc Total ldp vc : 1 1 up 0 down*Client Interface : Atm3/0/0.1 Session State : up AC Status : up VC State : up VC ID : 101 VC Type : atm 1to1 vpc Destination : 3. 3. 3.9 Local VC Label : 138240 Remote VC Label : 138240 Control Word : Disable Local VC MTU : 1500 Remote VC MTU : 0 Tunnel Policy Name : -- Traffic Behavior Name: -- PW Template Name : -- Create time : 0 days, 0 hours, 5 minutes, 22 seconds UP time : 0 days, 0 hours, 5 minutes, 22 seconds Last change time : 0 days, 0 hours, 5 minutes, 22 seconds

l CEs (Router A and Router B) can ping through each other.

l Traffic mapping succeeds.[PE1] display port-queue statistics interface Pos 2/0/0 af2 outbound

7 ATM QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

7-34 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 289: 00399154-Configuration Guide - QoS(V300R003_03).pdf

af2 Traffic statistics OutBound: Last 1 second rate(pps): 118647 Last 1 second rate(Bps): 9017172 Pass packets: 271004559 Pass bytes: 20596342912 Discard packets: 0

Configuration Filesl Configuration file of CE1

# sysname CE1#interface Atm1/0/0 undo shutdown#interface Atm1/0/0.1 pvc 2/300 map ip 202.38.160.2 ip address 202.38.160.1 255.255.255.0#interface Atm1/0/0.2 pvc 2/200 map ip 202.37.10.2 ip address 202.37.10.1 255.255.255.0#return

l Configuration file of CE2# sysname CE2#interface Atm2/0/0 undo shutdown#interface Atm2/0/0.1 pvc 2/300 map ip 202.38.160.1 ip address 202.38.160.2 255.255.255.0#interface Atm2/0/0.2pvc 2/200 map ip 202.37.10.1 ip address 202.37.10.2 255.255.255.0#return

l Configuration file of PE1# sysname PE1# atm service cbr-name cbr 100 2000# mpls lsr-id 1.1.1.9 mpls lsp-trigger all mpls l2vpn#mpls ldp#mpls ldp remote-peer 1 remote-ip 3.3.3.9#diffserv domain default atm-inbound cbr 0 phb af2 green#interface Atm3/0/0 undo shutdown

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 7 ATM QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-35

Page 290: 00399154-Configuration Guide - QoS(V300R003_03).pdf

#interface Atm3/0/0.1 atm cell transferpvp 2 trust upstream default service output cbr-name mpls l2vc 3.3.3.9 101#interface Pos2/0/0 undo shutdown link-protocol ppp ip address 10.1.1.1 255.255.255.0 mpls mpls ldp trust upstream default#interface LoopBack1ip address 1.1.1.9 255.255.255.255#ospf 1 area 0.0.0.0 network 1.1.1.9 0.0.0.0 network 10.1.1.0 0.0.0.255#return

l Configuration file of P# sysname P# mpls lsr-id 2.2.2.9 mpls lsp-trigger all#mpls ldp#interface Pos1/0/0 undo shutdown link-protocol ppp ip address 10.1.1.2 255.255.255.0 mpls mpls ldp#interface Pos2/0/0 undo shutdown link-protocol ppp ip address 10.1.2.1 255.255.255.0 mpls mpls ldp#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 10.1.1.0 0.0.0.255 network 10.1.2.0 0.0.0.255#return

l Configuration file of PE2# sysname PE2#mpls lsr-id 3.3.3.9 mpls lsp-trigger all mpls l2vpn#

7 ATM QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

7-36 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 291: 00399154-Configuration Guide - QoS(V300R003_03).pdf

mpls ldp#mpls ldp remote-peer 1 remote-ip 1.1.1.9#interface Atm4/0/0 undo shutdown#interface Atm4/0/0.1 atm cell transfer pvp 2 mpls l2vc 1.1.1.9 101#interface Pos2/0/0 undo shutdown ip address 10.1.2.2 255.255.255.0 mpls mpls ldp#interface LoopBack1 ip address 3.3.3.9 255.255.255.255#ospf 1 area 0.0.0.0 network 1.1.1.9 0.0.0.0 network 10.1.2.0 0.0.0.255#return

7.8.3 Example for Configuring Simple Traffic Classification forAAL5 SDU ATM Transparent Transmission

Networking RequirementsAs shown in Figure 7-8, the ATM interface of CE1 is connected to the MPLS network throughPE1, and is connected to CE2 through PE2. A VC is established between Router A and RouterB over the MPLS network.

Simple traffic classification is required for the upstream traffic on PE1. PE1 maps the PVCservice type and the CLP of upstream traffic to its internal precedence. For downstream traffic,it maps the internal precedence to the MPLS EXP field. The precedence of ATM cells istransmitted transparently over the MPLS network.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 7 ATM QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-37

Page 292: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Figure 7-8 Networking diagram for configuring simple traffic classification for AAL5 SDUATM transparent transmission

Configuration RoadmapThe configuration roadmap is as follows:

1. Configure the IP addresses and PVC parameters for the interfaces.2. Configure IGP on the P and PE devices in the MPLS network to achieve IP connectivity.3. Configure basic MPLS functions on the P and PE devices.4. Configure MPLS LDP on the P and PE devices.5. Establish LDP sessions between the two PEs.6. Enable MPSL L2VPN on the PE devices.7. Configure AAL5 SUD ATM transparent transmission8. Configure mapping rules for ATM simple traffic classification.9. Enable simple traffic classification.

Data PreparationTo complete the configuration, you need the following data:

l Data for configuring OSPF

l Remote peer name of the PE

l VC ID

l VPI/VCI value on the CE

l Service type and CLP value

Configuration Procedure1. Configure the ATM interfaces on the CEs.

# Configure CE1.<CE1> system-view[CE1] interface atm 1/0/0[CE1-Atm1/0/0] undo shutdown

7 ATM QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

7-38 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 293: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[CE1-Atm1/0/0] quit[CE1] interface atm 1/0/0.1[CE1-Atm1/0/0.1] ip address 202.38.160.1 24[CE1-Atm1/0/0.1] pvc 1/100[CE1-atm-pvc-Atm1/0/0.1-1/100] map ip 202.38.160.2[CE1-atm-pvc-Atm1/0/0.1-1/100] return

# Configure CE2.<CE2> system-view[CE2] interface atm 2/0/0[CE2-Atm2/0/0] undo shutdown[CE2-Atm2/0/0] quit[CE2] interface atm 2/0/0.1[CE2-Atm2/0/0.1] ip address 202.38.160.2 24[CE2-Atm2/0/0.1] pvc 1/100[CE2-atm-pvc-Atm2/0/0.1-1/100] map ip 202.38.160.1[CE2-atm-pvc-Atm2/0/0.1-1/100] return

2. Configure IGP on the MPLS network (In this example, OSPF is used).See Example for Configuring Simple Traffic Classification for 1-to-1 VCC ATMTransparent Transmission step 2.

3. Configure based MPLS and LDP on the MPLS network.See Example for Configuring Simple Traffic Classification for 1-to-1 VCC ATMTransparent Transmission step 3.

4. Establish LDP sessions between the two PEs.See Example for Configuring Simple Traffic Classification for 1-to-1 VCC ATMTransparent Transmission step 4.

5. On the PE, enable MPLS L2VPN and configure transmission of AAL5 SDU frames.# Configure PE1.<PE1> system-view[PE1] mpls l2vpn[PE1-l2vpn] quit[PE1] interface atm 3/0/0 p2p[PE1-Atm3/0/0] undo shutdown[PE1-Atm3/0/0] quit[PE1] interface atm 3/0/0.1 p2p[PE1-Atm3/0/0.1] pvc 1/100[PE1-atm-pvc-Atm3/0/0.1-1/100] quit[PE1-Atm3/0/0.1] mpls l2vc 3.3.3.9 101 no-control-word[PE1-Atm3/0/0.1] return

# Configure PE2.<PE2> system-view[PE2] mpls l2vpn[PE2-l2vpn] quit[PE2] interface atm 4/0/0 p2p[PE2-Atm4/0/0] undo shutdown[PE2-Atm4/0/0] quit[PE2] interface atm 4/0/0.1 p2p[PE2-Atm4/0/0.1] pvc 1/100[PE2-atm-pvc-Atm4/0/0.1-1/100] quit[PE2-Atm4/0/0.1] mpls l2vc 1.1.1.9 101 no-control-word[PE1-Atm4/0/0.1] return

6. On PE1, set the CoS of the PVC.<PE1> system-view[PE1]atm service cbr-name cbr 100 2000[PE1] interface atm 3/0/0.1[PE1-Atm3/0/0.1] pvc 1/100[PE1-atm-pvc-Atm3/0/0.1-1/100] shutdown[PE1-atm-pvc-Atm3/0/0.1-1/100] service output cbr-name[PE1-atm-pvc-Atm3/0/0.1-1/100] undo shutdown[PE1-atm-pvc-Atm3/0/0.1-1/100] return

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 7 ATM QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-39

Page 294: 00399154-Configuration Guide - QoS(V300R003_03).pdf

NOTE

Before running the service output command on a PVC or PVP, run the shutdown command to shutdown it. Otherwise, the configuration does not take effect.

7. On PE1, configure mapping rules for ATM simple traffic classification and enable simpletraffic classification.<PE1> system-view[PE1] diffserv domain default[PE1-dsdomain-default] atm-inbound cbr 0 phb af2 green[PE1-dsdomain-default] quit[PE1] interface atm 3/0/0.1[PE1-Atm3/0/0.1] pvc 1/100[PE1-atm-pvc-Atm3/0/0.1-1/100] trust upstream default[PE1-atm-pvc-Atm3/0/0.1-1/100] quit[PE1-Atm3/0/0.1] quit[PE1] interface pos 2/0/0[PE1-pos 2/0/0] undo shutdown[PE1-pos 2/0/0] trust upstream default[PE1-pos 2/0/0] return

NOTE

On PE2, you also need to configure ATM simple traffic classification for the reverse traffic. Theconfiguration is similar to that on PE1 and is not mentioned in this example.

8. Verify the configuration.l On the PE devices, view the L2VPN connections. The output shows that an L2VC is

set up and the status is Up.Take PE1 for an example:[RouterC] display mpls l2vc Total ldp vc : 1 1 up 0 down*Client Interface : Atm3/0/0.1 Session State : up AC Status : up VC State : up VC ID : 101 VC Type : atm aal5 sdu Destination : 3. 3. 3.9 Local VC Label : 138240 Remote VC Label : 138240 Control Word : Disable Local VC MTU : 1500 Remote VC MTU : 1500 Tunnel Policy Name : -- Traffic Behavior Name: -- PW Template Name : -- Create time : 0 days, 0 hours, 5 minutes, 22 seconds UP time : 0 days, 0 hours, 5 minutes, 22 seconds Last change time : 0 days, 0 hours, 5 minutes, 22 seconds

l CEs (Router A and Router B) can ping through each other.

l Traffic mapping succeeds.

Configuration Filesl Configuration file of CE1

# sysname CE1#interface Atm1/0/0 undo shutdown#interface Atm1/0/0.1 pvc 1/100 map ip 202.38.160.2

7 ATM QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

7-40 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 295: 00399154-Configuration Guide - QoS(V300R003_03).pdf

ip address 202.38.160.1 255.255.255.0#return

l Configuration file of CE2# sysname CE2#interface Atm2/0/0 undo shutdown#interface Atm2/0/0.1 pvc 1/100 map ip 202.38.160.1 ip address 202.38.160.2 255.255.255.0#return

l Configuration file of PE1# sysname PE1#atm service cbr-name cbr 100 2000# mpls lsr-id 1.1.1.9 mpls lsp-trigger all mpls l2vpn#mpls ldp#mpls ldp remote-peer 1 remote-ip 3.3.3.9#diffserv domain default atm-inbound cbr 0 phb af2 green#interface Atm3/0/0 undo shutdown#interface Atm3/0/0.1 p2p pvc 1/100 trust upstream default service output cbr-name mpls l2vc 3.3.3.9 101 no-control-word#interface Pos2/0/0 undo shutdown link-protocol ppp ip address 10.1.1.1 255.255.255.0 mpls mpls ldp trust upstream default#interface LoopBack1 ip address 1.1.1.9 255.255.255.255ospf 1 area 0.0.0.0 network 1.1.1.9 0.0.0.0 network 10.1.1.0 0.0.0.255 network 202.38.160.0 0.0.0.255#return

l Configuration file of P# sysname P# mpls lsr-id 2.2.2.9 mpls

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 7 ATM QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-41

Page 296: 00399154-Configuration Guide - QoS(V300R003_03).pdf

lsp-trigger all#mpls ldp#interface Pos1/0/0 undo shutdown link-protocol ppp ip address 10.1.1.2 255.255.255.0 mpls mpls ldp#interface Pos2/0/0 undo shutdown link-protocol ppp ip address 10.1.2.1 255.255.255.0 mpls mpls ldp#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 10.1.1.0 0.0.0.255 network 10.1.2.0 0.0.0.255#return

l Configuration file of PE2# sysname PE2#mpls lsr-id 3.3.3.9 mpls lsp-trigger all mpls l2vpn#mpls ldp#mpls ldp remote-peer 1 remote-ip 1.1.1.9#interface Atm4/0/0 undo shutdown#interface Atm4/0/0.1 p2ppvc 1/100 mpls l2vc 1.1.1.9 101 no-control-word#interface Pos2/0/0 undo shutdownip address 10.1.2.2 255.255.255.0 mpls mpls ldp#interface LoopBack1 ip address 3.3.3.9 255.255.255.255#ospf 1 area 0.0.0.0 network 1.1.1.9 0.0.0.0 network 10.1.2.0 0.0.0.255 network 202.38.160.0 0.0.0.255#return

7 ATM QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

7-42 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 297: 00399154-Configuration Guide - QoS(V300R003_03).pdf

7.8.4 Example of Configuring for 1483R-based ATM Simple TrafficClassification

Networking Requirements

As shown in Figure 7-9, Router A, Router B, and Router C are located at the edge of the ATMnetwork to carry out the access to the IP network. The three routers connect the three PSNnetworks that are separated by the ATM network. On the ATM network, IP packets aretransmitted in AAL5 frames. When the IP packets are sent out of the ATM network, therouters perform ATM termination and forward the packets to interfaces of other types.

l The IP addresses for the ATM interfaces of the three routers are 202.38.160.1/24,202.38.160.2/24, and 202.38.160.3/24 respectively.

l In the ATM network, the VPI and VCI of Router A are 0/40 and 0/50, which are connectedto Router B and Router C respectively; the VPI and VCI of Router B are 0/40 and 0/60,which are connected to Router A and Router C respectively; the VPI and VCI of Router Care 0/50 and 0/60, which are connected to Router A and Router B.

l All the PVCs on the ATM interfaces of the three routers adopt IPoA.

l On the outbound interface of Router A, enable simple traffic classification, and map theDSCP filed of IP packets to the CLP of ATM cells.

Figure 7-9 Networking diagram of configuring 1483R-based ATM simple traffic classification

Configuration Roadmap

The configuration roadmap is as follows:

1. Assign IP addresses for interfaces.2. Configure IPoA mapping on the PVC of each interface.3. Configure mapping rules for ATM simple traffic classification.4. Enable simple traffic classification.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 7 ATM QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-43

Page 298: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Data Preparation

To complete the configuration, you need the following data:

l The IP addresses for the ATM interfaces of the three routers are 202.38.160.1/24,202.38.160.2/24, and 202.38.160.3/24 respectively

l VPI/VCI of Router A: 0/40 and 0/50 that are connected to Router B and Router Crespectively

l VPI/VCI of Router B: 0/40 and 0/60 that are connected to Router A and Router Crespectively

l VPI/VCI of Router C: 0/50 and 0/60 that are connected to Router A and Router Brespectively

l Service type and CLP value

Configuration Procedure1. Assign an IP address for the ATM interface and enable simple traffic classification on the

interface.<RouterA> system-view[RouterA] interface atm 1/0/0[RouterA-Atm1/0/0] undo shutdown[RouterA-Atm1/0/0] ip address 202.38.160.1 255.255.255.0[RouterA-Atm1/0/0] return<RouterB> system-view[RouterB] interface atm 1/0/0[RouterB-Atm1/0/0] undo shutdown[RouterB-Atm1/0/0] ip address 202.38.160.2 255.255.255.0[RouterB-Atm1/0/0] return<RouterC> system-view[RouterC] interface atm 1/0/0[RouterC-Atm1/0/0] undo shutdown[RouterC-Atm1/0/0] ip address 202.38.160.3 255.255.255.0[RouterC-Atm1/0/0] return

2. Create a PVC and set the IPoA mapping for the PVC.<RouterA> system-view[RouterA] interface atm 1/0/0[RouterA-Atm1/0/0] pvc to_b 0/40[RouterA-atm-pvc-Atm1/0/0-0/40-to_b] map ip 202.38.160.2[RouterA-atm-pvc-Atm1/0/0-0/40-to_b] quit[RouterA-Atm1/0/0] pvc to_c 0/50[RouterA-atm-pvc-Atm1/0/0-0/50-to_c] map ip 202.38.160.3[RouterA-atm-pvc-Atm1/0/0-0/50-to_c] return<RouterB> system-view[RouterB] interface atm 1/0/0[RouterB-Atm1/0/0] pvc to_a 0/40[RouterB-atm-pvc-Atm1/0/0-0/40-to_a] map ip 202.38.160.1[RouterB-atm-pvc-Atm1/0/0-0/40-to_a] quit[RouterB-Atm1/0/0] pvc to_c 0/60[RouterB-atm-pvc-Atm1/0/0-0/60-to_c] map ip 202.38.160.3[RouterB-atm-pvc-Atm1/0/0-0/60-to_c] return<RouterC> system-view[RouterC] interface atm 1/0/0[RouterC-Atm1/0/0] pvc to_a 0/50[RouterC-atm-pvc-Atm1/0/0-0/50-to_a] map ip 202.38.160.1[RouterC-atm-pvc-Atm1/0/0-0/50-to_a] quit[RouterC-Atm1/0/0] pvc to_b 0/60[RouterC-atm-pvc-Atm1/0/0-0/60-to_b] map ip 202.38.160.2[RouterC-atm-pvc-Atm1/0/0-0/60-to_b] return

3. Configure mapping rules for ATM simple traffic classification and enable simple trafficclassification

7 ATM QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

7-44 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 299: 00399154-Configuration Guide - QoS(V300R003_03).pdf

NOTE

If you do not set the mapping rule for the downstream, the router uses the rule in the default domain.If other DS domain is applied to the interface, the router uses the rule in the user-defined domain.

l For the traffic that goes into the ATM network, set ATM mapping rules for simple trafficclassification and enable simple traffic classification on the Router A, Router B, andRouter C.<RouterA> system-view[RouterA] diffserv domain default[RouterA-dsdomain-default] atm-outbound af1 green map 0[RouterA-dsdomain-default] quit[RouterA] interface atm 1/0/0[RouterA-Atm1/0/0] trust upstream default[RouterA-Atm1/0/0] return<RouterB> system-view[RouterB] diffserv domain default[RouterB-dsdomain-default] atm-outbound af1 green map 0[RouterB-dsdomain-default] quit[RouterB] interface atm 1/0/0[RouterB-Atm1/0/0] trust upstream default[RouterB-Atm1/0/0] return<RouterC> system-view[RouterC] diffserv domain default[RouterC-dsdomain-default] atm-outbound af1 green map 0[RouterC-dsdomain-default] quit[RouterC] interface atm 1/0/0[RouterC-Atm1/0/0] trust upstream default[RouterC-Atm1/0/0] return

l The IPoA service has been configured for the traffic that is sent out of the ATM network,so Router A, Router B, and Router C can automatically obtain the IP packets and forwardthem to other interfaces.

4. Check the configuration.

# View the status of the PVC on Router A.[RouterA] display atm pvc-infoVPI/VCI |STATE|PVC-NAME |INDEX |ENCAP|PROT |INTERFACE--------|-----|----------------|--------|-----|-----|--------------------- 0/40 |UP |to_b |0 |SNAP |IP |Atm1/0/0 (UP) 0/50 |UP |to_c |1 |SNAP |IP |Atm1/0/0 (UP)

# View the mapping rule for the PVC on Router A.[RouterA] display atm map-infoAtm1/0/0, PVC 0/40, IP, State UP 202.38.160.2, vlink 393217Atm1/0/0, PVC 0/50, IP, State UP 202.38.160.3, vlink 393218

Similarly, you can view the status of the PVC and the mapping rule on Router B and RouterC.

# On Router A, run the ping command to ping Router B. Router A can ping through RouterB.[RouterA] ping 202.38.160.2 PING 202.38.160.2: 56 data bytes, press CTRL_C to break Reply from 202.38.160.2: bytes=56 Sequence=1 ttl=255 time=62 ms Reply from 202.38.160.2: bytes=56 Sequence=2 ttl=255 time=31 ms Reply from 202.38.160.2: bytes=56 Sequence=3 ttl=255 time=31 ms Reply from 202.38.160.2: bytes=56 Sequence=4 ttl=255 time=31 ms Reply from 202.38.160.2: bytes=56 Sequence=5 ttl=255 time=31 ms --- 202.38.160.2 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 31/37/62 ms

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 7 ATM QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-45

Page 300: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Similarly, Router A can ping through Router C; Router B can ping through Router A andRouter C; Router C can ping through Router A and Router B.

Configuration Filesl Configuration file of Router A.

# sysname RouterA#interface Atm1/0/0 undo shutdown trust upstream defaultpvc to_b 0/40 map ip 202.38.160.2pvc to_c 0/50 map ip 202.38.160.3ip address 202.38.160.1 255.255.255.0#diffserv domain default atm-outbound af1 green map 0#return

l Configuration file of Router B.# sysname RouterB#interface Atm1/0/0 undo shutdown trust upstream default pvc to_a 0/40 map ip 202.38.160.1 pvc to_c 0/60 map ip 202.38.160.3 ip address 202.38.160.2 255.255.255.0#diffserv domain default atm-outbound af1 green map 0#return

l Configuration file of Router C.# sysname RouterC#interface Atm1/0/0 undo shutdown trust upstream default pvc to_a 0/50 map ip 202.38.160.1 pvc to_b 0/60 map ip 202.38.160.2 ip address 202.38.160.3 255.255.255.0#diffserv domain default atm-outbound af1 green map 0#return

7.8.5 Example for Configuring 1483B-Based ATM Simple TrafficClassificaiton

7 ATM QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

7-46 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 301: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Networking RequirementsAs shown in Figure 7-10, Router A and Router B are located at the edge of the ATM networkto carry out the access to the IP network. The intranets of an enterprise are in two differentlocations. The ATM interfaces of the routers are used to transparently transmit Ethernet framesfor the intranet. The enterprise has two departments, whose VLAN IDs are 10 and 20respectively. ATM bridging function is enabled on the routers so that users in the same VLANcan communicate as if they are in the same LAN. On the outbound interfaces of Router A andRouter B, enable simple traffic classification to apply IP QoS to the ATM network.

Figure 7-10 Networking diagram of configuring 1483B-based ATM simple traffic classification

Configuration RoadmapThe configuration roadmap is as follows:

1. Create the VLAN and add GE ports into the VLAN.2. Create the VE interface and add the VE interface to the VLAN.3. Create a PVC and set the IPoEoA mapping for the PVC.4. Configure mapping rules for ATM simple traffic classification.5. Enable simple traffic classification.

Data PreparationTo complete the configuration, you need the following data:

l Number of the interface that is added to the VLAN

l ID of the VLAN that is connected to the ATM network

l VPI/VCI of the PVC that is used to transparently transmit layer 2 packets

l Service type and CLP value

Configuration ProcedureConfigurations of Router A and Router B are the same as follows:

1. On Router A and Router B, create VLANs and add the GE interfaces to the VLAN.<Quidway> system view[Quidway] vlan 10[Quidway-vlan10] quit[Quidway] vlan 20

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 7 ATM QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-47

Page 302: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[Quidway-vlan20] quit[Quidway] interface gigabitethernet3/0/1[Quidway-GigabitEthernet3/0/1] undo shutdown[Quidway-GigabitEthernet3/0/1] portswitch[Quidway-GigabitEthernet3/0/1] port default vlan 10[Quidway-GigabitEthernet3/0/1] quit[Quidway] interface gigabitethernet3/0/2[Quidway-GigabitEthernet3/0/2] undo shutdown[Quidway-GigabitEthernet3/0/2] portswitch[Quidway-GigabitEthernet3/0/2] port default vlan 20[Quidway-GigabitEthernet3/0/2] quit[Quidway] quit

2. On Router A and Router B, create VE interfaces and add the VE interfaces to VLAN.<Quidway> system view[Quidway] interface virtual-ethernet1/0/0[Quidway-Virtual-Ethernet1/0/0] portswitch[Quidway-Virtual-Ethernet1/0/0] port default vlan 10[Quidway-Virtual-Ethernet1/0/0] quit[Quidway] interface virtual-ethernet1/0/1[Quidway-Virtual-Ethernet1/0/1] portswitch[Quidway-Virtual-Ethernet1/0/1] port default vlan 20[Quidway-Virtual-Ethernet1/0/1] quit[Quidway] quit

3. On Router A and Router B, create PVCs and set IPoEoA mapping for the PVC.<Quidway> system view[Quidway] interface atm1/0/0[Quidway-Atm1/0/0] undo shutdown[Quidway-Atm1/0/0] pvc 100/1[Quidway-atm-pvc-Atm1/0/0-100/1-1] encapsulation aal5snap[Quidway-atm-pvc-Atm1/0/0-100/1-1] map bridge virtual-ethernet1/0/0[Quidway-atm-pvc-Atm1/0/0-100/1-1] quit[Quidway-Atm1/0/0] pvc 100/2[Quidway-atm-pvc-Atm1/0/0-100/2-2] encapsulation aal5snap[Quidway-atm-pvc-Atm1/0/0-100/2-2] map bridge virtual-ethernet1/0/1[Quidway-atm-pvc-Atm1/0/0-100/2-2] quit[Quidway] quit

4. Configure mapping rules for ATM simple traffic classification and enable simple trafficclassification

NOTE

If you do not set the mapping rule for the downstream, the router uses the rule in the default domain.If other DS domain is applied to the interface, the router uses the rule in the user-defined domain.

l For the traffic that goes into the ATM network, set ATM mapping rules for simple trafficclassification and enable simple traffic classification on the Router A and Router B.<Quidway> system-view[Quidway] diffserv domain default[Quidway-dsdomain-default] atm-outbound af1 green map 0[Quidway-dsdomain-default] quit[Quidway] interface atm1/0/0[Quidway-Atm1/0/0] pvc 100/1[Quidway-atm-pvc-Atm1/0/0-100/1-1] trust upstream default[Quidway-Atm1/0/0] pvc 100/2[Quidway-atm-pvc-Atm1/0/0-100/2-2] trust upstream default[Quidway-atm-pvc-Atm1/0/0-100/2-2] return

l The IPoEoA service has been configured for the traffic that is sent out of the ATMnetwork, so Router A and Router B can automatically obtain the IP packets and forwardthem to Ethernet interfaces.

5. Verify the configuration.# View the status of the PVC on Router A and Router B.[Quidway] display atm pvc-infoVPI/VCI |STATE|PVC-NAME |INDEX |ENCAP|PROT |INTERFACE

7 ATM QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

7-48 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 303: 00399154-Configuration Guide - QoS(V300R003_03).pdf

--------|-----|-------------|--------|-----|-----|-----------------------100/1 |UP | |0 |SNAP |GE |Atm3/0/1 (UP) 100/2 |UP | |1 |SNAP |GE |Atm3/0/2 (UP) The PCs connected to Router A and that connected to Router B can ping through each other.

Configuration Filesl Configuration file of Router A.

# sysname RouterA#vlan batch 10 20#interface Atm1/0/0 undo shutdownpvc 100/1 map bridge Virtual-Ethernet1/0/0 trust upstream defaultpvc 100/2 map bridge Virtual-Ethernet1/0/1 trust upstream default#interface Gigabitethernet3/0/1 undo shutdown portswitch port default vlan 10#interface Gigabitethernet3/0/2 undo shutdown portswitch port default vlan 20#interface Virtual-Ethernet1/0/0 portswitch port default vlan 10#interface Virtual-Ethernet1/0/1 portswitch port default vlan 20#diffserv domain default atm-outbound af1 green map 0#return

l Configuration file of Router B.# sysname RouterB#vlan batch 10 20#interface Atm1/0/0 undo shutdownpvc 100/1 map bridge Virtual-Ethernet1/0/0 trust upstream defaultpvc 100/2 map bridge Virtual-Ethernet1/0/1 trust upstream default#interface Gigabitethernet3/0/1 undo shutdown portswitch port default vlan 10#interface Gigabitethernet3/0/2 undo shutdown portswitch

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 7 ATM QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-49

Page 304: 00399154-Configuration Guide - QoS(V300R003_03).pdf

port default vlan 20#interface Virtual-Ethernet1/0/0 portswitch port default vlan 10#interface Virtual-Ethernet1/0/1 portswitch port default vlan 20#diffserv domain default atm-outbound af1 green map 0#return

7.8.6 Example for Configuring Forced ATM Traffic Classification

Networking RequirementsAs shown in Figure 7-11, when PE1 receives the ATM cells from CE1, it transmits transparentlythe ATM cells over PW to PE2. PE2 then transmits the ATM cells on the ATM link.

Configure L2VPN between PE1 and PE2; set forced traffic classification for the traffic flowingfrom CE1 to CE2.

Figure 7-11 Networking diagram for forced ATM traffic classification

Configuration RoadmapThe configuration roadmap is as follows:

1. Configure the IP addresses and PVC parameters for the interfaces.2. Configure IGP on the P and PE devices in the MPLS network to achieve IP connectivity.3. Configure basic MPLS functions on the P and PE devices.4. Configure MPLS LDP on the P and PE devices.5. Establish LDP sessions between the two PEs.6. Enable MPSL L2VPN on the PE devices.7. Configure transparent transmission of ATM cells on the PE devices.

7 ATM QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

7-50 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 305: 00399154-Configuration Guide - QoS(V300R003_03).pdf

8. Configure forced ATM traffic classification on the upstream interface ATM 3/0/0 of PE1.

Data PreparationTo complete the configuration, you need the following data:

l Data for configuring OSPF

l Remote peer name of the PE

l VC ID

l VPI/VCI value on the CE

l CoS and color of IP packets on the PVC for forced traffic classification.

Configuration Procedure1. Configure the ATM interfaces of the CEs.

# Configure CE1.<CE1> system-view[CE1] interface atm 1/0/0[CE1-Atm1/0/0] undo shutdown[CE1-Atm1/0/0] quit[CE1] interface atm 1/0/0.1[CE1-Atm1/0/0.1] ip address 202.38.160.1 24[CE1-Atm1/0/0.1] pvc 1/100[CE1-atm-pvc-Atm1/0/0.1-1/100] map ip 202.38.160.2[CE1-atm-pvc-Atm1/0/0.1-1/100] return# Configure CE2.<CE2> system-view[CE2] interface atm 2/0/0[CE2-Atm2/0/0] undo shutdown[CE2-Atm2/0/0] quit[CE2] interface atm 2/0/0.1[CE2-Atm2/0/0.1] ip address 202.38.160.2 24[CE2-Atm2/0/0.1] pvc 1/100[CE2-atm-pvc-Atm2/0/0.1-1/100] map ip 202.38.160.1[CE2-atm-pvc-Atm2/0/0.1-1/100] return

2. Configure IGP on the MPLS network (In this example, OSPF is used).See Example for Configuring Simple Traffic Classification for 1-to-1 VCC ATMTransparent Transmission step 2.

3. Configure based MPLS and LDP on the MPLS network.See Example for Configuring Simple Traffic Classification for 1-to-1 VCC ATMTransparent Transmission step 3.

4. Establish LDP sessions between the two PE devices.See Example for Configuring Simple Traffic Classification for 1-to-1 VCC ATMTransparent Transmission step 4.

5. Enable MPLS L2VPN on PEs, and then configure ATM cell relay in 1-to-1 VCC mode.See Example for Configuring Simple Traffic Classification for 1-to-1 VCC ATMTransparent Transmission step 5.

6. Configure forced ATM traffic classification on PE1.<PE1> system-view[PE1] interface atm 3/0/0[PE1-Atm3/0/0] undo shutdown[PE1-Atm3/0/0] quit[PE1] interface atm 3/0/0.1

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 7 ATM QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-51

Page 306: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[PE1-Atm3/0/0.1] traffic queue af4 green[PE1-Atm3/0/0.1] quit[PE1] interface pos 2/0/0[PE1-pos2/0/0] undo shutdown[PE1-pos2/0/0] trust upstream default[PE1-pos2/0/0] return

NOTE

On PE2, you also need to configure ATM simple traffic classification for the reverse traffic. Theconfiguration is similar to that on PE1 and is not mentioned in this example.

7. Verify the configurationOn the PE devices, view the L2VPN connections. The output shows that an L2VC is setup and the status is Up.<PE1> display mpls l2vc Total ldp vc : 1 1 up 0 down *Client Interface : POS2/0/0 Session State : up AC Status : up VC State : up VC ID : 1 VC Type : ip-interworking Destination : 3.3.3.9 Local VC Label : 138240 Remote VC Label : 138240 Control Word : Disable Local VC MTU : 1500 Remote VC MTU : 1500 Tunnel Policy Name : -- Traffic Behavior Name: -- PW Template Name : -- Create time : 0 days, 0 hours, 0 minutes, 29 seconds UP time : 0 days, 0 hours, 0 minutes, 26 seconds Last change time : 0 days, 0 hours, 0 minutes, 26 seconds The output shows that the Session State, AC Status, and VC State are Up. This implies thatthe L2VPN has been configured successfully.From the CE, run the ping command to ping the other CE. The two CEs should be able toping through each other.

Configuration Filesl Configuration file of CE1

# sysname CE1#interface Atm1/0/0 undo shutdown#interface Atm1/0/0.1 pvc 1/100 map ip 202.38.160.2 ip address 202.38.160.1 255.255.255.0#return

l Configuration file of CE2# sysname CE2#interface Atm2/0/0 undo shutdown#interface Atm2/0/0.1 pvc 1/100

7 ATM QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

7-52 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 307: 00399154-Configuration Guide - QoS(V300R003_03).pdf

map ip 202.38.160.1 ip address 202.38.160.2 255.255.255.0#return

l Configuration file of PE1# sysname PE1#mpls lsr-id 1.1.1.9 mpls lsp-trigger all mpls l2vpn#mpls ldp#mpls ldp remote-peer 1 remote-ip 3.3.3.9#interface Atm3/0/0 undo shutdown#interface Atm3/0/0.1 p2p traffic queue af4 green atm cell transfer pvc 1/100 mpls l2vc 3.3.3.9 101 no-control-word#interface Pos2/0/0 undo shutdown ip address 10.1.1.1 255.255.255.0 trust upstream default mpls mpls ldp#interface LoopBack1 ip address 1.1.1.9 255.255.255.255#ospf 1 area 0.0.0.0 network 1.1.1.9 0.0.0.0 network 10.1.1.0 0.0.0.255 network 202.38.160.0 0.0.0.255#return

l Configuration file of P# sysname P# mpls lsr-id 2.2.2.9 mpls lsp-trigger all#mpls ldp#interface Pos1/0/0 undo shutdown link-protocol ppp ip address 10.1.1.2 255.255.255.0 mpls mpls ldp#interface Pos2/0/0 undo shutdown link-protocol ppp ip address 10.1.2.1 255.255.255.0 mpls mpls ldp#

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 7 ATM QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-53

Page 308: 00399154-Configuration Guide - QoS(V300R003_03).pdf

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 10.1.1.0 0.0.0.255 network 10.1.2.0 0.0.0.255#return

l Configuration file of PE2# sysname PE2#mpls lsr-id 3.3.3.9 mpls lsp-trigger all mpls l2vpn#mpls ldp#mpls ldp remote-peer 1 remote-ip 1.1.1.9#interface Atm1/0/0 undo shutdown#interface Atm4/0/0.1 p2p traffic queue af4 green atm cell transfer pvc 1/100 mpls l2vc 1.1.1.9 101 no-control-word#interface Pos2/0/0 undo shutdown ip address 10.1.2.2 255.255.255.0 mpls mpls ldp#interface LoopBack1 ip address 3.3.3.9 255.255.255.255ospf 1 area 0.0.0.0 network 1.1.1.9 0.0.0.0 network 10.1.2.0 0.0.0.255 network 202.38.160.0 0.0.0.255#return

7.8.7 Example for Configuring the ATM Complex TrafficClassification

Networking RequirementsAs shown in Figure 7-12, Router A, Router B, and Router C are at the edge of the ATM network.They control the access to IP networks, enabling communications between the three separatedpacket switched networks (PSNs). IP packets are encapsulated into AAL5 frames when they aretransmitted over the ATM network. The service is therefore called the IPoA service. When thepackets leave the ATM network, the AAL5 frame headers are removed on the router before thepackets are forwarded to other types of interfaces.

7 ATM QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

7-54 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 309: 00399154-Configuration Guide - QoS(V300R003_03).pdf

l The IP addresses of the ATM interfaces of the three routers are 202.38.160.1/24,202.38.160.2/24, and 202.38.160.3/24.

l On the ATM network, the VPIs/VCIs of Router A are 0/40 and 0/50, which connect RouterB and Router C respectively; the VPIs/VCIs of Router B are 0/40 and 0/60, which connectRouter A and Router C respectively; the VPIs/VCIs of Router C are 0/50 and 0/60respectively, which connect Router A and Router B respectively.

l All PVCs on the ATM interfaces of the three routers are in IPoA mode.

The specific requirements are as follows:

The downstream ATM 1/0/0 on Router A is applied with the complex traffic classification. AllATM cells carrying the IP packets with the IP precedence of 5, 6, and 7 can pass; the ATM cellscarrying the IP packets with the IP precedence of 4 are guaranteed with a bandwidth of 2 Mbit/s.

Figure 7-12 Networking diagram for configuring the ATM complex traffic classification

Configuration Roadmap

The configuration roadmap is as follows:

1. Configure the IP addresses of the interfaces.2. Configure traffic classifiers.3. Configure traffic behaviors.4. Configure traffic policies.5. Apply traffic policies to the ATM interfaces.

Data Preparation

To complete the configuration, you need the following data:

l The IP addresses of the ATM interfaces of the three routers: 202.38.160.1/24,202.38.160.2/24, and 202.38.160.3/24.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 7 ATM QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-55

Page 310: 00399154-Configuration Guide - QoS(V300R003_03).pdf

l The VPIs/VCIs of Router A: 0/40 and 0/50, which connect Router B and Router Crespectively

l The VPIs/VCIs of Router B: 0/40 and 0/60, which connect Router A and Router Crespectively

l The VPIs/VCIs of Router C: 0/50 and 0/60, which connect Router A and Router Brespectively

l Parameters for the ATM complex traffic classification: names of traffic classifiers, IPprecedence, names of traffic behaviors, guaranteed bandwidths, the name of a traffic policy,and interfaces where the policy are applied

Configuration Procedure1. Enter the system view and configure IP addresses for the ATM interfaces of the routers.

<RouterA> system-view[RouterA] interface atm 1/0/0[RouterA-Atm1/0/0] undo shutdown[RouterA-Atm1/0/0] ip address 202.38.160.1 255.255.255.0[RouterA-Atm1/0/0] return<RouterB> system-view[RouterB] interface atm 1/0/0[RouterB-Atm1/0/0] undo shutdown[RouterB-Atm1/0/0] ip address 202.38.160.2 255.255.255.0[RouterB-Atm1/0/0] return<RouterC> system-view[RouterC] interface atm 1/0/0[RouterC-Atm1/0/0] undo shutdown[RouterC-Atm1/0/0] ip address 202.38.160.3 255.255.255.0[RouterC-Atm1/0/0] return

2. Create PVCs and configure IPoA mappings for the PVCs.<RouterA> system-view[RouterA] interface atm 1/0/0[RouterA-Atm1/0/0] pvc to_b 0/40[RouterA-atm-pvc-Atm1/0/0-0/40-to_b] map ip 202.38.160.2[RouterA-atm-pvc-Atm1/0/0-0/40-to_b] quit[RouterA-Atm1/0/0] pvc to_c 0/50[RouterA-atm-pvc-Atm1/0/0-0/50-to_c] map ip 202.38.160.3[RouterA-atm-pvc-Atm1/0/0-0/50-to_c] return<RouterB> system-view[RouterB] interface atm 1/0/0[RouterB-Atm1/0/0] pvc to_a 0/40[RouterB-atm-pvc-Atm1/0/0-0/40-to_a] map ip 202.38.160.1[RouterB-atm-pvc-Atm1/0/0-0/40-to_a] quit[RouterB-Atm1/0/0] pvc to_c 0/60[RouterB-atm-pvc-Atm1/0/0-0/60-to_c] map ip 202.38.160.3[RouterB-atm-pvc-Atm1/0/0-0/60-to_c] return<RouterC> system-view[RouterC] interface atm 1/0/0[RouterC-Atm1/0/0] pvc to_a 0/50[RouterC-atm-pvc-Atm1/0/0-0/50-to_a] map ip 202.38.160.1[RouterC-atm-pvc-Atm1/0/0-0/50-to_a] quit[RouterC-Atm1/0/0] pvc to_b 0/60[RouterC-atm-pvc-Atm1/0/0-0/60-to_b] map ip 202.38.160.2[RouterC-atm-pvc-Atm1/0/0-0/60-to_b] return

3. Configure the ATM complex traffic classification.# Create traffic classifiers and define matching rules.[RouterA] traffic classifier a[RouterA-classifier-a] if-match ip-precedence 7[RouterA-classifier-a] if-match ip-precedence 6[RouterA-classifier-a] if-match ip-precedence 5[RouterA-classifier-a] quit[RouterA] traffic classifier b

7 ATM QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

7-56 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 311: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[RouterA-classifier-b] if-match ip-precedence 4[RouterA-classifier-b] quitAfter the preceding configuration, you can run the display command to view theconfiguration of the traffic classifiers.[RouterA] display traffic classifier user-definedUser Defined Classifier Information: Classifier: b Operator: ORRule(s): if-match ip-precedence 4 Classifier: a Operator: ORRule(s) : if-match ip-precedence 7 if-match ip-precedence 6 if-match ip-precedence 5 # Define traffic behaviors.[RouterA] traffic behavior a[RouterA-behavior-a] permit[RouterA-behavior-a] quit[RouterA] traffic behavior b[RouterA-behavior-b] car cir 2000[RouterA-behavior-b] quitAfter the preceding configuration, you can run the display command to view theconfiguration of the traffic classifiers.[PE1] display traffic behavior user-definedUser Defined Behavior Information: Behavior: b Committed Access Rate: CIR 2000 (Kbps), PIR 0 (Kbps), CBS 10000 (byte), PBS 0 (byte) Conform Action: pass Yellow Action: pass Exceed Action: discard Behavior: a Firewall: permit # Define a traffic policy and associate the traffic classifiers with the traffic behaviors.[RouterA] traffic policy p[RouterA-trafficpolicy-a] classifier a behavior a[RouterA-trafficpolicy-a] classifier b behavior b[RouterA-trafficpolicy-a] quit# Apply the traffic policy to the outbound interface.[RouterA] interface atm 1/0/0[RouterA-Atm1/0/0] undo shutdown[RouterA-Atm1/0/0] traffic-policy p outbound[RouterA-Atm1/0/0] quit

4. Verify the configuration.Run the display traffic policy command. You can view the configuration of the trafficpolicies, traffic classifiers defined in the traffic policies, and the traffic behaviors associatedwith traffic classifiers.[RouterA] display traffic policy user-definedUser Defined Traffic Policy Information: Policy: p Classifier: default-class Behavior: be -none- Classifier: a Behavior: a Firewall: permit Classifier: b Behavior: b Committed Access Rate:

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 7 ATM QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-57

Page 312: 00399154-Configuration Guide - QoS(V300R003_03).pdf

CIR 2000 (Kbps), PIR 0 (Kbps), CBS 10000 (byte), PBS 0 (byte) Conform Action: pass Yellow Action: pass Exceed Action: discard

Run the display interface command on Router A. You can view that the traffic on theinterfaces are controlled according to the specified requirements.

Configuration Filesl Configuration file of Router A

# sysname RouterA#traffic classifier a if-match ip-precedence 7if-match ip-precedence 6if-match ip-precedence 5traffic classifier b if-match ip-precedence 4#traffic behavior a permittraffic behavior bcar cir 2000 cbs 10000 pbs 0 green pass red discard #traffic policy p classifier a behavior a classifier b behavior b#interface Atm1/0/0 undo shutdownpvc to_b 0/40 map ip 202.38.160.2pvc to_c 0/50 map ip 202.38.160.3ip address 202.38.160.1 255.255.255.0traffic-policy p outbound#return

l Configuration file of Router B# sysname RouterB#interface Atm1/0/0 undo shutdownpvc to_a 0/40 map ip 202.38.160.1pvc to_c 0/60 map ip 202.38.160.3ip address 202.38.160.2 255.255.255.0#return

l Configuration file of Router C# sysname RouterC#interface Atm1/0/0 undo shutdownpvc to_a 0/50 map ip 202.38.160.1pvc to_b 0/60 map ip 202.38.160.2ip address 202.38.160.3 255.255.255.0#return

7 ATM QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

7-58 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 313: 00399154-Configuration Guide - QoS(V300R003_03).pdf

7.8.8 Example for Configuring Queue Scheduling for an ATM PVC

Networking Requirements

As shown in Figure 7-13, GE 1/0/1 of Router A connects GE 1/0/0 of Router B. Server, PC1,and PC2 can access the Internet through Router A and Router B. Server, PC1, and GE1/0/0 ofRouter A are in the same network segment. PC2 and GE 2/0/0 of Router A are in the samenetwork segment.

To avoid congestion when a lot of traffic enters the ATM network, you are required to configurethe traffic shaping and queue scheduling on ATM 2/0/1 of Router B.

Figure 7-13 Networking diagram for configuring queue scheduling of ATM PVCs

Configuration Roadmap

The configuration roadmap is as follows:

1. Set the IP address of each interface and the route.

2. Configure IPoA on Router B.

3. Configure the traffic shaping for the ATM PVC on ATM 2/0/1 of Router B.

4. Configure the queue scheduling for the ATM PVC on ATM 2/0/1 of Router B.

Data Preparation

To complete the configuration, you need the following data:

l PVC name and VPI or VCI number

l Traffic shaping rate

l Queue name, queue scheduling type, and WFQ weight

Configuration Procedure1. Configure the IP address and route to ensure normal operation of the network (omitted).

2. Create a PVC and configure IPoA mapping of the PVC (omitted).

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 7 ATM QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-59

Page 314: 00399154-Configuration Guide - QoS(V300R003_03).pdf

For details of the configurations, refer to "ATM Configuration" in the QuidwayNetEngine80E/40E Router Configuration Guide – WAN Access.

3. Configure the simple traffic classification on GE 1/0/0 of Router B.<RouterB> system-view[RouterB] interface gigabitethernet 1/0/0[RouterB-GigabitEthernet1/0/0] ip address 20.1.1.1 255.0.0.0[RouterB-GigabitEthernet1/0/0] trust upstream default[RouterB-GigabitEthernet1/0/0] return

4. Configure the traffic shaping and queue scheduling for the ATM PVC on Router B.<RouterB> system-view[RouterB] atm service cbr-name cbr 100 2000[RouterB] interface atm 2/0/1[RouterB-Atm2/0/1] pvc 0/40[RouterB-atm-pvc-Atm2/0/1-0/40] shutdown[RouterB-atm-pvc-Atm2/0/1-0/40] service output cbr-name[RouterB-atm-pvc-Atm2/0/1-0/40] pvc-queue ef pq outbound[RouterB-atm-pvc-Atm2/0/1-0/40] pvc-queue af4 wfq 50 outbound[RouterB-atm-pvc-Atm2/0/1-0/40] undo shutdown[RouterB-atm-pvc-Atm2/0/1-0/40] return

5. Verify the configuration.Run the display atm pvc-queue command on Router B and view the queue schedulinginformation on PVC 0/40 on ATM 4/0/1. For example:<RouterB> display atm pvc-queue interface atm 4/0/1 pvc 0/40Show CBQ PVC configeration of interface Atm4/0/1 PVC 0/40: be distribute OutBound wfq Weight 20 af1 distribute OutBound wfq Weight 20 af2 distribute OutBound wfq Weight 20 af3 distribute OutBound wfq Weight 20 af4 distribute OutBound wfq Weight 50 ef distribute OutBound pq cs6 distribute OutBound wfq Weight 20 cs7 distribute OutBound wfq Weight 20

Configuration Filesl Configuration file of Router A

# sysname RouterA#interface gigabitEthernet1/0/0 undo shutdownip address 1.1.1.10 255.0.0.0#interface gigabitEthernet1/0/1 undo shutdownip address 20.1.1.2 255.0.0.0#interface gigabitEthernet2/0/0 undo shutdownip address 10.1.1.1 255.0.0.0#ospf 1 area 0.0.0.0 network 1.0.0.0 0.255.255.255 network 10.0.0.0 0.255.255.255network 20.0.0.0 0.255.255.255# return

l Configuration file of Router B# sysname RouterB#

7 ATM QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

7-60 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 315: 00399154-Configuration Guide - QoS(V300R003_03).pdf

atm service cbr-name cbr 100 2000#interface GigabitEthernet1/0/0 undo shutdownip address 20.1.1.1 255.0.0.0trust upstream default#interface Atm2/0/1 undo shutdownip address 30.1.1.1 255.0.0.0 pvc 0/40 map ip 202.38.160.2service output cbr-namepvc-queue ef pq outboundpvc-queue af4 wfq 50 outbound#ospf 1 area 0.0.0.0 network 20.0.0.0 0.255.255.255network 30.0.0.0 0.255.255.255#return

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 7 ATM QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-61

Page 316: 00399154-Configuration Guide - QoS(V300R003_03).pdf
Page 317: 00399154-Configuration Guide - QoS(V300R003_03).pdf

8 Frame Relay QoS Configuration

About This Chapter

This chapter describes the various QoS mechanism in FR network. It also describes the FR QoSconfiguration steps, along with typical examples.

8.1 OverviewThis section describes the basic concepts of frame relay QoS.

8.2 Configuring Frame Relay Traffic ShapingThis section describes how to limit the rate of packets sent on the virtual circuit to avoid packetloss.

8.3 Configuring Frame Relay Traffic PolicingThis section describes how to limit the traffic entering a frame relay network to avoid networkcongestion.

8.4 Configuring Universal Frame Relay QueuesThis section describes how to set the cached packets to enter corresponding queues such as first-in-first-out (FIFO) queuing, custom queuing (CQ), priority queuing (PQ), weighted fair queuing(WFQ), class-based queuing (CBQ), and real time transport protocol queuing (RTPQ) and sendthe packets according to the scheduling mechanism.

8.5 Configuring PVC PQ of Frame RelayThis section describes how to set the precedence of Permanent Virtual Circuit Priority Queuing(PVC PQ). Packets entering specified virtual circuits then are placed in the corresponding PVCPQ.

8.6 Configuring Frame Relay Congestion AvoidanceThis section describes how to configure frame relay class and WRED on frame interface to carryout congestion avoidance.

8.7 Configuring Frame Relay FragmentationThis section describes how to divide a large frame relay packet into several smaller ones toensure that data can be transmitted with low delay on low-speed lines.

8.8 Debugging Frame Relay QoSThis section describes how to debug FR QoS.

8.9 Configuration Examples

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 8 Frame Relay QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

8-1

Page 318: 00399154-Configuration Guide - QoS(V300R003_03).pdf

This section provides configuration examples of frame relay traffic shaping and frame relayfragmentation.

8 Frame Relay QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

8-2 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 319: 00399154-Configuration Guide - QoS(V300R003_03).pdf

8.1 OverviewThis section describes the basic concepts of frame relay QoS.

8.1.1 Introduction to Frame Relay QoS

8.1.2 Frame Relay QoS Supported by the NE80E/40E

8.1.1 Introduction to Frame Relay QoS

QoS provides network services of different grades on demand. It can be used on a frame relayinterface. In addition, frame relay also has its own QoS mechanisms, and can configure QoS atthe PVC level to offer users, flexible quality services.

Frame relay class defines traffic parameters. To validate the configured frame relay classparameters, associate frame relay class with an interface or a virtual circuit, and enable framerelay QoS on the related interface.

After the frame relay class is associated with the interface, all virtual circuits on the interfaceinherit QoS parameters of the frame relay class.

When a virtual circuit provides QoS, it searches the corresponding frame relay class in thefollowing order:

l If there is a frame relay class related to the virtual circuit, the virtual circuit uses theconfigured QoS parameters of such class.

l If there is a frame relay class related to the interface where the virtual circuit resides, thevirtual circuit uses the configured QoS parameters of such class.

l If there is no frame relay class related to the interface where the virtual circuit resides, thevirtual circuit uses the default QoS parameters.

8.1.2 Frame Relay QoS Supported by the NE80E/40E

The NE80E/40E supports the implementation of QoS on the frame relay links, including framerelay traffic shaping (FRTS), frame relay traffic policing (FRTP), frame relay congestionmanagement, frame relay queue management, and frame relay fragmentation.

8.2 Configuring Frame Relay Traffic ShapingThis section describes how to limit the rate of packets sent on the virtual circuit to avoid packetloss.

8.2.1 Establishing the Configuration Task

8.2.2 Configuring FRTS Parameters

8.2.3 Applying FRTS Parameters to the Interface

8.2.4 Enabling FRTS

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 8 Frame Relay QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

8-3

Page 320: 00399154-Configuration Guide - QoS(V300R003_03).pdf

8.2.1 Establishing the Configuration Task

Applicable EnvironmentIf the rates of the link at two ends of a router are unmatched, packets transmitted in the networkmay be discarded when they are sent from a high-speed interface to a low-speed interface. Toavoid this, you need to configure FRTS to limit the rate of packets sent from the virtual circuit.

Pre-configuration TasksBefore configuring FRTS, complete the following tasks:

l Configuring the frame relay interface or the multi-link frame relay bundle interface

l Configuring the related parameters of frame relay interface or multi-link frame relay bundleinterface

Data PreparationTo configure FRTS, you need the following data.

No Data

1 Name of frame relay class

2 Committed information rate (CIR), MinCIR, committed burst size (CBS) and excessburst size (EBS)

3 Number of frame relay interface, MFR number, or Data-Link Connection Identifier(DLCI)

4 Ratio that adjusts rate according to the receiving status of Backward ExplicitCongestion Notification (BECN) packets

5 Length threshold of interface queue that triggers rate adjustment

8.2.2 Configuring FRTS Parameters

ContextSelf-adaptive traffic adjustment function of FRTS decides the sending rate to be reduced usingthe following two methods:

l BECN: After the sending interface of a router receives packets with a BECN value of 1 bitfrom the frame relay network, all PVCs that have been configured with FRTS reduce thesending rate by the specified percentage. The bigger value between the reduced rate andMinCIR serves as the new sending rate. After the sending rate is reduced, if the routerreceives no packet with BECN field as 1 within the period of time of 16 (Tc), the sendingrate increases by the specified percentage. The smaller value between the increased rateand the CIR serves as the new sending rate.

l Interface congestion: When the number of packets in the queue of the sending interfacereaches the set value, all PVCs that have been configured with FRTS reduce their sending

8 Frame Relay QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

8-4 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 321: 00399154-Configuration Guide - QoS(V300R003_03).pdf

rates. When the number of packets in the queue is less than the set value, the sending rateis raised again.

Do as follows on the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:fr class class-name

An FR class is created and the FR class view is displayed.

Step 3 Perform the following as required to set the committed information rate.l Run

cir allow outbound rate-limit

CIR is set.l Run:

cir rate-limit

The minimum CIR is set.l Run:

cbs outbound cbs

CBS is set.l Run:

pbs outbound pbs

PBS is set.l Run:

traffic-shaping adaptation { becn percentage | interface-congestion number }

Self-adaptive traffic adjustment of FRTS is enabled.The MinCIR cannot be larger than the CIR.

----End

8.2.3 Applying FRTS Parameters to the Interface

Context

Do as follows on the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 8 Frame Relay QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

8-5

Page 322: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Step 2 Perform the following as required.l Run:

interface interface-type interface-numberThe FR interface view is displayed.

l Run:interface mfr interface-numberThe MFR view is displayed.

l To apply traffic shaping parameters to the specified DLCI, run:fr dlci dlciThe DLCI view is displayed.

Step 3 Run:fr-class class-name

The FR class is associated with the interface.

FRTS is applied to the sending interface of frame relay packets on a router. In general, it isapplied to the Data Terminal Equipments (DTE) end of the frame relay network.

----End

8.2.4 Enabling FRTS

ContextRun the following commands on the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Perform the following as required.l Run:

interface interface-type interface-numberThe FR interface view is displayed.

l Run:interface mfr interface-numberThe MFR view is displayed.

Step 3 Run:fr traffic-shaping

FRTS is enabled.

You can enable traffic shaping. You cannot enable RTP queue attributes if you run the qosrtpq command after the fr traffic-shaping command. To enable RTP priority queue, you needto run the rtpq command in the frame relay class view and apply it to the virtual circuit.

----End

8 Frame Relay QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

8-6 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 323: 00399154-Configuration Guide - QoS(V300R003_03).pdf

8.3 Configuring Frame Relay Traffic PolicingThis section describes how to limit the traffic entering a frame relay network to avoid networkcongestion.

8.3.1 Establishing the Configuration Task

8.3.2 Configuring FRTP Parameters

8.3.3 Applying FRTP Parameters to the Interface

8.3.4 Enabling FRTP

8.3.1 Establishing the Configuration Task

Applicable EnvironmentThe rate of traffic that enters a frame relay network needs to be limited to avoid networkcongestion. Through the FRTP configuration, you can limit the network traffic within a certainscope.

FRTP can be applied only to the inbound interfaces of routers. In addition, it can be applied toonly the Data Circuit-terminal Equipment (DCE) end of a frame relay network.

NOTE

For configurations about DTE and DCE, refer to the Quidway NetEngine80E/40E Router ConfigurationGuide – WAN Access.

Pre-configuration TasksBefore configuring FRTP, complete the following tasks:

l Configuring the frame relay interface or multi-link frame relay bundle interface

l Configuring related parameters of the frame relay interface or multi-link frame relay bundleinterface

Data PreparationTo configure FRTP, you need the following data.

No Data

1 Name of the frame relay class

2 CIR, CBS and EBS

3 Number of frame relay interface or MFR number

8.3.2 Configuring FRTP Parameters

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 8 Frame Relay QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

8-7

Page 324: 00399154-Configuration Guide - QoS(V300R003_03).pdf

ContextDo as follows on the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:fr class class-name

An FR class is created and the FR class view is displayed.

Step 3 Perform the following as required to set the information rate.l Run

cir allow outbound rate-limitCIR is set.

l Run:cbs outbound cbsCBS is set.

l Run:pbs outbound pbsPBS is set.

----End

8.3.3 Applying FRTP Parameters to the Interface

ContextDo as follows on the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Perform the following as required.l Run:

interface interface-type interface-numberThe FR interface view is displayed.

l Run:interface mfr interface-numberThe MFR view is displayed.

Step 3 Run:

8 Frame Relay QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

8-8 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 325: 00399154-Configuration Guide - QoS(V300R003_03).pdf

fr-class class-name

The FR class is associated with the interface.

----End

8.3.4 Enabling FRTP

Context

Do as follows on the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Perform the following as required.

l Run:interface interface-type interface-number

The FR interface view is displayed.

l Run:interface mfr interface-number

The MFR view is displayed.

Step 3 Run:fr traffic-policing

FRTP is enabled.

----End

8.4 Configuring Universal Frame Relay QueuesThis section describes how to set the cached packets to enter corresponding queues such as first-in-first-out (FIFO) queuing, custom queuing (CQ), priority queuing (PQ), weighted fair queuing(WFQ), class-based queuing (CBQ), and real time transport protocol queuing (RTPQ) and sendthe packets according to the scheduling mechanism.

8.4.1 Establishing the Configuration Task

8.4.2 Configuring Universal Frame Relay Queues

8.4.3 Applying Universal Queues to an Frame Relay Interface

8.4.4 Applying Universal Queues to Frame Relay Virtual Circuits

8.4.1 Establishing the Configuration Task

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 8 Frame Relay QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

8-9

Page 326: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Applicable EnvironmentFor congestion management, the packets that exceed bandwidth need to be stored for a while,and sent after the network becomes idle.

To configure universal frame relay queues, the cached packets can be set to enter correspondingqueues such as first-in-first-out (FIFO) queuing, custom queuing (CQ), priority queuing (PQ),weighted fair queuing (WFQ), and real time transport protocol queuing (RTPQ) and sentaccording to the scheduling mechanism.

Pre-configuration TasksBefore configuring universal queues of frame relay, complete the following tasks:

l Configuring the frame relay interface or multi-link frame relay bundle interface

l Configuring related parameters of the frame relay interface or multi-link frame relay bundleinterface

l Configuring frame relay virtual circuits and related parameters

Data PreparationTo configure the universal queues of frame relay, you need the following data.

No Data

1 FIFO queue length, CQ queue number, PQ queue number, WFQ queue total, andmaximum length of queues, upper limit and lower limit of UDP port, and RTPbandwidth

2 Name of the frame relay class

3 Interface type and number

4 DLCI number

8.4.2 Configuring Universal Frame Relay Queues

ContextThe frame relay interface supports universal queues such as FIFO, PQ, CQ, WFQ, and RTPQ.

The rtpq command is used to set a strict priority queue. That is, only the UDP packet whosedestination port number is an even and is between start-port and end-port enter the RTP priorityqueue.

Do as follows on teh router:

Procedure

Step 1 Run:system-view

8 Frame Relay QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

8-10 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 327: 00399154-Configuration Guide - QoS(V300R003_03).pdf

The system view is displayed.

Step 2 Run:fr class class-name

An FR class is created and the FR class view is displayed.

Step 3 Perform the following as required to configure different FR queues.l Run:

fifo queue-length queue-sizeThe length FR FIFO queue is set.

l Run:pq pql list-numberFR PQ is set.

l Run:cq cql list-numberFR CQ is set.

l Run:wfq [ congestive-discard-threshold [ dynamic-queues ] ]FR WFQ is set.

l Run:rtpq start-port min-rtp-port-number end-port max-rtp-port-number bandwidth bandwidth [ cbs cbs ]RTPQ is applied.

----End

8.4.3 Applying Universal Queues to an Frame Relay Interface

ContextDo as follows on the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Perform the following as required.l Run:

interface interface-type interface-numberThe FR interface view is displayed.

l Run:interface mfr interface-numberThe MFR view is displayed.

Step 3 Run:fr-class class-name

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 8 Frame Relay QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

8-11

Page 328: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Universal frame relay queues are applied.

----End

Postrequisite

When an FR interface is enabled with FRTS or congestion management, the interface supportsonly FIFO, PVC PQ, or RTPQ.

8.4.4 Applying Universal Queues to Frame Relay Virtual Circuits

Context

Do as follows on the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Perform the following as required.l Run:

interface interface-type interface-number

The FR interface view is displayed.l Run:

interface mfr interface-number

The MFR view is displayed.

Step 3 Run:fr traffic-shaping

FRTS is enabled.

When an FR interface is enabled with FRTS, each virtual circuit on his interface has anindependent virtual circuit queue. The queue type of the virtual circuit can be FIFO, PQ, CQ,WFQ, or RTPQ.

When the FR virtual circuit enables congestion management, the queue type of virtual circuitcan be only FIFO.

Step 4 Run:fr dlci dlci

The DLCI view is displayed.

Step 5 Run:fr-class class-name

The universal queues of FR are applied.

----End

8 Frame Relay QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

8-12 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 329: 00399154-Configuration Guide - QoS(V300R003_03).pdf

8.5 Configuring PVC PQ of Frame RelayThis section describes how to set the precedence of Permanent Virtual Circuit Priority Queuing(PVC PQ). Packets entering specified virtual circuits then are placed in the corresponding PVCPQ.

8.5.1 Establishing the Configuration Task

8.5.2 Configuring PVC PQ on an FR Interface

8.5.3 Configuring the FR PVC PQ Precedence

8.5.1 Establishing the Configuration Task

Applicable Environment

Permanent Virtual Circuit Priority Queuing (PVC PQ) is a unique queue on the frame relayinterface. When the key data with priority is to be forwarded on the virtual circuit of the framerelay, you need to configure the frame relay virtual circuit.

Pre-configuration Tasks

Before configuring queue management of frame relay, complete the following tasks:

l Configuring the frame relay interface or multi-link frame relay bundle interface

l Configuring related parameters of the frame relay interface or multi-link frame relay bundleinterface

l Configuring frame relay virtual circuits and related parameters

Data Preparation

To configure PVC PQ of frame relay, you need the following data.

No Data

1 Name of frame relay class

2 The length of queues with top, middle, normal and bottom priorities

3 Interface type and number

4 DLCI number

8.5.2 Configuring PVC PQ on an FR Interface

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 8 Frame Relay QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

8-13

Page 330: 00399154-Configuration Guide - QoS(V300R003_03).pdf

ContextPVC PQ contians four sub-queues, that is, top, middle, normal, and bottom queues. The topvalue has the highest priority and the bottom queue has the lowest priority. PVC PQ classifiespackets into four groups to enter the above four sub-queues.

The router sends packets in order according to the priorites of queues. That is, first send packetsin top queue, then middle queue, normal queue, and bottom queue.

Run the fr traffic-shaping command prior to running the fr pvc-pq command.

Do as follows on the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Perform the following as required.l Run:

interface interface-type interface-numberThe FR interface view is displayed.

l Run:interface mfr interface-numberThe MFR view is displayed.

Step 3 Run:fr pvc-pq [ top-limit middle-limit normal-limit bottom-limit ]

The queue type of the FR interface is set to PVC PQ.

----End

8.5.3 Configuring the FR PVC PQ Precedence

ContextDo as follows on the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:fr class class-name

An FR class is created and the FR class view is displayed.

Step 3 Run:pvc-pq { top | middle | normal | bottom }

8 Frame Relay QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

8-14 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 331: 00399154-Configuration Guide - QoS(V300R003_03).pdf

PVC PQ is specified.

Step 4 Run:quit

Return to the system view.

Step 5 Perform the following as required.l Run:

interface interface-type interface-number

The FR interface view is displayed.l Run:

interface mfr interface-number

The MFR view is displayed.

Step 6 Run:fr dlci dlci

The DLCI view is displayed.

Step 7 Run:fr-class class-name

The FR class is associated with a virtual circuit.

Each FR virtual circuit on the interface has its own PVC PQ preference. Packets sent from thisvirtual circuit can only enter the corresponding PVC PQ.

----End

8.6 Configuring Frame Relay Congestion AvoidanceThis section describes how to configure frame relay class and WRED on frame interface to carryout congestion avoidance.

8.6.1 Establishing the Configuration Task

8.6.2 Creating a Frame Relay Class

8.6.3 Configuring WRED Parameters

8.6.4 Applying WRED Parameters on the Frame Relay Interface

8.6.5 Checking the Configuration

8.6.1 Establishing the Configuration Task

Applicable EnvironmentTraditional frame relay congestion avoidance is carried out by using the tail drop policy, whichleads to inevitable global TCP synchronization. In addition, the device cannot perform selectivepacket dropping according to the status of queues. To avoid global TCP synchronization, youcan configure Weighted Random Early Detection (WRED) to carry out congestion avoidance.When configuring WRED, you can set the threshold values for each queue.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 8 Frame Relay QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

8-15

Page 332: 00399154-Configuration Guide - QoS(V300R003_03).pdf

l When the length of a queue is less than the low limit, no packet is dropped.

l When the length of a queue exceeds the high limit, all the incoming packets are dropped.

l When the length of a queue is between the low and high limits, the incoming packets aredropped randomly. The longer the queue is, the higher the dropping probability is.

WRED enables the system to drop packets selectively before congestion occurs and thus improveQoS performance of interface.

In frame relay, you can set WRED parameters on multiple interfaces or frame relay links tooptimize the link efficiently.

Pre-configuration Tasks

Before configuring congestion avoidance in frame relay fragmentation, complete Configuringbasic frame relay functions

Data Preparation

To configure congestion avoidance in frame relay, you need the following data.

No. Data

1 Name of frame relay

2 Value of WRED parameters

3 High and low threshold WRED values for each local queue

4 The drop percentage of each queue

8.6.2 Creating a Frame Relay Class

Context

Do as follows on the router.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:fr class class-name

An frame relay (FR) class is created and the FR class view is displayed.

Step 3 Run:wred enable

8 Frame Relay QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

8-16 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 333: 00399154-Configuration Guide - QoS(V300R003_03).pdf

The WRED function is enabled.

----End

8.6.3 Configuring WRED Parameters

Procedurel Configuring WRED Parameters

Do as follows on the router.

1. Run:system-view

The system view is displayed.2. Run:

fr class class-name

View of the specified FR class is displayed.3. Run:

wred weighting-constant length-factor

The value of the mean weighted factor for queues is set.

NOTE

l The current queue length has an impact on the average queue length. The impact variesinversely with the weighting factor.

l When the value of the weighting factor is 1, the average queue length equals the currentqueue length.

l Configuring WRED Parameters for the FIFO Queue

Do as follows on the router.

1. Run:system-view

The system view is displayed.2. Run:

fr class class-name

View of the specified FR class is displayed.3. Run:

wred fifo low-limit mini-number high-limit max-number discard-probability denominator

The higher limit, lower limit and denominator used for calculating the drop percentageare set for the FIFO queue.

l Configuring WRED Parameters for the PQ Queue

Do as follows on the router.

1. Run:system-view

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 8 Frame Relay QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

8-17

Page 334: 00399154-Configuration Guide - QoS(V300R003_03).pdf

The system view is displayed.2. Run:

fr class class-name

View of the specified FR class is displayed.3. Run:

wred pq queue { bottom | middle | normal | top } low-limit mini-number high-limit max-number discard-probability denominator

The higher limit, lower limit and denominator used for calculating the drop percentageare set for the PQ queue.

l Configuring WRED Parameters for the CQ Queue

Do as follows on the router.

1. Run:system-view

The system view is displayed.2. Run:

fr class class-name

View of the specified FR class is displayed.3. Run:

wred cq queue queue-number low-limit mini-number high-limit max-number discard-probability denominator

The higher limit, lower limit and denominator used for calculating the drop percentageare set for the CQ queue.

l Configuring WRED Parameters for the WFQ Queue

Do as follows on the router.

1. Run:system-view

The system view is displayed.2. Run:

fr class class-name

The specified FR class view is displayed.3. Run:

wred cq queue queue-number low-limit mini-number high-limit max-number discard-probability denominator

The higher limit, lower limit and denominator used for calculating the drop percentageare set for the WFO queue.

----End

8.6.4 Applying WRED Parameters on the Frame Relay Interface

ContextDo as follows on the router.

8 Frame Relay QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

8-18 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 335: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:interface interface-type interface-number [.subnumber ]

View of the specified frame relay interface is displayed.

Step 3 Run:fr-class fr-class-name

The WRED parameters configured under the FR class view are applied to the interface.

----End

8.6.5 Checking the Configuration

Action Command

Check the status of the framerelay interface.

display fr interface [ interface-type interface-number ]

8.7 Configuring Frame Relay FragmentationThis section describes how to divide a large frame relay packet into several smaller ones toensure that data can be transmitted with low delay on low-speed lines.

8.7.1 Establishing the Configuration Task

8.7.2 Configuring Frame Relay Fragmentation

8.7.3 Applying FR Fragmentation to a Virtual Circuit

8.7.4 Checking the Configuration

8.7.1 Establishing the Configuration Task

Applicable EnvironmentOn low-speed frame relay links, large packets may increase the transmission delay. Accordingly,some packets with high demand on real time cannot be sent in time. With the frame relayfragmentation feature, a large frame relay packet is divided into several smaller packets, ensuringthe transmission with low delay on low-speed links.

Pre-configuration TasksBefore configuring frame relay fragmentation, complete the following tasks:

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 8 Frame Relay QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

8-19

Page 336: 00399154-Configuration Guide - QoS(V300R003_03).pdf

l Configuring the frame relay interface or multi-link frame relay bundle interface

l Configuring related parameters of the frame relay interface or multi-link frame relay bundleinterface

l Configuring the frame relay virtual circuit and related parameters

Data PreparationTo configure the frame relay fragmentation, you need the following data.

No Data

1 Length of fragment

2 Name of the frame relay class

3 Interface type and number

4 DLCI number

8.7.2 Configuring Frame Relay Fragmentation

ContextDo as follows on the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:fr class class-name

An FR class is created and the FR class view is displayed.

Step 3 Run:fragment [ fragment-size ]

FR fragmentation is enabled.

----End

8.7.3 Applying FR Fragmentation to a Virtual Circuit

ContextTo validate frame relay fragmentation, you need to enable FRTS.

Do as follows on the router:

8 Frame Relay QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

8-20 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 337: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Perform the following as required.

l Run:interface interface-type interface-number

The FR interface view is displayed.

l Run:interface mfr interface-number

The MFR view is displayed.

Step 3 Run:fr dlci dlci

The DLCI view is displayed.

Step 4 Run:fr-class class-name

The FR class is applied.

----End

8.7.4 Checking the Configuration

Run the following command to check the previous configuration.

Action Command

View the frame relay fragmentationon an interface.

display fr fragment-info [ interface interface-typeinterface-number ] [ dlci-number ]

Run the display fr fragment-info command. If information about frame relay fragments isdisplayed, it means that the configuration succeeds. For example:

<Quidway> display fr fragment-infointerface Serial Serial4/0/0dlci type size in/out/drop16 FRF12(ETE) 80 0/0/0

8.8 Debugging Frame Relay QoSThis section describes how to debug FR QoS.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 8 Frame Relay QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

8-21

Page 338: 00399154-Configuration Guide - QoS(V300R003_03).pdf

CAUTIONDebugging affects the performance of the system. So, after debugging, run the undodebugging all command to disable it immediately.

Run the debug commands in the user view to debug FR QoS and locate the fault.

For the procedure of displaying the debugging information, refer to NE80E/40E RouterCommand Reference.

Action Command

Enable congestion managementdebugging.

debugging fr congestion [ interface interface-typeinterface-number ]

Enable rate adjustment debugging. debugging fr transmit-rate [ interface interface-type interface-number ]

8.9 Configuration ExamplesThis section provides configuration examples of frame relay traffic shaping and frame relayfragmentation.

8.9.1 Example for Configuring Frame Relay Traffic Shaping

8.9.2 Example for Configuring Frame Relay Fragmentation

8.9.1 Example for Configuring Frame Relay Traffic Shaping

Networking RequirementsRouter A is connected to a frame relay network through the interface Serial 4/0/0. The requiredaverage rate of the router to send packets is 96 kbit/s, the maximum rate is 128 kbit/s and theminimum rate is 32 kbit/s. The router has self-adaptive traffic adjustment function. For packetswith BECN flag, the adjustment ratio every time is 20. PQ is required to ensure all IP packetsfrom the network segment 10.0.0.0 could pass first.

Figure 8-1 Networking diagram of FRTS

10.0.0.0/8 Frame RelayNetwork

Ethernet1/0/0RouterA

DTE

Serial4/0/0

Configuring RoadmapThe configuration roadmap is as follows:

8 Frame Relay QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

8-22 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 339: 00399154-Configuration Guide - QoS(V300R003_03).pdf

1. Configure basic FR functions.2. Define a preferential queue group 1 to allow packets from specified network segment pass

first.3. Create an FR class and configure TS parameters for FR.4. Configure Serial 4/0/0 and enable FRTS.5. Create an FR virtual link and associate it with the FR class.

Data PreparationTo complete the configuration, you need the following data:

l ACL number

l CIR, minimum CIR, CBS, and PBS

Configuration ProcedureDo as follows on Router A:

1. Configure basic FR functions.See the chapter "Frame Relay Configurtation" in the Quidway NetEngine80E/40E RouterConfiguration Guide - WAN Access.

2. Define a preferential queue group 1 to allow all IP packets from the network segment10.0.0.0 pass first.<RouterA> system-view[RouterA] acl number 2001[RouterA-acl-basic-2001] rule permit source 10.0.0.0 0[RouterA-acl-basic-2001] quit[RouterA] qos pql 1 protocol ip acl 2001 queue top

3. Create an FR class and configure FRTS parameters.[RouterA] fr class 96k[RouterA-fr-class-96k] cir allow outbound 96000[RouterA-fr-class-96k] cir 32000[RouterA-fr-class-96k] cbs outbound 96000[RouterA-fr-class-96k] pbs outbound 32000[RouterA-fr-class-96k] traffic-shaping adaptation becn 20[RouterA-fr-class-96k] pq pql 1[RouterA-fr-class-96k] quit

4. Configure Serial 4/0/0 and enable FRTS on it.[RouterA] interface pos 4/0/0[RouterA-Pos4/0/0] link-protocol fr[RouterA-Pos4/0/0] ip address 1.1.1.1 255.255.255.0[RouterA-Pos4/0/0] fr traffic-shaping

5. Create an FR virtual circuit and associate it with the FR class[RouterA-Pos4/0/0] fr dlci 16[RouterA-fr-dlci-Pos4/0/0-16] fr-class 96k

6. Verify the configuration.After the preceding configurations, you can find that the packets from 10.0.0.0 are sentpreferentially when passing Router A and packet rates are controlled to be 96 kbit/s.

Configuration FilesThe configuration file of Router A is as follows:

#

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 8 Frame Relay QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

8-23

Page 340: 00399154-Configuration Guide - QoS(V300R003_03).pdf

sysname RouterA# qos pql 1 protocol ip acl 2001 queue top#acl number 2001 rule 5 permit source 10.0.0.0 0#interface Serial4/0/0 link-protocol fr fr traffic-shaping fr dlci 16 fr-class 96K ip address 1.1.1.1 255.255.255.0#fr class 96K cir allow outbound 96000 cbs outbound 96000 pbs outbound 32000 cir 32000 traffic-shaping adaptation becn 20 pq pql 1#return

8.9.2 Example for Configuring Frame Relay Fragmentation

Networking RequirementsAs shown in Figure 8-2, Router A, and Router B are connected through the frame relay network.The required average rate of the routers to send packets is 96 kbit/s, the maximum rate is 128kbit/s and the minimum rate is 32 kbit/s. FR fragmentation is enabled with the size of the fragmentis 80 bytes.

Figure 8-2 Networking diagram of FR fragmentation

Serial4/0/010.1.1.1/8

Serial5/0/020.1.1.1/8

RouterA RouterB

FrameRelay

Network

Configuration RoadmapThe configuration road map is as follows:

1. Create frame relay classes, configure traffic shaping parameters, and enable the frame relayfragmentation function.

2. Configure the link encapsulation type of the interface to frame relay and enable FRTS onthe interface.

3. Create frame relay virtual circuits and associate frame relay classes with the virtual circuits.

Data PreparationTo complete the configuration, you need the following data:

l CIR, minimum CIR, CBS, and PBS

8 Frame Relay QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

8-24 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 341: 00399154-Configuration Guide - QoS(V300R003_03).pdf

l Sizes of frame relay fragments

Configuration Procedure1. Create frame relay classes, configure traffic shaping parameters, and enable the frame relay

fragmentation function.# Create frame relay classes on Router A.<RouterA> system-view[RouterA] fr class test1[RouterA-fr-class-test1] cir allow outbound 64000[RouterA-fr-class-test1] cir 32000[RouterA-fr-class-test1] cbs outbound 64000[RouterA-fr-class-test1] pbs outbound 64000[RouterA-fr-class-test1] fragment 80# Create frame relay classes on Router B. This configuration is similar to that on RouterA, so it is not mentioned here.

2. Configure the link encapsulation type of the interface to frame relay and enable FRTS onthe interface.# Configure Serial 4/0/0 on Router A.[RouterA] interface Serial 4/0/0[RouterA-Serial4/0/0] link-protocol fr[RouterA-Serial4/0/0] ip address 10.1.1.1 255.0.0.0[RouterA-Serial4/0/0] fr traffic-shaping# Configure Serial 5/0/0 on Router B.[RouterB] interface Serial 5/0/0[RouterB-Serial5/0/0] link-protocol fr[RouterB-Serial5/0/0] ip address 20.1.1.1 255.0.0.0[RouterB-Serial5/0/0] fr traffic-shaping

3. Create frame relay virtual circuits and associate frame relay classes with the virtual circuits.# Create DLCI 16 on Router A and apply the frame relay class with the name test1 to DLCI16.[RouterA-Serial4/0/0] fr dlci 16[RouterA-fr-dlci-Serial4/0/0-16] fr-class test1# The configuration on Router B is similar to that on Router A, so it is not mentioned here.

4. Verify the configuration.# Take Router A as an example. Running the display fr fragment-info command on RouterA, you can view that the size of the fragment is 80.<RouterA> display fr fragment-infointerface Serial Serial4/0/0dlci type size in/out/drop16 FRF12(ETE) 80 0/0/0

Configuration Filesl Configuration file of Router A

# sysname RouterA#interface Serial4/0/0 link-protocol frfr traffic-shaping fr dlci 16 fr-class test1 ip address 10.1.1.2 255.0.0.0#fr class test1

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 8 Frame Relay QoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

8-25

Page 342: 00399154-Configuration Guide - QoS(V300R003_03).pdf

cir allow outbound 64000 cbs outbound 64000 pbs 64000 fragment 80 cir 32000#return

l Configuration file of Router B# sysname RouterB#interface Serial5/0/0 link-protocol frfr traffic-shaping fr dlci 16 fr-class test1 ip address 10.1.1.1 255.0.0.0#fr class test1 cir allow outbound 64000 cbs outbound 64000 pbs 64000fragment 80 cir 32000#return

8 Frame Relay QoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

8-26 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 343: 00399154-Configuration Guide - QoS(V300R003_03).pdf

9 HQoS Configuration

About This Chapter

This chapter describes the basic concept, configuration procedure and examples of HQoS.

9.1 OverviewThis section covers basic concepts of HQoS.

9.2 Configuring HQoS on an Ethernet InterfaceThis section describes the configuration of HQoS on an Ethernet interface.

9.3 Configuring HQoS on a QinQ Termination Sub-interfaceThis section describes the HQoS configuration on the QinQ interface.

9.4 Configuring HQoS on a CPOS or E3/T3 InterfaceThis section describes the configuration of HQoS on an E3 or T3 interface.

9.5 Configuring HQoS Based on the PBB-TE TunnelsThis section describes the procedure of configuring HQoS on a PBB-TE tunnel.

9.6 Configuring Class-based HQoSThis section describes the procedure of configuring Class-based HQoS.

9.7 Configuring Template-based HQoSThis section describes how to configure template-based HQoS.

9.8 Maintaining HQoSThis section introduces how to clearing queue statistics.

9.9 Configuration ExamplesThis section presents the examples for configuring HQoS on the Ethernet interface, QinQinterface, CPOS interface, E3 or T3 interface, and PBB-TE tunnel.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-1

Page 344: 00399154-Configuration Guide - QoS(V300R003_03).pdf

9.1 OverviewThis section covers basic concepts of HQoS.

9.1.1 Introduction to HQoS

9.1.2 Related Concepts

9.1.3 HQoS Supported by the NE80E/40E

9.1.1 Introduction to HQoS

Traditional QoS performs traffic scheduling on the basis of the interface. A single interface candistinguish service priorities but cannot identify users or services among users. Packets of thesame priority go to the same interface queue; they compete for the same queue resource. As aresult, the traditional QoS is unable to identify a type of packets from a specific user on aninterface and to provide differentiated services for this type of packets. Figure 9-1 shows thequeue scheduling principle of traditional QoS.

Figure 9-1 Principle of traditional QoS queue scheduling

For example, two users want to send AF4 packets at the same time: user 1 sends packets at 10Mbit/s and user 2 sends packets at 1 Gbit/s. The traffic rate of AF4, however, is limited to 10Mbit/s.

Traditional QoS does not identify user features. Because user 2 sends AF4 packets at a higherrate, these packets are most likely to enter the queue whereas packets from user 1 are most likelyto be discarded.

This mechanism results in the fact that user 1's traffic is susceptible to other users' traffic. Thisis unfavorable for a telecommunication carrier to develop services specific to certain enterprisesor subscribers. The reason is that a carrier is unable to ensure the quality of service for traffic ofall users; as a result, the carrier is unable to attract more users to buy its products and services.

Nowadays, network users and services are expanding continuously. Users and service providersboth expect user-specific and segmented services so that users can obtain better quality of serviceand service providers can draw more profits. HQoS can provide better user-specific quality ofservice for advanced users and save cost in network operation and maintenance. Therefore,HQoS is highly demanded by the market.

9.1.2 Related Concepts

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-2 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 345: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Flow QueueHQoS enables a router to perform user-specific queue scheduling. You can restrict the bandwidthof a user by setting the CIR and PIR. A user's service can be divided into eight FQs. You canconfigure the PQ, WFQ or LPQ scheduling and WRED for each flow queue and configure thetraffic rate for traffic shaping.

Subscriber QueueA subscriber queue (SQ) is a virtual queue. A virtual queue means that there is no buffer for thequeue; data of the queue enters or leaves the queue without any delay. The queue is only a levelin hierarchical scheduling for output packets.

Each SQ maps eight types of FQ priority and can be configured with one to eight FQs. Idlequeues cannot be used by other SQs, that is, one to eight FQs share the total SQ bandwidth. EachSQ maps one user, either a VLAN user or a VPN user. Each user can use one to eight FQs. Youcan define the CIR and PIR for the SQ.

Group QueueOne group queue (GQ) consists of multiple SQs that are bound together to carry out Level-3queue scheduling.

GQ functions to limit the traffic rate of a group of users together. It is recommended that thePIR is no less than the sum of CIRs of the SQ. Otherwise, the traffic rate of an SQ in the GQcannot be guaranteed.

GQ is also a virtual queue. Each SQ can be bound to only one GQ. If it is not bound to any GQ,the router skips Level-3 queue scheduling.

GQ can perform traffic shaping. You can set the traffic shaping rate for a GQ.

Class QueueIn HQoS scheduling, packets of the FQ, after CQ scheduling, enter the CQ on the port togetherwith common packets. When packets of an FQ enter a CQ, the router supports two prioritymapping models:

l UniformThe eight levels of FQs of each SQ map the eight CQs on a port. The mapping is pre-determined by the system.

l PipeThe mapping between the eight levels of FQs of the SQ and the eight CQs on the port canbe configured manually. The pipe model does not impact the priority of packets.

9.1.3 HQoS Supported by the NE80E/40E

HQoS Implementation on an Ethernet InterfaceA router performs five-level HQoS scheduling on an Ethernet interface for upstream traffic anddownstream traffic each on Ethernet interfaces and as a result provides rich QoS services forusers. Figure 9-2 shows the principle of HQoS scheduling on an Ethernet interface.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-3

Page 346: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Figure 9-2 Principle of HQoS scheduling on an Ethernet interface

l Upstream HQoSUpstream HQoS queues fall into five levels: Flow Queue (FQ) — Subscriber Queue (SQ)— Group Queue (GQ) — Target Blade (TB) — Class Queue (CQ), as shown in Figure9-3.

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-4 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 347: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Figure 9-3 Upstream HQoS scheduling on an Ethernet interface

1. Level-1 queue scheduling: FQAn FQ is a physical queue, which is identified by the priority of a user service andused to store the data of each flow temporarily. A delay occurs when the data entersor leaves the queue. You can set the scheduling weight, shaping value, and flow-wredobject for each FQ. The mapping between the two levels of physical queues, namelyFQ and CQ can be implemented according to the customized flow mapping template.

2. Level-2 queue scheduling: SQThe SQ is a virtual queue. A virtual queue means that there is no buffer for the queueand data of the queue enters or leaves the queue without any delay. The queue servesonly as a level in the hierarchical scheduling for output scheduling. You can set thescheduling weight, CIR, and PIR for each SQ; you can also set quoted flow queue,flow mapping, customer group queue objects.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-5

Page 348: 00399154-Configuration Guide - QoS(V300R003_03).pdf

One SQ maps eight types of FQs. You can set to use some of them according to theactual conditions. But no more than eight types can be set. Idle FQs cannot be usedby other SQs, that is, one to eight FQs share the total SQ bandwidth. In application,each SQ maps one user, either a VLAN user or a VPN user. Each user can use one toeight service priority FQs. An SQ can quote only one GQ or nothing.

3. Level-3 queue scheduling: GQ

GQ is also a virtual queue. One group queue (GQ) consists of multiple SQs that arebound together to carry out queue scheduling of the third level. You can set the shapingvalue for each GQ. GQ performs virtual scheduling and can only limit the traffic rate.Each SQ can be bound to only one GQ. If it is not bound to any GQ, the router doesnot perform third-level queue scheduling. One GQ can schedule multiple SQs.

4. Level-4 queue scheduling: TB

TB performs queue scheduling among boards. A TB has four buffer queues, whichmap four service CQs respectively. This scheduling works inside the system andcannot be configured by users.

5. Level-5 queue scheduling: CQ

CQ is a physical queue. Each physical interface for upstream HQoS maps four CQs,which identify users' upstream service flows. You can set the scheduling weight,shaping value, and port-wred object for each CQ. After CQ scheduling, users' data isforwarded at a high rate through the switching fabric card (SFC). Upstream HQoSscheduling of CQs cannot be configured by users; it works inside the system.

l Processing of Upstream HQoS on Ethernet Interfaces

1. The router performs simple traffic classification of packets and marks a packet withone of the eight service priorities.

2. The classified packets are identified as SQ or GQ on the interface. Then they enterthe eight FQs of SQ according to the service priority.

– To shape the FQ, a user can set the FQ congestion avoidance parameters and queuescheduling policy; a user can also set the mapping of an SQ service to a CQ.

NOTE

You can set PQ, WFQ, and LPQ scheduling mode for FQ.

The three queue scheduling modes are in the following sequence of priority (from high tolow):

PQ > WFQ > LPQ

A queue of high priority can preempt the bandwidth of a queue of low priority.

– Users can set an SQ bandwidth, a GQ name, and the FQ quotation relations. EachSQ can be bound to only one GQ. If it is not bound to any GQ, the router does notperform third-level queue scheduling.

– Users can set a bandwidth for a GQ.

3. In queue scheduling, the scheduler first checks whether the GQ has sufficientbandwidth.

– If the GQ has sufficient bandwidth resources, the router forwards the SQ packetsin the GQ at the configured bandwidth.

– If the GQ does not have sufficient bandwidth resources, the packets in the GQ arein the waiting state and not forwarded.

4. The system checks whether the SQs in the GQ have sufficient bandwidth resources.

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-6 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 349: 00399154-Configuration Guide - QoS(V300R003_03).pdf

– If the SQs have sufficient bandwidth resources, the router forwards the FQ packetsin the SQ at the configured bandwidth.

– If the SQs do not have sufficient bandwidth resources, the packets in the SQ arein the waiting state and not forwarded.

5. The packets in the FQ are given TB scheduling; these packets then enter the CQaccording to the bound mapping relationship between the FQ and the CQ.

6. The packets are then forwarded through the SFC after CQ scheduling.l Downstream HQoS

The downstream HQoS scheduling falls into five levels: Flow Queue — Subscriber Queue(virtual queue) — Group Queue (virtual queue) — Class Queue — target port, as shownin Figure 9-4.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-7

Page 350: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Figure 9-4 Downstream HQoS scheduling on an Ethernet interface

The three levels of queue scheduling, namely, Level-1 queue scheduling (FQ), Level-2queue scheduling (SQ), and Level-3 queue scheduling (GQ) are the same as those of theupstream HQoS scheduling.Level-4 queue scheduling: CQ. CQ is a physical queue. Each physical interface fordownstream HQoS maps eight CQs, which identify users' downstream service flows

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-8 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 351: 00399154-Configuration Guide - QoS(V300R003_03).pdf

according to service priorities. You can set the scheduling weight, shaping value, and port-wred object for each CQ. Users' data is mapped to the CQ for scheduling according to theconfigured mapping between the FQ and the CQ.Level-5 queue scheduling: TP. TP schedules data among the interfaces. TP has bufferqueues, which maps eight CQ service queues. Being given TP scheduling, users' data isforwarded through the corresponding interface. This scheduling works inside the systemand is not configured by users.The processing of downstream HQoS is similar to that of upstream HQoS and is notdescribed here. The only difference is that users can set the congestion avoidanceparameters and queue scheduling policy to shape the CQ.The requirement of HQoS deployment can be on the user side or the network side. To meetthe requirement, the product can perform upstream and downstream HQoS. You canconfigure the parameters in different positions according to users' requirements and chooseto implement HQoS independently or jointly.You can configure HQoS for five-level scheduling on the Ethernet, GE, Eth-Trunk, Virtual-Ethernet, or POS (encapsulated with an FR link protocol) interface, or the correspondingsub-interfaces.

HQoS Implementation on a CPOS or E3/T3 Interface

Figure 9-5 shows the Level-2 queue scheduling for HQoS on the CPOS, E3, or T3 interface.

Figure 9-5 HQoS on a CPOS or E3/T3 interface

On E3 and T3 interface, HQoS adopts two levels of scheduling, as shown in Figure 9-5.

l The first level of scheduling supports bandwidth allocation to each user. It controls thebandwidth of each user and guarantees bandwidth of each user upon traffic congestion.

l The second level of scheduling supports three modes: PQ, CBPQ and CBFQ for eight kindsof services (BE, AF1, AF4, EF, CS6 and CS7).

Processing of HQoS on a CPOS, E3, or T3 interface

1. The router performs simple or complex traffic classification and marks the packets withone of the eight service priorities.

2. After traffic classification, packets go into corresponding channel for traffic policing.Here, the channel is like a user. For example, each serial interface corresponds to one userand a channel corresponds to one user. Level-1 scheduling is now complete.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-9

Page 352: 00399154-Configuration Guide - QoS(V300R003_03).pdf

3. Each channel can be configured with eight CARs, mapping a classified flow respectively.CAR works in token bucket mode. Each CAR is allocated with a certain bandwidth, whichis called the size of a token bucket. The total bandwidth of the eight CARs is the same asthe channel bandwidth. For example, if the channel bandwidth of Seria1 1/2/0/0:1 is 10Mbit/s, the total bandwidth of the eight CARs for the serial interface is also 10 Mbit/s. Youcan set the CAR bandwidth of CS7 to AF1, and the remaining bandwidth is the CARbandwidth for BE. The scheduling before CAR configuration is in three modes: PQ, CBPQ,and CBFQ. Level-2 scheduling is now complete.

4. After being processed in the CAR bucket, the packets enter the channel.Each channel has one primary queue and one secondary queue. The total size of the twoqueues is the size of the channel. For example, the bandwidth of Serial 1/2/0/0:1 is 10 Mbit/s, and thus the total size of the two queues is 10 Mbit/s. This guarantees the bandwidth ofdifferent users and ensures queue scheduling of services of each user according to thepriority.Usually, only the primary queue is used. The secondary queue is used only when the totalsize of the CAR bucket changes. This case may occur on the MP interface because thestatus change of members (Up or Down) of the MP interface can impact the total MPbandwidth. In this case, the size of the CAR bucket and the queue size need to be changed.When the queue size is changed, there should be no packets in the queue. Before the queuesize is changed, traffic is switched from the primary queue to the secondary queue. Afterthe queue size is changed, traffic is then switched back to the primary queue. Fair schedulingis adopted between the two queues of a channel. No congestion occurs during the schedulingbecause the total bandwidth of the two queues is equal to or less than the bandwidth of thephysical interface.

5. Packets go into the physical interface and are sent out.

Class-based HQoSClass-based Hierarchical Quality of Service (HQoS), which integrates the complex trafficclassification (CTC) and HQoS, is an extension of interface-based HQoS.

Interface-based HQoS takes the traffic on an interface or a sub-interface as only one user's. Inactual networking, carriers hope to use an interface or a sub-interface to provide hierarchicaltraffic scheduling for multiple users. Interface-based HQoS, however, is incapable of furtherclassifying users based on the traffic on one interface.

Integrating the classification function of the CTC and the queue scheduling function of HQoS,class-based HQoS enables segmented classification and hierarchical scheduling of classifiedtraffic.

The device carries out class-based HQoS as follows:

l Classifies traffic that needs HQoS scheduling through the CTC.

l Configures HQoS parameters by taking all the packets that match a classifying rule as oneuser. The system then distributes resources according to the configured HQoS parametersfor HQoS scheduling.

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-10 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 353: 00399154-Configuration Guide - QoS(V300R003_03).pdf

NOTE

l To configure interface-based HQoS, you need to directly configure Subscriber Queues (SQs) on aninterface; you also need to specify the parameter inbound or outbound to configure upstream HQoSscheduling or downstream HQoS scheduling on the interface.

l To configure class-based HQoS, you need to configure SQs in a traffic behavior. The HQoSconfiguration takes effect after you apply the traffic policy that contains the traffic behavior to aninterface.

l Class-based HQoS is valid to upstream traffic only.

l In the two HQoS modes, the configurations of Flow Queues (FQs), Group Queues (GQs), and ClassQueues (CQs) are the same.

l The interior scheduling mechanism for class-based HQoS is exactly the same as that for interface-basedHQoS.

Class-based HQoS supports the Ethernet interface, GE interface, Eth-Trunk interface, and thelayer-2 interface and sub-interface of the preceding three types of interfaces. Class-based HQoSalso supports the POS interface, IP-Trunk interface, RINGIF interface, and tunnel interface.

9.2 Configuring HQoS on an Ethernet InterfaceThis section describes the configuration of HQoS on an Ethernet interface.

NOTE

Configuring upstream HQoS on an Ethernet interface is independent from that of downstream HQoS. Theydo not affect each other.

Currently you can configure only FQ, SQ, and GQ for upstream HQoS on an Ethernet interface. CQ,however, adopts the default setting of the system and does not need your configuration. You can configureall FQ, SQ, GQ, and CQ when for downstream HQoS on an Ethernet interface.

It is recommended that you configure upstream FQ, SQ, and GQ, and downstream CQ on the Ethernetinterface. You do not need to configure both upstream CQ and downstream CQ.

9.2.1 Establishing the Configuration Task

9.2.2 (Optional) Configuring an FQ WRED Object

9.2.3 (Optional) Configuring Scheduling Parameters of an FQ

9.2.4 (Optional) Configuring Mapping from an FQ to a CQ

9.2.5 (Optional) Configuring the Traffic Shaping of a GQ

9.2.6 Configuring Scheduling Parameters of an SQ

9.2.7 (Optional) Configuring a CQ WRED Object

9.2.8 (Optional) Configuring Scheduling Parameters of a CQ

9.2.9 Checking the Configuration

9.2.1 Establishing the Configuration Task

Applicable EnvironmentHQoS is mostly used on the user side of

l A PE device of a backbone network

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-11

Page 354: 00399154-Configuration Guide - QoS(V300R003_03).pdf

l An access router of an access network.

In the case of multiple user access and multiple service access, HQoS can differentiate users(VLAN users or VPN users) in a network for priority scheduling and bandwidth guarantee. Inaddition, HQoS can also save the costs in network operation and maintenance.

To differentiate users and provide hierarchical QoS for them, HQoS divides a GE interface intomultiple sub-interfaces. Each user occupies one GE sub-interface for service access. In thismanner, the interface bandwidth can be better utilized. Figure 9-6 provides a typical networkingdiagram for VLAN user access through sub-interfaces. Figure 9-7 provides a typical networkingdiagram for VPN user access through sub-interfaces.

The procedures of configuring HQoS in the two environments are the same.

Figure 9-6 Typical networking diagram for VLAN user access through sub-interfaces

Figure 9-7 Typical networking diagram for VPN user access through sub-interfaces

Pre-configuration TasksBefore configuring HQoS, complete the following tasks:

l Configuring IP addresses for the interfaces

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-12 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 355: 00399154-Configuration Guide - QoS(V300R003_03).pdf

l Configuring IP routing protocol on the routers and ensure that the link works normally

l Configuring simple traffic classification

NOTE

Before you configure the HQoS function, it is recommended that you configure the simple trafficclassification or complex traffic classification; otherwise, in FQ scheduling all traffic is considered BE bydefault.

Data PreparationTo configure HQoS, you need the following data.

No. Data

1 VLAN IDs

2 (Optional) Parameters of flow-wred packet discarding

3 (Optional) Algorithms for flow-queue scheduling and related parameters

4 (Optional) Service class mappings for flow-mapping

5 (Optional) A value of user-group-queue shaping

6 Values of CIR, PIR, and network-header-length

7 (Optional) Parameters of port-wred referenced by port-queue scheduling

8 (Optional) Algorithms for port-queue scheduling and related parameters, and theshaping value

9.2.2 (Optional) Configuring an FQ WRED Object

ContextDo as follows on the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:flow-wred flow-wred-name

The flow-wred is created and the flow-wred view is displayed.

Step 3 Run:color { green | yellow | red } low-limit low-limit-percentage high-limit high-limit-percentage discard-percentage discard-percentage-value

The high and low limit percentages and the drop probability are set for different colors of packets.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-13

Page 356: 00399154-Configuration Guide - QoS(V300R003_03).pdf

NOTE

l When no flow-wred objects are set, the system adopts the default tail-drop policy.

l The high and low limit percentages for red packets can be set to the minimum; those for yellow packetscan be greater; those for green packets can be set to the maximum.

l In the actual configuration, the low limit percentage of WRED is recommended to begin with 50% andbe adjusted according to different colors of packets. 100% is recommended for the drop probability.

Through configuring a flow-wred object, users can set high limit percentage, low limitpercentage, and drop probability for queues.

l When the percentage of the actual length of a queue over the length of a CQ is less than thelow limit percentage, the system does not drop packets.

l When the percentage of the actual length of a queue over the length of a CQ is between thelow limit percentage and the high limit percentage, the system drops packets through theWRED mechanism. The longer the queue length, the higher the drop probability is.

l When the percentage of the actual length of a queue over the length of a CQ is greater thanthe high limit percentage, the system drops all subsequent packets.

You can create multiple flow-wred objects for being referenced by FQs as required. You canconfigure up to 127 flow-wred objects in the system.

----End

9.2.3 (Optional) Configuring Scheduling Parameters of an FQ

ContextDo as follows on the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:flow-queue flow-queue-name

The FQ view is displayed.

Step 3 Run:queue cos-value { [ pq | wfq weight weight-value | lpq ] | [ shaping { shaping-value | shaping-percentage shaping-percentage-value } ] | flow-wred wred-name } *

A queue scheduling policy for a class is set.

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-14 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 357: 00399154-Configuration Guide - QoS(V300R003_03).pdf

NOTE

You can configure scheduling parameters in one flow queue template for the eight FQs of a subscriberrespectively.

If you do not configure a flow queue, the system uses the default flow queue template.

l By default, the system performs PQ scheduling on the FQs with the priorities of ef, cs6, and cs7.

l The system defaults the FQs with the priorities of be, af1, af2, af3, and af4 to WFQ. The schedulingweight is 10:10:10:15:15.

l By default, the system performs no traffic shaping.

l The default discarding policy is the tail drop.

----End

9.2.4 (Optional) Configuring Mapping from an FQ to a CQ

Context

Do as follows on the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:flow-mapping mapping-name

The flow mapping view is displayed.

Step 3 Run:map flow-queue cos-value to port-queue cos-value

The priority mapping from a flow queue to a CQ is set.

NOTE

You can configure eight mappings from the flow queue to the port queue in one flow queue mappingtemplate.

When no mapping from the flow queue to the CQ is set, the system defaults the one-to-one mapping.

Users can create multiple flow-mapping templates for being referenced by SQs as required. Youcan configure up to 15 flow-mapping templates in the system.

----End

9.2.5 (Optional) Configuring the Traffic Shaping of a GQ

Context

Do as follows on the router:

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-15

Page 358: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:user-group-queue group-name [ slot slot-id ]

The specified GQ view is displayed.

Step 3 Run:shaping shaping-value { inbound | outbound }

The shaping value is set for the GQ.

NOTEWhen traffic shaping is not configured for the GQ, the system performs no traffic shaping by default.

GQs fall into two types: board GQs and global GQs.

l A board GQ is created if you specify the slot number of the board to which a GQ belongs.

l A global GQ is created if you do not specify the slot number of a board to which a GQ belongs.This means that you create a GQ on all slots.

----End

9.2.6 Configuring Scheduling Parameters of an SQ

ContextDo as follows on the upstream interface of the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:interface interface-type interface-number[ sub-interface-number ]

View of the specified interface is displayed.

Step 3 Run:user-queue cir cir-value [ [ pir pir-value ] | [ flow-queue flow-queue-name ] | [ flow-mapping mapping-name ] | [ user-group-queue group-name ] ] *{ inbound | outbound }[ service-template service-template-name ]

Queue scheduling parameters are set for SQ and HQoS is enabled.

NOTETo set the presion scheduling length for a service template run the command network-header-length inthe service-template view.

----End

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-16 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 359: 00399154-Configuration Guide - QoS(V300R003_03).pdf

9.2.7 (Optional) Configuring a CQ WRED Object

ContextDo as follows on the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:port-wred port-wred-name

A port-wred object is created and the port-wred view is displayed.

Step 3 Run:color { green | yellow | red } low-limit low-limit-value high-limit high-limit-value discard-percentage discard-percentage-value

The low limit percentage, high limit percentage, and drop probability are set.

NOTEWhen no port-wred objects are set, the system adopts the default tail-drop policy.

Through configuring a port-wred object, users can set the high limit percentage, low limitpercentage, and drop probability for queues.

l When the percentage of the actual length of a queue over the length of a CQ is less than thelow limit percentage, the system does not drop packets.

l When the percentage of the actual length of a queue over the length of a CQ is between thelow limit percentage and the high limit percentage, the system drops packets through theWRED mechanism. The longer the queue length, the higher the drop probability is.

l When the percentage of the actual length of a queue over the length of a CQ is greater thanthe high limit percentage, the system drops all subsequent packets.

Users can create multiple port-wred objects for being referenced by CQs as required. The systemprovides one default port-wred object. You can configure a maximum of seven more port-wredobjects.

----End

9.2.8 (Optional) Configuring Scheduling Parameters of a CQ

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-17

Page 360: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Context

CAUTIONIn upstream HQoS scheduling on an Ethernet interface, CQ adopts the default scheduling settingof the system and is not configured by users.It is recommended that users configure downstream CQ on an Ethernet interface so that thebackbone network is not congested.

Do as follows on the downstream interface of the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:interface interface-type interface-number

The interface view is displayed.

Step 3 Run:port-queue cos-value { { pq | wfq weight weight-value | lpq} | shaping { shaping-value | shaping-percentage shaping-percentage-value } | port-wred wred-name } * outbound

A queue scheduling policy for different CQs is set.

NOTE

You can configure eight CQ scheduling parameters respectively on one interface.

When no CQ is configured, the system adopts the default CQ template.

l By default, the system performs PQ on the flow queues with the priorities of ef, cs6, and cs7.

l By default, the system performs WFQ on the flow queues with the priorities of be, af1, af2, af3, andaf4. The scheduling weight is 10:10:10:15:15.

l By default, the system performs no traffic shaping.

l The discarding policy defaults to tail drop.

----End

9.2.9 Checking the Configuration

Run the following commands to check the preceding configuration.

Action Command

Check the configured parameters of aflow queue mapping object and thereferential relations of the object.

display flow-mapping configuration [ verbose [mapping-name ] ]

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-18 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 361: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Action Command

Check the configuration of a flowqueue template.

display flow-queue configuration [ verbose[ flow-queue-name ] ]

Check the configured parameters of aflow queue WRED object.

display flow-wred configuration [ verbose [ flow-wred-name ] ]

Check the HQoS configuration oninterfaces.

display user-queue configuration interfaceinterface-type interface-number [ inbound |outbound ]

Check the configuration of a GQ andthe referential relations.

display user-group-queue configuration[ verbose [ group-name ] ]

Check the configured parameters of aCQ WRED object.

display port-wred configuration [ verbose [port-wred-name ] ]

Check the detailed configuration of aCQ.

display port-queue configuration interfaceinterface-type interface-number outbound

Check the statistics of SQs on aspecified interface.

display user-queue statistics interface interface-type interface-number { inbound | outbound }

Check the statistics of a GQ. display user-group-queue group-name statistics[ slot slot-id ] { inbound | outbound }

Check the statistics of a CQ. display port-queue statistics interface interface-type interface-number [ cos-value ] outbound

Running the display user-queue statistics interface interface-type interface-number{ inbound | outbound } command, you can view the statistics of an SQ on a specified interface.The statistic information covers that of every service of an SQ. For example:

<Quidway> display user-queue statistics interface gigabitethernet 6/0/0 inboundGigabitEthernet6/0/0 inbound traffic statistics: [be] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 30 seconds pass rate: 0 pps, 0 bps Last 30 seconds discard rate: 0 pps, 0 bps [af1] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 30 seconds pass rate: 0 pps, 0 bps Last 30 seconds discard rate: 0 pps, 0 bps [af2] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 30 seconds pass rate: 0 pps, 0 bps Last 30 seconds discard rate: 0 pps, 0 bps [af3] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-19

Page 362: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Last 30 seconds pass rate: 0 pps, 0 bps Last 30 seconds discard rate: 0 pps, 0 bps [af4] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 30 seconds pass rate: 0 pps, 0 bps Last 30 seconds discard rate: 0 pps, 0 bps [ef] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 30 seconds pass rate: 0 pps, 0 bps Last 30 seconds discard rate: 0 pps, 0 bps [cs6] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 30 seconds pass rate: 0 pps, 0 bps Last 30 seconds discard rate: 0 pps, 0 bps [cs7] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 30 seconds pass rate: 0 pps, 0 bps Last 30 seconds discard rate: 0 pps, 0 bps [total] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 30 seconds pass rate: 0 pps, 0 bps Last 30 seconds discard rate: 0 pps, 0 bps

Running the display user-group-queue group-name statistics [ slot slot-id ] { inbound |outbound } command, you can view the statistics of a GQ. For example:

<Quidway> display user-group-queue test statistics inboundtest inbound traffic statistics:[slot 6] total: Pass: 855, 444 packets, 88, 193, 994 bytes Discard: 22, 815, 639 packets, 2, 467, 264, 575 bytes[slot all] total: Pass: 855, 444 packets, 88, 193, 994 bytes Discard: 22, 815, 639 packets, 2, 467, 264, 575 bytes

Running the display port-queue statistics interface interface-type interface-number [ cos-value ] outbound command, you can view the statistics of a CQ. For example: Display thestatistics of the AF1 queue on GE 2/0/1.

<Quidway> display port-queue statistics interface gigabitethernet 2/0/1 af1 outbound[af1] Total pass: 27,697,521 packets, 2,006,796,750 bytes Total discard: 0 packets, 0 bytes --Drop tail discard: 0 packets, 0 bytes --Wred discard: 0 packets, 0 bytes

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-20 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 363: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Last 30 seconds pass rate: 0 pps, 0 bps Last 30 seconds discard rate: 0 pps, 0 bps --Drop tail discard rate: 0 pps, 0 bps --Wred discard rate: 0 pps, 0 bps

9.3 Configuring HQoS on a QinQ Termination Sub-interface

This section describes the HQoS configuration on the QinQ interface.

For details of the QinQ principle and configuration, refer to "QinQ Configuration" in theQuidway NetEngine80E/40E Quidway NetEngine80E/40E Configuration Guide – LAN Accessand MAN Access.

9.3.1 Establishing the Configuration Task

9.3.2 (Optional) Configuring an FQ WRED Object

9.3.3 (Optional) Configuring Scheduling Parameters of an FQ

9.3.4 (Optional) Configuring Mapping from an FQ to a CQ

9.3.5 (Optional) Configuring the Traffic Shaping of a GQ

9.3.6 Enabling QinQ on an Interface

9.3.7 Configuring QinQ on a Sub-interface

9.3.8 Configuring a VLAN Group

9.3.9 Configuring Scheduling Parameters of an SQ

9.3.10 (Optional) Configuring a CQ WRED Object

9.3.11 (Optional) Configuring Scheduling Parameters of a CQ

9.3.12 Checking the Configuration

9.3.1 Establishing the Configuration Task

Applicable Environment

The QinQ HQoS technology is mostly used on the user side of the edge PE in a backbonenetwork.

When packets of multiple VLAN users, after users' two-layer tags being terminated on the QinQtermination sub-interface, enter the ISP network, the ISP network can identify only the servicetypes of packets instead of users.

The HQoS function configured on a QinQ termination sub-interface enables the system toidentify both services and users in the network when packets of multiple VLAN users enter theISP network. After this, the system performs priority scheduling and provides bandwidthguarantee for services of high priority.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-21

Page 364: 00399154-Configuration Guide - QoS(V300R003_03).pdf

You need to configure HQoS features of a QinQ termination sub-interface in the vlan-groupview of the QinQ termination sub-interface.

Pre-configuration TasksBefore configuring HQoS, complete the following tasks:

l Configuring the physical parameters and link attributes to ensure normal operation of theinterfaces

l Configuring IP addresses of the interfaces

l Configuring the IP routes on the router and keeping the link be connected

l Configuring simple traffic classification

NOTE

Before you configure the HQoS function, it is recommended that you configure the simple trafficclassification or complex traffic classification; otherwise, in FQ scheduling all traffic is considered BE bydefault.

Data PreparationTo configure HQoS on a QinQ termination sub-interface, you need the following data.

No. Data

1 VLAN-group ID

2 QinQ termination sub-interface number

3 (Optional) Parameters of flow-wred

4 (Optional) Algorithms for flow-queue scheduling and related parameters

5 (Optional) Service class mappings for flow-mapping

6 (Optional) A value of user-group-queue shaping

7 Values of CIR, PIR, and network-header-length

8 (Optional) port-wred parameters of port-queue

9 (Optional) Algorithms for port-queue scheduling and related parameters and shapingvalues

9.3.2 (Optional) Configuring an FQ WRED Object

ContextDo as follows on the router:

Procedure

Step 1 Run:

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-22 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 365: 00399154-Configuration Guide - QoS(V300R003_03).pdf

system-view

The system view is displayed.

Step 2 Run:flow-wred flow-wred-name

The flow-wred is created and the flow-wred view is displayed.

Step 3 Run:color { green | yellow | red } low-limit low-limit- percentage high-limit high-limit- percentage discard-percentage discard-percentage-value

The high and low limit percentages and drop probability are set for different colors of packets.

NOTE

l When no flow-wred objects are set, the system adopts the default tail-drop policy.

l The high and low limit percentages for red packets can be set to the minimum; those for yellow packetscan be greater; those for green packets can be set to the maximum.

l In the actual configuration, the low limit percentage of WRED is recommended to begin with 50% andbe adjusted according to different colors of packets. 100% is recommended for the drop probability.

Through configuring a flow-wred object, users can set high limit percentage, low limitpercentage, and drop probability for queues.

l When the percentage of the actual length of a queue over the length of a CQ is less than thelow limit percentage, the system does not drop packets.

l When the percentage of the actual length of a queue over the length of a CQ is between thelow limit percentage and the high limit percentage, the system drops packets through theWRED mechanism. The longer the queue length, the higher the drop probability is.

l When the percentage of the actual length of a queue over the length of a CQ is greater thanthe high limit percentage, the system drops all subsequent packets.

Users can create multiple flow-wred objects for being referenced by FQs as required. You canconfigure up to 127 flow-wred objects in the system.

When no flow-wred objects are set, the system adopts the default tail-drop policy.

----End

9.3.3 (Optional) Configuring Scheduling Parameters of an FQ

ContextDo as follows on the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:flow-queue flow-queue-name

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-23

Page 366: 00399154-Configuration Guide - QoS(V300R003_03).pdf

The FQ view is displayed.

Step 3 Run:queue cos-value { [ pq | wfq weight weight-value | lpq ] | [ shaping { shaping-value | shaping-percentage shaping-percentage-value } ] | flow-wred wred-name } *

The queue scheduling policy is set.

NOTE

You can configure scheduling parameters in one flow queue template for the eight FQs of a subscriberrespectively.

When no FQ is configured, the system adopts the default FQ template.

l By default, the system performs PQ on the FQs with the priorities of ef, cs6, and cs7.

l The system defaults the FQs with the priorities of be, af1, af2, af3, and af4 to WFQ. The schedulingweight is 10:10:10:15:15.

l By default, the system performs no traffic shaping.

l The discarding policy defaults to tail drop.

----End

9.3.4 (Optional) Configuring Mapping from an FQ to a CQ

ContextDo as follows on the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:flow-mapping mapping-name

The flow mapping view is displayed.

Step 3 Run:map flow-queue cos-value to port-queue cos-value

The mapping between a service class of FQ and a service class of CQ is set.

NOTE

You can configure eight mappings from flow-queue to port-queue in one flow queue mapping template.

When no mapping from the FQ to the CQ is set, the system defaults the one-to-one mapping.

Users can create multiple flow-mapping templates for being referenced by SQs as required. Youcan configure up to 15 flow-mapping templates in the system.

----End

9.3.5 (Optional) Configuring the Traffic Shaping of a GQ

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-24 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 367: 00399154-Configuration Guide - QoS(V300R003_03).pdf

ContextDo as follows on the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:user-group-queue group-name [ slot slot-id ]

The specified GQ view is displayed.

Step 3 Run:shaping shaping-value { inbound | outbound }

The shaping value is set for the GQ.

NOTEWhen traffic shaping is not configured for the GQ, the system performs no traffic shaping by default.

GQs fall into two types: board GQs and global GQs.

l A board GQ is created if you specify the slot number of the board to which a GQ belongs.

l A global GQ is created if you do not specify the slot number of a board to which a GQ belongs.This means that you create a GQ on all slots.

----End

9.3.6 Enabling QinQ on an Interface

ContextDo as follows on the upstream interface of the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:interface interface-type interface-number

The view of the specified interface is displayed.

Step 3 Run:mode user-termination

The interface is set to work in user termination mode and QinQ is enabled on the master interface.

----End

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-25

Page 368: 00399154-Configuration Guide - QoS(V300R003_03).pdf

9.3.7 Configuring QinQ on a Sub-interface

ContextDo as follows on the QinQ sub-interface of the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:interface interface-type interface-number.sub-interface

A QinQ sub-interface is created and the QinQ sub-interface view is displayed.

Step 3 Run:control-vid vid qinq-termination

The VLAN encapsulation mode is set to QinQ.

Step 4 Run:qinq termination pe-vid pe-vid ce-vid low-ce-vid [ to high-ce-vid ] [ vlan-group group-id ]

The QinQ sub-interface termination is configured.

Step 5 Run:quit

Exit from the QinQ sub-interface view.

----End

9.3.8 Configuring a VLAN Group

ContextDo as follows on the master QinQ interface of the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:interface interface-type interface-number.sub-interface

The view of the specified QinQ sub-interface is displayed.

Step 3 Run:vlan-group vlan-group-id

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-26 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 369: 00399154-Configuration Guide - QoS(V300R003_03).pdf

A VLAN group is created and the view of the VLAN group is displayed.

Step 4 Run:quit

Exit from the VLAN group view.

----End

9.3.9 Configuring Scheduling Parameters of an SQ

ContextDo as follows on the vlan-group view of the QinQ sub-interface of the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:interface interface-type interface-number[ sub-interface-number ]

View of the specified sub-interface is displayed.

Step 3 Run:vlan-group vlan-group-id

The view of the specified VLAN group is displayed.

Step 4 Run:user-queue cir cir-value [ [ pir pir-value ] | [ flow-queue flow-queue-name ] | [ flow-mapping mapping-name ] | [ user-group-queue group-name ] ] *{ inbound | outbound }[ service-template service-template-name ]

The parameters of the SQ scheduling are set and HQoS is enabled on the sub-interface.

NOTETo set the presion scheduling length for a service template run the command network-header-length inthe service-template view.

----End

9.3.10 (Optional) Configuring a CQ WRED Object

ContextDo as follows on the router:

Procedure

Step 1 Run:system-view

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-27

Page 370: 00399154-Configuration Guide - QoS(V300R003_03).pdf

The system view is displayed.

Step 2 Run:port-wred port-wred-name

A port-wred is created and the port-wred view is displayed.

Step 3 Run:color { green | yellow | red } low-limit low-limit-value high-limit high-limit-value discard-percentage discard-percentage-value

The high and low limit percentages and drop probability are set for different colors of packets.

NOTEWhen no port-wred objects are set, the system adopts the default tail-drop policy.

Through configuring a port-wred object, you can set the high limit percentage, low limitpercentage, and drop probability for queues. When the percentage of the actual length of a queueover the length of a class queue is less than the low limit percentage, the system does not droppackets. When the percentage of the actual length of a queue over the length of a class queue isbetween the low limit percentage and the high limit percentage, the system drops packets throughthe WRED mechanism. The longer the queue length is, the higher the drop probability is. Whenthe percentage of the actual length of a queue over the length of a class queue is greater than thehigh limit percentage, the system drops all subsequent packets.

You can create multiple port-wred objects for being referenced by class queues as required. Thesystem provides a default port-wred object. In addition, you can configure a maximum of sevenport-wred objects.

----End

9.3.11 (Optional) Configuring Scheduling Parameters of a CQ

Context

CAUTIONIn upstream HQoS scheduling on an Ethernet interface, CQ adopts the default scheduling settingof the system and is not configured by users.It is recommended to configure downstream CQ on an Ethernet interface so that the backbonenetwork is not congested.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:interface interface-type interface-number

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-28 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 371: 00399154-Configuration Guide - QoS(V300R003_03).pdf

The interface view is displayed.

Step 3 Run:port-queue cos-value { { pq | wfq weight weight-value | lpq} | shaping { shaping-value | shaping-percentage shaping-percentage-value } | port-wred wred-name } * outbound

The queue scheduling policy is set.

NOTE

l You can configure scheduling parameters for eight CQs respectively on one interface.

l When no CQ is configured, the system adopts the default CQ template.

----End

9.3.12 Checking the Configuration

Run the following commands to check the previous configuration.

Action Command

Check the configuredparameters of an FQ mappingobject and the referentialrelations of the object.

display flow-mapping configuration [ verbose[ mapping-name ] ]

Check the configuration of anFQ template.

display flow-queue configuration [ verbose [ flow-queue-name ] ]

Check the configuredparameters of an FQ WREDobject.

display flow-wred configuration [ verbose [ flow-wred-name ] ]

Check the configuration of aGQ and the referentialrelations.

display user-group-queue configuration [ verbose[ group-name ] ]

Check the SQ statistics on aspecified interface.

display statistic user-queue qinq-termination interfaceinterface-type interface-number pe-vid pe-vid ce-vid ce-vid { inbound | outbound }

Check the statistics of a GQ. display user-group-queue group-name statistics [ slotslot-id ] { inbound | outbound }

9.4 Configuring HQoS on a CPOS or E3/T3 InterfaceThis section describes the configuration of HQoS on an E3 or T3 interface.

9.4.1 Establishing the Configuration Task

9.4.2 Configuring HQoS

9.4.3 Checking the Configuration

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-29

Page 372: 00399154-Configuration Guide - QoS(V300R003_03).pdf

9.4.1 Establishing the Configuration Task

Applicable Environment

Two-level HQoS scheduling is implemented on low-rate interfaces such as CPOS, E3, or T3. Afixed total bandwidth is set. You can configure HQoS to divide the total bandwidth to performpriority scheduling and bandwidth guarantee. Level-1 scheduling performs bandwidth guaranteefor all users. Level-2 scheduling performs bandwidth guarantee for different services of a user.

Pre-configuration Tasks

Before configuring HQoS on a CPOS or E3/T3 interface, complete the following tasks:

l Configuring the physical parameters and link attributes to ensure normal operation of theinterfaces

l Configuring the IP addresses for the interface

l Configuring an IP route and ensuring that the link works normally

l Configuring simple traffic classification

NOTE

Before you configure the HQoS function, it is recommended that you configure the simple trafficclassification or complex traffic classification; otherwise, in FQ scheduling all traffic is considered BE bydefault.

Data Preparation

To configure HQoS on a CPOS or E3/T3 interface, you need the following data.

No. Data

1 Total bandwidth for HQoS

2 Queue scheduling mode for HQoS

3 CIR

4 The ways of processing packets that exceed the configured specifications

9.4.2 Configuring HQoS

ContextNOTE

l The configuration of HQoS on a CPOS or E3/T3 interface is valid only in the outbound direction.

l Before configuring HQoS on CPOS, E3 or T3, you need to configure the simple traffic classificationor the complex traffic classification; otherwise, the HQoS configuration does not work.

Do as follows on the outbound interface of the router:

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-30 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 373: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:interface serial interface-number

The view of the specified E3/T3 interface is displayed.

Step 3 Run:hqos policy { pq | cbpq | cbfq } bandwidth bandwidth-value

HQoS is enabled; the total bandwidth of the interface and queue scheduling mode are specified.

NOTEIf you set the queue scheduling mode to PQ, queue scheduling is carried out according to the priority ofthe queues on the interface and the guaranteed bandwidth cannot be set for the queues with the hqos queuecommand.

Step 4 Run:hqos queue { af1 | af2 | af3 | af4 | ef | cs6 | cs7 } cir cir [ remark | drop ]

The ensured bandwidth for the HQoS service queue is configured.

----End

9.4.3 Checking the Configuration

Run the following command to check the preceding configuration.

Action Command

Check the traffic statistics about thecurrent priority on an interfacewhere HQoS is enabled.

display hqos queue statistics { mp-group | serial }interface-number { cos-value }

Running the display hqos queue statistics { mp-group | serial } interface-number { cos-value } command, you can display the traffic statistics about the traffic of a specified servicepriority on an interface where HQoS is enabled. For example:

<Quidway> display hqos queue statistics serial 5/0/0/0:0 efSerial5/0/0/0:0 statistics: Forward bits : 188243 ( bits ) Forward pacekts : 23541 ( packets ) Remark bits : 0 ( bits ) Remark packets : 0 ( packets ) Drop bits : 0 ( bits ) Drop packets : 0 ( packets )

9.5 Configuring HQoS Based on the PBB-TE TunnelsThis section describes the procedure of configuring HQoS on a PBB-TE tunnel.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-31

Page 374: 00399154-Configuration Guide - QoS(V300R003_03).pdf

NOTE

For detailed information about the PBB-TE tunnels, refer to the chapter "PBB-TE Configuration" in theQuidway NetEngine80E/40E Quidway NetEngine80E/40E Configuration Guide – LAN and MANAccess.

9.5.1 Establishing the Configuration Task

9.5.2 Configuring a Reserved Bandwidth for PBB-TE Services on an Interface

9.5.3 (Optional) Configuring the WRED Object of an FQ

9.5.4 (Optional) Configuring Scheduling Parameters of an FQ

9.5.5 (Optional) Configuring Mappings from an FQ to a CQ

9.5.6 (Optional) Configuring Traffic Shaping of a GQ

9.5.7 Configuring Scheduling Parameters of an SQ

9.5.8 Checking the Configuration

9.5.1 Establishing the Configuration Task

Applicable EnvironmentBefore configuring HQoS based on PBB-TE services, you need to reserve bandwidth on thespecified interface for services according to the demand of the service on the bandwidthresources. Inside a PBB-TE tunnel, PQ and WFQ scheduling algorithms are implementedaccording to the priorities carried by user packets or the priorities of service instances. WFQ isused for scheduling among multiple PBB-TE tunnels. PBB-TE tunnels of the same type, forexample, PBB-TE tunnels accessing a certain area can be converged through B-VLAN and areprovided with a guaranteed bandwidth. On one interface, PBB-TE services can share bandwidthresources with non-PBB-TE services.

Pre-configuration TasksBefore configuring HQoS, complete the following tasks:

l Configuring a PBB-TE tunnel

l Configuring service instances

Data PreparationTo configure HQoS, you need the following data.

No. Data

1 Bandwidth reserved for PBB-TE services on the interface

2 Low threshold, high threshold, and drop probability of packets

3 Algorithms for the FQ scheduling and parameters

4 Mapping relations between the service of the SQ and the CQ

5 Traffic shaping parameters of the GQ

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-32 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 375: 00399154-Configuration Guide - QoS(V300R003_03).pdf

9.5.2 Configuring a Reserved Bandwidth for PBB-TE Services on anInterface

ContextDo as follows on the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:interface interface-type interface-number

The view of the interface to which the PBB-TE tunnel is bound is displayed.

Step 3 Run:mac-tunnel reserved-bandwidth cir cir-value [ pir pir-value ]

The bandwidth reserved for PBB-TE services is configured on the interface.

----End

9.5.3 (Optional) Configuring the WRED Object of an FQ

ContextDo as follows on the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:flow-wred flow-wred-name

A WRED object of an FQ is created and the WRED view of the FQ is displayed.

Step 3 Run:color { green | yellow | red } low-limit low-limit-value high-limit high-limit-value discard-percentage discard-percentage-value

The high threshold, the low threshold, and the drop probability of the WRED object are set fordifferent colors of packets.

----End

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-33

Page 376: 00399154-Configuration Guide - QoS(V300R003_03).pdf

9.5.4 (Optional) Configuring Scheduling Parameters of an FQ

Context

Do as follows on the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:flow-queue flow-queue-name

A flow queue template is created and the FQ view is displayed.

Step 3 Run:queue cos-value { [ pq | wfq weight weight-value | lpq ] | [ shaping { shaping-value | shaping-percentage shaping-percentage-value } ] | flow-wred wred-name } *

Scheduling parameters are set for queues of different priorities.

----End

9.5.5 (Optional) Configuring Mappings from an FQ to a CQ

Context

Do as follows on the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:flow-mapping mapping-name

A mapping object is created for an FQ and the FQ mapping view is displayed.

Step 3 Run:map flow-queue cos-value to port-queue cos-value

The priority for packets of a service of an SQ to enter a CQ is configured.

----End

9.5.6 (Optional) Configuring Traffic Shaping of a GQ

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-34 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 377: 00399154-Configuration Guide - QoS(V300R003_03).pdf

ContextDo as follows on the device:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:user-group-queue group-name [ slot slot-id ]

The GQ view is displayed.

Step 3 Run:shaping shaping-value outbound

The traffic shaping value is set for the GQ.

----End

9.5.7 Configuring Scheduling Parameters of an SQ

ContextDo as follows on the device:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:mac-tunnel tunnel-name tunnel-name

The PBB-TE tunnel view is displayed.

Step 3 Run:user-queue cir cir-value [ [ pir pir-value ] | [ flow-queue flow-queue-name ] | [ flow-mapping mapping-name ] | [ user-group-queue group-name ] ] *{ inbound | outbound }[ service-template service-template-name ]

The scheduling parameters of an SQ are configured and HQoS is enabled on the PBB-TE tunnel.

NOTETo set the presion scheduling length for a service template run the command network-header-length inthe service-template view.

----End

9.5.8 Checking the Configuration

Run the following commands to check the previous configuration.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-35

Page 378: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Action Command

Check the configuration of aGQ on a PBB-TE tunnel.

display user-queue configuration interface mac-tunnel[ tunnel-name ]

Check the statistics of GQs onthe PBB-TE tunnel.

display user-queue statistics interface mac-tunneltunnel-name

l Run the display user-queue configuration interface mac-tunnel [ tunnel-name ]command. If the correct HQoS configuration on the PBB-TE tunnel is displayed, it meansthat the configuration succeeds.<Quidway> display user-queue configuration interface mac-tunnel t1 MacTunnelName: t1 CirValue<kbps>: 60000 PirValue<kbps>: 100000 FlowQueue: fq FlowMapping: fm GroupQueue: gq Network-Header-Length: Default

l Run the display user-queue statistics interface mac-tunnel tunnel-name command. Ifthe correct statistics of user queues on the PBB-TE tunnel are displayed, it means that theconfiguration succeeds.<Quidway> display user-queue statistics interface mac-tunnel t1test traffic statistics: [be] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Pass Rate: 0 packets, 0 bytes Discard Rate: 0 packets, 0 bytes [af1] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Pass Rate: 0 packets, 0 bytes Discard Rate: 0 packets, 0 bytes [af2] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Pass Rate: 0 packets, 0 bytes Discard Rate: 0 packets, 0 bytes [af3] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Pass Rate: 0 packets, 0 bytes Discard Rate: 0 packets, 0 bytes [af4] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Pass Rate: 0 packets, 0 bytes Discard Rate: 0 packets, 0 bytes [ef] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Pass Rate: 0 packets, 0 bytes Discard Rate: 0 packets, 0 bytes [cs6] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Pass Rate: 0 packets, 0 bytes Discard Rate: 0 packets, 0 bytes [cs7] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-36 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 379: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Pass Rate: 0 packets, 0 bytes Discard Rate: 0 packets, 0 bytes [total] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Pass Rate: 0 packets, 0 bytes Discard Rate: 0 packets, 0 bytes

9.6 Configuring Class-based HQoSThis section describes the procedure of configuring Class-based HQoS.

9.6.1 Establishing the Configuration Task

9.6.2 Defining a Traffic Classifier

9.6.3 (Optional) Configuring a WRED Object for a Flow Queue

9.6.4 (Optional) Configuring Scheduling Parameters for a Flow Queue

9.6.5 (Optional) Configuring Mappings from a Flow Queue to a Class Queue

9.6.6 (Optional) Configuring Traffic Shaping for a Group Queue

9.6.7 Defining a Traffic Behavior and Configuring Scheduling Parameters for a SubscriberQueue

9.6.8 Defining a Traffic Policy and Applying It to an Interface

9.6.9 (Optional) Configuring a WRED Object for a Class Queue

9.6.10 (Optional) Configuring Scheduling Parameters for a Class Queue

9.6.11 Checking the Configuration

9.6.1 Establishing the Configuration Task

Applicable Environment

HQoS is mostly used on the user side of:

l A PE of a backbone network

l An access router of an access network

In the case of multiple user access and multiple service access, HQoS can differentiate users(VLAN users) in a network for priority scheduling and bandwidth guarantee. In addition, HQoScan also save the costs in network operation and maintenance.

To further divide users on a small number of interfaces and perform hierarchical scheduling overtraffic of multiple users, you need to deploy class-based HQoS. Class-based HQoS integratesthe classification function of the CTC and the queue scheduling function of HQoS. The systemfirst classifies traffic that needs HQoS scheduling through the CTC; then it configures HQoSparameters by taking all the packets that match a classifying rule as one user.

Pre-configuration Tasks

Before configuring class-based HQoS, complete the following tasks:

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-37

Page 380: 00399154-Configuration Guide - QoS(V300R003_03).pdf

l Configuring physical parameters and link attributes to ensure normal operation of theinterfaces

l Configuring IP addresses for interfaces

l Configuring IP routes on routers to ensure normal operation of the link

l Configuring the simple traffic classification

Data Preparation

To configure class-based HQoS, you need the following data.

No. Data

1 Matching rule, names of the traffic classifier, traffic behavior, traffic policy, and theinterface where the traffic policy is applied

2 (Optional) Parameters for packet drop in flow-wred

3 (Optional) Scheduling algorithms and related parameters in flow-queue

4 (Optional) CoS relations in flow-mapping

5 (Optional) Shaping value in user-group-queue

6 CIR, PIR, and network-header-length of user-queue

7 (Optional) Port-wred parameters used in port-queue

8 (Optional) Scheduling algorithms, related parameters, and shaping values in port-queue

9.6.2 Defining a Traffic Classifier

ContextNOTE

In configuration of class-based HQoS, the purpose of defining a traffic classifier is to single out the packetsthrough the CTC for further HQoS scheduling.

Do as follows on the router to configure class-based HQoS:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:traffic classifier classifier-name [ operator { and | or } ]

A traffic classifier is defined and the traffic classifier view is displayed.

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-38 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 381: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Step 3 Run the following command as required to define a traffic policy.l To define an ACL rule, run the if-match acl acl-number command.

l To define a DSCP rule, run the if-match dscp dscp-value command.

l To define a TCP flag rule, run the if-match tcp syn-flag tcpflag-value command.

l To define a matching rule based on IP precedence, run the if-match ip-precedence ip-precedence command.

l To define a rule for matching all packets, run the if-match any command.

l To define an 802.1p rule for VLAN packets, run the if-match 8021p 8021p-value command.

l To define a rule for matching packets based on the source MAC address, run the if-matchsource-mac mac-address command.

l To define a rule for matching packets based on the destination MAC address, run the if-match destination-mac mac-address command.

l To define a rule for matching packets based on the MPLS EXP value, run the if-match mpls-exp exp-value command.

If multiple matching rules are configured for one traffic classifier, you can set the relation amongthe matching rules by specifying the parameter operator in Step 2 with the command trafficclassifier classifier-name [ operator { and | or } ], where,

l and: is an operator indicating that the matching rules are in the logical AND relation. Thismeans that the packets are of the specified class only when all rules are matched.

l or: is an operator indicating that the matching rules are in the logical OR relation. This meansthat the packets are of the specified class when any of the rules is matched.

If no operator is not specified, the default relation among matching rules is logical OR.

----End

9.6.3 (Optional) Configuring a WRED Object for a Flow Queue

ContextDo as follows on the router to configure class-based HQoS:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:flow-wred flow-wred-name

An flow-wred object is created and the flow-wred view is displayed.

Step 3 Run:color { green | yellow | red } low-limit low-limit-percentage high-limit high-limit-percentage discard-percentage discard-percentage-value

The upper limit (in percentage), the lower limit (in percentage), and the discarding probabilityare set for different colors of packets.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-39

Page 382: 00399154-Configuration Guide - QoS(V300R003_03).pdf

NOTE

If you do not configure a flow-wred object, the system uses the default tail-drop policy.

You can create multiple flow-wred objects used by FQs as required. You can configure up to 127 flow-wred objects in the system.

----End

9.6.4 (Optional) Configuring Scheduling Parameters for a FlowQueue

Context

Do as follows on the router to configure class-based HQoS:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:flow-queue flow-queue-name

An FQ template is created and the FQ view is displayed.

Step 3 Run:queue cos-value { [ pq | wfq weight weight-value | lpq ] | [ shaping { shaping-value | shaping-percentage shaping-percentage-value } ] | flow-wred wred-name } *

Scheduling policies are set for queues of different priorities.

NOTE

You can configure scheduling parameters in one FQ template for the eight FQs of a subscriber respectively.

If you do not configure an FQ, the system uses the default FQ template.

l By default, the system performs PQ on the FQs with the CoSs of ef, cs6, and cs7.

l WFQ is the default tool of the system for scheduling the FQs with the priorities of be, af1, af2, af3,and af4. The scheduling weight proportion is 10:10:10:15:15.

l By default, the system does not perform traffic shaping.

l The default discarding policy is the tail-drop policy.

----End

9.6.5 (Optional) Configuring Mappings from a Flow Queue to aClass Queue

Context

Do as follows on the router to configure class-based HQoS:

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-40 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 383: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:flow-mapping mapping-name

The flow-mapping view is displayed.

Step 3 Run:map flow-queue cos-value to port-queue cos-value

The priority to enter a CQ is configured for packets of a service in an SQ.

NOTE

You can configure eight mappings from flow-queue to port-queue in one flow-mapping template.

If mappings from flow-queue to class-queue are not configured, the system defaults the one-to-onemapping.

You can create multiple flow-mapping templates used by SQs as required. Up to 15 flow-mapping templates can be configured in the system.

----End

9.6.6 (Optional) Configuring Traffic Shaping for a Group Queue

ContextDo as follows on the router to configure class-based HQoS:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:user-group-queue group-name

The GQ view is displayed.

Step 3 Run:shaping shaping-value { inbound | outbound }

The shaping value of the GQ is set.

NOTE

If you do not configure any traffic shaping value for a GQ, the system does not perform traffic shaping bydefault.

You can configure only a global GQ for class-based HQoS.

GQs fall into two types: board GQs and global GQs.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-41

Page 384: 00399154-Configuration Guide - QoS(V300R003_03).pdf

l A board GQ is created if you specify the slot number of the board to which a GQ belongs.

l A global GQ is created if you do not specify the slot number of a board to which a GQ belongs.This means that you create a GQ on all slots.

----End

9.6.7 Defining a Traffic Behavior and Configuring SchedulingParameters for a Subscriber Queue

ContextDo as follows on the router to configure class-based HQoS:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:traffic behavior behavior–name

A traffic behavior is defined and the traffic behavior view is displayed.

Step 3 Run:user-queue cir cir-value [ [ pir pir-value ] | [ flow-queue flow-queue-name ] | [ flow-mapping mapping-name ] | [ user-group-queue group-name ] | [ service-template service-template-name ] ]*

The scheduling parameters of a subscriber queue are configured and HQoS is enabled on theinterface.

NOTETo set the presion scheduling length for a service template run the command network-header-length inthe service-template view.

----End

9.6.8 Defining a Traffic Policy and Applying It to an Interface

ContextDo as follows on the router to configure class-based HQoS:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:traffic policy policy-name

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-42 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 385: 00399154-Configuration Guide - QoS(V300R003_03).pdf

A traffic policy is defined and the policy view is displayed.

Step 3 Run:classifier classifier-name behavior behavior-name

A traffic behavior is associated with a specified traffic classifier in the traffic policy.

Step 4 Run:quit

The device returns to the system view.

Step 5 Run:interface interface-type interface-number

The interface view is displayed.

Step 6 Run:traffic-policy policy-name inbound

The traffic policy is applied to the interface.

NOTEA traffic policy that contains an associated HQoS scheduling behavior can be applied to only the inboundinterface. The attribute of the policy must be shared.

----End

9.6.9 (Optional) Configuring a WRED Object for a Class Queue

ContextDo as follows on the router to configure class-based HQoS:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:port-wred port-wred-name

A port-wred object is created and the port-wred view is displayed.

Step 3 Run:color { green | yellow | red } low-limit low-limit-value high-limit high-limit-value discard-percentage discard-percentage-value

The upper limit (in percentage), the lower limit (in percentage), and the discarding probabilityare set for different colors of packets.

NOTEIf you do not configure a WRED object for a CQ (that is, a port-wred object), the system uses the defaulttail-drop policy.

----End

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-43

Page 386: 00399154-Configuration Guide - QoS(V300R003_03).pdf

9.6.10 (Optional) Configuring Scheduling Parameters for a ClassQueue

Context

CAUTIONIn the HQoS scheduling for upstream HQoS on an Ethernet interface, the CQ adopts the defaultscheduling setting of the system and requires no configuration.

It is recommended that you configure the CQ on a downstream Ethernet interface so that thebackbone network is not congested.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:interface interface-type interface-number

The interface view is displayed.

Step 3 Run:port-queue cos-value { { pq | wfq weight weight-value | lpq} | shaping { shaping-value | shaping-percentage shaping-percentage-value } | port-wred wred-name } * outbound

A scheduling policy is set for queues of different priorities.

NOTE

You can configure scheduling parameters for eight CQs respectively on one interface.

If you do not configure a CQ, the system uses the default CQ template.

l By default, the system performs PQ on the FQs with the priorities of ef, cs6, and cs7.

l WFQ is the default tool of the system for scheduling the FQs with the priorities of be, af1, af2, af3,and af4. The scheduling weight proportion is 10:10:10:15:15.

l By default, the system does not perform traffic shaping.

l The default discarding policy is the tail-drop policy.

----End

9.6.11 Checking the Configuration

Run the following commands to check the previous configuration.

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-44 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 387: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Action Command

Check the configured parameters of aflow-mapping object and thereferential relations of the object.

display flow-mapping configuration [ verbose[ mapping-name ] ]

Check the configuration of an FQtemplate.

display flow-queue configuration [ verbose[ flow-queue-name ] ]

Check the configured parameters of aflow-wred object.

display flow-wred configuration [ verbose [ flow-wred-name ] ]

Check the configuration of a GQ andthe referential relations.

display user-group-queue configuration[ verbose [ group-name ] ]

Check the configured parameters of theWRED object for a CQ.

display port-wred configuration [ verbose [port-wred-name ] ]

Check the detailed configuration of aCQ.

display port-queue configuration interfaceinterface-type interface-number outbound

Check the SQ statistics of a specifiedtraffic behavior.

display user-queue statistics traffic behaviorbehavior-name inbound

Check the statistics of a GQ. display user-group-queue statistics group-name[ slot slot-id ] { inbound | outbound }

Check the statistics of a CQ. display port-queue statistics interface interface-type interface-number [ cos-value ] outbound

Check the configuration of a trafficbehavior.

display traffic behavior user-defined behavior-name

Check the configuration of a trafficclassifier.

display traffic classifier user-defined classifier-name

Running the display user-queue statistics traffic behavior behavior-name inbound command,you can view the SQ statistics of a specified traffic behavior. The statistics cover informationon every service of an SQ. If the displayed statistics are correct, it means that the configurationsucceeds. For example:

<Quidway> display user-queue statistics traffic behavior b1 inboundTraffic behavior b1 inbound traffic statistics:Traffic behavior b1 inbound traffic statistics:[slot 5] [be] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 5 minutes pass rate: 0 pps, 0 bps Last 5 minutes discard rate: 0 pps, 0 bps [af1] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 5 minutes pass rate: 0 pps, 0 bps Last 5 minutes discard rate: 0 pps, 0 bps

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-45

Page 388: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[af2] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 5 minutes pass rate: 0 pps, 0 bps Last 5 minutes discard rate: 0 pps, 0 bps [af3] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 5 minutes pass rate: 0 pps, 0 bps Last 5 minutes discard rate: 0 pps, 0 bps [af4] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 5 minutes pass rate: 0 pps, 0 bps Last 5 minutes discard rate: 0 pps, 0 bps [ef] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 5 minutes pass rate: 0 pps, 0 bps Last 5 minutes discard rate: 0 pps, 0 bps [cs6] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 5 minutes pass rate: 0 pps, 0 bps Last 5 minutes discard rate: 0 pps, 0 bps [cs7] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 5 minutes pass rate: 0 pps, 0 bps Last 5 minutes discard rate: 0 pps, 0 bps [total] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 5 minutes pass rate: 0 pps, 0 bps Last 5 minutes discard rate: 0 pps, 0 bps[slot all] [be] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 5 minutes pass rate: 0 pps, 0 bps Last 5 minutes discard rate: 0 pps, 0 bps [af1] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 5 minutes pass rate: 0 pps, 0 bps Last 5 minutes discard rate: 0 pps, 0 bps [af2] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 5 minutes pass rate: 0 pps, 0 bps

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-46 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 389: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Last 5 minutes discard rate: 0 pps, 0 bps [af3] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 5 minutes pass rate: 0 pps, 0 bps Last 5 minutes discard rate: 0 pps, 0 bps [af4] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 5 minutes pass rate: 0 pps, 0 bps Last 5 minutes discard rate: 0 pps, 0 bps [ef] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 5 minutes pass rate: 0 pps, 0 bps Last 5 minutes discard rate: 0 pps, 0 bps [cs6] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 5 minutes pass rate: 0 pps, 0 bps Last 5 minutes discard rate: 0 pps, 0 bps [cs7] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 5 minutes pass rate: 0 pps, 0 bps Last 5 minutes discard rate: 0 pps, 0 bps [total] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 5 minutes pass rate: 0 pps, 0 bps Last 5 minutes discard rate: 0 pps, 0 bps

9.7 Configuring Template-based HQoSThis section describes how to configure template-based HQoS.

9.7.1 Establishing the Configuration Task

9.7.2 (Optional) Configuring an FQ WRED Object

9.7.3 (Optional) Configuring Scheduling Parameters of an FQ

9.7.4 (Optional) Configuring Mapping from an FQ to a CQ

9.7.5 (Optional) Configuring the Traffic Shaping of a GQ

9.7.6 (Optional) Configuring Packet Loss Compensation Length of Service Templates

9.7.7 Defining a QoS Template and Configuring Scheduling Parameters

9.7.8 Applying a QoS Template

9.7.9 (Optional) Configuring a CQ WRED Object

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-47

Page 390: 00399154-Configuration Guide - QoS(V300R003_03).pdf

9.7.10 (Optional) Configuring Scheduling Parameters of a CQ

9.7.11 Checking the Configuration

9.7.1 Establishing the Configuration Task

Applicable Environment

To achieve uniform scheduling of incoming traffic flows on multiple interfaces, you need toimplement traffic management by user levels. Interface-based HQoS only supports classifyingtraffic flows on one interface into an SQ queue for scheduling. It does not support uniformscheduling of traffic flows on multiple interfaces. Template-based HQoS, by comparison,supports classifying traffic flows on multiple interfaces into an SQ queue for scheduling. Itimplements uniform scheduling of traffic flows on multiple interfaces by defining QoSscheduling templates and applying the templates to different interfaces. The template-basedHQoS technique is used mainly on the access routers deployed at the edge of a MAN.

Pre-configuration Tasks

Before configuring template-based HQoS, complete the following tasks:

l Configuring the physical parameters and link attributes of interfaces for them to workproperly

l Assigning IP addresses to interfaces

l Configuring IP routes on the router to make routers on the link reachable

Data Preparation

To configure template-based HQoS, you need the following data.

No. Data

1 (Optional) Parameters for packet drop in flow-wred

2 (Optional) Scheduling algorithms and related parameters in flow-queue

3 (Optional) CoS relations in flow-mapping

4 (Optional) Shaping value in user-group-queue

5 QoS template names

6 l Values of CIR, PIR, and network-header-length in the user-queue command

l CIR, and CBS of the traffic suppression

7 Interfaces to which the QoS template is applied

8 (Optional) Port-wred parameters used in port-queue

9 (Optional) Scheduling algorithms, related parameters, and shaping values in port-queue

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-48 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 391: 00399154-Configuration Guide - QoS(V300R003_03).pdf

9.7.2 (Optional) Configuring an FQ WRED Object

ContextDo as follows on the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:flow-wred flow-wred-name

The flow-wred is created and the flow-wred view is displayed.

Step 3 Run:color { green | yellow | red } low-limit low-limit-percentage high-limit high-limit-percentage discard-percentage discard-percentage-value

The high and low limit percentages and the drop probability are set for different colors of packets.

NOTE

l When no flow-wred objects are set, the system adopts the default tail-drop policy.

l The high and low limit percentages for red packets can be set to the minimum; those for yellow packetscan be greater; those for green packets can be set to the maximum.

l In the actual configuration, the low limit percentage of WRED is recommended to begin with 50% andbe adjusted according to different colors of packets. 100% is recommended for the drop probability.

Through configuring a flow-wred object, users can set high limit percentage, low limitpercentage, and drop probability for queues.

l When the percentage of the actual length of a queue over the length of a CQ is less than thelow limit percentage, the system does not drop packets.

l When the percentage of the actual length of a queue over the length of a CQ is between thelow limit percentage and the high limit percentage, the system drops packets through theWRED mechanism. The longer the queue length, the higher the drop probability is.

l When the percentage of the actual length of a queue over the length of a CQ is greater thanthe high limit percentage, the system drops all subsequent packets.

You can create multiple flow-wred objects for being referenced by FQs as required. You canconfigure up to 127 flow-wred objects in the system.

----End

9.7.3 (Optional) Configuring Scheduling Parameters of an FQ

ContextDo as follows on the router:

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-49

Page 392: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:flow-queue flow-queue-name

The FQ view is displayed.

Step 3 Run:queue cos-value { [ pq | wfq weight weight-value | lpq ] | [ shaping { shaping-value | shaping-percentage shaping-percentage-value } ] | flow-wred wred-name } *

A queue scheduling policy for a class is set.

NOTE

You can configure scheduling parameters in one flow queue template for the eight FQs of a subscriberrespectively.

If you do not configure a flow queue, the system uses the default flow queue template.

l By default, the system performs PQ scheduling on the FQs with the priorities of ef, cs6, and cs7.

l The system defaults the FQs with the priorities of be, af1, af2, af3, and af4 to WFQ. The schedulingweight is 10:10:10:15:15.

l By default, the system performs no traffic shaping.

l The default discarding policy is the tail drop.

----End

9.7.4 (Optional) Configuring Mapping from an FQ to a CQ

Context

Do as follows on the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:flow-mapping mapping-name

The flow mapping view is displayed.

Step 3 Run:map flow-queue cos-value to port-queue cos-value

The priority mapping from a flow queue to a CQ is set.

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-50 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 393: 00399154-Configuration Guide - QoS(V300R003_03).pdf

NOTE

You can configure eight mappings from the flow queue to the port queue in one flow queue mappingtemplate.

When no mapping from the flow queue to the CQ is set, the system defaults the one-to-one mapping.

Users can create multiple flow-mapping templates for being referenced by SQs as required. Youcan configure up to 15 flow-mapping templates in the system.

----End

9.7.5 (Optional) Configuring the Traffic Shaping of a GQ

Context

Do as follows on the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:user-group-queue group-name [ slot slot-id ]

The specified GQ view is displayed.

Step 3 Run:shaping shaping-value { inbound | outbound }

The shaping value is set for the GQ.

NOTEWhen traffic shaping is not configured for the GQ, the system performs no traffic shaping by default.

GQs fall into two types: board GQs and global GQs.

l A board GQ is created if you specify the slot number of the board to which a GQ belongs.

l A global GQ is created if you do not specify the slot number of a board to which a GQ belongs.This means that you create a GQ on all slots.

----End

9.7.6 (Optional) Configuring Packet Loss Compensation Length ofService Templates

ContextDo as follows to configure HQoS on the router.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-51

Page 394: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:service-template service-template-name [ slot slot-id ]

The service template view is displayed.

Step 3 Run:network-header-length network-header-length { inbound | outbound }

The packet loss compensation length of the service template is specified.

NOTEAfter packets enter the router, there is difference between the length of a processed packet and the originalpacket. Packet loss compensation is a method to achieve precise traffic control by compensating a processedpacket with a certain length.

Step 4 Run:quit

The system view is displayed.

----End

9.7.7 Defining a QoS Template and Configuring SchedulingParameters

ContextDo as follows to configure HQoS on the router.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:qos-profile qos-profile-name

A QoS template is defined and the qos-profile view is displayed.

Step 3 You can choose to configure user queue scheduling parameters or traffic assurance for usersaccording actual needs.l To configure user queue scheduling parameters to implement HQoS for user services, run:

user-queue cir cir-value [ [ pir pir-value ] | [ flow-queue flow-queue-name ] | [ flow-mapping mapping-name ] | [ user-group-queue group-name ] | [ service-template service-template-name ] ] *

l To limit the rate of broadcast packets in the QoS template, run:broadcast-suppression cir cir-value [ cbs cbs-value ]

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-52 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 395: 00399154-Configuration Guide - QoS(V300R003_03).pdf

l To limit the rate of multicast packets in the QoS template, run:multicast-suppression cir cir-value [ cbs cbs-value ]

l To limit the rate of unknown unicast packets in the QoS template, run:unknown-unicast-suppression cir cir-value [ cbs cbs-value ]

NOTE

l In addition, if you configure the qos-profile command on an interface, you cannot configure the user-queue command, or the car command, or the traffic suppression function on the interface.

----End

9.7.8 Applying a QoS Template

ContextDo as follows to configure HQoS on the router.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:interface interface-type interface-number [ .sub-interface ]

The interface view is displayed.

Step 3 Run:qos-profile qos-profile-name { inbound | outbound } [ identifier none | group group-name ]

Apply the QoS template on the Ethernet interface, GE interface, Ethernet sub-interface, GE sub-interface, layer 2 GE interface, and layer 2 Ethernet interface.

----End

9.7.9 (Optional) Configuring a CQ WRED Object

ContextDo as follows on the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:port-wred port-wred-name

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-53

Page 396: 00399154-Configuration Guide - QoS(V300R003_03).pdf

A port-wred object is created and the port-wred view is displayed.

Step 3 Run:color { green | yellow | red } low-limit low-limit-value high-limit high-limit-value discard-percentage discard-percentage-value

The low limit percentage, high limit percentage, and drop probability are set.

NOTEWhen no port-wred objects are set, the system adopts the default tail-drop policy.

Through configuring a port-wred object, users can set the high limit percentage, low limitpercentage, and drop probability for queues.

l When the percentage of the actual length of a queue over the length of a CQ is less than thelow limit percentage, the system does not drop packets.

l When the percentage of the actual length of a queue over the length of a CQ is between thelow limit percentage and the high limit percentage, the system drops packets through theWRED mechanism. The longer the queue length, the higher the drop probability is.

l When the percentage of the actual length of a queue over the length of a CQ is greater thanthe high limit percentage, the system drops all subsequent packets.

Users can create multiple port-wred objects for being referenced by CQs as required. The systemprovides one default port-wred object. You can configure a maximum of seven more port-wredobjects.

----End

9.7.10 (Optional) Configuring Scheduling Parameters of a CQ

Context

CAUTIONIn upstream HQoS scheduling on an Ethernet interface, CQ adopts the default scheduling settingof the system and is not configured by users.It is recommended that users configure downstream CQ on an Ethernet interface so that thebackbone network is not congested.

Do as follows on the downstream interface of the router:

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:interface interface-type interface-number

The interface view is displayed.

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-54 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 397: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Step 3 Run:port-queue cos-value { { pq | wfq weight weight-value | lpq} | shaping { shaping-value | shaping-percentage shaping-percentage-value } | port-wred wred-name } * outbound

A queue scheduling policy for different CQs is set.

NOTE

You can configure eight CQ scheduling parameters respectively on one interface.

When no CQ is configured, the system adopts the default CQ template.

l By default, the system performs PQ on the flow queues with the priorities of ef, cs6, and cs7.

l By default, the system performs WFQ on the flow queues with the priorities of be, af1, af2, af3, andaf4. The scheduling weight is 10:10:10:15:15.

l By default, the system performs no traffic shaping.

l The discarding policy defaults to tail drop.

----End

9.7.11 Checking the Configuration

Run the following commands to check the previous configuration.

Action Command

Check the configurations of aFQ mapping object and thereferential relations of theobject.

display flow-mapping configuration [ verbose[ mapping-name ] ]

Check the configurations of theflow queue template.

display flow-queue configuration [ verbose [ flow-queue-name ] ]

Check the configurations of aflow queue's WRED object.

display flow-wred configuration [ verbose [ flow-wred-name ] ]

Check the configurations of auser group queue and itsreferential relations.

display user-group-queue configuration [ verbose[ group-name ] ]

Check the configurations of aclass queue's WRED object.

display port-wred configuration [ verbose [ port-wred-name ] ]

Check the configurations of aclass queue.

display port-queue configuration interface interface-type interface-number outbound

Check the statistics about aQoS template.

display qos-profile statistics interface interface-typeinterface-number { inbound | outbound }

Using the display qos-profile statistics interface interface-type interface-number { inbound |outbound } command, you can view the statistical information about a QoS template on aninterface.

<Quidway> display qos-profile statistics interface gigabitethernet 4/0/7 outbound

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-55

Page 398: 00399154-Configuration Guide - QoS(V300R003_03).pdf

GigabitEthernet4/0/7 outbound profile statistics: User-queue statistics: [be] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 5 minutes pass rate: 0 pps, 0 bps Last 5 minutes discard rate: 0 pps, 0 bps [af1] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 5 minutes pass rate: 0 pps, 0 bps Last 5 minutes discard rate: 0 pps, 0 bps [af2] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 5 minutes pass rate: 0 pps, 0 bps Last 5 minutes discard rate: 0 pps, 0 bps [af3] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 5 minutes pass rate: 0 pps, 0 bps Last 5 minutes discard rate: 0 pps, 0 bps [af4] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 5 minutes pass rate: 0 pps, 0 bps Last 5 minutes discard rate: 0 pps, 0 bps [ef] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 5 minutes pass rate: 0 pps, 0 bps Last 5 minutes discard rate: 0 pps, 0 bps [cs6] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 5 minutes pass rate: 0 pps, 0 bps Last 5 minutes discard rate: 0 pps, 0 bps [cs7] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 5 minutes pass rate: 0 pps, 0 bps Last 5 minutes discard rate: 0 pps, 0 bps [total] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 5 minutes pass rate: 0 pps, 0 bps Last 5 minutes discard rate: 0 pps, 0 bps Suppression statistics: Broadcast statistics: Passed: 0 bytes, 0 packets Dropped: 0 bytes, 0 packets

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-56 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 399: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Last 30 seconds passed rate: 0 bps, 0 pps Last 30 seconds dropped rate: 0 bps, 0 pps Multicast statistics: Passed: 0 bytes, 0 packets Dropped: 0 bytes, 0 packets Last 30 seconds passed rate: 0 bps, 0 pps Last 30 seconds dropped rate: 0 bps, 0 pps Unknown-unicast statistics: Passed: 0 bytes, 0 packets Dropped: 0 bytes, 0 packets Last 30 seconds passed rate: 0 bps, 0 pps Last 30 seconds dropped rate: 0 bps, 0 pps

9.8 Maintaining HQoSThis section introduces how to clearing queue statistics.

9.8.1 Clearing Queue Statistics

9.8.1 Clearing Queue Statistics

CAUTIONQueue statistics cannot be restored after you clear it. So, confirm the action before you use thecommand.Make sure that you would clear the queue statistics and run the reset command in the user viewto clear the existing queue statistics.

Action Command

Clear statistics on a specified GQ. reset user-group-queue group-name statistics slot{ slot-id | all } { inbound | outbound }

Clear statistics of a specified SQ on aspecified interface.

reset user-queue statistics interface interface-typeinterface-number { inbound | outbound }

Clear statistics of a specified SQ on aspecified PBB-TE tunnel.

reset user-queue statistics interface mac-tunneltunnel-name

Clear inbound statistics of a specifiedtraffic behavior

reset user-queue statistics traffic behaviorbehavior-name inbound

9.9 Configuration ExamplesThis section presents the examples for configuring HQoS on the Ethernet interface, QinQinterface, CPOS interface, E3 or T3 interface, and PBB-TE tunnel.

9.9.1 Example for Configuring HQoS on an Ethernet Interface

9.9.2 Example for Configuring QinQ HQoS

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-57

Page 400: 00399154-Configuration Guide - QoS(V300R003_03).pdf

9.9.3 Example for Configuring HQoS on an E3 or T3 Interface

9.9.4 Example for Configuring HQoS on a CPOS Interface

9.9.5 Example for Configuring HQoS Based on the PBB-TE Tunnel

9.9.6 Example for Configuring Class-based HQoS

9.9.7 Example for Configuring Template-based HQoS

9.9.1 Example for Configuring HQoS on an Ethernet Interface

Networking Requirements

To differentiate users and provide hierarchical QoS for them, HQoS divides a GE masterinterface into multiple sub-interfaces for access by users. For the purpose of better utilization ofthe bandwidth of the GE interface, each user accesses the network through a GE sub-interface.The packets of all users are then converged to the backbone network by the router.

As shown in Figure 9-8, router is an access device to the backbone network. The router connectsLayer 2 switches. User1 and User2 access the network through GigabitEthernet1/0/0.1 andGigabitEthernet1/0/0.2 of router. User1 is guaranteed with a bandwidth of 100 Mbit/s; User2,200 Mbit/s. The bandwidth of the EF flow of User1 is 30 Mbit/s; that of the AF1 flow, 10 Mbit/s. The bandwidth of the EF flow of User2 is 50 Mbit/s. User1 and User2 are in the same subscribergroup. The bandwidth of the group queue is 500 Mbit/s. On the downstream interface ofrouter, the traffic rate of EF flow is no more than 100 Mbit/s.

NOTE

Home users carry out broadband access through home service gateways. A home service gateway addsVLAN tags to service packets of home users to identify the users' VLAN and the 802.1 priorities of services.Home users' packets with VLAN tags are forwarded at Layer 2 through DSLAMs and switches. VLANtags are terminated on the sub-interface of router and then the packets go to the ISP network.

Figure 9-8 Networking diagram for configuring SQ

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-58 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 401: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Configuration Roadmap

CAUTIONIn upstream HQoS scheduling on an Ethernet interface, CQ adopts the default scheduling settingand is not configured by users.It is recommended that users configure downstream CQ on an Ethernet interface so that thebackbone network is not congested.

The configuration roadmap is as follows:

1. Configuring parameters of packet dropping for the FQ WRED object.2. Configuring algorithms for flow queue scheduling and related parameters.3. Configuring service class mappings from FQs to CQs.4. Configuring values of GQ shaping.5. Configuring SQs on the upstream interface of the access router.6. Configuring parameters of packet dropping for a CQ WRED object.7. Configuring CQs on the downstream interface of the access router.

Data PreparationTo complete the configuration, you need the following data:

l VLAN IDs of sub-interfaces

l Parameters of flow-wred packet dropping

l Algorithms for flow-queue scheduling and related parameters

l Service class mappings for flow-mapping

l Values of user-group-queue shaping

l Values of user-queue CIR, PIR, and network-header-length

l Parameters of port-wred referenced by port-queue

l Algorithms for port-queue scheduling and related parameters and shaping values

Configuration ProcedureNOTE

Before you configure the HQoS function, it is recommended that you configure the simple trafficclassification or complex traffic classification; otherwise, in FQ scheduling all traffic is considered BE bydefault.

1. Configure a WRED object referenced by FQs.# Configure parameters of flow-wred packet dropping.<Quidway> system view[Quidway] flow-wred test[Quidway-flow-wred-test] color green low-limit 70 high-limit 100 discard-percentage 100[Quidway-flow-wred-test] color yellow low-limit 60 high-limit 90 discard-percentage 100[Quidway-flow-wred-test] color red low-limit 50 high-limit 80 discard-percentage 100

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-59

Page 402: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[Quidway-flow-wred-test] return

After the preceding configuration, you can run the display flow-wred configurationverbose command to view the configured parameters of the FQ WRED object.<Quidway> display flow-wred configuration verbose testflow-wred-name : test--------------------------------------------------- color low-limit high-limit discard-percent--------------------------------------------------- green 70 100 100 yellow 60 90 100 red 50 80 100Reference relationships : NULLTotal number : 1

2. Configure algorithms for queue scheduling and related parameters of FQs.# Configure the scheduling algorithms, WRED parameters, and shaping values for FQs.<Quidway> system view[Quidway] flow-queue test1[Quidway-flow-queue-template-test1] queue af1 lpq flow-wred test shaping 10000[Quidway-flow-queue-template-test1] queue ef pq flow-wred test shaping 30000[Quidway-flow-queue-template-test1] quit[Quidway] flow-queue test2[Quidway-flow-queue-template-test2] queue ef pq flow-wred test shaping 25000[Quidway-flow-queue-template-test2] return

After the preceding configuration, you can run the display flow-queue configurationverbose command to view the configuration of the FQ template.<Quidway> display flow-queue configuration verbose test1 Codes: Arith(Schedule algorithm) U-Weight(Schedule weight configured by users) I-Weight(Inverse schedule weight used by TM) A-Weight(Actual schedule weight obtained by users) Shp(Shaping value, the percentage of subscriber queue's PIR) Drop-Arith(The name of the WRED object used by the flow queue)

Flow Queue Template : test1------------------------------------------------------------------Cos Arith U-Weight I-Weight A-Weight Shp Pct Drop-Arith------------------------------------------------------------------be wfq 10 3 10.00 - - Tail Dropaf1 lpq - - - 10000 - testaf2 wfq 10 3 10.00 - - Tail Dropaf3 wfq 15 2 15.00 - - Tail Dropaf4 wfq 15 2 15.00 - - Tail Dropef pq - - - 30000 - testcs6 pq - - - - - Tail Dropcs7 pq - - - - - Tail DropReference relationships : NULL <Quidway> display flow-queue configuration verbose test2Codes: Arith(Schedule algorithm) U-Weight(Schedule weight configured by users) I-Weight(Inverse schedule weight used by TM) A-Weight(Actual schedule weight obtained by users) Shp(Shaping value, the percentage of subscriber queue's PIR) Drop-Arith(The name of the WRED object used by the flow queue)

Flow Queue Template : test2------------------------------------------------------------------Cos Arith U-Weight I-Weight A-Weight Shp Pct Drop-Arith------------------------------------------------------------------be wfq 10 3 10.00 - - Tail Dropaf1 wfq 10 3 10.00 - - Tail Dropaf2 wfq 10 3 10.00 - - Tail Dropaf3 wfq 15 2 15.00 - - Tail Dropaf4 wfq 15 2 15.00 - - Tail Drop

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-60 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 403: 00399154-Configuration Guide - QoS(V300R003_03).pdf

ef pq - - - 25000 - testcs6 pq - - - - - Tail Dropcs7 pq - - - - - Tail DropReference relationships : NULL

3. Configure service class mappings from FQs to CQs.<Quidway> system view[Quidway] flow-mapping test1[Quidway-flow-mapping-test1] map flow-queue af1 to port-queue ef[Quidway-flow-mapping-test1] return

After the preceding configuration, you can run the display flow-mapping configurationverbose command to view the configured parameters of the FQ mapping object and thereferential relations of the object.<Quidway> display flow-mapping configuration verbose test1flow-mapping-name : test1 fq-cosvalue to pq-cosvalue be to be af1 to ef af2 to af2 af3 to af3 af4 to af4 ef to ef cs6 to cs6 cs7 to cs7 [reference relationship] NULL

4. Configure the value for the GQ shaping.# Configure user-group-queue.<Quidway> system view[Quidway] user-group-queue test[Quidway-user-group-queue-test-slot-all] shaping 500000 inbound[Quidway-user-group-queue-test-slot-all] return

After the preceding configuration, you can run the display user-group-queueconfiguration verbose command to view the configuration of the GQ and the referentialrelations.<Quidway> display user-group-queue configuration verbose test user-group-queue-name : test slot : 3 [current configuration] inbound shaping-value <kbps> : 500000 pbs-value <byte> : 524288 outbound shaping-value <kbps> : NA pbs-value <byte> : NA [reference relationship] NULL

5. Configure an SQ on the upstream interface of the access router.<Quidway> system view[Quidway] interface gigabitethernet 1/0/0[Quidway-GigabitEthernet1/0/0] undo shutdown[Quidway-GigabitEthernet1/0/0] quit[Quidway] interface gigabitethernet 1/0/0.1[Quidway-GigabitEthernet1/0/0.1] trust upstream default[Quidway-GigabitEthernet1/0/0.1] trust 8021p[Quidway-GigabitEthernet1/0/0.1] vlan-type dot1q 1[Quidway-GigabitEthernet1/0/0.1] ip address 100.1.1.1 24[Quidway-GigabitEthernet1/0/0.1] user-queue cir 100000 pir 100000 flow-queue test1 flow-mapping test1 user-group-queue test inbound[Quidway-GigabitEthernet1/0/0.1] return[Quidway] interface gigabitethernet 1/0/0.2[Quidway-GigabitEthernet1/0/0.2] trust upstream default[Quidway-GigabitEthernet1/0/0.2] trust 8021p

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-61

Page 404: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[Quidway-GigabitEthernet1/0/0.2] vlan-type dot1q 2[Quidway-GigabitEthernet1/0/0.2] ip address 200.1.2.1 24[Quidway-GigabitEthernet1/0/0.2] user-queue cir 200000 pir 200000 flow-queue test2 flow-mapping test1 user-group-queue test inbound[Quidway-GigabitEthernet1/0/0.2] return[Quidway]service-template st1[Quidway-service-template-st1-slot-all] network-header-length 10 inboundAfter the preceding configuration, you can run the display user-queue configurationinterface command to view the detailed HQoS configuration on the interface.<Quidway> display user-queue configuration interface gigabitethernet 1/0/0.1 inbounduser-queue configuration infomation show : GigabitEthernet1/0/0.1 Inbound: CirValue<kbps>: 100000 PirValue<kbps>: 100000 FlowQueue: test1 FlowMapping: test1 GroupQueue: test service-template: NULL <Quidway> display user-queue configuration interface gigabitethernet 1/0/0.2 inbounduser-queue configuration infomation show : GigabitEthernet1/0/0.2 Inbound: CirValue<kbps>: 200000 PirValue<kbps>: 200000 FlowQueue: test2 FlowMapping: test1 GroupQueue: test service-template: NULL

6. Configure a WRED object referenced by CQs.# Configure the parameters of port-wred packet dropping referenced by CQs.<Quidway> system view[Quidway] port-wred test[Quidway-port-wred-test] color green low-limit 70 high-limit 100 discard-percentage 100[Quidway-port-wred-test] color yellow low-limit 60 high-limit 90 discard-percentage 100[Quidway-port-wred-test] color red low-limit 50 high-limit 80 discard-percentage 100[Quidway-port-wred-test] returnAfter the preceding configuration, you can run the display port-wred configurationverbose command to view the configured parameters of the CQ WRED object.<Quidway> display port-wred configuration verbose testport-wred-name : test color low-limit high-limit discard-percentgreen 70 100 100yellow 60 90 100 red 50 80 100 [reference relationship] NULL

7. Verify the configuration.When packets are available in the network, you can find that packets of User1's AF1 andEF flows and User2's EF flow are forwarded at the guaranteed bandwidth.Running the display port-queue statistics command on the downstream GE 2/0/0 ofrouter, you can see that the packets of the CS7 flow increases rapidly.<Quidway> display port-queue statistics interface gigabitethernet 2/0/0 ef outbound[ef] Total pass: 104,762,039 packets, 10,251,481,862 bytes Total discard: 0 packets, 0 bytes

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-62 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 405: 00399154-Configuration Guide - QoS(V300R003_03).pdf

--Drop tail discard: 0 packets, 0 bytes --Wred discard: 0 pps, 0 bps Last 30 seconds pass rate: 0 pps, 0 bps Last 30 seconds discard rate: 0 pps, 0 bps --Drop tail discard rate: 0 pps, 0 bps --Wred discard rate: 0 pps, 0 bps

Configuration FilesConfiguration file of router# sysname Quidway#flow-wred test color green low-limit 70 high-limit 100 discard-percentage 100color yellow low-limit 60 high-limit 90 discard-percentage 100color red low-limit 50 high-limit 80 discard-percentage 100#flow-mapping test1 map flow-queue af1 to port-queue ef#flow-queue test1 queue af1 lpq shaping 10000 flow-wred testqueue ef pq shaping 30000 flow-wred test#flow-queue test2 queue ef pq shaping 25000 flow-wred test#user-group-queue test shaping 500000 inbound#service-template st1 network-header-length 10 inbound#interface GigabitEthernet1/0/0 undo shutdown#interface GigabitEthernet1/0/0.1trust upstream defaulttrust 8021pvlan-type dot1q 1ip address 100.1.1.1 255.255.255.0user-queue cir 100000 pir 100000 flow-queue test1 flow-mapping test1 user-group-queue test inbound#interface GigabitEthernet1/0/0.2trust upstream defaulttrust 8021pvlan-type dot1q 2ip address 200.1.2.1 255.255.255.0user-queue cir 200000 pir 200000 flow-queue test2 flow-mapping test1 user-group-queue test inbound#port-wred test color green low-limit 70 high-limit 100 discard-percentage 100color yellow low-limit 60 high-limit 90 discard-percentage 100color red low-limit 50 high-limit 80 discard-percentage 100#interface GigabitEthernet2/0/0 undo shutdownip address 200.1.1.1 255.255.255.0port-queue ef pq shaping 100 port-wred test outbound

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-63

Page 406: 00399154-Configuration Guide - QoS(V300R003_03).pdf

#osfp 10 area 0.0.0.0 network 200.1.1.0 0.0.0.255 network 200.1.2.0 0.0.0.255 network 100.1.1.0 0.0.0.255#return

9.9.2 Example for Configuring QinQ HQoS

Networking RequirementsAs shown in Figure 9-9, router is an edge device of the backbone network. The router connectsLayer 2 switches. User1 and User2 access the network through the VLAN group of the two QinQtermination sub-interfaces GigabitEthernet1/0/0.1 and GigabitEthernet1/0/0.2of router. User1is guaranteed with a bandwidth of 100 Mbit/s; User2, 200 Mbit/s. The bandwidth of the EF flowof User1 is 30 Mbit/s; that of the AF1 flow, 10 Mbit/s. The bandwidth of the EF flow of User2is 50 Mbit/s. User1 and User2 are in the same subscriber group. The bandwidth of the groupqueue is 500 Mbit/s. On the downstream interface of router, the traffic rate of CS7 flow is nomore than 100 Mbit/s.

NOTE

Home users carry out broadband access through home service gateways. A home service gateway addsVLAN tags to service packets of home users to identify the users' VLAN and the 802.1 priorities of services.According to the QinQ technology, DSLAM can also encapsulate an outer tag over a VLAN tag in a homeuser's packet. This makes it easy to manage internal VLAN users. For example, the inner VLAN tag marksa home user and the outer VLAN tag marks a cell; or the inner VLAN tag marks a cell and the outer VLANtag marks a service. In this manner, home users' packets with two-layer VLAN tags are forwarded at Layer2 through DSLAMs and switches. The VLAN tags are terminated on the sub-interface of router and thenthe packets go to the ISP network.

Figure 9-9 Networking diagram for configuring QinQ HQoS

Configuration RoadmapThe configuration roadmap is as follows:

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-64 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 407: 00399154-Configuration Guide - QoS(V300R003_03).pdf

1. Configuring parameters of packet dropping for flow queue WRED objects.2. Configuring algorithms for flow queue scheduling and related parameters.3. Configuring service class mappings from FQs to CQs.4. Configuring values of GQ shaping.5. Enabling QinQ on the master interface.6. Creating and configuring QinQ sub-interfaces.7. Creating VLAN groups.8. Configuring SQs on the upstream interface of the PE1.

NOTE

In this procedure, HQoS is configured only on a QinQ termination sub-interface. You do not need toconfigure upstream HQoS CQs. You can configure HQoS on the downstream interface of a router orconfigure only CQs according to the actual network traffic to prevent network congestion.

Data PreparationTo complete the configuration, you need the following data:

l QinQ termination sub-interface numbers and vlan-group IDs

l Parameters of flow-wred packet dropping

l Algorithms for flow-queue scheduling and related parameters

l Service class mappings for flow-mapping

l Value of user-group-queue shaping

l Values of user-queue CIR and PIR

Configuration ProcedureNOTE

Before you configure the HQoS function, it is recommended that you configure the simple trafficclassification or complex traffic classification; otherwise, in FQ scheduling all traffic is considered BE bydefault.

1. Configure a WRED object referenced by a flow queue.# Configure parameters of flow-wred packet dropping.<Quidway> system view[Quidway] flow-wred test[Quidway-flow-wred-test] color green low-limit 70 high-limit 100 discard-percentage 100[Quidway-flow-wred-test] color yellow low-limit 60 high-limit 90 discard-percentage 100[Quidway-flow-wred-test] color red low-limit 50 high-limit 80 discard-percentage 100[Quidway-flow-wred-test] returnAfter the preceding configuration, you can run the display flow-wred configurationverbose command to view the configured parameters of the FQ WRED object.<Quidway> display flow-wred configuration verbose testflow-wred-name : test--------------------------------------------------- color low-limit high-limit discard-percent--------------------------------------------------- green 70 100 100 yellow 60 90 100 red 50 80 100

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-65

Page 408: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Reference relationships : NULLTotal number : 1

2. Configure algorithms for flow queue scheduling and related parameters.# Configure the scheduling algorithms, WRED parameters, and shaping values for FQs.<Quidway> system view[Quidway] flow-queue test1[Quidway-flow-queue-template-test] queue af1 lpq flow-wred test shaping 10000[Quidway-flow-queue-template-test] queue ef pq flow-wred test shaping 30000[Quidway-flow-queue-template-test] quit[Quidway] flow-queue test2[Quidway-flow-queue-template-test] queue ef pq flow-wred test shaping 25000[Quidway-flow-queue-template-test] returnAfter the preceding configuration, you can run the display flow-queue configurationverbose command to view the configuration of the FQ template.<Quidway> display flow-queue configuration verbose test1 Codes: Arith(Schedule algorithm) U-Weight(Schedule weight configured by users) I-Weight(Inverse schedule weight used by TM) A-Weight(Actual schedule weight obtained by users) Shp(Shaping value, the percentage of subscriber queue's PIR) Drop-Arith(The name of the WRED object used by the flow queue)

Flow Queue Template : test1------------------------------------------------------------------Cos Arith U-Weight I-Weight A-Weight Shp Pct Drop-Arith------------------------------------------------------------------be wfq 10 3 10.00 - - Tail Dropaf1 lpq - - - 10000 - testaf2 wfq 10 3 10.00 - - Tail Dropaf3 wfq 15 2 15.00 - - Tail Dropaf4 wfq 15 2 15.00 - - Tail Dropef pq - - - 30000 - testcs6 pq - - - - - Tail Dropcs7 pq - - - - - Tail DropReference relationships : NULL <Quidway> display flow-queue configuration verbose test2Codes: Arith(Schedule algorithm) U-Weight(Schedule weight configured by users) I-Weight(Inverse schedule weight used by TM) A-Weight(Actual schedule weight obtained by users) Shp(Shaping value, the percentage of subscriber queue's PIR) Drop-Arith(The name of the WRED object used by the flow queue)

Flow Queue Template : test2------------------------------------------------------------------Cos Arith U-Weight I-Weight A-Weight Shp Pct Drop-Arith------------------------------------------------------------------be wfq 10 3 10.00 - - Tail Dropaf1 wfq 10 3 10.00 - - Tail Dropaf2 wfq 10 3 10.00 - - Tail Dropaf3 wfq 15 2 15.00 - - Tail Dropaf4 wfq 15 2 15.00 - - Tail Dropef pq - - - 25000 - testcs6 pq - - - - - Tail Dropcs7 pq - - - - - Tail DropReference relationships : NULL

3. Configure service class mappings from FQs to CQs.<Quidway> system view[Quidway] flow-mapping test1[Quidway-flow-mapping-test1] map flow-queue af1 to port-queue ef[Quidway-flow-mapping-test1] quit

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-66 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 409: 00399154-Configuration Guide - QoS(V300R003_03).pdf

After the preceding configuration, you can run the display flow-mapping configurationverbose command to view the configured parameters of the FQ mapping objects and thereferential relations of the objects.<Quidway> display flow-mapping configuration verbose test1flow-mapping-name : test1 fq-cosvalue to pq-cosvalue be to be af1 to ef af2 to af2 af3 to af3 af4 to af4 ef to ef cs6 to cs6 cs7 to cs7 [reference relationship] NULL

4. Configure a value of a GQ shaping.# Configure user-group-queue<Quidway> system view[Quidway] user-group-queue test[Quidway-user-group-queue-test-slot-all] shaping 500000 inbound[Quidway-user-group-queue-test-slot-all] returnAfter the preceding configuration, you can run the display user-group-queueconfiguration verbose command to view the configuration of the GQ and the referentialrelations.<Quidway> display user-group-queue configuration verbose test user-group-queue-name : test slot : 3 [current configuration] inbound shaping-value <kbps> : 500000 pbs-value <byte> : 524288 outbound shaping-value <kbps> : NA pbs-value <byte> : NA [reference relationship] NULL

5. Configure the master interface to enable the user termination mode.# Configure the user termination mode.[Quidway] interface gigabitethernet 1/0/0[Quidway-GigabitEthernet1/0/0] undo shutdown[Quidway-GigabitEthernet1/0/0] mode user-termination[Quidway-GigabitEthernet1/0/0] quit

6. Create QinQ termination sub-interfaces and configure QinQ termination.[Quidway] interface gigabitethernet 1/0/0.1[Quidway-GigabitEthernet1/0/0.1] control-vid 1 qinq-termination[Quidway-GigabitEthernet1/0/0.1] qinq termination pe-vid 100 ce-vid 600 vlan-group 1[Quidway] interface gigabitethernet 1/0/0.2[Quidway-GigabitEthernet1/0/0.2] control-vid 2 qinq-termination[Quidway-GigabitEthernet1/0/0.2] qinq termination pe-vid 100 ce-vid 700 vlan-group 1

7. Create a VLAN group and configure SQs of the VLAN group.<Quidway> system view[Quidway] interface gigabitethernet 1/0/0.1[Quidway-GigabitEthernet1/0/0.1] trust upstream default[Quidway-GigabitEthernet1/0/0.1] ip address 100.1.1.1 24[Quidway-GigabitEthernet1/0/0.1] vlan-group 1[Quidway-GigabitEthernet1/0/0.1-vlangroup1] user-queue cir 100000 pir 100000 flow-queue test1 flow-mapping test1 user-group-queue test inbound[Quidway-GigabitEthernet1/0/0.1-vlangroup1] quit

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-67

Page 410: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[Quidway-GigabitEthernet1/0/0.1] quit[Quidway] interface gigabitethernet 1/0/0.2[Quidway-GigabitEthernet1/0/0.2] trust upstream default[Quidway-GigabitEthernet1/0/0.2] ip address 200.1.1.1 24[Quidway-GigabitEthernet1/0/0.2] vlan-group 1[Quidway-GigabitEthernet1/0/0.2-vlangroup1] user-queue cir 200000 pir 200000 flow-queue test2 flow-mapping test1 user-group-queue test inbound[Quidway-GigabitEthernet1/0/0.1-vlangroup1] quit[Quidway-GigabitEthernet1/0/0.1] return

8. Verify the configuration.When packets are available in the network, you can find that packets of User1's AF1 andEF flows and User2's EF flow are forwarded at the guaranteed bandwidth.Running the display port-queue statistics command on the downstream GE 2/0/0 ofrouter, you can see that the packets of the CS7 flow increases rapidly.<Quidway> display port-queue statistics interface gigabitethernet 2/0/0 ef outbound[ef] Total pass: 104,762,039 packets, 10,251,481,862 bytes Total discard: 0 packets, 0 bytes --Drop tail discard: 0 packets, 0 bytes --Wred discard: 0 pps, 0 bps Last 30 seconds pass rate: 0 pps, 0 bps Last 30 seconds discard rate: 0 pps, 0 bps --Drop tail discard rate: 0 pps, 0 bps --Wred discard rate: 0 pps, 0 bps

Configuration FileConfiguration file of router:# sysname Quidway#flow-wred test color green low-limit 70 high-limit 100 discard-percentage 100color yellow low-limit 60 high-limit 90 discard-percentage 100color red low-limit 50 high-limit 80 discard-percentage 100flow-mapping test1 map flow-queue af1 to port-queue ef#flow-queue test1 queue af1 lpq shaping 10000 flow-wred testqueue ef pq shaping 30000 flow-wred test#flow-queue test2 queue ef pq shaping 25000 flow-wred test#user-group-queue test shaping 500000 inbound# interface GigabitEthernet1/0/0 undo shutdownmode user-termination#interface GigabitEthernet1/0/0.1trust upstream defaultip address 100.1.1.1 255.255.255.0control-vid 1 qinq-termination

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-68 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 411: 00399154-Configuration Guide - QoS(V300R003_03).pdf

vlan-group 1user-queue cir 100000 pir 100000 flow-queue test1 flow-mapping test1 user-group-queue test inboundqinq termination pe-vid 100 ce-vid 600 vlan-group 1#interface GigabitEthernet1/0/0.2trust upstream defaultip address 200.1.2.1 255.255.255.0control-vid 2 qinq-terminationvlan-group 1user-queue cir 200000 pir 200000 flow-queue test2 flow-mapping test1 user-group-queue test inboundqinq termination pe-vid 100 ce-vid 700 vlan-group#interface GigabitEthernet2/0/0undo shutdownip address 200.1.1.1 255.255.255.0#osfp 10 area 0.0.0.0 network 200.1.1.0 0.0.0.255 network 200.1.2.0 0.0.0.255 network 100.1.1.0 0.0.0.255#return

9.9.3 Example for Configuring HQoS on an E3 or T3 Interface

Networking RequirementsAs shown in Figure 9-10, E3 links are set up between the three routers. IP packets are forwardedwith IPv4 between Router A, Router B, and Router C. Packets from Router B go to Router Aand Router B through the serial interface channelized from the E3 interface.

Guaranteed bandwidth for the packets forwarded by Router B is configured. In addition, thepackets sent from Router B must meet the following requirements:

l The traffic rate of the packets that are sent from Serial 1/1/0/0:0 of Router B is 2 Mbit/sand the scheduling mode is CBPQ. When the actual traffic goes at a rate higher than 2 Mbit/s, the subsequent excessive packets are discarded. The receiving rate of the AF1 flow is 1Mbit/s. When the actual traffic goes at a rate higher than the set rate, the subsequentexcessive packets are discarded.

l The traffic rate of the packets that are sent from Serial 2/1/0/0:0 of Router B is 2 Mbit/sand the scheduling mode is CBFQ. When the actual traffic goes at a rate higher than the 2Mbit/s, the subsequent excessive packets are discarded. The receiving rate of the EF flowis 1 Mbit/s. When the actual traffic rate is greater than 1 Mbit/s but less than 2 Mbit/s, thesubsequent excessive packets are sent in a lower priority.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-69

Page 412: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Figure 9-10 Networking diagram for configuring HQoS on E3 interfaces

NOTE

This example assumes that the serial interfaces have been configured correctly and traffic can be forwardedwith IPv4 between Router A and Router B.The configuration of HQoS on a T3 interface is the same as that on an E3 interface.

Configuration RoadmapThe configuration roadmap is as follows:

1. Enabling the simple traffic classification on incoming packets.2. Configuring HQoS on the serial interface channelized from the E3 interface of Router B.

Data PreparationTo complete the configuration, you need the following data:

l HQoS total bandwidth (2 Mbit/s) and scheduling mode on Serial 1/1/0/0:0 (CBPQ) and onSerial 2/1/0/0:0 (CBFQ) of Router B

l HQoS bandwidth for AF1 flows (1 Mbit/s) on Serial 1/1/0/0:0 of Router B

l HQoS bandwidth for EF flows (1 Mbit/s) on Serial 2/1/0/0:0 of Router B

Configuration Procedure1. Configure IP addresses and routes on the interfaces as shown in the figure (not mentioned

here).2. Enable the simple traffic classification on incoming packets.

<RouterB> system-view[RouterB] interface pos3/0/0[RouterB–Pos3/0/0] undo shutdown[RouterB–Pos3/0/0] trust upstream default[RouterB–Pos3/0/0] return

3. Configure HQoS.# Configure Serial 1/1/0/0:0 of Router B.<RouterB> system-view[RouterB] controller e3 1/0/0[RouterB-E3 1/0/0] using e3[RouterB-E3 1/0/0] undo shutdown[RouterB-E3 1/0/0] quit[RouterB] interface serial1/1/0/0:0

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-70 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 413: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[RouterB-Serial1/1/0/0:0] undo shutdown[RouterB-Serial1/1/0/0:0] hqos policy cbpq bandwidth 2m[RouterB-Serial1/1/0/0:0] hqos queue af1 cir 1m drop

# Configure Serial 2/1/0/0:0 of Router B.<RouterB> system-view[RouterB] controller e3 2/0/0[RouterB-E3 2/0/0] using e3[RouterB-E3 1/0/0] undo shutdown[RouterB-E3 1/0/0] quit[RouterB] interface serial2/1/0/0:0[RouterB-Serial2/1/0/0:0] undo shutdown[RouterB-Serial2/1/0/0:0] hqos policy cbfq bandwidth 2m[RouterB-Serial2/1/0/0:0] hqos queue ef cir 1m remark

4. Verify the configuration.When Serial 1/1/0/0:0 and Serial 2/1/0/0:0 of Router B forwards traffic, use the displayhqos queue statistics command to check the traffic statistics on the interface.<RouterB> display hqos queue statistics Serial 1/1/0/0:0 af1Serial1/1/0/0:0 statistics: Forward bits : 18235840 ( bits ) Forward packets : 23260 ( packets ) Remark bits : 0 ( bits ) Remark packets : 0 ( packets ) Drop bits : 1411460288 ( bits ) Drop packets : 1800331 ( packets ) Forward bits rate : 0 ( bits/sec ) Forward packet rate : 0 ( packets/sec ) <RouterB> display hqos queue statistics Serial 2/1/0/0:0 efSerial 2/1/0/0:0 statistics: Forward bits : 2050664048 bits Forward packets : 2619677 packets Remark bits : 9112926 bits Remark packets : 11632 packets Drop bits : 82011854896 bits Drop packets : 104762039 packet Forward bits rate : 0 bits/sec Forward packet rate : 0 packet/sec

Configuration Filesl Configuration file of Router A

# sysname RouterA#controller e3 1/0/0 using e3 undo shutdown#interface Serial 1/1/0/0:0 undo shutdown ip address 192.168.0.1 255.255.255.0#ospf 1 area 0.0.0.0 network 192.168.0.0 0.0.0.255#return

l Configuration file of Router B# sysname RouterB#controller e3 1/0/0 using e3 undo shutdown#

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-71

Page 414: 00399154-Configuration Guide - QoS(V300R003_03).pdf

controller e3 2/0/0 using e3 undo shutdown#interface Serial 1/1/0/0:0 undo shutdown ip address 192.168.0.2 255.255.255.0hqos policy cbpq bandwidth 2Mhqos queue af1 cir 1m drop#interface Serial 2/1/0/0:0 undo shutdown ip address 10.1.1.2 255.255.255.0hqos policy cbfq bandwidth 2Mhqos queue ef cir 1m remark#interface Pos3/0/0 undo shutdownlink-protocol pppip address 100.1.1.1 255.255.255.0trust upstream default#ospf 1 area 0.0.0.0 network 10.1.1.0 0.0.0.255 network 192.168.0.0 0.0.0.255 network 100.1.1.0 0.0.0.255#return

l Configuration file of Router C# sysname RouterC#interface Serial 2/1/0/0:0 undo shutdown ip address 10.1.1.1 255.255.255.0#ospf 1 area 0.0.0.0 network 10.1.1.0 0.0.0.255#Return

9.9.4 Example for Configuring HQoS on a CPOS Interface

Networking RequirementsAs shown in Figure 9-11, an E1 link is established between Router A and Router B. IPv4 isapplied to Router A and Router B. Packets coming from Router A go through MP-Group 5/0/1,which is channelized from the CPOS, and Serial 5/0/0/1:0, and then reach Router B. MP-Group5/0/1 consists of five serial interfaces channelized from CPOS 5/0/1. Packets of the two usergroups flow out of MP-Group 5/0/1 and Serial 5/0/0/1:0.

You are required to provide ensured bandwidth for packets leaving Router A. The configurationdata is as follows:

l The total bandwidth for MP-Group 5/0/1 on Router A is 10 Mbit/s. The schedulingalgorithm is CBFQ. If the traffic rate is greater than 10 Mbit/s, the subsequent packets aredropped. The incoming traffic rate of the AF1 flow is 2 Mbit/s. If the traffic rate exceedsthe limit, the subsequent excessive packets are remarked and then forwarded through anidle interface. The incoming traffic rate of the AF2 flow is limited to 3 Mbit/s. If the trafficrate exceeds the limit, the subsequent excessive packets are dropped.

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-72 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 415: 00399154-Configuration Guide - QoS(V300R003_03).pdf

l The total bandwidth of Serial 5/0/0/1:0 on Router A is 2 Mbit/s and the scheduling algorithmis CBFQ. If the actual traffic goes at a rate higher than 2 Mbit/s, the excessive packets aredropped. The incoming rate of the EF flow is 2 Mbit/s. If the actual traffic goes at a ratehigher than the set rate, the excessive packets are dropped.

Figure 9-11 Networking diagram for configuring HQoS on a CPOS interface

NOTE

This configuration example assumes that the MP-Group interface of the two routers has been configured.IPv4 packets can be forwarded between Router A and Router B. In this configuration example, packets aresent from WAN1 to the GE interface on Router A and then are forwarded out from the CPOS interface onRouter A. After receiving the packets, the CPOS interface on Router B forwards them to WAN2.

Configuration RoadmapThe configuration roadmap is as follows:

1. Enabling simple traffic classification (STC) for incoming packets2. Configuring HQoS on the serial interface channelized from the CPOS interface of Router

A3. Configuring HQoS on the MP-Group interface created on the basis of the CPOS on Router

A

Data PreparationTo complete the configuration, you need the following data:

l Total bandwidth (10 Mbit/s) and scheduling mode on MP-Group 5/0/1 (CBFQ) of RouterA. HQoS bandwidth for AF1 flows (2 Mbit/s) and for AF2 flows (3Mbps).

l Total bandwidth (2 Mbit/s) and scheduling mode on Serial 5/0/0/1:0 (CBFQ) of Router A. HQoS bandwidth for EF flows (2 Mbps).

Configuration Procedure1. Configure IP addresses of the interfaces and routes according to the networking diagram.

(To be omitted.)

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-73

Page 416: 00399154-Configuration Guide - QoS(V300R003_03).pdf

2. Enable STC on incoming packets.<RouterA> system-view[RouterA] interface gigabitethernet 1/0/0[RouterA–GigabitEthernet1/0/0] undo shutdown[RouterA–GigabitEthernet1/0/0] trust upstream default[RouterA–GigabitEthernet1/0/0] return

3. Configure HQoS.# Configure MP-Group 5/0/1 on Router A.<RouterA> system-view[RouterA] interface mp-group 5/0/1[RouterA-Mp-group5/0/1] undo shutdown[RouterA-Mp-group5/0/1] hqos policy cbfq bandwidth 10000k[RouterA-Mp-group5/0/1] hqos queue af1 cir 2000k remark[RouterA-Mp-group5/0/1] hqos queue af2 cir 3000k drop[RouterA-Mp-group5/0/1] return

# Configure Serial 5/0/0/1:0 on Router A.<RouterA> system-view [RouterA] interface serial 5/0/0/1:0[RouterA-Serial5/0/0/1:0] undo shutdown[RouterA-Serial5/0/0/1:0] hqos policy cbfq bandwidth 2000k[RouterA-Serial5/0/0/1:0] hqos queue ef cir 1000k remark[RouterA-Serial5/0/0/1:0] return

4. Verify the configuration.After the preceding configuration, run the display hqos queue statistics command to viewthe traffic statistics on the interface when packets are flowing through MP-Group 5/0/1 andSerial 5/0/0/1:0 of Router A.<RouterA> display hqos queue statistics mp-group 5/0/1 af1Mp-group5/0/1 statistics: Forward bits : 219216688 ( bits ) Forward packets : 27457 ( packets ) Remark bits : 196462288 ( bits ) Remark packets : 24607 ( packets ) Drop bits : 207615936 ( bits ) Drop packets : 26004 ( packets ) <RouterA> display hqos queue statistics serial 5/0/0/1:0 efSerial5/0/0/1:0 statistics: Forward bits : 2050664048 bits Forward packets : 2619677 packet Remark bits : 9112926 bits Remark packets : 11632 packet Drop bits : 82011854896 bits Drop packets : 104762039 packet

Configuration Filesl Configuration file of Router A

# sysname RouterA#isis 10 network-entity 00.0080.0012.0000.00#isis 11 network-entity 00.0080.0012.0000.00 #controller Cpos5/0/1 e1 1 unframed e1 2 unframed e1 3 unframed e1 4 unframed e1 5 unframed

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-74 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 417: 00399154-Configuration Guide - QoS(V300R003_03).pdf

#controller Cpos5/0/0 e1 1 unframed#interface Mp-group5/0/1 undo shutdown shutdown ip address 10.10.10.1 255.255.255.0 isis enable 10hqos policy cbfq bandwidth 1000khqos queue af1 cir 200k remarkhqos queue af2 cir 300k drop#interface Serial5/0/1/1:0 undo shutdown link-protocol ppp ppp mp Mp-group 5/0/1#interface Serial5/0/1/2:0 undo shutdown link-protocol ppp ppp mp Mp-group 5/0/1#interface Serial5/0/1/3:0 undo shutdown link-protocol ppp ppp mp Mp-group 5/0/1#interface Serial5/0/1/4:0 undo shutdown link-protocol ppp ppp mp Mp-group 5/0/1#interface Serial5/0/1/5:0 undo shutdown link-protocol ppp ppp mp Mp-group 5/0/1#interface Serial5/0/0/1:0 undo shutdown ip address 11.11.11.1 255.255.255.0 link-protocol ppp hqos policy cbfq bandwidth 200k hqos queue ef cir 100k remarkisis enable 11# interface GigabitEthernet1/0/0 undo shutdown# interface GigabitEthernet1/0/0.1 vlan-type dot1q 10 ip address 21.21.21.1 255.255.255.0 isis enable 10 trust upstream default# interface GigabitEthernet1/0/0.2 vlan-type dot1q 20 ip address 22.22.22.1 255.255.255.0 isis enable 11 trust upstream default#return

l Configuration file of Router B# sysname RouterB#isis 10 network-entity 00.0080.0013.0000.00#

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-75

Page 418: 00399154-Configuration Guide - QoS(V300R003_03).pdf

isis 11 network-entity 00.0080.0013.0000.00 #controller Cpos6/0/1 e1 1 unframed e1 2 unframed e1 3 unframed e1 4 unframed e1 5 unframed#controller Cpos6/0/0 e1 1 unframed#interface Mp-group6/0/1 undo shutdown shutdown ip address 10.10.10.2 255.255.255.0 isis enable 10#interface Serial6/0/1/1:0 undo shutdown link-protocol ppp ppp mp Mp-group 6/0/1#interface Serial6/0/1/2:0 undo shutdown link-protocol ppp ppp mp Mp-group 6/0/1#interface Serial6/0/1/3:0 undo shutdown link-protocol ppp ppp mp Mp-group 6/0/1#interface Serial6/0/1/4:0 undo shutdown link-protocol ppp ppp mp Mp-group 6/0/1#interface Serial6/0/1/5:0 undo shutdown link-protocol ppp ppp mp Mp-group 6/0/1#interface Serial6/0/0/1:0 undo shutdown ip address 11.11.11.2 255.255.255.0 link-protocol ppp isis enable 11# interface GigabitEthernet1/0/0undo shutdown ip address 30.30.30.1 255.255.255.0# return

9.9.5 Example for Configuring HQoS Based on the PBB-TE Tunnel

Networking RequirementsTwo tunnels named t1 and t2 are established between Router A and Router B. Service instancessi1 to si6 are created on the two routers.

The service packets of CE1 are data, video, and voice packets from the users of the companynetwork. These service packets are mapped to the service instances named si1, si2, and si3 inPort+VLAN mode. These service instances are bound to the PBB-TE tunnel named t1. The

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-76 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 419: 00399154-Configuration Guide - QoS(V300R003_03).pdf

service packets of CE2 are data, video, and voice packets of the users of the residential area.These service packets are mapped to the service instances named si4, si5, and si6 in Port+VLANmode. These service instances are bound to the PBB-TE tunnel named t2.

In the two LANs, the priority of voice packets is 5 (EF); the priority of video packets is 3 (AF3);and the priority of data packets is 1 (AF1).

On Router A, a bandwidth of 100 Mbit/s is reserved for PBB-TE-based services. Users of thecompany network are provided with a CIR of 60 Mbit/s and a PIR of 100 Mbit/s. Users of theresidential area are provided with a CIR of 40 Mbit/s and a PIR of 100 Mbit/s. Different servicesof the same user are scheduled according to the priorities carried by the service packets.

Figure 9-12 Networking diagram for configuring PBB-TE-based HQoS

Configuration Roadmap

The configuration roadmap is as follows:

1. Configure a PBB-TE tunnel.

2. Configure GigabitEthernet 1/0/0 and GigabitEthernet 1/0/1 of Router A to trust thepriorities of the VLAN packets from the upstream device.

3. Configure a reserved bandwidth for PBB-TE services on GigabitEthernet 2/0/0 of RouterA.

4. Configure FQ scheduling policies on Router A for different service packets from the usersof the company network and the users of the residential area.

5. Configure SQ scheduling algorithms on Router A for PBB-TE tunnels.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-77

Page 420: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Data PreparationTo complete the configuration, you need the following data:

l Bandwidth reserved for PBB-TE services

l Scheduling algorithms for packets of different priorities

l Scheduling parameters of different SQs

Configuration Procedure1. Configure a PBB-TE tunnel.

For the configuration details, refer to the Quidway NetEngine80E/40E QuidwayNetEngine80E/40E Configuration Guide - LAN and MAN Access.

2. On Router A, configure the interfaces to trust the priorities of packets from the upstream.# Configure GigabitEthernet 1/0/0 on Router A to trust the priorities of the packets comingfrom the users of the company network.<RouterA> system-view[RouterA] interface gigabitethernet 1/0/0[RouterA-GigabitEthernet1/0/0] undo shutdown[RouterA-GigabitEthernet1/0/0] portswitch[RouterA-GigabitEthernet1/0/0] trust upstream default vlan 100 110 120[RouterA-GigabitEthernet1/0/0] trust 8021p vlan 100 110 120[RouterA-GigabitEthernet1/0/0] quit# Configure GigabitEthernet 1/0/1 on Router A to trust the priorities of the packets comingfrom the users of the residential area.[RouterA] interface gigabitethernet 1/0/1[RouterA-GigabitEthernet1/0/1] undo shutdown[RouterA-GigabitEthernet1/0/1] portswitch[RouterA-GigabitEthernet1/0/1] trust upstream default vlan 200 210 220[RouterA-GigabitEthernet1/0/1] trust 8021p vlan 200 210 220[RouterA-GigabitEthernet1/0/1] quit

3. Configure a reserved bandwidth for PBB-TE services.# Configure a reserved bandwidth for PBB-TE services on GigabitEthernet 2/0/0 of RouterA.[RouterA] interface gigabitethernet 2/0/0[RouterA-GigabitEthernet2/0/0] undo shutdown[RouterA-GigabitEthernet2/0/0] portswitch[RouterA-GigabitEthernet2/0/0] mac-tunnel reserved-bandwidth cir 100000[RouterA-GigabitEthernet2/0/0] quit

4. Configure scheduling algorithms for different services.# Define an FQ template named "fq." Configure the PQ scheduling algorithm for voiceservices from users of the company network and the residential area. Configure the WFQscheduling algorithm for video services with the scheduling priority of 30 and for dataservices with the scheduling priority of 20.[RouterA] flow-queue fq[RouterA-flow-queue-template-fq] queue ef pq[RouterA-flow-queue-template-fq] queue af3 wfq weight 30[RouterA-flow-queue-template-fq] queue af1 wfq weight 20[RouterA-flow-queue-template-fq] quit

5. Configure scheduling parameters on Router A for SQs.# Configure scheduling parameters for SQs of users of the company in the view of the PBB-TE tunnel named t1: The CIR is 60 Mbit/s; the PIR is 100 Mbit/s. Then apply the FQtemplate named "fq" to the interface.[RouterA] mac-tunnel tunnel-name t1

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-78 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 421: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[RouterA-mac-tunnel-t1] user-queue cir 60000 pir 100000 flow-queue fq outbound[RouterA-mac-tunnel-t1] quit# Configure scheduling parameters for SQs of the users of the residential area in the viewof the PBB-TE tunnel named t2: The CIR is 40 Mbit/s; the PIR is 100 Mbit/s. Then applythe FQ template named "fq" to the interface.[RouterA] mac-tunnel tunnel-name t2[RouterA-mac-tunnel-t2] user-queue cir 40000 pir 100000 flow-queue fq outbound[RouterA-mac-tunnel-t2] quit

6. Verify the configuration.# Run the display user-queue configuration interface mac-tunnel command to checkthe HQoS configuration on the PBB-TE tunnels.[RouterA] display user-queue configuration interface mac-tunnel t1 MacTunnelName: t1 CirValue<kbps>: 60000 PirValue<kbps>: 100000 FlowQueue: fq FlowMapping: Default GroupQueue: NA Network-Header-Length: Default[RouterA] display user-queue configuration interface mac-tunnel t2 MacTunnelName: t2 CirValue<kbps>: 40000 PirValue<kbps>: 100000 FlowQueue: fq FlowMapping: Default GroupQueue: NA Network-Header-Length: Default

Configuration Filesl Configuration file of Router A

# sysname RouterA#vlan batch 1 2 100 110 120 200 210 220# virtual-mac 0003-0003-0003#mac-tunnel vlan-pool 1 2#interface GigabitEthernet2/0/0 undo shutdown portswitch port trunk allow-pass vlan 1 2 mac-tunnel reserved-bandwidth cir 100000#interface GigabitEthernet1/0/0undo shutdown portswitch trust upstream default vlan 100 110 120 trust 8021p vlan 100 110 120#interface GigabitEthernet1/0/1 undo shutdown portswitch trust upstream default vlan 200 210 220 trust 8021p vlan 200 210 220#mac-tunnel tunnel-name t1 destination-mac 0002-0002-0002 vlan 1 tunnel-interface GigabitEthernet2/0/0 user-queue cir 60000 pir 100000 flow-queue fq outbound undo shutdown#

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-79

Page 422: 00399154-Configuration Guide - QoS(V300R003_03).pdf

mac-tunnel tunnel-name t2 destination-mac 0002-0002-0002 vlan 2 tunnel-interface GigabitEthernet2/0/1 user-queue cir 40000 pir 100000 flow-queue fq outbound undo shutdown#service-instance si1 service-id 1 priority trust-8021p mapping-type s-tagged one-to-one mac-tunnel t1 mapping interface GigabitEthernet1/0/0 vlan 100 undo shutdown#service-instance si2 service-id 2 priority trust-8021p mapping-type s-tagged one-to-one mac-tunnel t1 mapping interface GigabitEthernet1/0/0 vlan 110 undo shutdown#service-instance si3 service-id 3 priority trust-8021p mapping-type s-tagged one-to-one mac-tunnel t1 mapping interface GigabitEthernet1/0/0 vlan 120 undo shutdown#service-instance si4 service-id 4 priority trust-8021p mapping-type s-tagged one-to-one mac-tunnel t2 mapping interface GigabitEthernet1/0/1 vlan 200 undo shutdown#service-instance si5 service-id 5 priority trust-8021p mapping-type s-tagged one-to-one mac-tunnel t2 mapping interface GigabitEthernet1/0/1 vlan 210 undo shutdown#service-instance si6 service-id 6 priority trust-8021p mapping-type s-tagged one-to-one mac-tunnel t2 mapping interface GigabitEthernet1/0/1 vlan 220 undo shutdown#return

l Configuration file of Router B# sysname RouterB#vlan batch 1 2 100 110 120 200 210 220# virtual-mac 0002-0002-0002#mac-tunnel vlan-pool 1 2#interface GigabitEthernet3/0/0 undo shutdown portswitch

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-80 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 423: 00399154-Configuration Guide - QoS(V300R003_03).pdf

port trunk allow-pass vlan 1 2#interface GigabitEthernet4/0/0 undo shutdown portswitch port trunk allow-pass vlan 100 110 120 200 210 220#mac-tunnel tunnel-name t1 destination-mac 0003-0003-0003 vlan 1 tunnel-interface GigabitEthernet3/0/0 undo shutdown#mac-tunnel tunnel-name t2 destination-mac 0003-0003-0003 vlan 2 tunnel-interface GigabitEthernet3/0/0 undo shutdown#service-instance si1 service-id 1 priority trust-8021p mapping-type s-tagged one-to-one mac-tunnel t1 mapping interface GigabitEthernet4/0/0 vlan 100 undo shutdown#service-instance si2 service-id 2 priority trust-8021p mapping-type s-tagged one-to-one mac-tunnel t1 mapping interface GigabitEthernet4/0/0 vlan 110 undo shutdown#service-instance si3 service-id 3 priority trust-8021p mapping-type s-tagged one-to-one mac-tunnel t1 mapping interface GigabitEthernet4/0/0 vlan 120 undo shutdown#service-instance si4 service-id 4 priority trust-8021p mapping-type s-tagged one-to-one mac-tunnel t2 mapping interface GigabitEthernet4/0/0 vlan 200 undo shutdown#service-instance si5 service-id 5 priority trust-8021p mapping-type s-tagged one-to-one mac-tunnel t2 mapping interface GigabitEthernet4/0/0 vlan 210 undo shutdown#service-instance si6 service-id 6 priority trust-8021p mapping-type s-tagged one-to-one mac-tunnel t2 mapping interface GigabitEthernet4/0/0 vlan 220 undo shutdown#return

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-81

Page 424: 00399154-Configuration Guide - QoS(V300R003_03).pdf

9.9.6 Example for Configuring Class-based HQoS

Networking RequirementsAs shown in Figure 9-13, packets of multiple VLANs are converged on the converging switch.GE 1/0/1 admits packets of VLANs 1 to 1000. Configure the sub-interface for dot1q terminationand class-based HQoS on GE 1/0/0.1. Packets are identified according to their source IPaddresses. Totally 10 users are available; the Committed Information Rate (CIR) of each useris 10 Mbit/s and the Peak Information Rate (PIR), 100 Mbit/s. The 10 users share the totalbandwidth of 100 Mbit/s.

NOTE

The following example is about the configuration of the NE40E only.

Figure 9-13 Networking diagram for configuring class-based HQoS

Configuration RoadmapThe configuration roadmap is as follows:

1. Configure Dot1q termination sub-interfaces on GE 1/0/0.1 of the router.2. Configure traffic classifiers.3. Configure packet drop parameters for flow-wred objects.4. Configure scheduling algorithms and parameters for FQs.5. Configure CoS mappings between FQs and CQs.6. Configure shaping values for GQs.7. Configure SQs in traffic behaviors.8. Configure traffic policies and apply them to GE 1/0/0.1.9. Configure packet drop parameters for port-wred objects.10. Configure CQs on downstream GE 2/0/0 of the router.

Data PreparationTo complete the configuration, you need the following data:

l IP addresses of the 10 users: from 10.110.1.0/24 to 10.110.10.0/24

l Control VLAN ID of the Dot1q termination sub-interface

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-82 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 425: 00399154-Configuration Guide - QoS(V300R003_03).pdf

l Flow-wred drop parameters

l Algorithms of flow-queue scheduling and related parameters

l Flow-mapping of CoS

l Shaping values of user-group-queue

l Values of user-queue CIR, and PIR. CIR and PIR of each user: 10 Mbit/s and 100 Mbit/s

l Port-wred parameters used in port-queue

l Algorithms of port-queue scheduling and related parameters, and shaping values

Configuration Procedure1. Configure the sub-interface for dot1q termination.

<Quidway> system-view[Quidway] interface gigabitethernet 1/0/0[Quidway-GigabitEthernet1/0/0] undo shutdown[Quidway-GigabitEthernet1/0/0] mode user-termination[Quidway-GigabitEthernet1/0/0] quit[Quidway] interface gigabitethernet 1/0/0.1[Quidway-GigabitEthernet1/0/0.1] control-vid 1 dot1q-termination[Quidway-GigabitEthernet1/0/0.1] dot1q termination vid 1 to 1000[Quidway-GigabitEthernet1/0/0.1] ip address 100.1.1.1 24[Quidway-GigabitEthernet1/0/0.1] trust upstream defaut[Quidway-GigabitEthernet1/0/0.1] trust 8021p[Quidway-GigabitEthernet1/0/0.1] quit

2. Configure classifiers to identify the 10 users to be applied with class-based HQoS.# Configure the classifier c1.[Quidway] acl 3000[Quidway-acl-adv-3000] rule permit ip source 10.110.1.0 0.0.0.255[Quidway-acl-adv-3000] quit[Quidway] traffic classifier c1[Quidway-classifier-c1] if-match acl 3000[Quidway-classifier-c1] quit# Configure the classifier c2.[Quidway] acl 3001[Quidway-acl-adv-3001] rule permit ip source 10.110.2.0 0.0.0.255[Quidway-acl-adv-3001] quit[Quidway] traffic classifier c2[Quidway-classifier-c2] if-match acl 3001[Quidway-classifier-c2] quitThe configurations of the classifiers c3 to c10 are similar to that of c1, and therefore, arenot mentioned.

3. Configure a flow-wred object.[Quidway] flow-wred test[Quidway-flow-wred-test] color green low-limit 70 high-limit 100 discard-percentage 100[Quidway-flow-wred-test] color yellow low-limit 60 high-limit 90 discard-percentage 100[Quidway-flow-wred-test] color red low-limit 50 high-limit 80 discard-percentage 100[Quidway-flow-wred-test] quit

4. Configure scheduling algorithms and parameters for FQs.[Quidway] flow-queue test[Quidway-flow-queue-template-test] queue af1 lpq flow-wred test shaping 1000[Quidway-flow-queue-template-test] queue ef pq flow-wred test shaping 3000[Quidway-flow-queue-template-test] quit

5. Configure CoS mappings from FQs to CQs.[Quidway] flow-mapping test

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-83

Page 426: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[Quidway-flow-mapping-test] map flow-queue af1 to port-queue ef[Quidway-flow-mapping-test] quit

6. Configure shaping values for GQs.[Quidway] user-group-queue test[Quidway-user-group-queue-test-slot-all] shaping 100000 inbound[Quidway-user-group-queue-test-slot-all] quit

7. Configure traffic behaviors, that is, the SQ scheduling parameters of the 10 users.# Configure the behavior b1.[Quidway] traffic behavior b1 [Quidway-behavior-b1] user-queue cir 10000 pir 100000 flow-queue test flow-mapping test user-group-queue test[Quidway-behavior-b1] quit

# Configure the behavior b2.[Quidway] traffic behavior b2[Quidway-behavior-b2] user-queue cir 10000 pir 100000 flow-queue test flow-mapping test user-group-queue test[Quidway-behavior-b2] quit

The configurations of the behaviors b3 to b10 are similar to that of b1, and therefore arenot mentioned.

NOTE

You need to configure traffic behaviors one by one for the 10 users even though the HQoS schedulingparameters of the 10 users are the same. Otherwise, the system considers that all packets that matchany of the 10 traffic classifiers correspond to one user, by default.

8. Configure a traffic policy and apply it to GE 1/0/0.1.[Quidway] traffic policy p[Quidway-trafficpolicy-p] share-mode[Quidway-trafficpolicy-p] classifier c1 behavior b1[Quidway-trafficpolicy-p] classifier c2 behavior b2[Quidway-trafficpolicy-p] classifier c3 behavior b3[Quidway-trafficpolicy-p] classifier c4 behavior b4[Quidway-trafficpolicy-p] classifier c5 behavior b5[Quidway-trafficpolicy-p] classifier c6 behavior b6[Quidway-trafficpolicy-p] classifier c7 behavior b7[Quidway-trafficpolicy-p] classifier c8 behavior b8[Quidway-trafficpolicy-p] classifier c9 behavior b9[Quidway-trafficpolicy-p] classifier c10 behavior b10[Quidway-trafficpolicy-p] quit[Quidway] interface gigabitethernet 1/0/0.1[Quidway-GigabitEthernet1/0/0.1] traffic-policy P inbound[Quidway-GigabitEthernet1/0/0.1] quit

9. Configure CQs.# Configure a port-wred object.[Quidway] port-wred test[Quidway-port-wred-test] color green low-limit 70 high-limit 100 discard-percentage 100[Quidway-port-wred-test] color yellow low-limit 60 high-limit 90 discard-percentage 100[Quidway-port-wred-test] color red low-limit 50 high-limit 80 discard-percentage 100[Quidway-port-wred-test] quit

# Configure the scheduling algorithms, WRED parameters, and shaping values for CQs.[Quidway] interface gigabitethernet 2/0/0[Quidway-GigabitEthernet2/0/0] undo shutdown[Quidway-GigabitEthernet2/0/0] port-queue ef pq shaping 100 port-wred test outbound[Quidway-GigabitEthernet2/0/0] return

10. Verify the configuration.

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-84 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 427: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Run the display traffic classifier user-defined classifier-name command. You can viewthe configuration of a classifier.<Quidway> display traffic classifier user-defined c1 User Defined Classifier Information: Classifier: c1 Operator: OR Rule(s) : if-match acl 3000 Run the display traffic behavior user-defined behavior-name command. You can viewthe configuration of a traffic behavior.<Quidway> display traffic behavior user-defined b1 User Defined Behavior Information: Behavior: b1 User-queue: user-queue cir 10000 pir 100000 flow-queue test flow-mapping test network-header-length default user-group-queue testRun the display user-queue statistics traffic behavior behavior-name inboundcommand. You can view the statistics of an SQ. The following are the statistics of the trafficbehavior b1.<Quidway> display user-queue statistics traffic behavior b1 inboundTraffic behavior b1 inbound traffic statistics:[slot 1] be: Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes af1: Pass: 193385 packets, 18951730 bytes Discard: 3876689 packets, 399298967 bytes af2: Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes af3: Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes af4: Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes ef: Pass: 581216 packets, 56959168 bytes Discard: 3490089 packets, 359479167 bytes cs6: Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes cs7: Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes total: Pass: 774601 packets, 75910898 bytes Discard: 7366778 packets, 758778134 bytes [slot all] be: Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes af1: Pass: 193385 packets, 18951730 bytes Discard: 3876689 packets, 399298967 bytes af2: Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes af3: Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes af4: Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes ef: Pass: 581216 packets, 56959168 bytes

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-85

Page 428: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Discard: 3490089 packets, 359479167 bytes cs6: Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes cs7: Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes total: Pass: 774601 packets, 75910898 bytes Discard: 7366778 packets, 758778134 bytes

Run the display port-queue statistics command on GE 2/0/0. You can view the port-queuestatistics. Because the CoS AF1 is mapped to EF, no packets with the CoS AF1 are in theCQ on the interface; meanwhile, the number of EF packets increases greatly.<Quidway> display port-queue statistics interface gigabitethernet 2/0/0 outboundGigabitEthernet2/0/2 outbound traffic statistics: [be] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 30 seconds pass rate: 0 pps, 0 bps Last 30 seconds discard rate: 0 pps, 0 bps [af1] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 30 seconds pass rate: 0 pps, 0 bps Last 30 seconds discard rate: 0 pps, 0 bps [af2] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 30 seconds pass rate: 0 pps, 0 bps Last 30 seconds discard rate: 0 pps, 0 bps [af3] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 30 seconds pass rate: 0 pps, 0 bps Last 30 seconds discard rate: 0 pps, 0 bps [af4] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes Last 30 seconds pass rate: 0 pps, 0 bps Last 30 seconds discard rate: 0 pps, 0 bps [ef] Pass: 60,716,995 packets, 5,707,379,530 bytes Discard: 0 packets, 0 bytes Last 30 seconds pass rate: 99,534 pps, 93,561,596 bps Last 30 seconds discard rate: 0 pps, 0 bps [cs6] Pass: 257 packets, 18,504 bytes Discard: 0 packets, 0 bytes Last 30 seconds pass rate: 0 pps, 0 bps Last 30 seconds discard rate: 0 pps, 0 bps [cs7] Pass: 0 packets, 0 bytes Discard: 0 packets, 0 bytes

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-86 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 429: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Last 30 seconds pass rate: 0 pps, 0 bps Last 30 seconds discard rate: 0 pps, 0 bps

Configuration Files# Sysname Quidway # acl number 3000 rule 5 permit ip source 10.110.1.0 0.0.0.255 # acl number 3001 rule 5 permit ip source 10.110.2.0 0.0.0.255 # acl number 3002 rule 5 permit ip source 10.110.3.0 0.0.0.255 # acl number 3003 rule 5 permit ip source 10.110.4.0 0.0.0.255 # acl number 3004 rule 5 permit ip source 10.110.5.0 0.0.0.255 # acl number 3005 rule 5 permit ip source 10.110.6.0 0.0.0.255 # acl number 3006 rule 5 permit ip source 10.110.7.0 0.0.0.255 # acl number 3007 rule 5 permit ip source 10.110.8.0 0.0.0.255 # acl number 3008 rule 5 permit ip source 10.110.9.0 0.0.0.255 # acl number 3009 rule 5 permit ip source 10.110.10.0 0.0.0.255 # port-wred testcolor green low-limit 70 high-limit 100 discard-percentage 100color yellow low-limit 60 high-limit 90 discard-percentage 100color red low-limit 50 high-limit 80 discard-percentage 100#flow-wred testcolor green low-limit 70 high-limit 100 discard-percentage 100color yellow low-limit 60 high-limit 90 discard-percentage 100color red low-limit 50 high-limit 80 discard-percentage 100#flow-mapping test1 map flow-queue af1 to port-queue ef#flow-queue test1 queue af1 lpq shaping 1000 flow-wred test queue ef pq shaping 3000 flow-wred test#user-group-queue group shaping 100000 inbound #traffic classifier c1 operator or if-match acl 3000 traffic classifier c2 operator or if-match acl 3001 traffic classifier c3 operator or if-match acl 3002 traffic classifier c4 operator or if-match acl 3003 traffic classifier c5 operator or

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-87

Page 430: 00399154-Configuration Guide - QoS(V300R003_03).pdf

if-match acl 3004 traffic classifier c6 operator or if-match acl 3005 traffic classifier c7 operator or if-match acl 3006 traffic classifier c8 operator or if-match acl 3007 traffic classifier c9 operator or if-match acl 3008 traffic classifier c10 operator or if-match acl 3009 # traffic behavior b1 user-queue cir 10000 pir 100000 flow-queue test flow-mapping test user-group-queue testtraffic behavior b2 user-queue cir 10000 pir 100000 flow-queue test flow-mapping test user-group-queue testtraffic behavior b3 user-queue cir 10000 pir 100000 flow-queue test flow-mapping test user-group-queue testtraffic behavior b4 user-queue cir 10000 pir 100000 flow-queue test flow-mapping test user-group-queue testtraffic behavior b5 user-queue cir 10000 pir 100000 flow-queue test flow-mapping test user-group-queue testtraffic behavior b6 user-queue cir 10000 pir 100000 flow-queue test flow-mapping test user-group-queue testtraffic behavior b7 user-queue cir 10000 pir 100000 flow-queue test flow-mapping test user-group-queue testtraffic behavior b8 user-queue cir 10000 pir 100000 flow-queue test flow-mapping test user-group-queue testtraffic behavior b9 user-queue cir 10000 pir 100000 flow-queue test flow-mapping test user-group-queue testtraffic behavior b10 user-queue cir 10000 pir 100000 flow-queue test flow-mapping test user-group-queue test# traffic policy p share-mode classifier c1 behavior b1 classifier c2 behavior b2 classifier c3 behavior b3 classifier c4 behavior b4 classifier c5 behavior b5 classifier c6 behavior b6 classifier c7 behavior b7 classifier c8 behavior b8 classifier c9 behavior b9 classifier c10 behavior b10# diffserv domain default #interface GigabitEthernet1/0/0 undo shutdown mode user-termination# interface GigabitEthernet1/0/0.1 control-vid 1 dot1q-terminationdot1q termination vid 1 to 1000ip address 100.1.1.1 24traffic-policy P inboundtrust upstream defauttrust 8021p

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-88 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 431: 00399154-Configuration Guide - QoS(V300R003_03).pdf

# interface GigabitEthernet2/0/0 undo shutdownip address 200.1.1.1 255.255.255.0port-queue ef pq shaping 100 port-wred test outbound#Ospf 10 area 0.0.0.0 network 200.1.1.0 0.0.0.255network 100.1.1.0 0.0.0.255#return

9.9.7 Example for Configuring Template-based HQoS

Networking Requirements

As shown in Figure 9-14, users need to access the router through switch. The router functionsas the access device of the backbone network.

The traffic flows of User1 and User2 access the router through sub-interfaces GE 1/0/0.1, andGE 1/0/0.2 respectively. Uniform scheduling of user traffic needs to be implemented with 100Mbit/s assured bandwidth. The bandwidth for EF flows should be 20 Mbit/s, and the bandwidthfor AF1 flows should be 10 Mbit/s. The rate of broadcast packets, multicast packets, andunknown unicast packets is to be restricted to 2 Mbit/s. The bandwidth for the user group towhich the users belong should be 500 Mbit/s. On the downstream interface of the router, thetraffic rate of EF flows should not be higher than 120 Mbit/s.

Figure 9-14 Networking diagram of template-based HQoS

Configuration Roadmap

The configuration roadmap is as follows:

1. Configure packet drop parameters for flow WRED objects.2. Configure scheduling algorithms and parameters for the flow queues.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-89

Page 432: 00399154-Configuration Guide - QoS(V300R003_03).pdf

3. Configure CoS mapping between flow queues and class queues.4. Configure the shaping value for the user group queues.5. Configure the length for packet loss compensation of the service template.6. Configure scheduling parameters and the CIR value of the user queues.7. Configure packet drop parameters for class WRED objects.8. Configure class queues on the downstream interface of the access router.

Data PreparationTo complete the configuration, you need the following data:

l Packet drop parameters for flow-wred

l Algorithms of flow-queue scheduling and related parameters

l Flow-mapping of CoS

l Shaping value for user group queues

l The values of CIR, PIR, and network-header-length in the user-queue command in theQoS template

l Interface to which the QoS template is applied

l Port-wred parameters that are referenced by port-queue

l Algorithms, related parameters, and shaping values for port-queue scheduling

Configuration ProcedureNOTE

Configure simple traffic classification before configuring HQoS. Otherwise, all FQ traffic is treated as BEtraffic during the scheduling.

1. Configure a WRED object referenced by a flow queue.# Configure packet dropping parameters of flow-wred.<Quidway> system view[Quidway] flow-wred test[Quidway-flow-wred-test] color green low-limit 70 high-limit 100 discard-percentage 100[Quidway-flow-wred-test] color yellow low-limit 60 high-limit 90 discard-percentage 100[Quidway-flow-wred-test] color red low-limit 50 high-limit 80 discard-percentage 100[Quidway-flow-wred-test] returnAfter the preceding configuration, you can run the display flow-wred configurationverbose command to view the configured parameters of the flow WRED object.<Quidway> display flow-wred configuration verbose testflow-wred-name : test--------------------------------------------------- color low-limit high-limit discard-percent--------------------------------------------------- green 70 100 100 yellow 60 90 100 red 50 80 100Reference relationships : NULLTotal number : 1

2. Configure scheduling algorithms and parameters for flow queues.# Configure the scheduling algorithms, WRED parameters, and shaping values for flowqueues.

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-90 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 433: 00399154-Configuration Guide - QoS(V300R003_03).pdf

<Quidway> system view[Quidway] flow-queue test[Quidway-flow-queue-template-test] queue af1 lpq flow-wred test shaping 10000[Quidway-flow-queue-template-test] queue ef pq flow-wred test shaping 30000After the preceding configuration, you can run the display flow-queue configurationverbose command to view the configurations of the flow queue template.<Quidway> display flow-queue configuration verbose test Codes: Arith(Schedule algorithm) U-Weight(Schedule weight configured by users) I-Weight(Inverse schedule weight used by TM) A-Weight(Actual schedule weight obtained by users) Shp(Shaping value, the percentage of subscriber queue's PIR) Drop-Arith(The name of the WRED object used by the flow queue)

Flow Queue Template : test------------------------------------------------------------------Cos Arith U-Weight I-Weight A-Weight Shp Pct Drop-Arith------------------------------------------------------------------be wfq 10 3 10.00 - - Tail Dropaf1 lpq - - - 10000 - testaf2 wfq 10 3 10.00 - - Tail Dropaf3 wfq 15 2 15.00 - - Tail Dropaf4 wfq 15 2 15.00 - - Tail Dropef pq - - - 30000 - testcs6 pq - - - - - Tail Dropcs7 pq - - - - - Tail DropReference relationships : NULL

3. Configure the CoS mapping between flow queues and class queues.<Quidway> system view[Quidway] flow-mapping test[Quidway-flow-mapping-test] map flow-queue af1 to port-queue ef[Quidway-flow-mapping-test] returnAfter the preceding configuration, run the display flow-mapping configurationverbose command to view the configured parameters of the flow queue mapping objectand the referential relations of the object.<Quidway> display flow-mapping configuration verbose testflow-mapping-name : test fq-cosvalue to pq-cosvalue be to be af1 to ef af2 to af2 af3 to af3 af4 to af4 ef to ef cs6 to cs6 cs7 to cs7 [reference relationship] NULL

4. Configure the shaping value for user group queues.<Quidway> system view[Quidway] user-group-queue test[Quidway-user-group-queue-test-slot-all] shaping 500000 inbound[Quidway-user-group-queue-test-slot-all] returnAfter the preceding configuration, run the display user-group-queue configurationverbose command to view the configurations and the referential relations of the user groupqueue.<Quidway> display user-group-queue configuration verbose test user-group-queue-name : test slot : all [current configuration] inbound shaping-value <kbps> : 500000

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-91

Page 434: 00399154-Configuration Guide - QoS(V300R003_03).pdf

pbs-value <byte> : 524288 outbound shaping-value <kbps> : NA pbs-value <byte> : NA [reference relationship] NULL

5. Configure the length for packet loss compensation of the service template.# Configure service-template and network-header-length.<Quidway> system view[Quidway] service-template test[Quidway-service-template-test-slot-all] network-header-length 12 inbound[Quidway-service-template-test-slot-all] quitAfter the preceding configuration, you can run the display service-template configurationverbose command to view the configurations of the service template, the value of network-header-length, and the referential relations of the service template.<Quidway> display service-template configuration verbose[service-template detail information] total number : 1slot all : 1

service-template-name : test slot : all [current configuration] inbound network-header-length: 12

outbound network-header-length: NA

[reference relationship] NULL

6. Configure scheduling parameters in the QoS template and apply the parameters tointerfaces.# Configure scheduling parameters for user-queue and suppression rate of broadcastpackets in the QoS template.<Quidway> system view[Quidway] qos-profile test[Quidway-qos-profile-test] user-queue cir 100000 flow-queue test flow-mapping test user-group-queue test service-template test[Quidway-qos-profile-test] broadcast-suppression cir 2000[Quidway-qos-profile-test] multicast-suppression cir 2000[Quidway-qos-profile-test] unknown-unicast-suppression cir 2000# Apply the QoS template to GE 1/0/0.1, and GE 1/0/0.2.<Quidway> system-view[Quidway] interface gigabitethernet 1/0/0.1[Quidway-GigabitEthernet1/0/0.1] vlan-type dot1q 1[Quidway-GigabitEthernet1/0/0.1] ip address 100.1.1.1 24[Quidway-GigabitEthernet1/0/0.1] qos-profile test inbound [Quidway-GigabitEthernet1/0/0.1] quit[Quidway] interface gigabitethernet 1/0/0.2[Quidway-GigabitEthernet1/0/0.2] vlan-type dot1q 2[Quidway-GigabitEthernet1/0/0.2] ip address 200.1.2.1 24[Quidway-GigabitEthernet1/0/0.2] qos-profile test inbound [Quidway-GigabitEthernet1/0/0.2] quit

7. Configure a WRED object referenced by the class queue.# Configure the port-wred packet dropping parameters referenced by the class queue.<Quidway> system view[Quidway] port-wred test[Quidway-port-wred-test] color green low-limit 70 high-limit 100 discard-percentage 100[Quidway-port-wred-test] color yellow low-limit 60 high-limit 90 discard-percentage 100[Quidway-port-wred-test] color red low-limit 50 high-limit 80 discard-percentage 100

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-92 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 435: 00399154-Configuration Guide - QoS(V300R003_03).pdf

[Quidway-port-wred-test] returnAfter the preceding configuration, you can run the display port-wred configurationverbose command to view the configurations of the class WRED object.<Quidway> display port-wred configuration verbose testport-wred-name : testcolor low-limit high-limit discard-percentgreen 70 100 100yellow 60 90 100red 50 80 100Reference relationship: NULL

8. Configure a class queue.# Configure the scheduling algorithms, WRED parameters, and shaping values for port-queue.<Quidway> system view[Quidway] interface gigabitethernet 2/0/0 [Quidway-GigabitEthernet2/0/0] undo shutdown[Quidway-GigabitEthernet2/0/0] port-queue ef pq shaping 100 port-wred test outbound[Quidway-GigabitEthernet2/0/0] returnAfter the preceding configuration, you can run the display port-queue configurationinterface command to view the configurations of the class queue.<Quidway> display port-queue configuration interface gigabitethernet 2/0/0 outboundGigabitEthernet2/0/0 be current configuration: Arithmetic: wfq weight: 10 tm weight: 3 fact weight: 10.00 shaping(mbps): NA port-wred name: NA af1 current configuration: Arithmetic: wfq weight: 10 tm weight: 3 fact weight: 10.00 shaping(mbps): NA port-wred name: NA af2 current configuration: Arithmetic: wfq weight: 10 tm weight: 3 fact weight: 10.00 shaping(mbps): NA port-wred name: NA af3 current configuration: Arithmetic: wfq weight: 15 tm weight: 2 fact weight: 15.00 shaping(mbps): NA port-wred name: NA af4 current configuration: Arithmetic: wfq weight: 15 tm weight: 2 fact weight: 15.00 shaping(mbps): NA port-wred name: NAef current configuration: Arithmetic: pq weight: NA tm weight: NA fact weight: NA shaping(mbps): 100

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-93

Page 436: 00399154-Configuration Guide - QoS(V300R003_03).pdf

port-wred name: test cs6 current configuration: Arithmetic: pq weight: NA tm weight: NA fact weight: NA shaping(mbps): NA port-wred name: NA cs7 current configuration: Arithmetic: pq weight: NA tm weight: NA fact weight: NA shaping(mbps): NA port-wred name: NA

9. Check the configuration.When there are flows in the network, you can observe that packets of User1's AF1 and EFflows and User2's EF flows are forwarded at the assured bandwidth.Running the display port-queue statistics command on the downstream interface GE 2/0/0of the router, you can see that EF packets increase rapidly.<Quidway> display port-queue statistics interface gigabitethernet 2/0/0 ef outbound[ef] Total pass: 104,762,039 packets, 10,251,481,862 bytes Total discard: 0 packets, 0 bytes --Drop tail discard: 0 packets, 0 bytes --Wred discard: 0 pps, 0 bps Last 30 seconds pass rate: 0 pps, 0 bps Last 30 seconds discard rate: 0 pps, 0 bps --Drop tail discard rate: 0 pps, 0 bps --Wred discard rate: 0 pps, 0 bps

Configuration FilesConfiguration file of the router.# sysname Quidway#flow-wred test color green low-limit 70 high-limit 100 discard-percentage 100 color yellow low-limit 60 high-limit 90 discard-percentage 100 color red low-limit 50 high-limit 80 discard-percentage 100#flow-mapping test map flow-queue af1 to port-queue ef#flow-queue test queue af1 lpq shaping 10000 flow-wred test queue ef pq shaping 30000 flow-wred test#user-group-queue test shaping 500000 inbound#service-template test network-header-length 12 inbound#qos-profile test

9 HQoS ConfigurationQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

9-94 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 437: 00399154-Configuration Guide - QoS(V300R003_03).pdf

user-queue cir 100000 pir 100000 flow-queue test flow-mapping test user-group -queue test service-template test broadcast-suppression cir 2000 cbs 2000 multicast-suppression cir 2000 cbs 2000 unknown-unicast-suppression cir 2000 cbs 2000 #port-wred test color green low-limit 70 high-limit 100 discard-percentage 100 color yellow low-limit 60 high-limit 90 discard-percentage 100 color red low-limit 50 high-limit 80 discard-percentage 100#interface GigabitEthernet1/0/0.1 vlan-type dot1q 1 ip address 100.1.1.1 255.255.255.0 qos-profile test inbound #interface GigabitEthernet1/0/0.2 vlan-type dot1q 2 ip address 200.1.2.1 255.255.255.0 qos-profile test inbound #interface GigabitEthernet2/0/0 undo shutdown ip address 200.1.1.1 255.255.255.0 port-queue ef pq shaping 100 port-wred test outbound#osfp 10 area 0.0.0.0 network 200.1.1.0 0.0.0.255 network 200.1.2.0 0.0.0.255 network 100.1.1.0 0.0.0.255#return

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS 9 HQoS Configuration

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-95

Page 438: 00399154-Configuration Guide - QoS(V300R003_03).pdf
Page 439: 00399154-Configuration Guide - QoS(V300R003_03).pdf

A Glossary

This appendix collates frequently used glossaries in this document.

A

AAA Authentication, Authorization and Accounting.

Access Control List A list composed of multiple sequential permit/deny statements. Infirewall, after ACL is applied to an interface on the router, therouter decides which packet can be forwarded and which packetshould be denied. In QoS, ACL is used to classify traffic.

Assured Service A kind of service that enables the user to obtain more service amountthan what has subscribed. As with the case that the ensured serviceamount that is less than what has subscribed, good forwardingquality is ensured; as with the excess service, they are forwardedwith a lower forwarding quality but not be discarded directly.

ATM An asynchronous Transfer Mode. It is a data transmissiontechnology in which data (files, voice and video) is transferred incells with a fixed length (53 Bytes). The fixed length makes the cellbe processed by the hardware. The object of ATM is to make gooduse of high-speed transmission medium such as E3, SONET and T3.

B

Bandwidth An average transmission rate of data during a specified period. It isin bit/s.

Best-Effort A traditional packet posting service. It features processing packetsbased on the sequence they reach the router (First In First Out rule).Packets from all users share the network resource and thebandwidth. The amount of the resource the packet gets dependingon the time they reach the router. Best-Effort does not take effecton posting delay, jitter delay, packet loss ratio and reliability.

Border GatewayProtocol

An exterior gateway protocol. The function of this protocol is toexchange routing information (without loop) between autonomoussystems.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS A Glossary

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

A-1

Page 440: 00399154-Configuration Guide - QoS(V300R003_03).pdf

C

Class-Based Queuing To allocate a single First In First Out queue for each user-definedtraffic class to cache the data of the same class. When the networkcongestion occurs, CBQ matches the output packet with the user-defined rule and places it in the corresponding queue. Before beingplaced in the queue, congestion avoidance mechanism such as Tail-Drop or WRED and bandwidth restriction check should beperformed. When the packet is to be sent out from the queue, packetsin corresponding queues are equally scheduled.

Committed AccessRate

An instance of traffic policing. Three parameters can be defined inCAR: Committed Information Rate (CIR), Committed Burst Size(CBS) and Excess Burst Size (EBS). These parameters can be usedto estimate the traffic. CAR also can be used in traffic classificationand traffic policing behavior definition.

Committed Burst Size A maximum size of the burst traffic. It indicates the capacity of thetoken bucket. The maximum burst size should be larger than thepacket length.

CommittedInformation Rate

A rate of placing tokens to the token bucket. It is in bit/s. Commonly,the traffic rate should be slower than the committed information rate.

Congestion A phenomenon of degraded service. It is because the capacity of thenetwork is exceeded by the data rate of the input to the network.Congestion affects the quality of service.

Congestion Avoidance A traffic control mechanism in which packets are automaticallydiscarded when network congestion occurs and becomes intensive.This mechanism can adjust the network traffic by monitoring thenetwork resource occupancy so as to prevent the network overload.

CongestionManagement

A traffic control measure used to cache the packet when the networkcongestion occurs. It adopts some scheduling policy to define theforwarding order of each packet.

Custom Edge A terminator at one end of a layer connection within a ServiceAccess Point. It is used in the MPLS VPN network. CE can be arouter, a switch or a host.

Custom Queue A queuing policy allocating resources based on the user-definedbandwidth proportion.

D

Data Circuit-terminating Equipment

An equipment providing interfaces for the communication betweenDTE and the network.

Delay An average time taken by the service data to transmit across thenetwork.

A GlossaryQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

A-2 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 441: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Differentiated Service A QoS model that classifies the service level according the packetprecedence field (IP Precedence and DSCP), the source IP addressand the destination IP address. Packets with different levels can beprovided with different service levels. It is commonly used toprovide end-to-end QoS for specified application programs.

Differentiated ServicesCode Point

A basis of traffic classification. It marks the priorities of packetsthrough specifying ToS filed.

Data terminalEquipment

A device working as a data sender or a data receiver. It connectswith network through a Data Circuit-terminating Equipment (DCE).

E

Expedited Forwarding A mechanism in which messages from any DS node should be sentat an equal or more rate than what has specified. This can ensurelittle delay and enough bandwidth.

F

Fair Queue A mechanism for queue scheduling in which network resource isallocated equally and delay and jitter time of all traffic areoptimized.

File Transfer Protocol An application layer protocol based on TCP/IP. It is used to transferlarge amounts of data reliably between the user and the remote host.FTP is implemented based on corresponding file system.

First In First OutQueuing

A queuing policy that features that the packet reaching earlier canbe allocated resource firstly.

G

Generic TrafficShaping

A kind of traffic shaping measure. It adopts the queuing policyWFQ.

I

Integrated Service An integrated service model that needs to reserve the networkresource. It ensures the bandwidth, limits the delay and providesservice and payload control for the packet as defined by trafficparameters.

IP-Precedence A basis of traffic classification. It is three bits long carried in theToS filed of the IP packet.

J

Jitter Refers to the interval for sending two adjacent packets minus theinterval for receiving the two packets.

L

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS A Glossary

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

A-3

Page 442: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Limit Rate A traffic management technology used to limit the total rate ofpacket sending on a physical interface or a Tunnel interface. LR isdirectly enabled on the interface to control the traffic passing theinterface.

Link Fragmentationand Interleaving

To fragment large-size frames to small-size frames and send themwith other small fragments so that the delay and jitter time of theframes transmitted across the low-speed link is decreased. Thefragmented frames are reassembled when reaching the destination.

Local Area Network A network intended to serve a small geographic area, (few squarekilometers or less), a single office or building, or a small definedgroup of users. It features high speed and little errors. Ethernet,FDDI and Toke Ring are three technologies implemented in LAN.

Loss Rate A rate of the lost packet during packet transmission.

M

MaximumTransmission Unit

A maximum size of packets that an interface can process. It is inbytes.

Media Access Control It is in the data link layer in OSI and is next to the physical layer.

MultiLink PPP A link generated by binding multiple PPP links for increasingbandwidth.

Multiprotocol LabelSwitching

It is derived from IPv4 and its core technology can be extended tomultiple network protocols. Packet is marked with a short andpredetermined label. Based on routing protocol and controlprotocol, it provides a connection-oriented data exchange. MPLSenhances the network performance, optimizes the networkextensibility, and provides more flexible routing.

O

Open Shortest PathFirst

An interior gateway protocol developed by IETF. It is based onLink-State.

P

Permanent VirtualCircuit

A permanent communication circuit that can be generated thoughno data is transmitted. PVC applies to stable communicationsystems or communication systems with frequent data exchange.

Point to Point Protocol A transport serial link between two devices.

Priority Queue A queuing policy based on packet priorities. It features that thepacket with a higher priority is allocated resource firstly.

Provider Edge In an MPLS VPN network, PE is in the backbone network, engagedin managing VPN users, setting up LSPs and route designating forusers in the same VPN.

Q

A GlossaryQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

A-4 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 443: 00399154-Configuration Guide - QoS(V300R003_03).pdf

QoS An estimation of the ability of service providers to meet therequirements of the user. It focuses on estimating the delay, jitterdelay and packet loss ratio.

R

Real-Time Protocol A host-to-host protocol that is used in multi-media services such asVoice over IP and video.

Random EarlyDetection

A packet loss algorithm used in congestion avoidance. It discardsthe packet according to the specified higher limit and lower limit ofa queue so that global TCP synchronization resulted in traditionalTail-Drop can be prevented.

Resource ReservationProtocol

A protocol that prearranges the network resource for an application.In the Intserv model, the application program should inform therouter to apply QoS before sending out packets to reserve thenetwork resource.

S

Service LevelAgreement

An agreement between the user and the network carrier in which thetreatment of the user's traffic that needs to be transmitted across thenetwork is defined. The agreement covers the information oftechnology and commercial. Commonly, SLA is used to indicate acertain QoS.

T

Tail-Drop A mechanism for queue discarding. When the length of the queuereaches the maximum, the subsequently received packets are alldiscarded.

Traffic Engineering A traffic control measure that dynamically monitors the networktraffic and load of each network entity. It adjusts the trafficmanagement parameters, routes parameters, and resource restrictionparameters in real time to optimize the network operation status andthe resource occupancy. In this way, congestion that is resulted fromunbalanced load can be prevented.

Traffic Classifier A basis and precondition to provide differentiated service. Itidentifies packets according to certain matching rules.

Traffic policing A traffic control measure that monitors the size of the traffic thatreach the router. If the traffic size exceeds the maximum, somerestriction measures so as to protect the benefits of the carrier andthe network resource.

Traffic Shaping A traffic control measure that auto adjusts the output rate of traffic.It aims at making the traffic adapt the network resource that thedownstream can provide and avoiding packet loss and congestion.

Throughput Supposing that no packet is discarded, it indicates the number ofpackets that passed in a specified time.

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS A Glossary

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

A-5

Page 444: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Tunnel In VPN, it is a transport tunnel set up between two entities to preventinterior users from interrupting and ensure security.

V

Versatile RoutingPlatform

Versatile Routing Platform. It is a versatile operation systemplatform developed by Huawei.

Virtual Local AreaNetwork

Virtual LAN. A LAN is divided into several logical LANs. Eachvirtual LAN is a broadcast area. Communication between hosts ina virtual is just like the host communication is a LAN. VLANs canbe divided according to the function, department and applicationdespite of device location.

Virtual PrivateNetwork

Provision of an apparent single private network (as seen by the user),over a number of separate public and private networks. It is a newlydeveloped technology as the Internet becomes widely used."Virtual" indicates the network is logical.

W

Weighted Fair Queue It features automatic traffic classification and balances the delay andjitter time of each traffic. Compared with Fair Queue (FQ), itbenefits the high-priority packet.

Weighted RandomEarly Detection

A packet loss algorithm used on congestion avoidance. It canprevent the global synchronization resulted in traditional Tail-Dropand features benefiting the high-priority packet with high-qualityservice during calculating the packet loss rate.

A GlossaryQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

A-6 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 445: 00399154-Configuration Guide - QoS(V300R003_03).pdf

B Acronyms and Abbreviations

This appendix collates frequently used acronyms and abbreviations in this document.

Numerics

3G The Third Generation

3GPP2 3rd Generation Partnership Project 2

A

ACL Access Control List

AF Assured Forwarding

ATM Asynchronous Transfer Mode

B

BE Best-Effort

BW Band Width

C

CAR Committed Access List

CBQ Class-based Queue

CBS Committed Burst Size

CE Customer Edge

CIR Committed information Rate

CoS Class of Service

CQ Custom Queue

D

DCE Data Circuit-terminating Equipment

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS B Acronyms and Abbreviations

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

B-1

Page 446: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Diff-Serv Different-service

DSCP Differentiated Services Codepoint

DTE Data Terminal Equipment

E

EBS Excess Buret Size

EF Expedited Forwarding

F

FECN Forwarding Explicit Congestion Notification

FIFO First In First Out

FQ Fair Queue

FR Frame Relay

FTP File Transfer Protocol

G

GTS Generic Traffic Shaping

H

HDLC High Level Data Link Control

HTTP Hyper Text Transport Protocol

I

ILM Incoming Label Map

IP Internet Protocol

IPX Internet Packet Exchange

ISDN Integrated Services Digital Network

L

LAN Local Area Network

LFI Link Fragmentation and Interleaving

LR Limit Rate

LSP Label Switch Path

M

MIC Media Access Control

B Acronyms and AbbreviationsQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

B-2 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 447: 00399154-Configuration Guide - QoS(V300R003_03).pdf

MP Multilink PPP

MPLS Multi-Protocol Label Switching

MTU Maximum Transmission Unit

O

OSPF Open Shortest Path First

P

P2P Point to Point

PE Provider Edge

PPP Point-to-Point Protocol

PQ Priority Queue

PVC Permanent Virtual Circuit

Q

QoS Quality of Service

R

RED Random Early Detection

RSVP Resource Reservation Protocol

RTP Real-time Transport Protocol

T

TCP Transmission Control Protocol

TE Traffic Engineering

ToS Type of Service

TP Traffic Policing

TS Traffic Shaping

U

UDP User Datagram Protocol

V

VLAN Virtual Local Area Network

VoIP Voice over IP

VPN Virtual Private Network

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS B Acronyms and Abbreviations

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

B-3

Page 448: 00399154-Configuration Guide - QoS(V300R003_03).pdf

VRP Versatile Routing Platform

W

WFQ Weighted Fair Queue

WRED Weighted Random Early Detection

WWW World Wide Web

B Acronyms and AbbreviationsQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

B-4 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 449: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Index

Symbols/Numerics(Optional) Configuring a Class Queue, 6-20, 6-29(Optional) Configuring a CQ WRED Object, 9-17,9-27, 9-53(Optional) Configuring a WRED Object for a ClassQueue, 9-43(Optional) Configuring a WRED Object for a FlowQueue, 9-39(Optional) Configuring an FQ WRED Object, 9-13,9-22, 9-49(Optional) Configuring Mapping from an FQ to a CQ,9-15, 9-24, 9-50(Optional) Configuring Mappings from a Flow Queueto a Class Queue, 9-40(Optional) Configuring Mappings from an FQ to a CQ,9-34(Optional) Configuring Packet Loss CompensationLengths of Service Templates, 9-51(Optional) Configuring Scheduling Parameters for aClass Queue, 9-44(Optional) Configuring Scheduling Parameters for aFlow Queue, 9-40(Optional) Configuring Scheduling Parameters of aCQ, 9-17, 9-28, 9-54(Optional) Configuring Scheduling Parameters of anFQ, 9-14, 9-23, 9-34, 9-49(Optional) Configuring the Traffic Shaping of a GQ,9-15, 9-24, 9-51(Optional) Configuring the WRED Object of an FQ,9-33(Optional) Configuring Traffic Shaping for a GroupQueue, 9-41(Optional) Configuring Traffic Shaping of a GQ, 9-34(Optional) Enabling an L2VPN to Support DiffServModels, 6-28(Optional) Enabling an L3VPN to Support DiffServModels, 6-19AAcronyms and Abbreviations, B-1Advertising a Routing Policy on the Route Sender,6-11Advertising Routing Policy on the Route Sender, 5-5

Applying a QoS Template, 9-53Applying a Routing Policy on the Route Receiver,6-14Applying a Routing Policy to the Route Receiver, 5-7Applying a Traffic Policy, 4-12Applying an MPLS TE Tunnel Policy to an MPLSL2VPN, 6-31Applying ATM Traffic Shaping Parameters, 7-19Applying FR Fragmentation to a Virtual Circuit, 8-20Applying FRTP Parameters to the Interface, 8-8Applying FRTS Parameters to the Interface, 8-5Applying QPPB on the Interface, 6-15Applying QPPB to the Interface, 5-8Applying the Statistic Function of a Traffic Policy,4-14Applying the Traffic Policy, 2-13Applying Traffic Policies, 7-15Applying Traffic Policy Based on Simple TrafficClassification to an Interface, 4-24Applying Universal Queues to an Frame RelayInterface, 8-11Applying Universal Queues to Frame Relay VirtualCircuits, 8-12Applying WRED, 3-5Applying WRED Parameters on the Frame RelayInterface, 8-18Associating an MPLS TE Tunnel with an L2VPN andSpecifying a QoS Policy, 6-32ATM QoS Features Supported by the NE80E/40E, 7-2

BBECN, 8-4Best-Effort Service Model, 1-3Binding an MPLS TE Tunnel to a VPN Instance andSpecifying a QoS Policy, 6-23

CClass-based QoS Supported by the NE80E/40E, 4-4Clearing Queue Statistics, 9-57Clearing Statistics, 2-18Clearing the Statistics About Traffic Policies, 4-27configure QoS at the PVC level to offer users, 8-3

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS Index

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

i-1

Page 450: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Configuring a Bandwidth for an MPLS TE Tunnel,6-22Configuring a Flow Queue, 6-18, 6-26Configuring a Reserved Bandwidth for PBB-TEServices on an Interface, 9-33Configuring a Routing Policy on the BGP RouteSender, 6-10Configuring a Routing Policy on the Route Receiver,6-13Configuring a Routing Policy to the Route Receiver,5-6Configuring a Traffic Behavior on the Route Receiver,6-12Configuring a Traffic Policy, 2-13Configuring a Traffic Policy Based on the ComplexTraffic Classification, 4-4Configuring a Tunnel Policy, 6-30Configuring a Tunnel Policy and Apply It to a VPNInstance, 6-22Configuring a VLAN Group, 9-26Configuring ATM Complex Traffic Classification,7-12Configuring ATM Services, 7-10Configuring ATM Simple Traffic Classification, 7-5Configuring ATM Traffic Shaping Parameters, 7-18Configuring CAR on a Layer 2 Interface, 2-8Configuring CAR on a Layer 3 Interface, 2-7Configuring Class-based HQoS, 9-37Configuring Congestion Management of the ATMPVC, 7-21Configuring CTC-based Traffic Policing, 2-9Configuring Forced ATM Traffic Classification, 7-8,7-11Configuring Frame Relay Congestion Avoidance, 8-15Configuring Frame Relay Fragmentation, 8-19, 8-20Configuring Frame Relay Traffic Policing, 8-7Configuring Frame Relay Traffic Shaping, 8-3Configuring FRTP Parameters, 8-7Configuring FRTS Parameters, 8-4Configuring Hierarchical Resource Reserved L2VPNs,6-24Configuring Hierarchical Resource Reserved L3VPNs,6-16Configuring HQoS, 9-30Configuring HQoS Based on the PBB-TE Tunnels,9-31Configuring HQoS on a CPOS or E3/T3 Interface,9-29Configuring HQoS on a QinQ Termination Sub-interface, 9-21Configuring HQoS on an Ethernet Interface, 9-11Configuring Interface-based Traffic Policing, 2-6Configuring Mapping Rules for ATM QoS, 7-7Configuring Precedence Mapping Based on the SimpleTraffic Classification, 4-16Configuring PVC PQ of Frame Relay, 8-13Configuring PVC PQ on an FR Interface, 8-13Configuring QinQ on a Sub-interface, 9-26

Configuring QPPB, 5-2Configuring QPPB in L3VPNs, 6-8Configuring Scheduling Parameters of an SQ, 9-16,9-27, 9-35Configuring Template-based HQoS, 9-47Configuring the ATM Traffic Shaping, 7-17Configuring the Bandwidth of an MPLS TE Tunnel,6-32Configuring the FR PVC PQ Precedence, 8-14Configuring the Priority of an ATM PVC, 7-20, 7-21Configuring the Queue Scheduling of an ATM PVC,7-22Configuring the Routing Policy on the BGP RouteSender, 5-4Configuring the Traffic Behavior on the RouteReceiver, 5-5Configuring Traffic Shaping, 2-16, 2-17Configuring Universal Frame Relay Queues, 8-9, 8-10Configuring WRED, 3-3Configuring WRED Parameters, 3-4, 8-17Congestion Avoidance Configuration, 1-11Congestion Avoidance Supported by NE80E/40E, 3-3Creating a Frame Relay Class, 8-16

DDebugging Frame Relay QoS, 8-21Defining a Behavior and Configuring Traffic PolicingActions, 2-12Defining a Policy and Specifying a Behavior for theClassifier, 4-12Defining a QoS Template and Configuring SchedulingParameters, 9-52Defining a Traffic Behavior and ConfiguringScheduling Parameters for a Subscriber Queue, 9-42Defining a Traffic Behavior and Configuring TrafficActions, 4-8Defining a Traffic Classifier, 4-5, 9-38Defining a Traffic Policy and Applying It to anInterface, 9-42Defining the DiffServ Domain and Configuring aTraffic Policy, 4-17Defining Traffic Behaviors, 7-14Defining Traffic Classes, 2-10Defining Traffic Classifiers, 7-13Defining Traffic Policies, 7-15Differentiated Service Model, 1-4

EEnabling ATM Simple Traffic Classification, 7-7Enabling FRTP, 8-9Enabling FRTS, 8-6Enabling QinQ on an Interface, 9-25End-to-End QoS Model, 1-3Example for Applying a Routing Policy with QoSParameters in VPNv4, 6-35

IndexQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

i-2 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Page 451: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Example for Applying Routing Policies with QoSParameters to a VPN Instance, 6-45Example for Configuring 1483B-Based ATM SimpleTraffic Classificaiton, 7-46Example for Configuring a Hierarchical ResourceReserved L2VPN (VLL), 6-71Example for Configuring a Hierarchical ResourceReserved L2VPN (VPLS), 6-85Example for Configuring a Hierarchical ResourceReserved L3VPN, 6-55Example for Configuring a Traffic Policy Based onComplex Traffic Classification, 4-28Example for Configuring an MPLS DiffServ Model onthe VPLS over TE, 6-114Example for Configuring Class-based HQoS, 9-82Example for Configuring Complex TrafficClassification on QinQ Termination Sub-interface,4-36Example for Configuring Congestion Avoidance, 3-7Example for Configuring Forced ATM TrafficClassification, 7-50Example for Configuring Frame Relay Fragmentation,8-24Example for Configuring Frame Relay TrafficShaping, 8-22Example for Configuring Hierarchical ResourceReserved VPNs (with Both L3VPNs and L2VPNsDeployed), 6-95Example for Configuring HQoS Based on the PBB-TETunnel, 9-76Example for Configuring HQoS on a CPOS Interface,9-72Example for Configuring HQoS on an E3 or T3Interface, 9-69Example for Configuring HQoS on an EthernetInterface, 9-58Example for Configuring Priority Mapping Based on theSimple Traffic Classification (MPLS), 4-44Example for Configuring Priority Mapping Based on theSimple Traffic Classification (VLAN), 4-39Example for Configuring QinQ HQoS, 9-64Example for Configuring Queue Scheduling for anATM PVC, 7-59Example for Configuring Simple Traffic Classificationfor 1-to-1 VCC ATM Transparent Transmission, 7-25Example for Configuring Simple Traffic Classificationfor 1-to-1 VPC ATM Transparent Transmission, 7-31Example for Configuring Simple Traffic Classificationfor AAL5 SDU ATM Transparent Transmission, 7-37Example for Configuring Template-based HQoS, 9-89Example for Configuring the ATM Complex TrafficClassification, 7-54Example for Configuring Traffic Policing and TrafficShaping, 2-19Example for QPPB Configuration, 5-9Example of Configuring for 1483R-based ATM SimpleTraffic Classification, 7-43

Fframe relay also has its own QoS mechanisms, 8-3Frame Relay QoS Supported by the NE80E/40E, 8-3

GGlossary, A-1

HHQoS Supported by the NE80E/40E, 9-3

IIntegrated Service Model, 1-3Interface congestion, 8-4Introduction to ATM QoS, 7-2Introduction to Class-based QoS, 4-2Introduction to Congestion Avoidance, 3-2Introduction to Frame Relay QoS, 8-3Introduction to HQoS, 9-2

MMaintaining QPPB Configuration, 5-14Maintaining VPN QoS Configuration, 6-122

NNew Application Requirements, 1-2

PPVC PQ contians four sub-queues, 8-14

QQoS Supported by the NE80E/40E, 1-13QPPB Overview, 5-2QPPB Supported by the NE80E/40E, 5-2

RRelated Concepts, 9-2RSVP, 1-13

TTechniques Used for the QoS Application, 1-9Traditional Packet Transmission Application, 1-2Traffic Classification, 1-10Traffic Policing, 2-2Traffic Policing and Shaping, 1-11Traffic Policing and Shaping Supported by NE80E/40E, 2-5Traffic Shaping, 2-4

Quidway NetEngine80E/40E Core RouterConfiguration Guide - QoS Index

Issue 03 (2008-09-22) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

i-3

Page 452: 00399154-Configuration Guide - QoS(V300R003_03).pdf

Vvirtual circuits on the interface inherit QoS parametersof the frame relay class, 8-3VPN QoS Features Supported by the NE80E/40E, 6-2VPN QoS Overview, 6-2

IndexQuidway NetEngine80E/40E Core Router

Configuration Guide - QoS

i-4 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)