You are on page 1of 53

ZXR10 8900E

Series Core Switch


Configuration Guide (QoS)

Version: 3.01.01

ZTE CORPORATION
No. 55, Hi-tech Road South, ShenZhen, P.R.China
Postcode: 518057
Tel: +86-755-26771900
Fax: +86-755-26770801
URL: http://ensupport.zte.com.cn
E-mail: support@zte.com.cn
LEGAL INFORMATION
Copyright 2013 ZTE CORPORATION.
The contents of this document are protected by copyright laws and international treaties. Any reproduction or
distribution of this document or any portion of this document, in any form by any means, without the prior written
consent of ZTE CORPORATION is prohibited. Additionally, the contents of this document are protected by
contractual confidentiality obligations.
All company, brand and product names are trade or service marks, or registered trade or service marks, of ZTE
CORPORATION or of their respective owners.
This document is provided as is, and all express, implied, or statutory warranties, representations or conditions
are disclaimed, including without limitation any implied warranty of merchantability, fitness for a particular purpose,
title or non-infringement. ZTE CORPORATION and its licensors shall not be liable for damages resulting from the
use of or reliance on the information contained herein.
ZTE CORPORATION or its licensors may have current or pending intellectual property rights or applications
covering the subject matter of this document. Except as expressly provided in any written license between ZTE
CORPORATION and its licensee, the user of this document shall not acquire any license to the subject matter
herein.
ZTE CORPORATION reserves the right to upgrade or make technical change to this product without further notice.
Users may visit ZTE technical support website http://ensupport.zte.com.cn to inquire related information.
The ultimate right to interpret this product resides in ZTE CORPORATION.

Revision History

Revision No. Revision Date Revision Reason

R1.0 20130715 First edition

Serial Number: SJ-20121213142710-014

Publishing Date: 2013-07-15 (R1.0)

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


Contents
About This Manual ......................................................................................... I
Chapter 1 Port QoS Configuration............................................................ 1-1
1.1 Port QoS Overview............................................................................................. 1-1
1.2 Configuring Port QoS ......................................................................................... 1-4
1.3 Maintaining the Port QoS .................................................................................. 1-10
1.4 Port QoS Configuration Example....................................................................... 1-15

Chapter 2 Flow QoS Configuration........................................................... 2-1


2.1 Traffic-based QoS Overview ............................................................................... 2-1
2.2 Configuring Flow QoS......................................................................................... 2-5
2.3 Flow QoS Maintenance .................................................................................... 2-12
2.4 Flow QoS Configuration Example ...................................................................... 2-13

Figures............................................................................................................. I
Glossary ........................................................................................................ III

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


II

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


About This Manual
Purpose
This manual is the ZXR10 8900E (V3.01.01) Series Core Switch Configuration Guide (QoS
), which is applicable to the ZXR10 8900E (V3.01.01) series switches.

Intended Audience
This manual is intended for:
l Network planning engineer
l Debugging engineer
l Attendant

What Is in This Manual


This manual contains the following chapters:

Chapter Summary

1, Port QoS Configuration Provides the overview and principles of Port QoS configuration, related
configuration and maintenance commands, and configuration examples.

2, Flow QoS Configuration Provides the overview and principles of Flow QoS configuration, related
configuration and maintenance commands, and configuration examples.

Conventions
This manual uses the following typographical conventions:

Typeface Meaning

Italics Variables in commands. It may also refer to other related manuals and documents.

Bold Menus, menu options, function names, input fields, option button names, check boxes,
drop-down lists, dialog box names, window names, parameters, and commands.

Constant Text that you type, program codes, filenames, directory names, and function names.
width

[] Optional parameters.

{} Mandatory parameters.

| Separates individual parameter in series of parameters.

Note: provides additional information about a certain topic.

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


II

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


Chapter 1
Port QoS Configuration
Table of Contents
Port QoS Overview.....................................................................................................1-1
Configuring Port QoS .................................................................................................1-4
Maintaining the Port QoS .........................................................................................1-10
Port QoS Configuration Example..............................................................................1-15

1.1 Port QoS Overview


Introduction to Port QoS
In a traditional Internet Protocol (IP) network, all packets are processed without any
difference. Routers use the First In First Out (FIFO) policy to process packets and the
best-effort principle to transmit packets to destinations. However, the routers cannot
guarantee the performance such as packet transmission reliability, delay, and so on.
With the development of new applications in an IP network, users have more requirements
for service quality. The best-effort in a traditional IP network cannot meet the requirements
of applications. For example, in the VoIP service, if the transmission delay of packets is
too long, users cannot bear it. A feasible method to solve the problem is to provide the
Quality of Service (QoS) ability for the Internet.
QoS is used to provide different service qualities (such as providing a special bandwidth,
reducing the packet loss rate, delay, and delay jitter) in accordance with different
requirements of applications.

Port QoS Principle


The port QoS is an important part of the QoS function. It is a QoS sub-module configured
on the basis of ports. The main functions are as follows:
l Traffic limit
The traffic limit function based on ports is to limit the traffic rate of this port. For the
traffic exceeding the committed rate, perform the following operations:
Drop or forward packets (Red packets are dropped, and yellow packets are
allowed by default.)
Modify the DSCP value of a packet.
Modify the drop priority. A packet with a higher drop priority will be dropped first.
The default priority is 3 for a red packet, 2 for a yellow packet, and 1 for a green
packet.

1-1

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


ZXR10 8900E Configuration Guide (QoS)

The traffic limit based on the port does not cause any extra delay.
The traffic limit based on the port uses the MMU register. If it is not supported by the
ACL rule, extra packets to this port will be dropped in the default drop mode. That is
to say, the current packets will be dropped if no token bucket is obtained.
After the rate is limited, the packet will be colored in srTCM BLIND mode. The EBS
is equal to the CBS, so there are only red and green packets, and no yellow packets.
If a token is obtained from the token bucket, the packet will be green. If no token is
obtained from the token bucket, the packet will be red. The red packets are dropped
by default, and the green packets are allowed.

l Traffic shaping
The traffic shaping function limits the rate of packets sent from the port. In this case,
packets can be sent out at an average speed. The traffic shaping function is mainly
used to match the rate of packets with the rate of downstream devices to avoid packet
congestion and packet loss.

The difference between traffic shaping and traffic limit is as follows: The traffic shaping
function buffers a packet that exceeds the committed rate, and then sends the packet
at an average speed. However, the traffic limit function discards the packet because
the packet exceeds the committed rate. The traffic shaping function causes the delay,
but the traffic limit function does not cause any delay.
The traffic shaping function is also implemented through the MMU register.
l Queue scheduling
Each physical port of the ZXR10 8900E supports eight output queues (queue 0-7)
which are called CoS queues. The switch performs the output operation on the
ingress in accordance with the Cos queue corresponding to 802.1p of packets.
When network congestion occurs, multiple packets may occupy the resources. This
problem is solved through the queue scheduling function.
The ZXR10 8900E supports three types of queue scheduling, including Strict Priority
(SP), Weighted Round Robin (WRR), and Deficit Weighted Round Robin (DWRR).
Eight output queues of this port use different scheduling modes.
Strict Priority (SP)

In this mode, the packet in each queue is strictly scheduled in accordance with the
priority. The packets in the queue with the highest priority will be scheduled first.
When the packets with the highest priority in the queue are scheduled completely,
the packets in the queue with a second highest priority will be scheduled then,
and so on.

The strict priority scheduling ensures that packets of key services are processed
first. In addition, the QoS of key services are guaranteed. However, the queue
with a lower priority may never be processed.

Weighted Round Robin (WRR)

1-2

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


Chapter 1 Port QoS Configuration

This mode ensures that each queue has a chance to be scheduled. The weight
of each queue is different, so the time of each queue to be scheduled is different.
The weight refers to the proportion of resources obtained by each queue. The
packets in a queue with a higher priority take precedence over that in a queue
with a lower priority.
Deficit Weighted Round Robin (DWRR)
This mode also ensures that each queue has a chance to be scheduled. The
weight of each queue is also different from another queue. The difference
between DWRR and WRR is: The weight configured in DWRR indicates the
scheduled bytes of eight queues during each scheduling (unit: kbyte), and the
weight configured in WRR indicates the number of scheduled packets of each
queue during each scheduling. So, the size of DWRR packets has less influence
on the bandwidth.
l Default priority
When packet congestion occurs, the switch will discard packets selectively. In
general, this selective rule refers to the drop priority. Each packet to the port from the
egress will be colored in accordance with its carried 802.1p label (packet priority).
Packets with different priorities will be colored green (low), yellow (middle), or red
(high) in accordance with a certain mapping relationship. Packets are dropped in
accordance with the color when queue congestion occurs. The color can also be
used by other drop policies.
The mapping table between the 802.1P user priority and the local drop priority of a
switch must be set.
When a switch receives a packet, it determines the CoS value of the packet. For a
TAG packet, the CoS value refers to the 802.1P user priority in the packet. For a
non-TAG packet, the switch determines the local priority of a packet in accordance
with the default local priority of the receiving port, and then determines the CoS value
of the packet in accordance with the relationship between the local priority and the
CoS value. After that, the mapping table determines the drop priority of the packet in
accordance with the CoS value. The default value is 0.
The drop priority is configured on the ingress interface.
l Local priority
The local priority here is different from the common "internal priority" used in the ACL
rule. The local priority here is a mapping relationship between the 802.1p packet and
eight CoS queues of the egress. That is to say, 802.1p packets with different priorities
(level 0-7) will be sent to different CoS queues for scheduling.
The local priority mapping is configured on the ingress.
The local mapping relationship is valid only for the local switching chip. It becomes
invalid when the ingress used for the mapping configuration and the egress used for
the scheduling are not in the same board or the same switching chip.
l Tail Drop

1-3

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


ZXR10 8900E Configuration Guide (QoS)

