26-QoS-QoS Profile Operation

Download

Table of Contents

Chapter 1 QoS Configuration. 1-1

1.1 Overview. 1-1

1.1.1 Traffic. 1-1

1.1.2 Traffic Classification. 1-1

1.1.3 Precedence. 1-1

1.1.4 Priority of Protocol Packets. 1-5

1.1.5 Priority Remark. 1-5

1.1.6 Packet Filter 1-5

1.1.7 Rate Limit on Ports. 1-5

1.1.8 TP. 1-5

1.1.9 Queue Scheduling Configuration Synchronization on Aggregation Ports. 1-7

1.1.10 Redirect 1-8

1.1.11 Queue Scheduling. 1-8

1.1.12 Traffic-based Traffic Statistics. 1-10

1.2 QoS Supported by S5600. 1-11

1.3 Configuring the Mapping between 802.1p Priority and Queues. 1-11

1.4 Setting to Use the Port Priority or Packet Priority. 1-12

1.5 Configuring Priority Remark. 1-14

1.5.1 Configuration Prerequisites. 1-14

1.5.2 Configuration Procedure. 1-14

1.5.3 Configuration Example. 1-15

1.6 Setting the Precedence of Protocol Packet 1-15

1.6.1 Configuration Prerequisites. 1-15

1.6.2 Configuration Procedure. 1-16

1.6.3 Configuration Example. 1-16

1.7 Configuring Rate Limit on Ports. 1-16

1.7.1 Configuration Prerequisites. 1-16

1.7.2 Configuration Procedure. 1-17

1.7.3 Configuration Example. 1-17

1.8 Configuring TP. 1-17

1.8.1 Configuration Prerequisites. 1-17

1.8.2 Configuration Procedure of TP. 1-17

1.8.3 Configuration Example. 1-18

1.9 Configuring Redirect 1-19

1.9.1 Configuration Prerequisites. 1-19

1.9.2 Configuration Procedure. 1-19

1.9.3 Configuration Example. 1-20

1.10 Configuring Queue-scheduling. 1-20

1.10.1 Configuration Prerequisites. 1-20

1.10.2 Configuration Procedure. 1-21

1.10.3 Configuration Example. 1-22

1.11 Configuring Traffic Statistics. 1-23

1.11.1 Configuration Prerequisites. 1-23

1.11.2 Configuration Procedure of Traffic Statistics. 1-23

1.11.3 Clearing Traffic Statistics Information. 1-24

1.11.4 Configuration Example. 1-24

1.12 QoS Configuration Example. 1-25

1.12.1 Configuration Example of TP and Rate Limit on the Port 1-25

1.12.2 Configuration Example of Priority Remark. 1-26

Chapter 2 QoS Profile Configuration. 2-1

2.1 Introduction to QoS Profile. 2-1

2.1.1 Application Mode of QoS Profile. 2-1

2.2 Introduction to QoS Profile Configurations. 2-1

2.3 Configuring QoS Profile. 2-2

2.3.1 Configuration Prerequisites. 2-2

2.3.2 Configuration Procedure. 2-2

2.3.3 Configuration Example. 2-3

2.4 Applying the QoS Profile to the Port Manually. 2-5

2.5 Displaying QoS Profile. 2-6

 


Chapter 1  QoS Configuration

1.1  Overview

QoS (Quality of Service) is a concept generally existing in occasions with service supply and demand. It evaluates the ability to meet the need of the customers in service. Generally, the evaluation is not to grade precisely. Its purpose is to analyze the conditions when the service is the best and the conditions when the service still needs improvement and then to make improvements in the specified aspects.

In internet, QoS evaluates the ability of the network to deliver packets. The evaluation on QoS can be based on different aspects because the network provides various services. Generally speaking, QoS is the evaluation on the service ability to support the core requirements such as delay, delay variation and packet loss ratio in the packet delivery.

1.1.1  Traffic

Traffic means service traffic, that is, all the packets passing the switch.

1.1.2  Traffic Classification

Traffic classification means to identify packets conforming to certain characters according to certain rules.

