ODR002013 Configure QoS On NE Series Routers ISSUE1.02 PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 128
At a glance
Powered by AI
The key takeaways are that QoS provides different service quality levels for various network requirements like bandwidth allocation, packet loss reduction, congestion management, traffic control and packet prioritization.

The objectives of the course are to describe key QoS technologies, configure QoS on NE series routers and analyze common faults during the configuration.

The main topics covered in the course are QoS overview, implementation, class-based QoS and configuration of QoS on NE series routers.

Configure QoS on NE

Series Routers

www.huawei.com

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Foreword

As the integration of telecom networks, computer networks, and cable


networks progresses, certain new services such as IPTV and VoIP that have
high requirements for delay need to be carried over IP networks. The
emergence of new services poses increasing requirements for the service
capabilities of IP networks. Instead of merely being content with the result that
packets are sent to the destination, users hope to get satisfying service
experiences in this process. For example, users require allocation of
dedicated bandwidth resources, reduction of the packet loss ratio,
management and avoidance of network congestions, control of the network
traffic, and setting of the packet priority levels. All these requirements can be
met only with a stronger service capability of the networks. Quality of Serivce
(QoS) provides different service quality levels for various requirements.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page2

Objectives

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

Describe key Technologies of QoS

Configure QoS on a network that consists of NE series routers,


and describe the meaning and function of each parameter

involved in QoS configuration

Analyze and handle common faults during QoS configuration


on NE series routers

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page3

Contents
1. QoS Overview

2. QoS Implementation
3. Class-based QoS
4. Configuration of QoS on NE Series Routers
5. QoS Hands-on Practice

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page4

Contents
1. QoS Overview

2. QoS Implementation
3. Class-based QoS
4. Configuration of QoS on NE Series Routers
5. QoS Hands-on Practice

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page5

Contents
1. QoS Overview
1.1 Background of QoS
1.2 How to Measure QoS
1.3 How to Guarantee QoS

1.4 End-to-end QoS Model

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page6

Background of QoS
Solve resource competition
Improve benefits

Deploy QoS
Traditional IP Networks
Bear data services
(Email, FTP, WWW)

Current IP Networks
Bear multiple services
(VoIP, Video, VPN etc.)

The emergence of new services poses increasing requirements for the


service capabilities of IP networks.

All these requirements can be met only with a stronger service capability
of the networks.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page7

Contents
1. QoS Overview
1.1 Background of QoS
1.2 How to Measure QoS
1.3 How to Guarantee QoS

1.4 End-to-end QoS Model

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page8

Bandwidth

BWmaxMin(100M, 10M, 256k, 2M, 1G)256kbps

100Mbps

10Mbps

256kbps

2Mbps

1Gbps

Server

PC
BWmax256kbps

The bandwidth of an entire transmission path


depends on the minimum link bandwidth on this path.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page9

Delay

Transmission
Transmission
Transmission
Transmission
delay
Queue
Queue delay
Processing Queue delay
delay
Processing delay
Processing delay
delay
delay
delay
delay

The end-to-end delay equals to the sum of the


transmission delay, processing delay, and queue
delay on a path.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page10

Jitter

Jitter is caused by the difference in the


end-to-end delay of packets in a same data
flow.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page11

Packet Loss

Packet loss means that data is lost during


transmission and cannot reach the preset
destination.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page12

Contents
1. QoS Overview
1.1 Background of QoS
1.2 How to Measure QoS
1.3 How to Guarantee QoS

1.4 End-to-end QoS Model

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page13

How to Guarantee QoS


Compress and fragmentize packets.

Increase bandwidth.

Improve processing
performance.

Use rational queue scheduling and


congestion avoidance mechanism.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page14

Contents
1. QoS Overview
1.1 Background of QoS
1.2 How to Measure QoS
1.3 How to Guarantee QoS

1.4 End-to-end QoS Model

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page15

End-to-End QoS Model

The QoS provides services to users through different

service models based on the network quality and user


requirements, Three service models are provided:

Best-Effort Service model

Integrated Service model

Differentiated Service model

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page16

Self-Test Questions About QoS Overview


1. Which of the following means can ensure good QoS? ( )

A. Improve the link bandwidth.


B. Improve the device performance.
C. Properly use the queue scheduling mechanism.
D. Properly compress data.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page17

Self-Test Questions About QoS Overview


2. The common IP QoS models are ( )

A. Best-Effort
B. Integrated Service
C. Differentiated Service
D. FIFO Service

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page18

Contents
1. QoS Overview

2. QoS Implementation
3. Class-based QoS
4. Configuration of QoS on NE Series Routers
5. QoS Hands-on Practice

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page19

Contents
2. QoS Implementation
2.1 QoS Implementation Processing Introduction
2.2 Traffic Classifier and Marking
2.3 Traffic Policing and Shaping

2.4 Congestion Management


2.5 Congestion Avoidance

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page20

QoS Implementation Introduction


Traffic Shaping

Configure complex traffic


classification and traffic
policing at the ingress of
network

Non-DS Domain
RTB

DS domain

RTA

Configure simple
traffic classification ,
queue scheduling,
congestion avoidance
and management
Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page21

QoS Implementation Steps


Step
1

Description
Generally, an enterprise network is a non-DS domain.
Deploy traffic shaping on the egress of the router to
limit the rate of the traffic sent to the ISP.

Deploy complex traffic classifier on the ingress router


of the ISP to distinguish between users and between
services of users.

Deploy traffic policing at the ingress router of the ISP


to restrict and ensure the use of network resources by
different users or services.

Deploy simple traffic classifier, congestion management,


and congestion avoidance in the DS domain to implement
end-to-end QoS by combining steps 1, 2, and 3.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page22

Contents
2. QoS Implementation
2.1 QoS Implementation Processing Introduction
2.2 Traffic Classifier and Marking
2.3 Traffic Policing and Shaping

2.4 Congestion Management


2.5 Congestion Avoidance

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page23

Traffic Classifier and Marking(1/5)

Traffic classifier means to distinguish between data streams by marking a


certain field in an IP packet header according to a certain rule so that the
router can treat data streams of different classes in a different manner.