The tail drop policy is used for the egress of a queue. The packet is dropped in
accordance with its color. Three parameters need to be set, including CIR, CBS, and
EBS.
When the queue length exceeds the total threshold, all packets will be dropped.
When the queue length exceeds the drop threshold for yellow packets, yellow
packets will be dropped at a set rate.
When the queue length exceeds the drop threshold for red packets, all red
packets will be dropped.
l DSCP Mapping
When a packet enters an interface, the new DSCP value, the packet priority, and the
drop priority of the packet can be set in accordance with the DSCP index. When the
DSCP mapping function of this port is enabled, the DSCP value is not changed, the
packet priority is set to DSCP/8, and the drop priority is set to 0 by default.
l Bandwidth Restriction

The buffer resources of a queue are limited, so multiple packets may occupy the
resources when network congestion occurs. When the minimum bandwidth and the
maximum bandwidth are configured, the bandwidth obtained by each queue is not
less than the minimum bandwidth and not more than the maximum bandwidth when
multiple packets seize resources. This ensures that each queue has a chance to
obtain the bandwidth.
l Weighted Random Early Detection
Traditional tail drop schemes may cause a lot of TCP messages being dropped and
lead to global TCP synchronization. But Weighted Random Early Detection, a method
generally used to avoid congestion, combines the IP priority and random early
detection policy and provides different services for different types of services. Groups
having higher priorities are processed first and packets are dropped randomly. This
avoids multiple TCP links from reducing the transmission speed at the same time.

1.2 Configuring Port QoS


Configuring Traffic Limit
To set a traffic limit, perform the following step:

Command Function

ZXR10(config-pm-qos)#traffic-limit <interface> rate-limit Sets the traffic limit.


<1-10000000> bucket-size <1-4096>

Configuring Traffic Shaping


To set traffic shaping, perform the following steps:

1-4

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


Chapter 1 Port QoS Configuration

Command Function

ZXR10(config-pm-qos)#traffic-shape <interface> data-limit Sets traffic shaping.


<64-10000000> burst-size <1-4096>

Parameter descriptions are as follows:

Parameter Description

<interface> Interface name.

data-limit Key word, traffic shaping rate.

<64-10000000> Traffic shaping rate value or queue bandwidth threshold (in


Kbps). Interface boards with different models have different
minimum granularity.
For details, refer to the board performance specifications.

burst-size Key word, the token bucket capacity.

<1-4096> Token bucket capacity value (Kbits).

Configuring Queue Scheduling


To configure queue scheduling, perform the following steps:

Command Function

ZXR10(config-pm-qos)#queue-mode <interface>{ wrr Sets queue scheduling.


<0-7><1-255>| dwrr<0-7><1-4080>}

Parameter descriptions are as follows:

Parameter Description

<interface> Interface name.

{ wrr | dwrr } Select one from two queue scheduling modes, by default, sp.

<0-7> Select a queue number.

<1-255> Select a WRR scheduling factor (weight).

<1-4080> Select a DWRR scheduling factor (weight).

Configuring Default Priority


To configure default priority, perform the following steps:

Command Function

ZXR10(config-pm-qos)#priority <interface><0-7> Sets the default priority.

Parameter descriptions are as follows:

1-5

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


ZXR10 8900E Configuration Guide (QoS)

Parameter Description

<interface> Interface name.

<0-7> PRI value in an untag message.

Configuring drop priority


To configure drop priority, perform the following steps:

Step Command Function

1 ZXR10(config-pm-qos)#cos-drop-map <0-2><0-2><0-2 Sets the drop priority.


><0-2><0-2><0-2><0-2><0-2>

2 ZXR10(config-pm-qos)#trust-cos-dp-map <interface>{ Enables or disables the drop


enable | disable } priority.

Parameters in Step 1 are described as follows:

Parameter Description

<0-2> Drop priority of messages with pri=0. 0 indicates a low priority, 1 indicates
a middle priority, and 2 indicates a high priority.

<0-2> Drop priority of messages with pri=1. 0 indicates a low priority, 1 indicates
a middle priority, and 2 indicates a high priority.

<0-2> Drop priority of messages with pri=2. 0 indicates a low priority, 1 indicates
a middle priority, and 2 indicates a high priority.

<0-2> Drop priority of messages with pri=3. 0 indicates a low priority, 1 indicates
a middle priority, and 2 indicates a high priority.

<0-2> Drop priority of messages with pri=4. 0 indicates a low priority, 1 indicates
a middle priority, and 2 indicates a high priority.

<0-2> Drop priority of messages with pri=5. 0 indicates a low priority, 1 indicates
a middle priority, and 2 indicates a high priority.

<0-2> Drop priority of messages with pri=6. 0 indicates a low priority, 1 indicates
a middle priority, and 2 indicates a high priority.

<0-2> Drop priority of messages with pri=7. 0 indicates a low priority, 1 indicates
a middle priority, and 2 indicates a high priority.

Parameters in Step 2 are described as follows:

Parameter Description

<interface> Interface name.

{ enable | disable } Enables or disables the drop priority mapping function.

1-6

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


Chapter 1 Port QoS Configuration

Configuring Local Priority


To configure local priority, perform the following steps:

Step Command Function

1 ZXR10(config-pm-qos)#cos-local-map <0-7><0-7><0-7 Sets the local priority.


><0-7><0-7><0-7><0-7><0-7>

2 ZXR10(config-pm-qos)#trust-cos-lp-map <interface>{ Enables or disables the local


enable | disable } priority.

Parameters in Step 1 are described as follows:

Parameter Description

<0-7> Number of the queue for messages with pri=0.

<0-7> Number of the queue for messages with pri=1.

<0-7> Number of the queue for messages with pri=2.

<0-7> Number of the queue for messages with pri=3.

<0-7> Number of the queue for messages with pri=4.

<0-7> Number of the queue for messages with pri=5.

<0-7> Number of the queue for messages with pri=6 .

<0-7> Number of the queue for messages with pri=7.

Parameters in Step 2 are described as follows:

Parameter Description

<interface> Interface name.

{ enable | disable } Enables or disables the local priority mapping function.

Configuring Tail Drop


To configure tail drop, perform the following steps:

Step Command Function

1 ZXR10(config-pm-qos)#tail-drop <0-4> queue-id Sets the tail drop template.


<0-7><1-255><1-255><1-255>

2 ZXR10(config-pm-qos)#drop-mode <interface> tail-drop Sets the tail drop.


<0-4>

Parameters in Step 1 are described as follows:

1-7

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


ZXR10 8900E Configuration Guide (QoS)

Parameter Description

<0-4> Session ID. One session can send the tail drop parameters
of multiple queues.

<0-7> Queue number.

<1-255> Total drop threshold.

<1-255> Yellow message drop threshold.

<1-255> Red message drop threshold.

Parameters in Step 2 are described as follows:

Parameter Description

<interface> Interface name.

<0-4> Session ID. Select a configured tail drop template.

Configuring DSCP Mapping


To configure DSCP mapping, perform the following steps:

Step Command Function

1 ZXR10(config-pm-qos)#conform-dscp <0-63><0-63><0 Sets DSCP mapping.


-7><0-2>

2 ZXR10(config-pm-qos)#trust-dscp <interface>{ enable Enables or disables DSCP


| disable } mapping.

Parameters in Step 1 are described as follows:

Parameter Description

<0-63> Value of the source DSCP carried in messages.

<0-63> New DSCP value carried in messages.

<0-7> New PRI value carried in messages.

<0-2> Message drop priority.

Parameters in Step 1 are described as follows:

Parameter Description

<interface> Interface name.

{ enable | disable } Enables or disables the DSCP mapping.

Configuring Bandwidth Limit


To configure bandwidth limit, perform the following steps:

1-8

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


Chapter 1 Port QoS Configuration

Command Function

ZXR10(config-pm-qos)#traffic-shape <interface> queue Sets the bandwidth limit.


<0-7> min-gua-datarate <64-10000000> max-datarate-limit
<64-10000000>

Parameter descriptions are as follows:

Parameter Description

<interface> Interface name.

queue Key word, the queue bandwidth.

<0-7> Queue number.

min-gua-datarate Key word, the minimum queue bandwidth guarantee.

max-datarate-limit Key word, the maximum queue bandwidth limit.

<64-10000000> Traffic shaping rate or queue bandwidth limit (in Kbps).


Interfaces of different models have different granularities. For
details, refer to the board performance specifications.

WRED
Set the WRED by using the following commands on the ZXR10 8900E:

Command Function

ZXR10(config-pm-qos)#wred <interface><0-7>{ Sets the port WRED.


byte-type | packet-type }{[ green < green-min-thrd><
green-max-thrd><green-drop-rate>]|[ yellow < yellow-min-thrd><
yellow-max-thrd><yellow-drop-rate>]|[ red < red-min-thrd><
red-max-thrd><red-drop-rate>]|[ non-tcp < non-tcp-min-thrd><
non-tcp-max-thrd><non-tcp-drop-rate>]} weight <0-15>[cap-aver
age ]

Parameter descriptions are as follows:

Parameter Description

interface Interface name.

<0-7> Queue number.

byte-type Queue scheduling based on the number of bytes.

packet-type Queue scheduling based on the number of packets.

green-min-thrd Average queue threshold at which green message drop


starts, range: 111264 packets or 13047424 bytes.

green-max-thrd Average queue threshold at which all green message drop


starts, range: 111264 packets or 13047424 bytes.

1-9

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


ZXR10 8900E Configuration Guide (QoS)

Parameter Description

green-drop-rate Maximum green message drop probability, range: 0-100.

yellow-min-thrd Average queue threshold at which yellow message drop


starts, range: 111264 packets or 13047424 bytes.

yellow-max-thrd Average queue threshold at which all yellow message are


dropped, range: 111264 packets or 13047424 bytes.

yellow-drop-rate Maximum yellow message drop probability, range: 0-100.

red-min-thrd Average queue threshold at which red message drop starts,


range: 111264 packets or 13047424 bytes.

red-max-thrd Average queue threshold at which all red message are


dropped, range: 111264 packets or 13047424 bytes.

red-drop-rate Maximum red message drop probability, range: 0-100.