A classification rule is a filter rule configured to meet your management requirements. It can be very simple. For example, you can use a classification rule to identify traffic with different priorities according to the ToS field in the IP packet header. It can be very complicated too. For example, you can use a classification rule to identify the packets according to the combination of link layer (Layer 2), network layer (Layer 3) and transport layer (Layer 4) information including MAC addresses, IP protocols, source addresses, destination addresses, the port numbers of applications and so on.

Classification is generally based on the information in the packet header and rarely based on the packet content.

1.1.3  Precedence

1)         IP precedence, ToS precedence and DSCP precedence

Figure 1-1 DS fields and TOS bytes

The TOS field in an IP header contains 8 bits:

l           The first three bits indicate IP precedence in the range of 0 to 7.

l           Bit 3 to bit 6 indicate ToS precedence in the range of 0 to 15.

l           RFC2474 re-defines the ToS field in the IP packet header, which is called the DS field. The first six (bit 0 to bit 5) bits of the DS field indicate DSCP precedence in the range of 0 to 63.The first three bits in DSCP precedence are class selector codepoints, bit 4 and bit 5 indicate drop precedence, and bit 6 is zero indicating that the device sets the service class with the DS model.

l           The last two bits (bit 6 and bit 7) are reserved bits.

The precedence values of the IP packet indicate 8 different service classes.

Table 1-1 Description on IP Precedence

IP Precedence (decimal)

IP Precedence (binary)

Description

0

000

routine

1

001

priority

2

010

immediate

3

011

flash

4

100

flash-override

5

101

critical

6

110

internet

7

111

network

 

The Diff-Serv network defines four traffic classes:

l           Expedited Forwarding (EF) class: In this class, packets can be forwarded regardless of link share of other traffic. The class is suitable for preferential services with low delay, low packet loss ratio, low variation and assured bandwidth (such as virtual leased line);

l           Assured forwarding (AF) class: This class is further divided into four subclasses (AF1/2/3/4) and a subclass is further divided into three drop priorities, so the AF service level can be segmented. The QoS rank of the AF class is lower than that of the EF class;

l           Class selector (CS) class: This class comes from the IP TOS field and includes 8 classes;

l           Best Effort (BE) class: This class is a special class without any assurance in the CS class. The AF class can be degraded to the BE class if it exceeds the limit. Current IP network traffic belongs to this class by default.

Table 1-2 Description on DSCP values

Keyword

DSCP value (decimal)

DSCP value (binary)

ef

46

101110

af11

10

001010

af12

12

001100

af13

14

001110

af21

18

010010

af22

20

010100

af23

22

010110

af31

26

011010

af32

28

011100

af33

30

011110

af41

34

100010

af42

36

100100

af43

38

100110

cs1

8

001000

cs2

16

010000

cs3

24

011000

cs4

32

100000

cs5

40

101000

cs6

48

110000

cs7

56

111000

default (be)

0

000000

 

2)         802.1p priority

802.1p priority lies in Layer 2 packet headers and is applicable to occasions where the Layer 3 packet header does not need analysis but QoS must be assured in Layer 2.

Figure 1-2 An Ethernet frame with a 802.1Q tag header

As shown in the figure above, each host supporting 802.1Q protocol adds a 4-bit 802.1Q tag header after the source address of the former Ethernet frame header when sending packets.

The 4-bit 802.1Q tag header contains a 2-bit Tag Protocol Identifier (TPID) whose value is 8100 and a 2-bit Tag Control Information (TCI). TPID is a new class defined by IEEE to indicate a packet with an 802.1Q tag. Figure 1-3 describes the detailed contents of an 802.1Q tag header.

Figure 1-3 802.1Q tag headers

In the figure above, the 3-bit priority field in TCI is 802.1p priority in the range of 0 to 7.The 3 bits specify the precedence of the frame.8 classes of precedence are used to determine which packet is sent preferentially when the switch is congested.

Table 1-3 Description on 802.1p priority

CoS (decimal)

CoS (binary)

Description

0

000

best-effort

1

001

background

2

010

spare

3

011

excellent-effort

4

100

controlled-load

5

101

video

6

110

voice

7

111

network-management

 

The precedence is called 802.1p priority because the related applications of this precedence are defined in detail in the 802.1p specification.

1.1.4  Priority of Protocol Packets

Protocol packets carry their own priority. You can perform QoS actions on protocol packets by setting their priorities.

1.1.5  Priority Remark