Traffic classifier is divided into complex traffic classifier and simple traffic
classifier

Complex traffic classifier

This classification mode means to finely classify packets by using complex


rules, such as the information of the integrated link layer, network layer, and
transmission layer (for example, source MAC address, destination MAC
address, source IP address, destination IP address, user group number,
protocol type, and TCP/UDP port number of the application). Complex traffic
classifier is performed on the traffic by using ACL on the border router in the
Diff-Serv domain.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page24

Traffic Classifier and Marking(2/5)

Simple traffic classifier

This classification mode means to use simple rules, for example,


based on only the IP priority or DSCP value of the IP packet, EXP
domain value of the MPLS packet, and 802.1p value of the VLAN
packet, to roughly classify packets and identify traffic with different
priority levels or service class features.

Complex traffic
classification

Simple traffic
classification
2

Marking

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

implementing
PHB

Page25

Traffic Classifier and Marking(3/5)

Traffic Classifier is the basement of QoS operation in DS

model.
Version

IHL Type Of Service


Identification

TTL

Total Length
Fragment Offset

Flags

Protocol

Header Checksum

Source Address
Destination Address
Options

R
IP Precedence TOS

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

R
DSCP

Page26

Traffic Classifier and Marking(4/5)


IP Precedence

TOS

R
Max. reliability
000
001
010
011
100
101
110

Routine
Priority
Immediate
Flash
Flash Override
Critical
Internetwork
Control
111 Network Control

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Min. monetary cost

Max. throughput

Min. delay

Page27

Traffic Classifier and Marking(5/5)


DSCP (RFC2474)

Each DSCP value corresponds to a BA. Behavior Aggregate

A PHB can be specified for each BA.

certain QoS mechanisms such as traffic policing and queuing are


used to implement the PHB.

Best Effort (BE), Class Selector (CS), Expedited Forwarding (EF),


and Assured Forwarding (AF).

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page28

PHB(Per-Hop Behavior)(1/5)

Each DSCP value corresponds to a BA. A PHB (for

example, forwarding and dropping) can be specified for


each BA. Then, certain QoS mechanisms such as traffic
policing and queuing are used to implement the PHB.

The Diff-Serv network defines four PHB categories: Best


Effort (BE), Class Selector (CS), Expedited Forwarding (EF),
and Assured Forwarding (AF).

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page29

PHB(Per-Hop Behavior)(2/5)
PHB

Default

Remarks

DSCP Value
BE