non-tcp-min-thrd Average queue threshold at which non-tcp message drop


starts, range: 111264 packets or 13047424 bytes.

non-tcp-max-thrd Average queue threshold at which all non-tcp message are


dropped, range: 111264 packets or 13047424 bytes.

non-tcp-drop-rate Maximum non-tcp message drop probability, range: 0-100.

weight <0-15> Weight of the current queue mapping to the average queue
through low-pass filter, range: 015.

cap-average Replace the average queue length with the current queue
length to calculate the drop probability.

1.3 Maintaining the Port QoS


To maintain the port QoS on the ZXR10 8900E, run the following commands:

Command Function

ZXR10#show running-config pm-qos | include Displays valid configurations of the dscp


conform-dscp mapping table.

ZXR10#show running-config pm-qos | include trust-dscp Displays the dscp mapping function of an
interface.

ZXR10#show running-config pm-qos | include priority Displays the default priority of an interface.

ZXR10#show running-config pm-qos | include Displays the queue scheduling configuration


queue-mode of an interface.

ZXR10#show running-config pm-qos | include Displays the traffic limit configuration on the
traffic-limit ingress of an interface.

1-10

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


Chapter 1 Port QoS Configuration

Command Function

ZXR10#show running-config pm-qos | include Displays the traffic shaping and queue
traffic-shape bandwidth restriction configuration on the
egress of an interface.

ZXR10#show running-config pm-qos | include Displays the local priority mapping table.
cos-local-map

ZXR10#show running-config pm-qos | include Displays the local priority mapping function
trust-cos-lp-map of an interface.

ZXR10#show running-config pm-qos | include Displays the drop priority mapping table.
cos-drop-map

ZXR10#show running-config pm-qos | include Displays the drop priority mapping function of
trust-cos-dp-map an interface.

ZXR10#show running-config pm-qos | include tail-drop Displays the tail drop configuration of an
interface.

A description of the parameter is as follows:

Parameter Description

include Key words are next to the include command.

l The following is a sample output from the show running-config pm-qos | include confo
rm-dscp command:
ZXR10(config-pm-qos)#show running-config pm-qos | include conform-dscp
conform-dscp 11 23 6 1
ZXR10(config-pm-qos)#

A description of the output commands is as follows:

show Command Output Description

11 Source dscp.

23 New dscp.

6 New pri.

1 Drop priority.

l The following is a sample output from the show running-config pm-qos | include trust
-dscp command:
ZXR10(config-pm-qos)#show running-config pm-qos | include trust-dscp
trust-dscp gei-0/1/0/1 enable
ZXR10(config-pm-qos)#

A description of the output commands is as follows:

1-11

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


ZXR10 8900E Configuration Guide (QoS)

show Command Output Description

gei-0/1/0/1 Interface name.

enable The dscp switch.

l The following is a sample output from the show running-config pm-qos | include priority
command:
ZXR10(config-pm-qos)#show running-config pm-qos | include priority
priority gei-0/1/0/2 7
ZXR10(config-pm-qos)#

A description of the output commands is as follows:

show Command Output Description

gei-0/1/0/2 Interface name.

7 Default priority.

l The following is a sample output from the show running-config pm-qos | include queue
-mode command:
ZXR10(config-pm-qos)#show running-config pm-qos | include queue-mode
queue-mode gei-0/1/0/1 wrr 1 10
queue-mode gei-0/1/0/1 wrr 2 15
ZXR10(config-pm-qos)#

A description of the output commands is as follows:

show Command Output Description

gei-0/1/0/1 Interface name.

wrr Scheduling mode.

10 Queue weight.

l The following is a sample output from the show running-config pm-qos | include traffi
c-limit command:
ZXR10(config-pm-qos)#show running-config pm-qos | include traffic-limi
traffic-limit gei-0/1/0/1 rate-limit 200000 bucket-size 100
ZXR10(config-pm-qos)#

A description of the output commands is as follows:

show Command Output Description

gei-0/1/0/1 Interface name.

200000 Rate limit. The rate limit of the chip and that configured in
the command have a little deflection.

100 Bucket size. The bucket size of the chip and that
configured in the command have a little deflection.

1-12

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


Chapter 1 Port QoS Configuration

l The following is a sample output from the show running-config pm-qos | include traffi
c-shape command:
ZXR10(config-pm-qos)#show running-config pm-qos | include traffic-shap
traffic-shape gei-0/1/0/1 data-rate 200000 burst-size 100
traffic-shape gei-0/1/0/1 queue 1 min-gua-datarate 500 max-datarate-limit 600
ZXR10(config-pm-qos)#

A description of the output commands is as follows:

show Command Output Description

gei-0/1/0/1 Interface name.

data-rate 200000 Data rate. The data rate of the chip and that configured in
the command have a little deflection.

burst-size 100 Bucket size. The bucket size of the chip and that
configured in the command have a little deflection.

queue 1 The queue of which the bandwidth is restricted.

min-gua-datarate 500 Minimum bandwidth.

max-datarate-limit 600 Maximum bandwidth.

l The following is a sample output from the show running-config pm-qos | include cos-lo
cal-map command:
ZXR10(config-pm-qos)#show running-config pm-qos | include cos-local-ma
cos-local-map 0 1 2 3 4 5 6 7
ZXR10(config-pm-qos)#

A description of the output commands is as follows:

show Command Output Description

01234567 The local priority of queue cos0 to cos7, that is the queue
number.

l The following is a sample output from the show running-config pm-qos | include trust-
cos-lp-map command:
ZXR10(config-pm-qos)#show running-config pm-qos | include trust-cos-lp
trust-cos-lp-map gei-0/1/0/1 enable
ZXR10(config-pm-qos)#

A description of the output commands is as follows:

show Command Output Description

gei-0/1/0/1 Interface name.

enable The local priority switch.

l The following is a sample output from the show running-config pm-qos | include cos-d
rop-map command:

1-13

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


ZXR10 8900E Configuration Guide (QoS)

ZXR10(config-pm-qos)#show running-config pm-qos | include cos-drop-map


cos-drop-map 0 1 1 0 2 0 1 1
ZXR10(config-pm-qos)#

A description of the output commands is as follows:

show Command Output Description

01102011 The drop priority of queue cos0 to cos7.

l The following is a sample output from the show running-config pm-qos | include cos-d
p-map command:
ZXR10(config-pm-qos)#show running-config pm-qos | include cos-dp-map
trust-cos-dp-map gei-0/1/0/1 enable
ZXR10(config-pm-qos)#

A description of the output commands is as follows:

show Command Output Description

gei-0/1/0/1 Interface name.

enable The local priority switch.

l The following is a sample output from the show running-config pm-qos | include tail-d
rop command:
ZXR10(config-pm-qos)#show running-config pm-qos | include tail-drop
tail-drop 0 queue-id 1 200 100 100
drop-mode gei-0/1/0/1 tail-drop 0
ZXR10(config-pm-qos)#

A description of the output commands is as follows:

show Command Output Description

0 session number.

queue-id 1 Queue number.

200 The drop threshold for green packets.

100 The drop threshold for yellow packets.

100 The drop threshold for red packets.

gei-0/1/0/1 Interface name.

1-14

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


Chapter 1 Port QoS Configuration

Note:
There is a big difference between the real parameter of a tail drop chip and the command
line parameter. The deflection arithmetic of different chips is different. For details, refer to
the manual about board chips or consult the developers.

1.4 Port QoS Configuration Example


Configuration Description
Network A, Network B, and internal servers are connected to an Ethernet switch, see
Figure 1-1. Internal servers include a VOD server. To ensure QoS of VOD, a higher
priority is needed for the VOD server. Internal users can access the Internet through a
proxy. However, the bandwidths of Network A and B must be limited and traffic statistics
are required.

Figure 1-1 Port QoS Configuration Example

1-15

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


ZXR10 8900E Configuration Guide (QoS)

Configuration
1. Suppose the interface directly connecting the VOD and switch is gei_1/24, the traffic
through the interface must be limited or shaped in both out and in directions.
2. Suppose the interface directly connecting the VOD and switch is gei_1/4. To improve
the priority of VOD messages, DSCP mapping is needed on the interface. And the
DSCP of VOD messages must be increased (suppose the original DSCP of VOD
messages is 20) to reduce the drop priority.
3. Increase the local priority of VOD messages on gei_1/2.
4. Perform strict priority scheduling on gei_1/2.

Configuration Commands
Configuration on the switch:
ZXR10(config)#pm-qos
ZXR10(config-pm-qos)#traffic-limit gei-0/1/0/24 rate-limit 2000 bucket-size 300
ZXR10(config-pm-qos)#traffic-shape gei-0/1/0/24 data-rate 2000 burst-size 300
ZXR10(config-pm-qos)#conform-dscp 20 63 7 0
ZXR10(config-pm-qos)#trust-dscp gei-0/1/0/4 enable
ZXR10(config-pm-qos)#cos-local-map 0 1 1 2 2 3 5 7
ZXR10(config-pm-qos)#trust-cos-lp-map gei-0/1/0/2

Configuration verification
Use the following command to check the QoS configuration and validity on a port:
ZXR10(config-pm-qos)#show running-config pm-qos
! <QOS>
pm-qos
traffic-limit gei-0/1/0/24 rate-limit 2000 bucket-size 300
traffic-shape gei-0/1/0/24 data-rate 2000 burst-size 300
conform-dscp 20 63 7 0
trust-dscp gei-0/1/0/4 enable
cos-local-map 0 1 1 2 2 3 5 7
trust-cos-lp-map gei-0/1/0/2
! </QOS>

1-16

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


Chapter 2
Flow QoS Configuration
Table of Contents
Traffic-based QoS Overview.......................................................................................2-1
Configuring Flow QoS ................................................................................................2-5
Flow QoS Maintenance ............................................................................................2-12
Flow QoS Configuration Example.............................................................................2-13

2.1 Traffic-based QoS Overview


Traffic refers to packets passing through a switch. To classify the traffic is to classify, define,
and describes the packet that passes through a switch. The function of the traffic-based
QoS is as follows:

Flow Classification
Traffic refers to packets passing through switch. Flow classification is the process of
distinguishing one kind of traffic from another by examining the fields in the packet.
Flow classification of QoS is based on ACL and the ACL rule must be permitted. The user
can classify packets according to some filter options of the ACL which are as follows:
l Source IP address, destination IP address, source MAC address, destination MAC
address, IP protocol type and TCP source port number
l TCP destination port number, UDP source port number, UDP destination port number,
ICMP type, ICMP code, DSCP, ToS, precedence, source VLAN ID, Layer 2 Ethernet
protocol type and 802.1p priority value

Traffic Supervision
The traffic supervision function is used to restrict the traffic bandwidth of one service. If the
bandwidth exceeds the committed rate, the traffic of other services will be affected. For
the traffic that exceeds the committed rate, perform the following operations:

l Discard or forward the packet


l Change the DSCP value of the packet.
l Change the drop priority. The packet with higher drop priority will be discarded first.
The traffic supervision does not cause any extra delay. For the working flow, see Figure
2-1.

2-1

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


ZXR10 8900E Configuration Guide (QoS)

Figure 2-1 Working Flow for Traffic Supervision

l Traffic limit
The ZXR10 89 switch supports both Single Rate Three Color Marker (SrTCM)
(RFC2697) arithmetic and the Two Rate Three Color Marker (TrTCM) (RFC2698)
arithmetic. Both arithmetic support the Color-Blind and Color-Aware modes.
The Meter works in two modes. In the Color-Blind mode, it is assumed that the packet
is colourless. In the Color-Aware mode, it is assumed that the packet is colourful.
Packets passing through a switch will be coloured in according with a certain rule
(the information of the packets). The Maker colours the IP packets in the DS domain
according to the Meter result.
The following describes the arithmetic of these three marks.
1. SrTCM
The SrTCM arithmetic is used for the Diffserv traffic conditioner. The SrTCM
arithmetic measures the information stream, and marks the packet according to
the three parameters, including Committed Information Rate (CIR), Committed
Burst Size (CBS), and Excess Burst Size (EBS). These three parameters
correspond to three colours, green, yellow, and red. If a token is obtained
from the EBS token bucket instead of the CBS token bucket, the packet will be
coloured yellow. If the token is still not obtained from the EBS token bucket, the
packet will be coloured red. The red packet will be discarded by default.
2. TrTCM
The TrTCM arithmetic is used for the Diffserv traffic conditioner. The Diffserv
arithmetic measures the IP information stream, and marks the packet according
to four parameters, including Peak Information Rate (PIR), Committed Information
Rate (CIR), CBS, and PBS. If the rate of the packet exceeds the PIR, the packet
will be coloured red. If the rate of the packet exceeds the CIR, it will be coloured
yellow. If the rate the packet does not exceed the CIR, it will be coloured green.
3. ModifyTrTCM
The ModifyTrTCM arithmetic is used for the Diffserv traffic conditioner. The
ModifyTrTCM arithmetic measures the IP information stream, and marks the
packet according to four parameters, including CIR, EIR, CBS, and EBS. If the
packet can obtain a token from the CBS token bucket, it will be coloured yellow.
If it does not obtain a token from the CBS token bucket, it will obtain the token
from the EBS token bucket. If a token is obtained from the EBS token bucket,

2-2

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


Chapter 2 Flow QoS Configuration

the packet will be coloured yellow. Otherwise, it will be coloured red. The red
packet will be discarded by default.
l Hierarchical meter
On the ZXR10 89 switch, the switch with H-series line card and 89E-series line card
supports the hierarchical meter on the ingress. This function improves the usage
of the bandwidth on the ingress. When there is abundant bandwidth, some flow
can borrow the bandwidth from other flows. In additional, this function restricts the
total bandwidth of multiple flows. The hierarchical meter can set the traffic limit for
both MICRO METER and MACRO MTER. The MACRO MTER supports two modes,
including band-borrow and band-limit. The function is as follows:
1. Band Borrow
Figure 2-2 shows the bandwidth borrow mode.

Figure 2-2 Bandwidth Borrow Mode

It is assumed that the total bandwidth (Macroflow) is 100M, and the bandwidth of
flows 1-4 (Microflow) is 20M, 30M, 40M, and 10M.
If the bandwidth of Microflow_1 is 20M, the bandwidth of Microflow_2 is 30M, the
bandwidth of Microflow_4 is 20M, and the bandwidth of Microflow_3 is 0M, both
Microflow_1 and Microflow_4 can borrow the bandwidth from the Microflow_3. It
only needs to ensure that the total bandwidth is not more than 100M.
2. Bandwidth Limit
Figure 2-3 shows the band width limit mode.

2-3

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


ZXR10 8900E Configuration Guide (QoS)

Figure 2-3 Bandwidth Limit Mode

It is assumed that the total bandwidth (Macroflow) is 80M, and the bandwidth of
flows 1-4 (Microflow) is 20M, 30M, 40M, and 10M.
If the bandwidth of Microflow_1 is 50M, the bandwidth of Microflow_2 is 30M, the
bandwidth of Microflow_4 is 20M, and the bandwidth of Microflow_3 is 0M, the
traffic that passes the Microflow_1 should not more than 20M, and the traffic that
passes the Microflow_4 should not be more than 10M because the bandwidth
borrow is not allowed. It is only needs to ensure that the total bandwidth should
not be more than 80M.
The hierarchical meter only supports one CIR and CBS. That is to say, when a
packet passes through the egress supervision, the packet will be coloured green
if it can obtain a token from the token bucket. Otherwise, it will be coloured red.
The red packet will be discarded by default.

Policy Routing
Redirecting is used to make the decision again about the forwarding of packets with certain
features according to traffic classification. Redirection changes transmission direction of
packets and export messages to the specific port, CPU or next-hop IP address.
Redirect packets to the next-hop IP address to implement policy routing.
On the aspect of packet forwarding control, policy-based routing has more powerful control
capacity than traditional routing because it can select a forwarding path according to the
matched field in the ACL. Policy routing can implement traffic engineering to a certain
extent, thus making traffic of different service quality or different service data (such as
voice and FTP) to go to different paths. The user has higher and higher requirements for
network performance, therefore it is necessary to select different packet forwarding paths
based on the differences of services or user categories.

Priority Mark
Priority marking is used to reassign a set of service parameters to specific traffic described
in the ACL to perform the following operations:
l Change the CoS queue of the packet and change the 802.1p value.
l Change the CoS queue of the packet and do not change the 802.1p value.

2-4

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


Chapter 2 Flow QoS Configuration

l Change the DSCP value of the packet.


l Change the discard priority of the packet.

Traffic Mirroring
Traffic mirroring is used to copy a service flow matching the ACL rule to the CPU or specific
port to analyze and monitor packets during network fault diagnosis.

Traffic Statistics
Traffic statistics is used to sum up packets of the specific service flow. This is to understand
the actual condition of the network and reasonably allocate network resources. The main
content of traffic statistics contains the number of packets received from the incoming
direction of the port.

2.2 Configuring Flow QoS


Configuring Traffic Limit
To configure traffic limit, perform the following steps:

Step Command Function

1 ZXR10(config)#pm-qos Enters pm-qos configuration


mode

2 ZXR10(config-pm-qos)#traffic-limit-acl {ipv4-access-list| In pm-qos configuration mode,


ipv4-mix| ipv6-access-list| link-acl|ipv6-mix}< WORD> configure the traffic-limit-acl.
rule-id < 1-2147483644> cir < 0-32000000> cbs < Configure the SrTCM, TrTCM,
0-16000>{eir < 0-32000000> ebs < 40-16000>}|{ebs < ModifyTrTCM, Color-Aware,
40-16000>}|{pir < 0-32000000> pbs < 40-16000>} mode and Color-Blind modes. At the
{blind}|{aware}[drop-yellow][forward-red][remark-red-dp same time, set the drop priority,
{high}|{low}|{medium}][remark-red-dscp<0-63>][remark DSCP, and the forwarding
-yellow-dp {high}|{low}|{medium}][remark-yellow-dscp condition for the packet after
<0-63>] the color is changed,
Run the no traffic-limit-acl
{ipv4-access-list|
ipv4-mix| ipv6-access-list|
link-acl|ipv6-mix}< WORD>
rule-id < 1-2147483644>
command to cancel the traffic
limit configuration.

Descriptions of the parameters in Step 2:

2-5

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


ZXR10 8900E Configuration Guide (QoS)

Parameter Description

{ipv4-access-list| ipv4-mix| The type and name for the bound ACL rule.
ipv6-access-list| link-acl|ipv6-mix}<
WORD>

rule-id < 1-2147483644> The number of the ACL rule where this traffic limit takes effect.

cir < 0-32000000> cbs < 0-16000> Committed Information Rate and Committed Burst Size.

cir < 0-32000000> ebs < 0-16000> Committed Information Rate and Excess Burst Size. When
these two parameters are configured, it means that the
ModifyTrTCM arithmetic is used. This mode only takes effect
on several line cards, including H2, H3, H5, and S5.

ebs < 40-16000> Excess Burst Size. When this parameter is configured, it
means that the SrTCM arithmetic is used.

pir < 0-32000000> pbs < 40-16000> Peak Information Rate and Peak Burst Size. When these
two parameters are configured, it means that the TrTCM
arithmetic is used.

mode {blind}|{aware} blind refers to the color-blind mode. aware refers to the
color-aware mode.

[drop-yellow] Drops yellow packets. The yellow packets are forwarded by


default.

[forward-red] Forwards red packets. The red packets are discarded by


default.

[remark-red-dp]{high}|{low}|{medium} Modifies the drop priority for the red packet. Range: High,
middle, and low.

[remark-red-dscp]<0-63> Modifies the DSCP priority for the red packet. Range: 0-63.

[remark-yellow-dp]{high}|{low}|{medi Modifies the drop priority for the yellow packet. Range: High,
um} middle, and low.