The priority remark function is to use ACL rules in traffic identification and remark the priority for the packets matching with the ACL rules.

1.1.6  Packet Filter

Packet filter means filtering the service traffic. For example, in the operation of dropping packets, the service traffic matching with the traffic classification rule is dropped and the other traffic is permitted. The Ethernet switch adopts a complicated traffic classification rule to filter the packets based on much information and to drop these useless, unreliable, and doubtful packets. Therefore, the network security is enhanced.

The two critical steps in the packet filter operation are:

Step1: Classify the inbound packets to the port by the set classification rule.

Step 2: Perform the filter——drop operation on the classified packets.

The packet filter function can be implemented by applying ACL rules on the port. Refer to the description in the ACL module for detailed configurations.

1.1.7  Rate Limit on Ports

Rate limit on ports is port-based rate limit. It limits the total rate of outbound packets on a port.

1.1.8  TP

The network will be made more congested by plenty of continuous burst packets if the traffic of each user is not limited. The traffic of each user must be limited in order to make better use of the limited network resources and provide better service for more users. For example, the traffic can only get its committed resources in an interval to avoid network congestion caused by excess bursts.

TP (traffic policing) is a kind of traffic control policy to limit the traffic and its resource usage by supervising the traffic specification. The regulation policy is implemented according to the evaluation result on the premise of knowing whether the traffic exceeds the specification when TP or TS is performed. The token bucket is generally adopted in the evaluation of traffic specification.

I. Traffic evaluation and the token bucket

The token bucket can be considered as a container with a certain capacity to hold tokens. The system puts tokens into the bucket at the set rate. When the token bucket is full, the extra tokens will overflow and the number of tokens in the bucket stops increasing.

Figure 1-4 Evaluate the traffic with the token bucket

1)         Evaluate the traffic with the token bucket

The evaluation for the traffic specification is based on whether the number of tokens in the bucket can meet the need of packet forwarding. If the number of tokens in the bucket is enough to forward the packets (generally, one token is associated with a 1-bit forwarding authority), the traffic is conforming to the specification, and otherwise the traffic is nonconforming or excess.

When the token bucket evaluates the traffic, its parameter configurations include:

l           Average rate: The rate at which tokens are put into the bucket, namely, the permitted average rate of the traffic. It is generally set to committed information rate (CIR).

l           Burst size: The capacity of the token bucket, namely, the maximum traffic size that is permitted in every burst. It is generally set to committed burst size (CBS). The set burst size must be bigger than the maximum packet length.

One evaluation is performed on each arriving packet. In each evaluation, if the number of tokens in the bucket is enough, the traffic is conforming to the specification and you must take away some tokens whose number is corresponding to the packet forwarding authority; if the number of tokens in the bucket is not enough, it means that too many tokens have been used and the traffic is excess.

2)         Complicated evaluation

You can set two token buckets in order to evaluate more complicated conditions and implement more flexible regulation policies. For example, TP includes 4 parameters:

l           CIR

l           CBS

l           Peak information rate (PIR)

l           Excess burst size (EBS)

Two token buckets are used in this evaluation. Their rates of putting tokens into the buckets are CIR and PIR respectively, and their sizes are CBS and EBS respectively (the two buckets are called C bucket and E bucket respectively for short), representing different permitted burst levels. In each evaluation, you can implement different regulation policies in different conditions, including “enough tokens in C bucket”, “insufficient tokens in C bucket but enough tokens in E bucket” and “insufficient tokens in both C bucket and E bucket”.

II. TP

The typical application of TP is to supervise the specification of certain traffic into the network and limit it within a reasonable range, or to punish the extra traffic. Therefore, the network resources and the interests of the operators are protected. For example, you can limit HTTP packets within 50% of the network bandwidth. If the traffic of a certain connection is excess, TP can choose to drop the packets or to reset the priority of the packets.

TP is widely used in policing the traffic into the network of internet service providers (ISP).TP can classify the policed traffic and perform pre-defined policing actions according to different evaluation results. These actions include:

l           Forward: Forward the packet whose evaluation result is “conforming” or mark DSCP precedence for Diff-Serv packets and then forward them.

l           Drop: Drop the packet whose evaluation result is “nonconforming”.

l           Modify the precedence and forward: Modify the priority of the packets whose evaluation result is “partly-conforming” and forward them.