(Default

000000

Default PHB for IP data


FIFO
Tail-drop

PHB
FIFO

Tail-drop

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page30

PHB(Per-Hop Behavior)(3/5)

To support the compatibility with the nodes which dont support DSCP

Use the high three bits to set the IP Precedence


Precedence

CS Class

DSCP Value

Default

000000

Routine

CS1

001000

Priority

CS2

010000

Immediate

CS3

011000

Flash

CS4

100000

Override Flash

CS5

101000

Critical

CS6

110000

CS7

111000

Value

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Precedence Class

Internetwork
Control
Network Control
Page31

PHB(Per-Hop Behavior)(4/5)
PHB

Default

Remarks

DSCP Value
EF PHB

101110

For a device that does not support DSCP,


the effect is the same as that of IP
Precedence 5. Generally, delay-sensitive

data is tagged the 101110 mark. Such


data should be forwarded as soon as
possible. In addition, certain bandwidth
resources can be guaranteed. To avoid

such data from using up bandwidth


resources, the part that exceeds the
bandwidth limit is dropped.
Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page32

PHB(Per-Hop Behavior)(5/5)

AF (the assured forwarding per-hop behaviors) PHB means

to ensure that each hop behavior is forwarded.


C

Class

Low drop
precedence

Medium drop
precedence
High drop
precedence

Drop probability
Class1

Class2

Class3

Class4

001010

010010

011010

100010

001100

010100

011100

100100

001110

010110

011110

100110

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page33

Contents
2. QoS Implementation
2.1 QoS Implementation Processing Introduction
2.2 Traffic Classifier and Marking
2.3 Traffic Policing and Shaping

2.4 Congestion Management


2.5 Congestion Avoidance

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page34

Token Bucket

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page35

Traffic Policing(1/2)

Traffic policing monitors the specification of a certain traffic volume that enters
into a network, and confines the traffic within an allowed range. If the packet
traffic volume at a certain connection exceeds the range, packets are dropped,
or the priority of the packet is modified.

Traffic policing implements preset actions based on the evaluation result.


These actions include:

Forwardpass: means to continue forwarding packets whose


measurement result is Complied, or re-forward services with the DSCP tag
for Diff-Serv.

Dropdiscard: means to drop packets whose measurement result is Not


complied.

Change priority before forwardingremark: means to modify the priority


of a packet whose measurement result is Not complied before forwarding
the packet.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page36

Traffic Policing(2/2)
Traffic policing

Enterprise
network

S0

RTA

S0

ISP

RTB
Traffic shaping

When the packet sending rate of a neighboring network is higher than the packet
rate that is supported by the local network, traffic policing can be deployed at

network ingress devices. As shown in the preceding figure, RT A sends packets to


RT B. When the rate of sending packets by RT A is higher than the packet rate
that is supported by RT B, traffic policing can be deployed on the S0 interface of
RT B to restrict the rate at which RT A sends packets.
Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page37

Implementation of Traffic Policing(1/3)


Packets to be sent
from the interface

Sent out
classification
Token
bucket

Packets that need no traffic policing


Discarded

Packets that need traffic policing

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page38

Implementation of Traffic Policing(2/3)


Enterprise

S0

RTA

S0

ISP

RTB

[RTB]acl number 2001


[RTB-acl-basic-2001]rule 0 permit source 1.1.1.0 0.0.0.255
[RTB-acl-basic-2001]quit
[RTB]traffic classifier 1
[RTB-classifier-1]if-match acl 2001
[RTB-classifier-1]quit
[RTB]traffic behavior 1
[RTB-behavior-1]car cir 8000 cbs 15000000 pbs 0 green pass red discard
[RTB-behavior-1]quit
[RTB]traffic policy 1
[RTB-trafficpolicy-1]classifier 1 behavior 1
[RTB-Servial0]traffic-policy 1 inbound

Implementation of Traffic Policing(3/3)

Run display car statistics interface Servial 0 inbound on RTB.The


following result is expected:

[RTB]display car statistics interface Servial 0


inbound
interface: Serial0
inbound
Committed Access Rate:
CIR 8000(Kbps), PIR 0(Kbps), CBS 15000000(byte), PBS
0(byte)
Conform Action: pass
Yellow Action: pass
Exceed Action: discard
Passed: 13079100 bytes, 130791 packets
Dropped: 41236000 bytes, 412360 packets
Last 30 seconds passed rate: 19890 bps, 102 pps
Last 30 seconds dropped rate: 32190 bps, 321 pps

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page40

Traffic Shaping(1/2)

The interface bandwidth difference between upstream and


downstream routers is large, or traffic policing is deployed on the

router at a certain side. In this case, to avoid the router with the
small interface bandwidth from dropping packets, packets on the
router with the large interface bandwidth can be buffered to match
the processing capability of the router with the small interface
bandwidth at an equal speed. This technology is called traffic
shaping.

Generic Traffic Shaping (GTS) can shape irregular traffic or the


traffic that does not match the preset traffic features to ensure
bandwidth matching at network upstream and downstream and
avoid congestion.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page41

Traffic Shaping(2/2)
Traffic
Policing

Enterprise

S0

RTA

S0

ISP

RTB
Traffic
Shaping

Traffic shaping can delay the traffic to avoid a large number of packets from being
dropped, and avoid congestion at the egress. As shown in the preceding figure, RT A is
the egress of the enterprise network, and sends traffic to RTB. RTB deploys traffic
policing on interface S0. To match traffic policing set on RTB, and avoid packets from
being dropped, RTA deploys traffic shaping on S0 to buffer packets, and send packets
at a rate that matches traffic policing set on RTB.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page42

Implementation of Traffic Shaping(1/3)

The following figure shows the basic processing flow of GTS.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page43

Implementation of Traffic Shaping(2/3)

In this example, rate restriction is implemented for the traffic on serial0


interface of RTA. The traffic that sent to RTB is restricted to 20Mbit/s, if

the traffic exceeds, it will be discarded.

Enterprise

S0

RTA

S0

ISP

RTB

[RTA]interface Serial0
[RTA-Serial0] undo shutdown
[RTB-Serial0]port shaping 20
Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page44

Implementation of Traffic Shaping(3/3)

After basic configuration, certain commands can be run to check whether the configuration is

consistent with the planning. Run display interface Serial0 on RTA. The following result is
[RTA]display
expected: interface Servial 0
Serial0 current state : UP
Line protocol current state : UP
Description: Serial0 Interface
Route Port,The Maximum Transmit Unit is 1500, Hold timer is 10(sec)
Derived from T3 3/1/0, Unchannelized mode, baudrate is 44210000 bps
Internet protocol processing : disabled
Link layer protocol is PPP
LCP initial
clock master, loopback none
CRC: CRC-32
Scramble disabled
Statistics last cleared:2012-08-12 09:25:21
Traffic statistics:
Last 300 seconds input rate 32136 bits/sec, 875 packets/sec
Last 300 seconds output rate 19898 bits/sec, 537 packets/sec
Input: 13415135 packets, 14524525 bytes
Input error: 0 shortpacket, 0 longpacket, 0 CRC, 0 lostpacket
Output: 12143525 packets, 1215245 bytes
Output error: 0 lostpackets
Output error: 0 overrunpackets, 0 underrunpackets

The NE80E or NE40E supports traffic shaping only for packets in the outbound direction on the interface. On the interface,
configure different shaping parameters for the packets that participate in the traffic shaping based on different service
classes (EF, AF1, AF2, AF3, AF4, BE, CS6, or CS7).

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page45

Contents
2. QoS Implementation
2.1 QoS Implementation Processing Introduction
2.2 Traffic Classifier and Marking
2.3 Traffic Policing and Shaping

2.4 Congestion Management


2.5 Congestion Avoidance

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page46

Congestion Management

How to manage and control network congestion when it occurs? The


method is to use the queuing technology to place all packets that need to
be sent from an interface into multiple queues and handle the packets
according to the priority of each queue. By using a proper queuing
mechanism, the QoS parameters, such as bandwidth, delay, and jitter, of

packets of a certain type can be guaranteed.

Queues here indicate outgoing queues. The function is to save packets in


queues before the interface can send packets. Therefore, a queuing
mechanism functions when congestion occurs on an outgoing port. The
other function is to re-sort packets (except in FIFO queue).

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page47

Common Queuing Mechanisms

Common queuing mechanisms include:

FIFOFirst In First Out

PQPriority Queuing

WFQWeighted Fair Queuing

LPQLow Priority Queuing

Common queuing technologies on the NE routers include FIFO,


PQ, and WFQ, which are described in the following.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page48

First In First Out(FIFO)(1/2)

Packets to be sent
From the interface

Queue

Out queue
scheduling

Packets leaving
the packets

FIFO

Symbols

Urgent packets

Hypo-urgent packets

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Non-urgent packets

Page49

First In First Out(FIFO)(2/2)

Advantages of FIFO:

Simple processing, fast speed, and low delay

No configuration required; easy to use

Disadvantages of FIFO:

Unfair bandwidth allocation in the case of multiple streams

Delay and jitter

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page50

Priority Queuing(PQ)(1/3)
Queue
CS7

Packets to be sent
from the interface

CS6

PQ

EF

Out queue Packets to be sent


scheduling from the interface

AF4

classification

AF3
AF2

WFQ

AF1
BE

Symbols

Urgent packets

LPQ
Hypo-urgent packets

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Non-urgent packets

Page51

Priority Queuing(PQ)(2/3)

Enterprise
S0

RTA

S0

ISP

RTB

[RTA-interface-serial0] port-queue cos-value { pq | shaping


{ shaping-value | shaping-percentage shaping-percentagevalue } [ pbs pbs-value ] | port-wred wred-name } * outbound

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page52

Priority Queuing(PQ)(3/3)

Advantages of PQ:

Data is forwarded at a low delay. That is, the packets in the lowpriority queues are forwarded only after the packets in the high-priority
queues are forwarded. In this case, the delay in packet forwarding is
low, and key services in the high-priority queues are forwarded.

Disadvantages of PQ:

Each of the four PQ queues uses the FIFO mechanism. That is, each
queue has all the disadvantages of the FIFO queue.

If packets exist in the high-priority queues for a long time, the packets
in the low-priority queues cannot be forwarded during this period.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page53

Weighted Fair Queuing(WFQ)(1/3)


Queuing

Q1

Packets to be sent
from the interface
classification

Out queue
scheduling

Packets leaving
the interface

Q2
Q3

Qn
Symbols

WFQ dynamically classifies flows by HASH


algorithm and ensures more bandwidth for
Packets
packets with high priority.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page54

Weighted Fair QueuingWFQ(2/3)


ISP

Enterprise

E0

S0

port-queue cos-value { wfq wred-name } * outboundweight


weight-value | shaping { shaping-value | shaping-percentage
shaping-percentage-value } [ pbs pbs-value ] | port-wred

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page55

Weighted Fair Queuing(WFQ)(3/3)

Advantages of WFQ:

The configuration is simple.

The throughput of all flows can be guaranteed.

Disadvantages of WFQ:

The classification algorithm is complex. Therefore, the processing is

slow.

WFQ cannot guarantee a stable bandwidth for key services. Multiple


low-priority flows consume the bandwidth resources that may be
available to a high-priority flow.

Users cannot define classes.

No fixed bandwidth can be ensured.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page56

Low Priority Queue LPQ

LPQ Feathers

When schedulingthe packets of PQ queue is scheduled at first


then WFQthe last is LPQ. After finished PQ and WFQ
schedulingif bandwidth is left, these bandwidth can be assigned
to LPQ.

The way of scheduling is the same as PQ inside of LPQ. The

difference is PQ can occupy the bandwidth of WFQ when


congestion, while LPQ can not.

In the actual application, the BE flow can be scheduled by LPQ. If

the network is heavy loaded, BE flow can be restricted and so as


to meet the other service at first.
Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page57

Contents
2. QoS Implementation
2.1 QoS Implementation Processing Introduction
2.2 Traffic Classifier and Marking
2.3 Traffic Policing and Shaping

2.4 Congestion Management


2.5 Congestion Avoidance

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page58

Congestion Avoidance

Excessive congestion poses great threats to network resources,


and needs to be alleviated by taking a certain measure.
Congestion avoidance means to selectively drop packets
according to the queue status before excessive congestion occurs,
thereby improving the QoS performance of congested traffic.

Congestion avoidance is implemented through any of the


following drop mechanisms:

Tail drop

Random Early Detection (RED)

Weighted RED (WRED)

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page59

Tail Drop
Bandwidth
Saturation
bandwidth

Average
bandwidt
h

TCP global synchronization


TCP starvation
High delay and high jitter
Non-differentiated drop

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page60

Time

Random Early Detection(RED)


Drop
probability

Not drop

Random drop

Tail drop

100%

Max. drop probability

10%

20
(low limit)

40
(high limit)

Queue percent

RED has three drop modes: green packets (not drop),


yellow packets (drop at a certain possibility), and red
packets (drop all).

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page61

Weighted Random Early Detection


(WRED)(1/4)
Drop
probability
100%

Max. drop probability

10%

20
AF21
AF22
AF23

25 30

35

40

Queue percent

As shown in the figure, the high-limit and


low-limit values and drop possibilities of AF21,
AF22, and AF23 vary according to the priority
level.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page62

Weighted Random Early Detection


(WRED)(2/4)

In the example, WRED is configured. Set the green, yellow, red color s low-limit
value of priority levels 1 to 20, 30,35and the high-limit value to 30,35,40 .
Drop
probability

100%

red

Max. drop probability

10%

yellow
green

20

25 30

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

35

40

Page63

Queue percent

Weighted Random Early Detection


(WRED)(3/4)

Enterprise

S0

S0

ISP

RTA
RTB

[RTB]port-wred 1
[RTB-port-wred-1]color green low-limit 20 high-limit 30 discard-percentage
10
[RTB-port-wred-1]color yellow2 low-limit 30 high-limit 35 discardpercentage 10
[RTB-port-wred-1]color red low-limit 35 high-limit 40 discard-percentage 10
[RTB-port-wred-1]quit
[RTB]interface Serial 0
[RTB-Seirial0]port-queue be port-wred 1 outbound
Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page64

Weighted Random Early Detection


(WRED)(4/4)

After the configuration, run display port-wred configuration


verbose to check relevant configuration. The displayed information
shows that the actual effect is the same as planned.
[RTB]display port-wred configuration verbose 1
Port wred name : 1
--------------------------------------------------Color
Low-limit
High-limit
Discard-percent
--------------------------------------------------green
20
30
10
yellow
30
35
10
red
35
40
10
Reference relationships : NULL

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page65

Self-Test Questions About QoS


Implementation
1. Which of the following can be used to classify IP packets on

the network layer? ( )


A. Packet length
B. VLAN ID
C. Source IP address and destination IP address
D. TOS field

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page66

Self-Test Questions About QoS


Implementation
2. Which of the following technologies are used to avoid

congestion on the VRP? (

A. GTS
B. WRED
C. RED
D. CAR

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page67

Self-Test Questions About QoS


Implementation
3. Which of the following statements about traffic policing and

traffic shaping are true? (

A. Traffic policing is applicable only to the inbound direction.


B. Traffic policing is applicable to inbound and outbound
directions.
C. Traffic shaping is applicable to inbound and outbound
directions.
D. Traffic shaping is applicable only to the outbound direction.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page68

Self-Test Questions About QoS


Implementation
4. Which of the following statements about the PQ policy are true? (

A.The PQ policy ensures that key services are preferentially processed.


B. The packets of lower priorities that fail to be processed may be lost
because of the PQ policy.
C. The PQ policy assigns different priorities for packets of different
services and ensures absolute preferential processing for packets of
high priorities.
D. Generally, the PQ policy can be used to ensure that the delay of
time-sensitive and real-time applications such as VoIP is within the
specified time range.
Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page69

Self-Test Questions About QoS


Implementation
5. Which of the following statements about applications of the

token bucket in the QoS are true? (

A. The token bucket can be used to limit the speed on physical


interfaces.

B. The token bucket can be used for traffic classification.


C. The token bucket can be used for traffic policing.
D. The token bucket can be used for traffic shaping.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page70

Contents
1. QoS Overview

2. QoS Implementation
3. Class-based QoS
4. Configuration of QoS on NE Series Routers
5. QoS Hands-on Practice

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page71

Class-Based QoS

As a new QoS command delivery mode, class-based QoS

classifies traffic according to a certain rule, and associates


the traffic of a type to a certain action to form a certain
policy. This policy is applied on an interface to implement

function such as class-based traffic policing, traffic shaping,


congestion management, and priority remarking. By
consolidating the original QoS commands, class-based QoS

can flexibly distinguish between user services, implement


differentiated forwarding, and guarantee the quality of
service.
Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page72

Implementation Process Overview

Class-based QoS commands are divided into three categories:

traffic classifier identifies packets that comply with a certain feature


by using a certain rule.

traffic behaviora collection of QoS actions on packets.

traffic policycombination of traffic classifier and traffic behavior.

Class-based QoS is implemented by using policies. A QoS policy


associates traffic classifier and traffic behavior. By applying a
policy on an interface, the desired QoS can be provided.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page73

Traffic Classifier(1/2)

For traffic classifier rules, the IP precedence or DSCP value can


be used to identify traffic with different priority levels, or the
network administrator can set traffic classifier rules to classify
traffic based on information such as the source address,
destination address, MAC address, IP protocol, and application
port number. To implement class-based QoS applications on
network traffic, traffic classifier rules must be defined.

The implementation process of traffic classifier is as follows:

Define a name for traffic classifier.

Set the matching rule for the traffic classifier.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page74

Traffic Classifier(2/2)
[RTB]traffic classifier classier
[RTB-classifier-classier]if-match ?
8021p
Specify 802.1p parameters
acl
Specify ACL to match
any
Specify any packets to match
destination-mac Specify destination MAC address to match
dscp
Specify DSCP (DiffServ CodePoint) to match
ip-precedence
Specify IP precedence to match
ipv6
Specify IPv6
mpls-exp
Specify MPLS EXP value to match
source-mac
Specify source MAC address to match
tcp
Specify Transmission Control Protocol
parameters

From the displayed content, it can be seen that a traffic classifier


can match multiple rules.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page75

Traffic Behavior(1/4)

Traffic behavior indicates action based on traffic classifier.

Traffic behavior includes remarking of packet priority, traffic


policing, traffic shaping, queuing, and congestion avoidance.

The implementation process of traffic behavior is as follows:

Define a behavior name.

Define a traffic behavior.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page76

Traffic Behavior(2/4)

1. Traffic marking

[RTA]traffic behavior Behavior1


[RTA-behavior-Behavior1]remark ?
8021p
Specify 802.1p parameters
dscp
Remark DSCP (DiffServ CodePoint)
ip-df
ip-df
ip-precedence Remark IP precedence
ipv6
IPV6 Packet Remark
mpls-exp
Remark MPLS EXP

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page77

Traffic Behavior(3/4)

2. Traffic policing
[RTA]traffic behavior Behavior1
[RTA-behavior-Behavior1] car { cir cir-value [ pir pirvalue] } [ 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 ] } ]*

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page78

Traffic Behavior(4/4)

3. Queuing Set the Class of Service (CoS) in Packets

Setting the CoS applies to only upstream packets. Specifying the


CoS and drop precedence of packets allows matched packets to
be placed in corresponding queues. In this case, the router does

not need to look up the BA table according to the precedence


field in the packets to determine the CoS. In addition, the packets
can be transparently transmitted with no need to change the
precedence field in the packet.

EF, BE, CS6, and CS7 packets cannot be re-marked yellow or


red.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page79

Traffic Policy(1/2)

A traffic policy associates traffic classifier with traffic

behavior. After traffic classifier and traffic behavior are


defined, traffic policies need to be configured to associate
defined traffic with actions.

The process of defining a traffic policy is as follows:

Define a policy name

Associate traffic classifier with traffic behavior

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page80

Traffic Policy(2/2)

Example of configuring a policy and nesting an action:

[RTA]traffic policy Policy1


[RTA-trafficpolicy-Policy1]classifier classifier-name behavior
behavior-name

[RTA]traffic behavior Behavior1


[RTA-behavior-Behavior1]traffic-policy Policy1

NE routers support policy nesting.

Policy nesting indicates that a QoS policy contains another QoS policy. The
behavior of a parent policy is a sub policy. The behavior of a certain class of traffic

defined by using the traffic classifier command executes the behavior defined in
the parent policy. In addition, the traffic is further classified by the sub policy to
execute the behavior defined in the sub policy. NE routers support only two levels
of policy nesting.
Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page81

Applications of Traffic Policies on Interfaces

After traffic policies associate traffic classifier with traffic behavior, you
need to apply the policies on the outbound or inbound direction of an
interface according to the requirements for the policies to take effect.

Apply defined policies on specific interfaces, including the egress

interface and ingress interface. Policies can be applied in the outbound


direction or inbound direction of the interface according to the specific
behavior. For example, traffic policing can be applied in the outbound or
inbound direction, but traffic shaping and rate restriction can be applied

only in the outbound direction of an interface.


[RTA]interface Ethernet 0/0/1
[RTA-Ethernet0/0/1]traffic-policy Policy1 ?
inbound

Assign policy to the inbound of an interface

outbound

Assign policy to the outbound of an interface

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page82

Self-Test Question About Class-Based


QoS
1. The three parts in the command line of the class-based QoS

are ( )
A. Traffic classifier
B. Traffic behavior
C. Traffic policy
D. Traffic shaping and policing

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page83

Contents
1. QoS Overview

2. QoS Implementation
3. Class-based QoS
4. Configuration of QoS on NE Series Routers
5. QoS Hands-on Practice

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page84

Typical Application Scenarios


Perform PHB according
to marking

Diff-Serv

Set TCA according


to SLA
Classify and mark
traffic
Monitor traffic

Traffic shaping
Congestion
management
Congestion
avoidance

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Set TCA according


to SLA
Classify and mark
traffic
Monitor traffic

Page85

Configuration Example-Topology Description

In the network as shown in the preceding figure, the server provides the network
resources, and two PCs simulate users obtaining network resources from the
server. The two PCs belong to different service guarantee levels. QoS policies
need to be deployed between the server and PCs to control and adjust the traffic
between the server and PCs.

Traffic Policing and Traffic Shaping


ConfigurationConfiguration Flow
Step

Operation

View

Commands

Configure ACLs [Quidway]

acl number xxxx

Deploy the

[Quidway-

port CAR

Ethernet0/1]

qos car { cir cir-value [pir


pir-value] } [ cbs cbs-value
pbs pbs-value ] [ green
{ discard | pass [ serviceclass 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-10> } ]
port shaping shaping-value
[ network-header-length
network-header-length ] [ pbs
pbs-value ]

policy

Deploy the

[Quidway-

port GTS

Ethernet0/]

policy

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page87

Configuration Example

Configuration Example

Traffic policing is implemented on Ethernet0/1 of RT 1 to


restrict the traffic into RT 1 and define the maximum
bandwidth to PC 1 as 300 kbit/s.

Traffic shaping is implemented on Ethernet0/0 of RT 1 to


restrict the traffic at the egress and define the maximum
bandwidth to PC1 and PC 2 as 256 kbit/s.

The basic route configurations on RT 1, RT 2, and RT 3 are


omitted.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page88

Traffic Policing and Traffic Shaping


Configuration

[RT1] interface Ethernet0/1


[RT1-behavior-behavior1] qos car cir 300000 green pass
red discard
[RT1-behavior-behavior1] quit
[RT1]interface Ethernet0/0
[RT1-GigabitEthernet1/0/0]port shaping 256k
[RT1-GigabitEthernet1/0/0]quit

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page89

Traffic Policing and Traffic Shaping


ConfigurationTraffic Policing Verification

Check statistics information on relevant interfaces of the router


<RT1> display car statistics interface e0/1 inbound
Interface: Ethernet0/1
Inbound
Committed Access Rate:
CIR 128(Kbps), PIR 0(Kbps), CBS 23930(byte), PBS 0(byte)
Conform Action: pass
Yellow Action: pass
Exceed Action: discard
Passed: 6249759 bytes, 4552 packets
Dropped: 2074783 bytes, 1543 packets
Last 30 seconds passed rate: 300000 bps, 360 pps
Last 30 seconds dropped rate: 43388 bps, 64 pps

Different from GTS, when CAR is used, if the rate exceeds the restriction
range, the extra traffic is remarked or dropped according to the
configuration. In this experiment, 1543 packets are dropped.
Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page90

Traffic Policing and Traffic Shaping


ConfigurationTraffic Shaping Verification

Run display interface e0/0 to check the statistics information


about QoS status on the port.
<RT1> display interface e0/0
Ethernet0/0 current state : UP
Line protocol current state : UP
Description:HUAWEI, Quidway Series, Ethernet0/0 Interface
Route Port,The Maximum Transmit Unit is 1500
Internet protocol processing : disabled

Output:
Unicast: 34525245 packets, Multicast: 0 packets
Broadcast: 0 packets, JumboOctets: 0 packets
Lost: 0 packets, Overflow: 0 packets, Underrun: 0 packets
System: 0 packets, Overruns: 0 packets
TxPause: 0 packets

Under the restrictions of GTS, the rate is restricted. The data that
exceeds the traffic specification, however, is buffered but not dropped.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page91

PQ ConfigurationConfiguration Flow
Step
1

Operation
Enter the
interface view

Apply the
priority list

View
[Quidway]

Commands
interface

interface-type
[Quidwayinterface]

group on the
interface.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

interface-number
port-queue cos-value
{ pq | shaping
{ shaping-value |
shaping-percentage
shaping-percentagevalue } [ pbs pbsvalue ] | port-wred
wred-name } *
outbound

Page92

PQ ConfigurationConfiguration
Example

Configuration Example

As shown in the figure, PC 1 and PC 2 download files from


the server. PQ is configured on the E0/0 interface of RT 3
so that data to PC 1 is placed in the CS6 queue, and data to
PC 2 is placed in the EF queue.

The basic route configurations on RT 1, RT 2, and RT 3 are


omitted.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page93

PQ Configuration

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page94

PQ ConfigurationConfiguration
Verification(1/5)

Configuration Verification

1. PC2(192.168.1.3) downloads files from the server. PC 1


(192.168.1.2) is idle .

Run display port-queue statistics interface


ethernet0/0 outbound to check the queues, find that
data in EF queue increased very quickly.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page95

PQ ConfigurationConfiguration
Verification(2/5)

Check the data transmission rate on PC 2. It can be seen

that the LR can be reached (after physical rate restriction).

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page96

PQ ConfigurationConfiguration
Verification(3/5)

Run display port-queue statistics interface


ethernet0/0 outbound to check the queues, find that data in
CS6 queue increased very quickly.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page97

PQ ConfigurationConfiguration
Verification(4/5)

Check the FTP client on PC 2. It is found that the FTP connection is


interrupted (because no packets can be received or sent). PC 1, however,
reaches the LR.

Download status of PC 2:

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page98

PQ ConfigurationConfiguration
Verification(5/5)

Download status of PC 1:

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page99

WFQ ConfigurationConfiguration Flow


Step Operation
1

Enter interface view

Configure WFQ

View

Commands

[Quidway]

interface interface-

[Quidwayinterface]

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

type interface-number
port-queue cos-value
{ wfq weight weightvalue | shaping
{ shaping-value |
shaping-percentage
shaping-percentagevalue } [ pbs pbsvalue ] | port-wred
wred-name } *
outbound

Page100

WFQ ConfigurationConfiguration
Example

Configuration Example

As shown in the figure, PC 1 and PC 2 download files from


the server. Mark the priority level for data that enters into

the E0/1 interface on RT 3, and configure WFQ on the E0/0


interface on RT 1.

The basic route configurations on RT 1, RT 2, and RT 3 are

omitted.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page101

WRED ConfigurationConfiguration Flow


Step
1

Operation
Configure

View
[Quidway]

WRED
module

Apply
WRED on
the interface.

[QuidwayEthernet0/
1]

Commands
1.port-wred port-wred-name
2.color{ green | yellow |
red } low-limit low-limitpercentage high-limit highlimit-percentage discardpercentage discard-percentage
port-queue cos-value { { pq |
wfq weight weight-value | lpq}
| shaping { shaping-value |
shaping-percentage shapingpercentage-value } | portwred wred-name } * outbound

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page102

WRED ConfigurationExample

As shown in the figure, PC 1 and PC 2 download files from

the server. Enable WRED on E0/0 of RT 1.

The basic route configurations on RT 1, RT 2, and RT 3 are


omitted.

For the WFQ configuration on RT 3, refer to the preceding


topic.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page103

WRED ConfigurationConfiguration on
RT1

[RT1] port-wred pw
[RT1-port-wred-pw]color green low-limit 70
high-limit 100 discard-percentage 100
[RT1-port-wred-pw]color yellow low-limit 60
high-limit 90 discard-percentage 100
[RT1-port-wred-pw]color red low-limit 50
high-limit 80 discard-percentage 100
[RT1]interface Ethernet 0/0
[RT1]port-queue ef pq port-wred pw outbound
Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page104

WRED ConfigurationConfiguration
Verification(1/3)

Configuration Verification

Check WRED configuration.

<RT1>display port-wred configuration verbose pw


port-wred-name : pw
color low-limit high-limit discard-percent
green

70

100

100

yellow

60

90

100

red

50

80

100

reference relationships
NULL

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page105

WRED ConfigurationConfiguration
Verification(2/3)

Run display port-queue statistics interface E0/0 outbound on


E0/0 of RT1, found that EF traffic increased very quickly,

Before WRED is enabled, packet loss occurs only in the case


of congestion.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page106

WRED ConfigurationConfiguration
Verification(3/3)

You can run commands to change the high-limit and low-limit


values for different queues:
[RT1-port-wred-pw]color green low-limit 20 highlimit 40 discard-percentage 10

After WRED is enabled, run display port-queue statistics


interface e0/0 ef outbound found that packets are dropped as

long as the consumed queue length exceeds the low-limit value.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page107

Class-Based QoS Configuration


Configuration Flow
Step

Operation

View

Commands

Configure advanced ACLs

[Quidway]

acl

Configure traffic

[Quidway]

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

[Quidway]

traffic behavior
behaviorname

[Quidway]

1. traffic policy
policy-name
2. Classifier
classifier-name
behavior behaviorname [ precedence
precedence ]
traffic-policy policyname { inbound |
outbound } [ link-layer
| all-layer | mplslayer ]

classifier

Configure traffic
behavior

Configure traffic
policies

Apply traffic policies on

[Quidway-

interfaces

Ethernet0/1]

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page108

Class-Based QoS Configuration


Configuration Example

As shown in the figure, the PCs and server are connected by


using routers. PC 1 and PC 2 upload files to the server through
three routers.

Traffic classification is implemented on the data on the ingress


E0/1 of RT 3 based on the destination address. The DSCP field of
the data to be sent to PC 1 is set to EF. The DSCP field of the
data to be sent to PC 2 is set to AF11.

QoS policies need to be configured at the egress of RT 1. The


traffic whose DSCP field is EF is placed in the CS6 queue and the
color is marked green. The traffic whose DSCP field is AF11 is
placed in the AF4 queue and the is marked red.

The basic route configurations on RT 1, RT 2, and RT 3 are


omitted.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page109

Class-Based QoS Configuration


Configuration on RT3(1/5)

Configuration on RT3 Configure ACL policy on R3 and


classfy the traffic by the destination PC for E0/1 incoming
traffic and mark them.

1. Configure ACL

[RT3]acl number 3000


[RT3-acl-adv-3000]rule 0 permit ip
destination 192.168.1.2 0
[RT3-acl-adv-3000]quit
[RT3]acl number 3001
[RT3-acl-adv-3001]rule 0 permit ip
destination 192.168.1.3 0

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page110

Class-Based QoS Configuration


Configuration on RT3(2/5)

2. Configure traffic classifier

[RT3]traffic classifier c1
[RT3-classifier-c1]if-match acl 3000
[RT3-classifier-c1]quit
[RT3]traffic classifier c2
[RT3-classifier-c2]if-match acl 3001

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page111

Class-Based QoS Configuration


Configuration on RT3(3/5)

3. Configure Marking traffic behavior based on class

[RT3]traffic behavior b1
[RT3-behavior-b1]remark dscp ef
[RT3-behavior-b1]quit
[RT3]traffic behavior b2
[RT3-behavior-b2]remark dscp af11

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page112

Class-Based QoS Configuration


Configuration on RT3(4/5)

4. Configure class-based QoS policy

[RT3]traffic policy ftpuser


[RT3-trafficpolicy-ftpuser]classifier
c1 behavior b1
[RT3-trafficpolicy-ftpuser]classifier
c2 behavior b2

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page113

Class-Based QoS Configuration


Configuration on RT3(5/5)

5. Apply traffic policy

[RT3]interface Ethernet0/1
[RT3-Ethernet0/1] traffic-policy
ftpuser inbound

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page114

Class-Based QoS Configuration


Configuration on RT1(1/3)

Configuration on RT1: Configure class-based QoS on R1, traffic coming


in from E0/1, will provide diferent sevice based on DSCP in packets.

1. Configure traffic classifier

[RT1]traffic classifier c1
[RT1-classifier-c1]if-match dscp ef
[RT1-classifier-c1]quit
[RT1]traffic classifier c2
[RT1-classifier-c2]if-match dscp af11

Class-Based QoS Configuration


Configuration on RT1(2/3)

2. Configure class-based ingress queue operation

[RT1]traffic behavior b1
[RT1-behavior-b1] service-class cs6 color
green
[RT1-behavior-b1]quit
[RT1]traffic behavior b2
[RT1-behavior-b2] service-class af4 color red
[RT1-behavior-b2]quit

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page116

Class-Based QoS Configuration


Configuration on RT1(3/3)

3. Configure class-based QoS policy

4. Apply traffic policy

[RT1]traffic policy ftpuser


[RT1-trafficpolicy-ftpuser]classifier
c1 behavior b1
[RT1-trafficpolicy-ftpuser]classifier
c2 behavior b2

[RT1]interface Ethernet0/1
[RT1-Ethernet0/1]traffic-policy
ftpuser inbound

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page117

Class-Based QoS Configuration


Configuration Verification(1/5)

1. View the user-defined traffic classifier

<RT1>display traffic classifier user-defined


User Defined Classifier Information:
Classifier: c2

Operator: OR
Rule(s) : if-match dscp af11
RefedByPolicyNum : 0
PolicyName : ftpuser

Classifier: c1
Operator: OR
Rule(s) : if-match dscp ef
RefedByPolicyNum : 0
PolicyName : ftpuser

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page118

Class-Based QoS Configuration


Configuration Verification(2/5)

2.View the user-defined traffic behavior

<RT1>display traffic behavior user-defined


User Defined Behavior Information:
Behavior: Behavior1
-noneBehavior: b2
SERVICE-CLASS:
service-class af4 color red
Behavior: b1
SERVICE-CLASS:
service-class cs6 color green
Behavior: 1
-none-

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page119

Class-Based QoS Configuration


Configuration Verification(3/5)

3. View the user-defined QoS policies

<RT1>display traffic policy user-defined


User Defined Traffic Policy Information:
Policy: ftpuser
Share-mode
Classifier: default-class
Behavior: be
-noneClassifier: c1
Behavior: b1
SERVICE-CLASS:
service-class cs6 color green
Classifier: c2
Behavior: b2
SERVICE-CLASS:
service-class af4 color red

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page120

Class-Based QoS Configuration


Configuration Verification(4/5)

4. Check the traffic statictistics on the interface

<<RT1>display traffic policy statistics interface e0/0 outbound


verbose classifier-based
Interface: Ethernet0/0
Traffic policy inbound: ftpuser
Traffic policy applied at 2012-09-22 15:15:35
Statistics disabled at 2012-09-22 15:15:35
Statistics last cleared: Never
Rule number: 2 IPv4, 0 IPv6
Current status: OK!
Classifier: c1
Behavior: b1
Item
Packets
Bytes
------------------------------------------------------------------Matched
0
0
+--Passed
0
0
+--Dropped
0
0
+--Filter
0
0
+--URPF
0
0
+--CAR
0
0
Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page121

Class-Based QoS Configuration


Configuration Verification(5/5)

Last 30 seconds rate


Item
pps
bps
------------------------------------------------------------------Matched
0
0
+--Passed
0
0
+--Dropped
0
0
+--Filter
0
0
+--URPF
0
0
+--CAR
0
0
Classifier: c2
Behavior: b2
Item
Packets
Bytes
------------------------------------------------------------------Matched
0
0
+--Passed
0
0
+--Dropped
0
0
+--Filter
0
0
+--URPF
0
0
+--CAR
0
0
Last 30 seconds rate
Item
pps
bps
------------------------------------------------------------------Matched
0
0
+--Passed
0
0
+--Dropped
0
0
+--Filter
0
0
+--URPF
0
0
+--CAR
0
0

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page122

Contents
1. QoS Overview

2. QoS Implementation
3. Class-based QoS
4. Configuration of QoS on NE Series Routers
5. QoS Hands-on Practice

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page123

QoS Hands-on PracticeTopology


Description

As shown in the figure, interface GE1/0/1 on router A is interconnected with


interface GE1/0/0 on router B. The server and PC can access the Internet
through router A and router B. The IP addresses of the server, PC, and
GE1/0/0 of router A are in the same network segment.

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page124

Configuration Tasks(1/2)
Task
1

Description
Remark the DSCP domain for the packet traffic from the server and PC
sent by interface GE1/0/1 on router A
Remark the DSCP field for the data sent from the server as EF

Remark the DSCP field for the data sent from the PC as AF11
2

Perform traffic control on the packet traffic from the server and PC
received by interface GE1/0/0 on router B as follows
Constrain the packet traffic from the server to 54000 bit/. When the

traffic is lower than 54000 bit/s, the traffic can be normally sent. When
the traffic exceeds 54000 bit/s, set the priority level of the extra traffic
to 0 before sending the extra traffic
Constrain the packet traffic from the PC to 8000 bit/s. When the traffic

is lower than 8000 bit/s, the traffic can be normally sent. When the
burst traffic size exceeds 15000 bit/s, the extra traffic is dropped

Configuration Tasks(2/2)
Task
3

Description
The packet receiving and sending on GE1/0/0 and GE1/0/1 on router B must meet
the following requirements:

The total traffic restriction for packet receiving at GE1/0/0 on router B is 500
kbit/s. Extra traffic is dropped as incompliant packets.

The restriction on packet traffic that enters into the Internet through GE1/0/1
on router B is 1000 kbit/s. Extra traffic is dropped as incompliant packets.

If GE1/0/1 on router B encounters congestion, certain bandwidth resources must

be allocated to the data from the server, and the delay and jitter must be ensured

Packet traffic sent by GE1/0/1 on router B is divided into two classes


according to the DSCP field of the IP packets, and QoS policies must be
configured:

Implement AF for traffic whose DSCP field is AF. Ensure that the
minimum bandwidth is 5%
Implement EF for traffic whose DSCP field is EF. Ensure that the
minimum bandwidth is 30%.

Summary

QoS Overview

QoS Implementation

Class-based QoS

Configuration of QoS on NE Series Routers

Copyright 2011 Huawei Technologies Co., Ltd. All rights reserved.

Page127

Thank you
www.huawei.com

You might also like