[remark-yellow-dscp]<0-63> Modifies the DSCP priority for the yellow packet. Range:
0-63.

Tip:
1. When the ACL is bounded to the ingress of vlan or Smartgroup, the traffic limit
command does not take effect.
2. When the ACL is bounded to the egress of the vlan or Smartgroup, the traffic limit
command does not take effect.
3. The ModifyTrTCM arithmetic only takes effect on H-series line card, S1 line card and
S5 line card.
4. When the rate of the egress is limited, the drop-yellow, remark-red-dp and
remark-yellow-dp configuration do not take effect.

2-6

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


Chapter 2 Flow QoS Configuration

Configuring Hierarchy Meter


To configure hierarchy meter, perform the following steps:

Step Command Function

1 ZXR10(config)#pm-qos Enters pm-qos configuration


mode

2 ZXR10(config-pm-qos)#traffic-macro-flow <WORD> Configures macro meter


cir <0-32000000> cbs <0-16000> mode {band-borrow
}|{band-limit }

3 ZXR10(config-pm-qos)#traffic-micro-flow Configures MICRO METER,


{ipv4-access-list| ipv4-mix| ipv6-access-list| and then specifies MACRO
link-acl|ipv6-mix}< WORD> rule-id < 1-2147483644> METER according to the
cir < 0-32000000> cbs < 0-16000> macro-flow < macro-flow name.
WORD>[forward-red][remark-red-dscp<0-63>][remark-re Run the no traffic-micro-flow
d-dp{high}|{low}|{medium}] {ipv4-access-list|
ipv4-mix| ipv6-access-list|
link-acl|ipv6-mix}< WORD>
rule-id < 1-2147483644>
command to cancel the MICRO
METER configuration.

Descriptions of the parameters in Step 2:

Parameter Description

<WORD> Name of MACRO METER.

cir < 0-32000000> cbs < 0-16000> Committed Information Rate and Committed Burst Sze.

mode {band-borrow }|{band-limit } MACRO METER working mode, including:


band-borrow: The bandwidth of other traffic can be borrowed
when the total bandwidth is limited.
band-limit: The total bandwidth is limited.

Descriptions of the parameters in Step 3:

Parameter Description

{ipv4-access-list| ipv4-mix| The type and name for the bound ACL rule.
ipv6-access-list| link-acl|ipv6-mix}<
WORD>

rule-id < 1-2147483644> The number of the ACL rule where the traffic limit
configuration takes effect.

cir < 0-32000000> cbs < 0-16000> Committed Information Rate and Committed Burst Sze.

macro-flow < WORD> Specifies the related MACRO METER.

[forward-red] Forwards red packets. Red packets are discarded by default.

2-7

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


ZXR10 8900E Configuration Guide (QoS)

Parameter Description

[remark-red-dp]{high}|{low}|{medium} Modifies the drop priority for red packets. Range: High,
middle, and low.

[remark-red-dscp]<0-63> Modifies the DSCP priority for red packets. Range: 0-63.

Tip:
1. The hierarchical meter only supports red color and green color.
2. The hierarchical meter only takes effect on H-series line card, S1 line card and S5 line
card except S1XF12A.
3. The hierarchical meter command only takes effect on the ingress.
4. The hierarchical meter does not take effect on the ACL that is bounded to the vlan or
Smartgroup.
5. The macro-meter port shared by the hierarchical meter must be in the same chip. For
a line card with two chips, the first half of the port and the last half of the port may
belong to two chips, so you must be cautious during the configuration.

Configuring Policy Routing


To configure policy routing, perform the following steps:

Step Command Function

1 ZXR10(config)#pm-qos Enters pm-qos configuration


mode

2 ZXR10(config-pm-qos)#redirect in {ipv4-access-list| Configures the redirection. The


ipv4-mix| ipv6-access-list| link-acl|ipv6-mix}< WORD> packet can be redirected to the
rule-id < 1-2147483644>{ cpu}|{ interface <interface>}|{ cpu, egress, or the next hop.
next-hop [vrf <vrf-name>]< A.B.C.D>}|{next-hop-ipv6[vrf Run the no redirect
<vrf-name>]<X:X::X:X>} in {ipv4-access-list|
ipv4-mix| ipv6-access-list|
link-acl|ipv6-mix}< WORD>
rule-id < 1-2147483644>
command to cancel the
redirection configuration.

Descriptions of the parameters in Step 2:

Parameter Description

{ipv4-access-list| ipv4-mix| The type and name for the bound ACL rule.
ipv6-access-list| link-acl|ipv6-mix}<
WORD>

2-8

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


Chapter 2 Flow QoS Configuration

Parameter Description

rule-id < 1-2147483644> The number of the ACL rule where the redirection
configuration takes effect.

{cpu} Redirects the traffic to the cpu.

{ interface <interface>} Specifies the destination port for the redirection.

{next-hop [vrf <vrf-name>]< A.B.C.D> Specifies the next-hop for the redirection, and supports the
ECMP.

{next-hop-ipv6 [vrf <vrf-name Specifies the next-hop-ipvp for the redirection, and supports
>]<X:X::X:X>} the ECMP.

Tip:
1. The out-vlanID command in the priority label configuration is conflicted with next-hop
or next-hop-ipv6 in the redirection commands. When two commands are configured
at the same time, the packet is only redirected to next-hop or next-hop-ipv6. In this
case, the remark out-vlanID command becomes invalid.
2. The redirection command only takes effect on the ingress.

Configuring Priority Mark


To configure priority mark, perform the following steps:

Step Command Function

1 ZXR10(config)#pm-qos Enters pm-qos configuration


mode

2 ZXR10(config-pm-qos)#priority-mark {ipv4-access-list| Configures the priority label.


ipv4-mix| ipv6-access-list| link-acl|ipv6-mix}< WORD> Run the no priority-mark
rule-id < 1-2147483644>{[cos <0-7>]|[local-precedence {ipv4-access-list|
<0-7>]}[drop-precedence {high}|{medium}|{low}]{[dscp ipv4-mix| ipv6-access-list|
<0-63>]|[precedence <0-7>]}[out-vlanID <1-4094>] link-acl|ipv6-mix}< WORD>
rule-id < 1-2147483644>
command to cancel the priority
label configuration.

Descriptions of the parameters in Step 2:

Parameter Description

{ipv4-access-list| ipv4-mix| The type and name for the bound ACL rule.
ipv6-access-list| link-acl|ipv6-mix}<
WORD>

2-9

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


ZXR10 8900E Configuration Guide (QoS)

Parameter Description

rule-id < 1-2147483644> The number of the ACL rule where the configuration takes
effect.

[cos <0-7>] Modifies the vlan priority for a packet.

[drop-precedence {high}|{medium}|{l Modifies the drop priority for a packet.


ow}]

[dscp <0-63>] Modifies the dscp of a packet.

[out-vlanID <1-4094>] Modifies the external vlanid of a packet.

[local-precedence <0-7>] Modifies the local priority.

[precedence <0-7>] Modifies the IP priority of the packet (TOS field).

Tip:
1. The out-vlanID command in the priority label configuration is conflicted with next-hop
or next-hop-ipv6 in the redirection commands. When two commands are configured
at the same time, the packet is only redirected to next-hop or next-hop-ipv6. In this
case, the remark out-vlanID command becomes invalid.
2. The egress only supports the remark for the cos and the dscp fields, so the remark for
other fields does not take effect.

Configuring Traffic Mirroring


To configure traffic mirroring, perform the following steps:

Step Command Function

1 ZXR10(config)#pm-qos Enters pm-qos configuration


mode

2 ZXR10(config-pm-qos)#traffic-mirror in {ipv4-access-list| Configures the traffic mirroring,


ipv4-mix| ipv6-access-list| link-acl|ipv6-mix}< WORD> and mirrors the traffic to the
rule-id < 1-2147483644>{ cpu}|{ interface <interface>} cpu or a specified egress.
Run the no traffic-mirror
in {ipv4-access-list|
ipv4-mix| ipv6-access-list|
link-acl|ipv6-mix}< WORD>
rule-id < 1-2147483644>
command to cancel the traffic
mirroring configuration.

Descriptions of the parameters in Step 2:

2-10

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


Chapter 2 Flow QoS Configuration

Parameter Description

{ipv4-access-list| ipv4-mix| The type and name of the bound ACL rule.
ipv6-access-list| link-acl}< WORD>

rule-id < 1-2147483644> The number of the ACL rule where the configuration takes
effect.

{cpu} The traffic is mirrored to the CPU.

{ interface <interface>} The traffic is mirrored to the specified port.

Tip:
The traffic mirroring supports four destination ports at most, and these four destination
ports are shared by the port mirroring.

Configuring Traffic Statistics


To configure traffic statistics, perform the following steps:

Step Command Function

1 ZXR10(config)#pm-qos Enters pm-qos configuration


mode

2 ZXR10(config-pm-qos)#traffic-statistics {ipv4-access-list| Configures the traffic statistics


ipv4-mix| ipv6-access-list| link-acl|ipv6-mix}< according to the bytes or the
WORD> rule-id < 1-2147483644>pkt-type { packet.
all}|{green}|{red}|{yellow}statistics-type { byte}|{ Run the no traffic-statistics
packet} {ipv4-access-list|
ipv4-mix| ipv6-access-list|
link-acl|ipv6-mix}< WORD>
rule-id < 1-2147483644>
command to cancel the traffic
statistics configuration.

Descriptions of the parameters in Step 2:

Parameter Description

{ipv4-access-list| ipv4-mix| The type and name of the bound ACL rule.
ipv6-access-list| link-acl|ipv6-mix}<
WORD>

rule-id < 1-2147483644> The number of the ACL rule where the configuration takes
effect.

pkt-type { all}|{green}|{red}|{yellow} The type of statistics packet.

2-11

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


ZXR10 8900E Configuration Guide (QoS)

Parameter Description

statistics-type { byte}|{ packet} The format of statistics packet.