l           Enter the next-rank policing: TP can be piled up rank by rank and each rank polices more detailed objects.

1.1.9  Queue Scheduling Configuration Synchronization on Aggregation Ports

The feature of queue scheduling configuration synchronization on aggregation ports makes the queue scheduling configuration synchronous on each port of the aggregation port group.

l           Supporting the feature of queue scheduling configuration synchronization on the ports in the aggregation port group

When you modify or delete the queue scheduling mode in Ethernet port view, the queue scheduling modes of all the ports in the aggregation port group are modified or deleted if this port belongs to an aggregation group; only the queue scheduling mode of this port is modified or deleted if this port does not belong to any aggregation group.

l           Dynamic aggregation supported by queue scheduling modes on ports

If the queue scheduling configuration information of some LACP-enabled up ports is the same, these ports can be aggregated into the same aggregation group.

l           Static aggregation or manual aggregation supported by queue scheduling modes on ports

You can add a queue-scheduling-enabled port into a specific static or manual aggregation group. This operation can be performed not only on the local device but also cross devices in intelligent resilient framework (IRF).

l           You can use the copy command to copy the queue scheduling configuration of a port.

 

&  Note:

For the introduction to the copy command, refer to the Basic Port Configuration Module in this manual.

 

1.1.10  Redirect

You can re-specify the forwarding port of packets as required by your own QoS policy.

1.1.11  Queue Scheduling

When the network is congested, the problem that many packets compete for resources must be solved, usually in the way of queue scheduling.

In the following section, strict priority (SP) queuing, and weighted round robin (WRR) queuing are introduced.

1)         SP queuing

Figure 1-5 Diagram for SP queues

SP queue-scheduling algorithm is specially designed for critical service applications. An important feature of critical services is that they demand preferential service in congestion in order to reduce the response delay. Assume that there are 8 output queues on the port and the preferential queue classifies the 8 output queues on the port into 8 classes, which are queue7, queue6, queue5, queue4, queue3, queue2, queue1, and queue0. Their priorities decrease in order.

In the queue scheduling, SP sends packets in the queue with higher priority strictly following the priority order from high to low. When the queue with higher priority is empty, packets in the queue with lower priority are sent. You can put critical service packets into the queues with higher priority and put non-critical service (such as e-mail) packets into the queues with lower priority. In this case, critical service packets are sent preferentially and non-critical service packets are sent when critical service groups are not sent.

The disadvantage of SP queue is that: if there are packets in the queues with higher priority for a long time in congestion, the packets in the queues with lower priority will be “starved to death” because they are not served.

2)         WRR queuing

Figure 1-6 Diagram for WRR

WRR queue-scheduling algorithm schedules all the queues in turn and every queue can be assured of a certain service time. Assume there are 8 priority queues on the port. WRR configures a weight value for each queue, which are w7, w6, w5, w4, w3, w2, w1, and w0. The weight value indicates the proportion of obtaining resources. On a 100M port, configure the weight value of WRR queue-scheduling algorithm to 50, 50, 30, 30, 10, 10, 10 and 10 (corresponding to w7, w6, w5, w4, w3, w2, w1, and w0 in order). In this way, the queue with the lowest priority can get 5Mbps bandwidth at least, and the disadvantage of SP queue-scheduling that the packets in queues with lower priority may not get service for a long time is avoided. Another advantage of WRR queue is that: though the queues are scheduled in order, the service time for each queue is not fixed, that is to say, if a queue is empty, the next queue will be scheduled. In this way, the bandwidth resources are made full use of.

A port on a H3C S5600 Switch supports eight output queues and you can configure to choose the queue schedules (SP, WRR) as needed to achieve the implementation of SP+WRR. For example, when using WRR, if you set the value of some queues to 0, the SP applies to the queues and WRR applies to the rest queues.

1.1.12  Traffic-based Traffic Statistics

The function of traffic-based traffic statistics is to use ACL rules in traffic identifying and perform traffic statistics on the packets matching with the ACL rules. You can get the statistics of the packets you are interested in through this function.

1.2  QoS Supported by S5600

Table 1-4 QoS functions supported by S5600 and related commands

QoS

Specification

Related command

Priority mapping

Support only the mapping between 802.1p priority and local queues