Tip:
The statistics based on bytes only takes effect on the ingress. In this case, the traffic
statistics type on the egress must be set to packet. Otherwise, the configuration does not
take effect.

2.3 Flow QoS Maintenance


ZXR10 8900E provides the following commands to maintain fLow QoS.

Command Function

ZXR10#show traffic-statistics{ipv4-access-list| ipv4-mix| Displays statistics of traffic


ipv6-access-list| link-acl | ipv6-mix }< acl-name> rule-id < rule-no>
shelfID <shelf-no> slot <slot-no>

ZXR10#clear traffic-statistics {ipv4-access-list| ipv4-mix| Clears statistics of traffic


ipv6-access-list| link-acl|ipv6-mix}< WORD> rule-id <
1-2147483644>

A description of the commands is as follows:

Parameter Description

{ipv4-access-list| ipv4-mix| The type and name of the bound ACL.


ipv6-access-list| link-acl|ipv6-mix}

rule-id < 1-2147483644> ACL rule number

The following is a sample output from the show command:


ZXR10#show traffic-statistics
ipv4-access-list test rule-id 10 shelfID 0 slot 4
Shelf SLOT PKT/BYTE STATUS
--------------------------------------------------
0 4 500 OK
--------------------------------------------------
SUM 1500
ZXR10#

A description of the output commands is as follows:

Output Command Description

Shelf Shelf number.

2-12

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


Chapter 2 Flow QoS Configuration

Output Command Description

SLOT Slot number of a line card.

PKT/BYTE The statistics value of the line card in this slot. PKT/BYTE is
determined by the traffic statistics configuration command.

STATUS Status of a line card.

SUM The total traffic.

2.4 Flow QoS Configuration Example


Traffic Limit and Statistics Configuration Example
l Configuration Description

Network A, Network B and internal servers are connected to an Ethernet switch,


as shown in Figure 2-4. Internal servers include a VOD server with IP address
192.168.4.70. To ensure QoS of VOD, it shall be configured with a higher priority.
Internal users can access Internet through proxy 192.168.3.100. However, bandwidth
of Network A and B shall be limited and traffic statistics is required.

2-13

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


ZXR10 8900E Configuration Guide (QoS)

Figure 2-4 Traffic Limit and Statistics Configuration Example

l Configuration Flow
1. Configure an ACL for traffic classification. According to the current requirement,
the traffic classification must be done on the basis of the destination IP address,
so the IPv4-access-list is required. To perform statistics on the traffic of two de-
partments, an ACL rule must be configured.
2. To ensure the QoS of the VOD, configure a priority and allocate a higher priority
to the VOD.
3. Configure the traffic limit, and restrict the bandwidth of the traffic that accesses
the 192.168.3.100 agent.
4. Configure traffic statistics, and perform statistics on the traffic that accesses the
192.168.3.100 agent.
l Configuration Commands
Configuration on the switch:
/*Configuring ACL rule*/
ZXR10(config)#ipv4-access-list managerA
ZXR10(config-ipv4-acl)#rule 10 permit tcp any 192.168.4.70 0.0.0.0
ZXR10(config-ipv4-acl)#rule 20 permit ip any 192.168.3.100 0.0.0.0
ZXR10(config-ipv4-acl)#rule permit any
ZXR10(config-ipv4-acl)#exit

2-14

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


Chapter 2 Flow QoS Configuration

/*Binding the interface of network A*/


ZXR10(config)#ipv4-access-group interface gei-0/1/0/1 ingress managerA

/*Configuring priority mark*/


ZXR10(config)#pm-qos
ZXR10(config-pm-qos)#priority-mark ipv4-access-list managerA rule-id 10
cos 7 dscp 63

/*Configuring traffic limit*/


ZXR10(config-pm-qos)#traffic-limit-acl ipv4-access-list managerA rule-id
20 cir 10000 cbs 200 ebs 3000 mode blind

/*Configuring traffic statistics*/


ZXR10(config-pm-qos)#traffic-statistics ipv4-access-list managerA rule-id
20 pkt-type all statistics-type packet
ZXR10(config-pm-qos)#exit
ZXR10(config)#

/*Configuring ACL rule*/


ZXR10(config)#ipv4-access-list managerB
ZXR10(config-ipv4-acl)#rule 10 permit tcp any 192.168.4.70 0.0.0.0
ZXR10(config-ipv4-acl)#rule 20 permit ip any 192.168.3.100 0.0.0.0
ZXR10(config-ipv4-acl)#rule permit any
ZXR10(config-ipv4-acl)#exit

/*Binding the interface of network B*/


ZXR10(config)#ipv4-access-group interface gei-0/1/0/2 ingress managerB

/*Configuring priority mark*/


ZXR10(config)#pm-qos
ZXR10(config-pm-qos)#priority-mark ipv4-access-list managerB rule-id 10
cos 7 dscp 63

/*Configuring traffic limit*/


ZXR10(config-pm-qos)#traffic-limit-acl ipv4-access-list managerB rule-id
20 cir 20000 cbs 200 ebs 3000 mode blind

/*Configuring traffic statistics*/


ZXR10(config-pm-qos)#traffic-statistics ipv4-access-list managerB rule-id
20 pkt-type all statistics-type packet
ZXR10(config-pm-qos)#exit
ZXR10(config)#
l Configuration Verification

2-15

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


ZXR10 8900E Configuration Guide (QoS)

Use the following commands to verify that QoS configuration is correct and valid:
/*Verifying ACL configuration*/
ZXR10(config)#show ipv4-access-lists name managerA
ipv4-access-list managerA
3/3 (showed/total)
10 permit tcp any 192.168.4.70 0.0.0.0
20 permit ip any 192.168.3.100 0.0.0.0
30 permit any
ZXR10(config)#show ipv4-access-lists name managerB
ipv4-access-list managerB
3/3 (showed/total)
10 permit tcp any 192.168.4.70 0.0.0.0
20 permit ip any 192.168.3.100 0.0.0.0
30 permit any
/*Verifying ACL binding*/
ZXR10(config)#show ipv4-access-groups
Interface name|vlan Direction ACL name
------------------------------------------------------
gei-0/1/0/1 Ingress managerA
gei-0/1/0/2 Ingress managerB
/*Verifying Qos configuration*/
ZXR10(config-pm-qos)#show running-config pm-qos
!<QOS>
pm-qos
traffic-limit-acl ipv4-access-list managerA rule-id 20 cir 10000 cbs 200 ebs
3000 mode blind
traffic-limit-acl ipv4-access-list managerB rule-id 20 cir 20000 cbs 2000 ebs
3000 mode blind
priority-mark ipv4-access-list managerA rule-id 10 cos 7 dscp 63
priority-mark ipv4-access-list managerB rule-id 10 cos 7 dscp 63
traffic-statistics ipv4-access-list managerA rule-id 20 pkt-type all statistics-type
packet
traffic-statistics ipv4-access-list managerB rule-id 20 pkt-type all statistics-type
packet !</QOS>
/*Checking traffic statistics*/
ZXR10#show traffic-statistics ipv4-access-list managerA rule-id 20
shelfID 0 slot 1
Shelf SLOT PKT/BYTE STATUS
------------------------------------------------
0 1 25645 OK
------------------------------------------------
SUM 25645
ZXR10#show traffic-statistics ipv4-access-list managerB rule-id 20
shelfID 0 slot 1

2-16

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


Chapter 2 Flow QoS Configuration

Shelf SLOT PKT/BYTE STATUS


------------------------------------------------
0 1 1000 OK
------------------------------------------------
SUM 1000

Policy Routing Configuration Example


l Configuration Description
As shown in Figure 2-5, PC-A, R2, PC-B and Server AAA are connected to a switch
R1. Because route 200.0.0.0 is not advertised to R1 by R2, policy routing is configured
to transport traffic between R1 and R2.

Figure 2-5 Policy Routing Configuration Example

l Configuration Flow
1. Configure an ACL rule for traffic classification. According to the current
requirement, the traffic classification is done on the basis of the destination
IP address, so the ipv4-access-list is used. The TCP packet sent from the
server AAA matches the source IP address 192.168.210.2 and the TCP protocol
number. For the IP packet sent from the PC-A and PC-B device to the PC-C
device, the destination IP address is 200.0.0.1. The PC-A device pings the
packet of the server AAA. This packet is an icmp packet with the destination IP
address being 192.168.210.1, and the source IP address being 192.168.101.1.

2-17

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


ZXR10 8900E Configuration Guide (QoS)

2. Configure the QoS command that will be redirected to the cpu, and send the TCP
packet sent from the server AAA to the cpu.
3. Configure the policy route, and redirect the packet with the destination IP address
being 200.0.0.1 to the specified next hop.
4. Redirect the packet and specify an egress. After the PC-A device pings the server
AAA, redirect the packets to the PC-B device. To ensure that the packet can be
sent from Vlan2, set a priority label and modify the out-vlanid value of the packet.
l Configuration Commands
Configuration on the R1:
/*Configuring VLAN interface*/
ZXR10(config)#switchvlan-configuration
ZXR10(config-swvlan)#interface gei-0/1/0/1
ZXR10(config-swvlan-intf)#switchport mode access
ZXR10(config-swvlan-intf)#switchport access vlan 1
ZXR10(config-swvlan-intf)#exit

ZXR10(config-swvlan)#interface gei-0/1/0/4
ZXR10(config-swvlan-intf)#switchport mode access
ZXR10(config-swvlan-intf)#switchport access vlan 5
ZXR10(config-swvlan-intf)#exit

ZXR10(config-swvlan)#interface gei-0/1/0/2
ZXR10(config-swvlan-intf)#switchport mode access
ZXR10(config-swvlan-intf)#switchport access vlan 2
ZXR10(config-swvlan-intf)#exit

ZXR10(config-swvlan)#interface gei-0/1/0/10
ZXR10(config-swvlan-intf)#switchport mode trunk
ZXR10(config-swvlan-intf)#switchport trunk vlan 10