qos cos-local-precedence-map

Port priority

Supported

priority priority-level

priority trust

TP

traffic-limit

Priority remark

traffic-priority

Redirect

traffic-redirect

Queue scheduling

Support SP, WRR, and WRR + SP

Support queue scheduling configuration synchronization on the aggregation ports

queue-scheduler

Traffic statistics

Supported

traffic-statistic

Set the priority of protocol packets

Supported

protocol-priority

 

1.3  Configuring the Mapping between 802.1p Priority and Queues

The mapping between the local precedence and the outbound queue is one to one. You can modify the mapping between the 802.1p priority and the outbound queue through modifying the mapping between the 802.1p priority and the local priority.

I. Configuration prerequisites

You have understood the mapping between the 802.1p priority and the local precedence and the default mapping table.

II. Configuration procedure

Table 1-5 Configure the mapping table

Operation

Command

Description

Enter system view

system-view

Configure the COS-to-local-precedence mapping table

qos cos-local-precedence-map cos0-map-local-prec cos1-map-local-prec cos2-map-local-prec cos3-map-local-prec cos4-map-local-prec cos5-map-local-prec cos6-map-local-prec cos7-map-local-prec

Optional

Display the mapping table

display qos cos-local-precedence-map

Optional

You can execute the display command in any view

 

III. Configuration example

l           Configure the following 802.1p priority-to-local precedence mappings: 0 to 2, 1 to 3, 2 to 4, 3 to 1, 4 to 7, 5 to 0, 6 to 5, and 7 to 6.

l           Display the configuration results.

Configuration procedure:

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] qos cos-local-precedence-map 2 3 4 1 7 0 5 6

[H3C] dis qos cos-local-precedence-map

 cos-local-precedence-map:

            cos(802.1p) :      0     1     2     3     4     5     6     7

--------------------------------------------------------------------------

local precedence(queue) :      2     3     4     1     7     0     5     6

1.4  Setting to Use the Port Priority or Packet Priority

By default, the switch replaces the 802.1p priority of the received packet with the priority of the inbound interface, and then assigns local precedence for the packet according to the priority. In this case, you can set the port priority.

In addition, you can specify the switch to use the packet priority.

I. Configuration prerequisites

l           The priority trust mode is specified

l           The port whose priority is to be configured is specified

l           The priority value of the specified port is specified

II. Configuration procedure

Table 1-6 Set to use the port priority

Operation

Command

Description

Enter system view

system-view

Enter Ethernet port view

interface interface-type interface-number

Set the port priority

priority priority-level

Optional

By default, the port priority is 0

 

Table 1-7 Set to use the packet priority

Operation

Command

Description

Enter system view

system-view

Enter Ethernet port view

interface interface-type interface-number

Set the switch to use the packet priority

priority trust

Through this configuration, the switch uses the packet priority instead of the port priority

 

III. Configuration example

l           Set to use the port priority and specify the priority of GigabitEthernet1/0/1 to 7.

Configuration procedure:

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] interface gigabitEthernet1/0/1

[H3C-GigabitEthernet1/0/1] undo priority-trust cos

[H3C-GigabitEthernet1/0/1] priority 7

l           Set the switch to use the 802.1p priority carried in the packet on GigabitEthernet1/0/1.

Configuration procedure:

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] interface GigabitEthernet1/0/1

[H3C-GigabitEthernet1/0/1] priority trust

1.5  Configuring Priority Remark

Refer to 1.1.5  Priority Remark for the introduction to priority remark.

Priority remark can be implemented in the following ways:

l           Through TP. When configuring TP, you can define the action of remarking the DSCP priority of the packets out of the traffic limit. Refer to 1.8.2  Configuration Procedure of TP.

l           Through the traffic-priority command. Then you can remark the IP precedence, 802.1p priority, DSCP priority and local precedence.

1.5.1  Configuration Prerequisites

l           ACL rules used for traffic identifying are defined. Refer to the ACL module in the book for defining ACL rules

l           The type and value of the precedence that the packets matching with ACL rules are remarked are determined

l           The ports which need this configuration are defined

1.5.2  Configuration Procedure

Table 1-8 Configure priority remark

Operation

Command

Description

Enter system view

system-view

Enter Ethernet port view

interface interface-type</