ZXR10(config-swvlan-intf)#exit
ZXR10(config-swvlan)#interface gei-0/1/0/3
ZXR10(config-swvlan-intf)#switchport mode trunk
ZXR10(config-swvlan-intf)#switchport trunk vlan 4
ZXR10(config-swvlan-intf)#exit
ZXR10(config-swvlan)#exit

ZXR10(config)#interface vlan1
ZXR10(config-if)#ip address 192.168.101.2 255.255.255.0
ZXR10(config-if)#exit

ZXR10(config)#interface vlan5
ZXR10(config-if)#ip address 192.168.210.2 255.255.255.0
ZXR10(config-if)#exit

2-18

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


Chapter 2 Flow QoS Configuration

ZXR10(config)#interface vlan2
ZXR10(config-if)#ip address 192.168.102.2 255.255.255.0
ZXR10(config-if)#exit

ZXR10(config)#interface vlan10
ZXR10(config-if)#ip address 192.168.110.2 255.255.255.0
ZXR10(config-if)#exit

ZXR10(config)#interface vlan4
ZXR10(config-if)#ip address 192.168.103.2 255.255.255.0
ZXR10(config-if)#exit

/*Configuring ACL rule*/


ZXR10(config)#ipv4-access-list redirectAAA
ZXR10(config-ipv4-acl)#rule 10 permit tcp 192.168.210.2 0.0.0.0 any
ZXR10(config-ipv4-acl)#rule 20 permit ip any any
ZXR10(config-ipv4-acl)#exit

/*Binding the interface connected to server AAA*/


ZXR10(config)#ipv4-access-group interface gei-0/1/0/4 ingress redirectAAA

/*Configuring redirecting to CPU*/


ZXR10(config)#pm-qos
ZXR10(config-pm-qos)#redirect in ipv4-access-list redirectAAA rule-id 10 cpu
ZXR10(config-pm-qos)#exit

/*Configuring AAA rule*/


ZXR10(config)#ipv4-access-list redirect_1_2
ZXR10(config-ipv4-acl)#rule 10 permit ip any 200.0.0.0 0.0.0.255
ZXR10(config-ipv4-acl)#rule 20 permit ip any any
ZXR10(config-ipv4-acl)#exit

/*Binding the interface connected to PC-B*/


ZXR10(config)#ipv4-access-group interface gei-0/1/0/2 ingress redirect_1_2

/*Configuring static route*/


ZXR10(config)#ip route 200.0.0.2 255.255.255.255 192.168.110.1
ZXR10(config)#ip route 200.0.0.2 255.255.255.255 192.168.103.1

/*Configuring policy routing*/


ZXR10(config)#pm-qos
ZXR10(config-pm-qos)#redirect in ipv4-access-list redirect_1_2 rule-id 10
next-hop 200.0.0.2
ZXR10(config-pm-qos)#exit

2-19

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


ZXR10 8900E Configuration Guide (QoS)

/*Configuring ACL rule*/


ZXR10(config)#ipv4-access-list redirect_1_1
ZXR10(config-ipv4-acl)#rule 10 permit icmp 192.168.101.1 0.0.0.0 192.168.210.1
0.0.0.0
ZXR10(config-ipv4-acl)#rule 20 permit ip any 200.0.0.0 0.0.0.255
ZXR10(config-ipv4-acl)#rule 30 permit ip any any
ZXR10(config-ipv4-acl)#exit

/*Binding the interface connected to PC-A*/


ZXR10(config)#ipv4-access-group interface gei-0/1/0/1 ingress redirect_1_1

/*Configuring policy routing*/


ZXR10(config)#pm-qos
ZXR10(config-pm-qos)#redirect in ipv4-access-list redirect_1_1 rule-id 20
next-hop 200.0.0.2
ZXR10(config-pm-qos)#redirect in ipv4-access-list redirect_1_1 rule-id 10
interface gei_0/1/0/2
ZXR10(config-pm-qos)#priority-mark ipv4-access-list redirect_1_1 rule-id 10
out-vlanID 2
ZXR10(config-pm-qos)#exit

Configuration on the R2:


/*Configuring VLAN interface*/
ZXR10(config)#switchvlan-configuration
ZXR10(config-swvlan)#interface gei-0/1/0/10
ZXR10(config-swvlan-intf)#switchport mode trunk
ZXR10(config-swvlan-intf)#switchport trunk vlan 10
ZXR10(config-swvlan-intf)#exit
ZXR10(config-swvlan)#interface gei-0/1/0/3
ZXR10(config-swvlan-intf)#switchport mode trunk
ZXR10(config-swvlan-intf)#switchport trunk vlan 4
ZXR10(config-swvlan-intf)#exit

ZXR10(config-swvlan)#interface gei-0/1/0/20
ZXR10(config-swvlan-intf)#switchport mode access
ZXR10(config-swvlan-intf)#switchport access vlan 14
ZXR10(config-swvlan-intf)#exit
ZXR10(config-swvlan)#exit

ZXR10(config)#interface vlan10
ZXR10(config-if)#ip address 192.168.110.1 255.255.255.0
ZXR10(config-if)#exit

ZXR10(config)#interface vlan4

2-20

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


Chapter 2 Flow QoS Configuration

ZXR10(config-if)#ip address 192.168.103.1 255.255.255.0


ZXR10(config-if)#exit

ZXR10(config)#interface vlan14
ZXR10(config-if)#ip address 200.0.0.2 255.255.255.0
ZXR10(config-if)#exit
l Configuration Verification
Check QoS configuration results.
/*Checking the ACL configuration.*/
ZXR10(config)#show ipv4-access-lists name redirectAAA
ipv4-access-list redirectAAA
2/2 (showed/total)
10 permit tcp 192.168.210.2 0.0.0.0 any
20 permit ip any any
ZXR10(config)#show ipv4-access-lists name redirect_1_2
ipv4-access-list redirect_1_2
2/2 (showed/total)
10 permit ip any 200.0.0.0 0.0.0.255
20 permit ip any any
ZXR10(config)#show ipv4-access-lists name redirect_1_1
ipv4-access-list redirect_1_1
3/3 (showed/total)
10 permit icmp 192.168.101.1 0.0.0.0 192.168. 210.1 0.0.0.0
20 permit ip any 200.0.0.0 0.0.0.255
30 permit ip any any
/*Checking the binding relationship of the ACL.*/
ZXR10(config)#show ipv4-access-groups
Interface name|vlan Direction ACL name
------------------------------------------------------
gei-0/1/0/4 Ingress redirectAAA
gei-0/1/0/2 Ingress redirect_1_2
gei-0/1/0/1 Ingress redirect_1_1
/*Checking the QoS configuration.*/
ZXR10(config-pm-qos)#show running-config pm-qos
! <QOS>
pm-qos
priority-mark ipv4-access-list redirect_1_1 rule-id 10 out-vlanID 2
redirect in ipv4-access-list redirectAAA rule-id 10 cpu
redirect in ipv4-access-list redirect_1_2 rule-id 10 next-hop 200.0.0.2
redirect in ipv4-access-list redirect_1_1 rule-id 10 gei_0/1/0/2
redirect in ipv4-access-list redirect_1_1 rule-id 20 next-hop 200.0.0.2
! </QOS>
/*Checking the route table.*/
ZXR10(config)#show ip forwarding route

2-21

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


ZXR10 8900E Configuration Guide (QoS)

IPv4 Routing Table:


status codes: *valid, >best
Dest Gw Interface Owner Pri Metric
*> 192.168.101.0/24 192.168.101.2 vlan1 direct 0 0
*> 192.168.101.2/32 192.168.101.2 vlan1 address 0 0
*> 200.0.0.2/32 12.0.0.2 vlan12 static 1 0
*> 200.0.0.2/32 50.0.0.2 vlan50 static 1 0
*> 192.168.210.0/24 192.168.210.2 vlan5 direct 0 0
*> 192.168.210.2/32 192.168.210.2 vlan5 address 0 0
*> 192.168.102.0/24 192.168.102.2 vlan2 direct 0 0
*> 192.168.102.2/32 192.168.102.2 vlan2 address 0 0
*> 192.168.110.0/24 192.168.110.2 vlan10 direct 0 0
*> 192.168.110.2/32 192.168.110.2 vlan10 address 0 0
*> 192.168.103.0/24 192.168.103.2 vlan4 direct 0 0
*> 192.168.103.2/32 192.168.103.2 vlan4 address 0 0

Hierarchy Meter Configuration Example


l Configuration Description
As shown in Figure 2-6, Network A, B and C are connected to Internet by proxy server
192.168.3.100. It is required for Internet bandwidth restrictions of Network A, B ,C:
Network A, the maximum bandwidth required for 40M
Network B, the maximum bandwidth required for 30M
Network C, the maximum bandwidth required for 30M

2-22

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


Chapter 2 Flow QoS Configuration

Figure 2-6 Hierarchy Meter Configuration Example

l Configuration Flow
1. Configure an ACL for the traffic classification. According to the current require-
ment, use the ipv4-access-list to restrict all IP packets.
2. Set the bandwidth of department A to 40M.
3. Set the bandwidth of department B to 30M.
4. Set the bandwidth of department C to 430M.
l Configuration Commands
Configuration on the R1:

/*Configuring ACL rule*/


ZXR10(config)#ipv4-access-list meterA
ZXR10(config-ipv4-acl)#rule 10 permit ip any any
ZXR10(config-ipv4-acl)#exit
ZXR10(config)#ipv4-access-list meterB
ZXR10(config-ipv4-acl)#rule 10 permit ip any any
ZXR10(config-ipv4-acl)#exit
ZXR10(config)#ipv4-access-list meterC
ZXR10(config-ipv4-acl)#rule 10 permit ip any any
ZXR10(config-ipv4-acl)#exit

/*Binding interface*/
ZXR10(config)#ipv4-access-group interface gei-0/1/0/1 ingress meterA
ZXR10(config)#ipv4-access-group interface gei-0/1/0/2 ingress meterB
ZXR10(config)#ipv4-access-group interface gei-0/1/0/10 ingress meterC

2-23

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


ZXR10 8900E Configuration Guide (QoS)

/*Configuring macro meter*/


ZXR10(config)#pm-qos
ZXR10(config-pm-qos)#traffic-macro-flow R1 cir 100000 cbs 1000 mode band-borrow

/*Configuring micro meter of a network*/


ZXR10(config-pm-qos)#traffic-micro-flow ipv4-access-list meterA rule-id 10 cir
40000 cbs 1000 macro-flow R1
ZXR10(config-pm-qos)#traffic-micro-flow ipv4-access-list meterB rule-id 10 cir
30000 cbs 1000 macro-flow R1
ZXR10(config-pm-qos)#traffic-micro-flow ipv4-access-list meterC rule-id 10 cir
30000 cbs 1000 macro-flow R1
ZXR10(config-pm-qos)#exit
ZXR10(config)#
l Configuration Verification

Check QoS configuration results.


/*Checking the ACL configuration.*/
ZXR10(config)#show ipv4-access-lists name meterA
ipv4-access-list meterA
1/1 (showed/total)
10 permit ip any any
ZXR10(config)#show ipv4-access-lists name meterB
ipv4-access-list meterB
1/1 (showed/total)
10 permit ip any any
ZXR10(config)#show ipv4-access-lists name meterC
ipv4-access-list meterC
1/1 (showed/total)
10 permit ip any any
/*Checking the binding relationship of the ACL.*/
ZXR10(config)#show ipv4-access-groups
Interface name|vlan Direction ACL name
-----------------------------------------------------
gei-0/1/0/1 Ingress meterA
gei-0/1/0/2 Ingress meterB
gei-0/1/0/10 Ingress meterC
/*Checking the Qos configuration.*/
ZXR10(config-pm-qos)#show running-config pm-qos
!<QOS>
pm-qos
traffic-macro-flow R1 cir 100000 cbs 1000 mode band-borrow
traffic-micro-flow ipv4-access-list meterA rule-id 10 cir
40000 cbs 1000 macro-flow R1
traffic-micro-flow ipv4-access-list meterB rule-id 10 cir
30000 cbs 1000 macro-flow R1

2-24

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


Chapter 2 Flow QoS Configuration

traffic-micro-flow ipv4-access-list meterC rule-id 10 cir


30000 cbs 1000 macro-flow R1
!</QOS>

Traffic Mirroring Configuration Example


l Configuration Description
As shown in Figure 2-7, PC-A and PC-B are connected to switch R1. It is required
that packets between PC-A and PC-B are mirrored to PC for diagnosis.

Figure 2-7 Traffic Mirroring Configuration Example

l Configuration Flow
1. Configure an ACL for traffic classification. According to the current requirement,
the traffic classification is done on the basis of the destination IP address, so
the ipv4-access-list is used. Both the source IP address and the destination IP
address can be configured.
2. Apply the ACL rule to the ingress gei_0/1/0/1 and the egress gei_0/1/0/10 on R1.
3. Configure traffic mirroring, and mirror the packet to the gei_0/1/0/2 port.
l Configuration Commands
Configuration on the R1:
/*Configuring ACL rule*/
ZXR10(config)#ipv4-access-list mirror1
ZXR10(config-ipv4-acl)#rule 10 permit icmp 192.168.101.1 0.0.0.0
192.168.210.1 0.0.0.0
ZXR10(config-ipv4-acl)#rule 20 permit ip any any
ZXR10(config-ipv4-acl)#exit

/*Bingding the interface connected to PC-A*/


ZXR10(config)#ipv4-access-group interface gei-0/1/0/1 ingress mirror1

/*Configuring Traffic Mirroring*/


ZXR10(config)#pm-qos

2-25

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


ZXR10 8900E Configuration Guide (QoS)

ZXR10(config-pm-qos)#traffic-mirror in ipv4-access-list mirror1 rule-id 10


interface gei_0/1/0/2
ZXR10(config-pm-qos)#exit
ZXR10(config)#ipv4-access-group interface gei-0/1/0/10 egress mirror1
l Configuration Verification
Checking QoS configuration results.
/*Checking the ACL configuration.*/
ZXR10(config)#show ipv4-access-lists name mirror1
ipv4-access-list mirror1
2/2 (showed/total)
10 permit icmp 192.168.101.1 0.0.0.0 192.168.210.1 0.0.0.0
20 permit ip any any
/*Checking the binding relationship of the ACL rule.*/
ZXR10(config)#show ipv4-access-groups
Interface name|vlan Direction ACL name
-------------------------------------------------------
gei-0/1/0/1 Ingress mirror1
gei-0/1/0/10 Egress mirror1
/*Checking the QoS configuration.*/
ZXR10(config-pm-qos)#show running-config pm-qos
!<QOS>
pm-qos
traffic-mirror in ipv4-access-list mirror1 rule-id 10 interface gei_0/1/0/2
!</QOS>

Configuring the Traffic Limit Based on the vlan


l Configuration Description
As shown in Figure 2-8, R1 is connected with network A and network B. R1 accesses
Internet through the 192.168.3.100 address. R1 has H3 line card. Network A is
connected to vlan10, and network B is connected to vlan20. It is required to restrict
the upper-link traffic of network A, and the down-link traffic of network B.

2-26

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


Chapter 2 Flow QoS Configuration

Figure 2-8 flow qos config Example Structure

l Configuration Flow
1. Configure an ACL for traffic classification. Use the ipv4-mixed-access-list to match
the traffic of network A that accesses the Internet, and match the traffic sent from
192.168.3.100 to network B.
2. Bind the ACL rule to the ingress of gei-0/2/0/3, and to the egress of gei-0/2/0/21.
3. Configure the traffic limit.
l Configuration Command
Run the following commands on R1:
/*Configuring the ACL rule.*/
ZXR10(config)#ipv4-mixed-access-list limit_A
ZXR10(config-ipv4-mixed-acl)#rule 1 permit link-protocol 2048 any any
outer-vlan 10 ip any any
ZXR10(config-ipv4-mixed-acl)#rule 2 permit any any ip any any
ZXR10(config-ipv4-mixed-acl)#exit
/*Binding the interface of department A*/
ZXR10(config)#ipv4-mixed-access-group interface gei-0/2/0/3 ingress limit_A
/*Configuring the traffic limit.*/
ZXR10(config-pm-qos)#traffic-limit-acl ipv4-mix limit_A rule-id 1 cir
100000 cbs 200 ebs 3000 mode blind
ZXR10(config-pm-qos)#exit
ZXR10(config)#

2-27

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


ZXR10 8900E Configuration Guide (QoS)

/*Configuring the ACL rule.*/


ZXR10(config)#ipv4-mixed-access-list limit_B
ZXR10(config-ipv4-mixed-acl)#rule 1 permit link-protocol 2048 any any
outer-vlan 20 ip any any
ZXR10(config-ipv4-mixed-acl)#rule 2 permit any any ip any any
ZXR10(config-ipv4-mixed-acl)#exit
/*Binding the interface of department B.*/
ZXR10(config)#ipv4-mixed-access-group interface gei-0/2/0/21 egress limit_B
/*Configuring the priority label.*/
ZXR10(config)#pm-qos
ZXR10(config-pm-qos)#traffic-limit-acl ipv4-mix limit_B rule-id 1 cir
100000 cbs 200 ebs 3000 mode blind
ZXR10(config-pm-qos)#exit
ZXR10(config)#
l Configuration Verification
Check QoS configuration results.
/*Checking the ACL configuration.*/
ZXR10(config)#show ipv4-mixed-access-list name limit_A
ipv4-mixed-access-list limit_A
2/2 (showed/total)
rule 1 permit link-protocol 2048 any any outer-vlan 10 ip any any
rule 2 permit any any ip any any
ZXR10(config)#show ipv4-mixed-access-list name limit_B
ipv4-mixed-access-list limit_B
2/2 (showed/total)
rule 1 permit link-protocol 2048 any any outer-vlan 20 ip any any
rule 2 permit any any ip any any
/*Checking the binding relationship of the ACL rule.*/
ZXR10(config)#show ipv4-mixed-access-groups
Interface name|vlan Direction ACLname
---------------------------------------------
gei-0/2/0/3 Ingress limit_A
gei-0/2/0/21 Egress limit_B
/*Checking the QoS configuration.*/
ZXR10(config-pm-qos)#show running-config pm-qos
<QOS>
pm-qos
traffic-limit-acl ipv4-mix limit_A rule-id 1 cir 100000 cbs 200 ebs
3000 mode blind traffic-limit-acl ipv4-mix limit_B rule-id 1 cir 100000
cbs 200 ebs 3000 mode blind
</QOS>

2-28

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


Figures
Figure 1-1 Port QoS Configuration Example ........................................................... 1-15
Figure 2-1 Working Flow for Traffic Supervision ........................................................ 2-2
Figure 2-2 Bandwidth Borrow Mode .......................................................................... 2-3
Figure 2-3 Bandwidth Limit Mode.............................................................................. 2-4
Figure 2-4 Traffic Limit and Statistics Configuration Example .................................. 2-14
Figure 2-5 Policy Routing Configuration Example ................................................... 2-17
Figure 2-6 Hierarchy Meter Configuration Example................................................. 2-23
Figure 2-7 Traffic Mirroring Configuration Example ................................................. 2-25
Figure 2-8 flow qos config Example Structure ......................................................... 2-27

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


Figures

This page intentionally left blank.

II

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential


Glossary
ACL
- Access Control List
CBS
- Committed Burst Size
CIR
- Committed Information Rate
CoS
- Class of Service
DWRR
- Deficit Weighted Round Robin
EBS
- Excess Burst Size
FIFO
- First In and First Out
IP
- Internet Protocol

PIR
- Peak Information Rate

QoS
- Quality of Service
SP
- Strict Priority
ToS
- Type of Service
WRED
- Weighted Random Early Detection
WRR
- Weighted Round Robin

III

SJ-20121213142710-014|2013-07-15 (R1.0) ZTE Proprietary and Confidential

You might also like