17-QoS Operation

Download

Table of Contents

Chapter 1 QoS Configuration. 1-1

1.1 QoS Overview. 1-1

1.1.1 Traffic. 1-1

1.1.2 Precedence. 1-1

1.1.3 Queue scheduling. 1-2

1.1.4 Local port monitoring. 1-3

1.1.5 RSPAN. 1-3

1.1.6 Port rate limit 1-3

1.2 QoS Functions and Related Commands. 1-3

1.3 Configuring Port Priority. 1-5

1.3.1 Configuration Procedure. 1-5

1.3.2 Configuration Example. 1-5

1.4 Configuring Packet Trust Priority. 1-6

1.4.1 Configuration Procedure. 1-6

1.4.2 Configuration Example. 1-6

1.5 Configuring Priority - Local Precedence Queue Mapping. 1-6

1.5.1 Prerequisites. 1-6

1.5.2 Configuring “802.1p Priority - Local Precedence Queue” Mapping Table. 1-7

1.5.3 Configuring “IP Precedence - Local Precedence Queue” Mapping Table. 1-7

1.5.4 Configuring “DSCP Precedence - Local Precedence Queue” Mapping Table. 1-8

1.5.5 Configuration Example. 1-9

1.6 Configuring Packet Priority. 1-9

1.6.1 Prerequisites. 1-9

1.6.2 Configuration Procedure. 1-10

1.6.3 Configuration Example. 1-10

1.7 Configuring Queue Scheduling Algorithm.. 1-11

1.7.1 Prerequisites. 1-11

1.7.2 Configuration Procedure. 1-11

1.7.3 Configuration Example. 1-11

1.8 Configuring Local Port Monitoring. 1-12

1.8.1 Configuring Local Port Mirroring. 1-12

1.9 Configuring RSPAN. 1-15

1.9.1 Prerequisites. 1-17

1.9.2 Configuration Procedure on the Source Switch. 1-17

1.9.3 Configuration Procedure on the Intermediate Switch. 1-19

1.9.4 Configuration Procedure on the Destination Switch. 1-20

1.9.5 Configuration Example. 1-21

1.10 Setting Rate Limit on Ports. 1-23

1.10.1 Prerequisites. 1-23

1.10.2 Configuration Procedure. 1-23

1.10.3 Configuration Example. 1-24

1.11 Displaying QoS. 1-24

 


Chapter 1  QoS Configuration

1.1  QoS Overview

Quality of Service (QoS) 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 where the service is the best and the conditions where the service still needs improvement and then to make improvements in the specified aspects.

In an 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, jitter, and packet loss ratio in the packet delivery.

1.1.1  Traffic

Stream refers to traffic, including all packets that pass through a switch.

1.1.2  Precedence

This section describes the IP precedence, Type of Service(TOS) precedence, Differentiated Services Codepoint (DSCP) precedence, and 802.1p priority.

1)         IP precedence, TOS precedence and DSCP precedence

Figure 1-1 DS field and ToS byte

As shown in Figure 1-1, the TOS field of an IP header contains eight bits, among which the first three represent the IP precedence, ranging from 0 to 7. Bits 3 to 6 (a total of 4 bits) represent the TOS precedence, ranging from 0 to 15. The TOS field of an IP packet header is redefined as Differentiated Services (DS) field in RFC2474, among which the first six bits (bits 0 to 5) represent DSCP precedence, ranging from 0 to 63, and bits 6 and 7 are reserved.

2)         802.1p priority

Embedded in the header of a Layer 2 packet, 802.1p priority is intended to ensure Layer 2 QoS rather than analysis of a Layer3 header.

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

As shown in Figure 1-2, an 802.1Q-enabled host will include a 4-bit 802.1Q header next to the source address in its outbound Ethernet frames. The 4-bit header is comprised of a 2-bit Tag Protocol Identifier (TPID) with a value of 8100 and a 2-bit Tag Control Information (TCI). TPID was defined recently by IEEE, indicating that the packet includes an 802.1Q tag. The detailed make-up of an 802.1Q header is illustrated in Figure 1-3.

Figure 1-3 802.1Q tag header

In Figure 1-3, the Priority field in TCI is 802.1p priority. It consists of three bits with a value range of 0 to 7. The three bits are intended to determine the priority of a given packet. A total of 8 priorities are provided to help the switch decide which packet to be sent first in case of traffic congestion.

As it is the 802.1p specifications that have described in detail the application of these priorities, hence the name. It is also known as CoS priority.

1.1.3  Queue scheduling

When congestion occurs, packets contend for network resources. To address this issue, queue scheduling was introduced. The following are two ways of implementing it: Weighted Round Robin (WRR) and High Queue-WRR (HQ-WRR).

1)         WRR

With each port supporting four output queues, WRR performs a round-robin scheduling to ensure that all queues are served. Each queue is allocated with a weight value (w3, w2, w1, and w0) denoting the resource proportions allocated to the corresponding queue. For example, on a 100M port, allocating its output queues with WRR weight values of 50, 30, 10, and 10 (corresponding to w3, w2, w1,and w0 respectively) will ensure that even queues with the lowest priority can get at least 10Mbit/s bandwidth, thus avoiding the scenario where packets with low priority are not served over a long time. Performing round-robin scheduling, WRR also ensures that network bandwidth is used efficiently by not allocating a fixed amount of time to each individual queue. This means that when a queue has nothing to output, its bandwidth can be given to the next queue with outputs.

2)         HQ-WRR

HQ-WRR is an improvement over WRR. With queue 3 allocated with the highest priority, the switch will ensure that this queue get served first and will perform round-robin scheduling to the other three queues when the traffic has exceeded the bandwidth capacity of a port.

1.1.4  Local port monitoring

Local port monitoring copies inbound packets of a given port to the local destination port for network detection and troubleshooting.

1.1.5  RSPAN

Remote switched port analyzer (RSPAN) breaks through the limitation that the source port and destination port have to be located on the same switch, and permits them to reside across multiple network devices. Therefore, it enhances the way network administrator can manage remote switches.

1.1.6  Port rate limit

Refers to rate limit of a given port. It limits the rate that a port receives or sends packets.

1.2  QoS Functions and Related Commands

Table 1-1 QoS functions and related commands

QoS functions

Specifications

Related Command

Related section

Port priority

Support

priority priority-level

Configuring Port Priority

Packet trust priority

Support

priority trust

Configuring Packet Trust Priority

Priority to local precedence queue mapping

Support

qos cos-local-precedence-map

qos ip-precedence-local-precedence-map

qos dscp-local-precedence-map

Configuring Priority - Local Precedence Queue Mapping

Priority options

The following options are available:

l      According to dscp precedence

l      According to ip-precedence

l      According to CoS priority

priority-trust { dscp | ip-precedence | cos }

Configuring Packet Priority

Queue scheduler

WRR, HQ+WRR

queue-scheduler

Configuring Queue Scheduling Algorithm

Local port monitoring

One-to-multiple port monitoring, that is to say, one destination port to multiple source ports.

Packet monitoring directions can be inbound, outbound or both.

System view:

mirroring-group group-id local

mirroring-group group-id mirroring-port mirroring-port-list { inbound | outbound | both }

mirroring-group group-id monitor-port monitor-port

Configuring Local Port Monitoring

Ethernet port view:

monitor-port

mirroring-port

RSPAN

Monitoring applies to both inbound and outbound packets.

mirroring-group group-id { remote-source | remote-destination }

mirroring-group group-id mirroring-port mirroring-port-list { inbound | outbound }

mirroring-group group-id monitor-port monitor-port

mirroring-group group-id reflector-port reflector-port

mirroring-group group-id remote-probe vlan remote-probe-vlan-id

Configuring RSPAN

Port rate limit

Rate limit applies to both inbound and outbound packets with a rate value of 64 kbps.

line-rate

Setting Rate Limit on Ports

 

1.3  Configuring Port Priority

By default, the switch replaces the 802.1p priorities of the received packets with the priorities of the ports receiving the packets, and then put the packets into different output queues according to the new priorities, so as to control service quality.

1.3.1  Configuration Procedure

Table 1-2 Configure port priority

Operation

Command

Description

Enter system view

system-view

Enter Ethernet port view

interface interface-type interface-number

Configure port priority level

priority priority-level

Required

Defaults to 0.

 

1.3.2  Configuration Example

I. Network requirements

Configure port priority level for Ethernet1/0/1.

II. Configuration procedure

<H3C> system-view

[H3C] interface Ethernet1/0/1

[H3C-Ethernet1/0/1] priority 7

1.4  Configuring Packet Trust Priority

Users can configure the switch to trust the priority of inbound packets rather than priority of the receiving port.

1.4.1  Configuration Procedure

Table 1-3 Configure packet trust priority

Operation

Command

Description

Enter system view

system-view

Configure packet trust priority

priority trust

Required

By default, the switch replaces 802.1p priority brought by packets with priority of the receiving port.

 

1.4.2  Configuration Example

I. Network requirements

Configure the switch to trust 802.1p priority of inbound packets.

II. Configuration procedure

<H3C> system-view

[H3C] priority trust

1.5  Configuring Priority - Local Precedence Queue Mapping

The switch put packets into the proper port output queue based on the priority - local precedence queue mapping. You can set the mapping relationship between priority and local precedence queue with the help of commands.

1.5.1  Prerequisites

New mapping relationships have been established to modify the “802.1p priority - local precedence queue”, “IP precedence - local precedence queue”, and “DSCP precedence - local precedence queue” mapping tables.

1.5.2  Configuring “802.1p Priority - Local Precedence Queue” Mapping Table

Table 1-4 Configure the “802.1p priority - local precedence queue” mapping table

Operation

Command

Description

Enter system view

system-view

Set the 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

Required

 

The following table shows the default “802.1p priority - local precedence queue” mapping table.

Table 1-5 Default “802.1p priority - local precedence queue” mapping table

802.1p priority

Local precedence queue

0

1

1

0

2

0

3

1

4

2

5

2

6

3

7

3

 

1.5.3  Configuring “IP Precedence - Local Precedence Queue” Mapping Table

Table 1-6 Configure the “IP precedence - local precedence queue” mapping table

Operation

Command

Description

Enter system view

system-view

Set the mapping table

qos ip-precedence-local-precedence-map ip0-map-local-prec ip1-map-local-prec ip2-map-local-prec ip3-map-local-prec ip4-map-local-prec ip5-map-local-prec ip6-map-local-prec ip7-map-local-prec

Required

 

The following table shows the default “IP precedence - local precedence queue” mapping table.

Table 1-7 Default “IP precedence - local precedence queue” mapping table

IP precedence

Local precedence queue

0

0

1

0

2

1

3

1

4

2

5

2

6

3

7

3

 

1.5.4  Configuring “DSCP Precedence - Local Precedence Queue” Mapping Table

Table 1-8 Configure the “DSCP precedence - local precedence queue” mapping table

Operation

Command

Description

Enter system view

system-view

Configure the mapping table

qos dscp-local-precedence-map dscp-list : local-precedence

Required

 

The following table shows the default “DSCP precedence - local precedence queue” mapping table.

Table 1-9 Default “DSCP precedence - local precedence queue” mapping table

DSCP precedence

Local precedence queue

0–15

0

16–31

1

32–47

2

48–63

3

 

1.5.5  Configuration Example

I. Network requirements

Modify the “802.1p priority - local precedence queue” mapping table as follows.

Table 1-10 “802.1p priority - local precedence queue” mapping table

802.1p priority

Local precedence queue

0

0

1

0

2

1

3

1

4

2

5

2

6

3

7

3

 

II. Configuration procedure

<H3C> system-view

[H3C] qos cos-local-precedence-map 0 0 1 1 2 2 3 3

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

cos-local-precedence-map:

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

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

   local precedence(queue) :      0     0     1     1     2     2     3     3

1.6  Configuring Packet Priority

1.6.1  Prerequisites

l           The mapping relationship between the priority and local precedence queue has been established. Refer to 1.5  Configuring Priority - Local Precedence Queue Mapping.

l           The kind of priority (chosen from 802.1p priority, IP precedence and DSCP precedence) to be used for putting packets into queues is determined.

1.6.2  Configuration Procedure

Table 1-11 Determine the priority to trust

Operation

Command

Description

Enter system view

system-view

Determine the priority to trust

priority-trust { cos | dscp | ip-precedence }

Required

Default to 802.1p priority.

cos: Uses the 802.1p priority.

dscp: Uses the DSCP precedence.

ip-precedence: Uses the IP precedence.

 

1.6.3  Configuration Example

I. Network requirements

Users choose to trust 802.1p priority. Table 1-12 shows the mapping relationship.

Table 1-12 “802.1p priority- local precedence queue” mapping table

802.1p priority

Local precedence queue

0

0

1

0

2

1

3

1

4

2

5

2

6

3

7

3

 

II. Configuration procedure

<H3C> system-view

[H3C] qos cos-local-precedence-map 0 0 1 1 2 2 3 3

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

cos-local-precedence-map:

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

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

   local precedence(queue) :      0     0     1     1     2     2     3     3

[H3C] priority-trust cos

[H3C] display priority-trust

Priority trust mode: cos

1.7  Configuring Queue Scheduling Algorithm

1.7.1  Prerequisites

l           Mapping relationships between the priority and local precedence queue have been established. Refer to 1.5  Configuring Priority - Local Precedence Queue Mapping.

l           The priority to trust has been determined (from the 802.1p priority, IP precedence, and DSCP precedence). Refer to 1.6  Configuring Packet Priority.

l           The scheduling algorithm (WRR or HQ+WRR) has been determined, and the weight value for each queue has been allocated.

1.7.2  Configuration Procedure

Table 1-13 Configure the queue scheduling algorithm

Operation

Command

Description

Enter system view

system-view

Set the queue scheduling algorithm

queue-scheduler { hq-wrr queue0-weight queue1-weight queue2-weight | wrr queue0-weight queue1-weight queue2-weight queue3-weight }

Required

Defaults to WRR algorithm with a weight ratio of 1:2:3:4.

 

1.7.3  Configuration Example

I. Network requirements

l           802.1p priority is in use.

l           WRR algorithm is in use with a weight ratio of 2:3:4:5

l           The “802.1p priority - local precedence queue” mapping table is shown as follows.

Table 1-14 “802.1p priority - local precedence queue” mapping table

802.1p priority

Local precedence queue

0

0

1

0

2

1

3

1

4

2

5

2

6

3

7

3

 

II. Configuration procedure

<H3C> system-view

[H3C] qos cos-local-precedence-map 0 0 1 1 2 2 3 3

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

cos-local-precedence-map:

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

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

   local precedence(queue) :      0     0     1     1     2     2     3     3

[H3C] priority-trust cos

[H3C] display priority-trust

Priority trust mode: cos

[H3C] queue-scheduler wrr 2 3 4 5

[H3C] display queue-scheduler

 Queue scheduling mode: weighted round robin

 weight of queue 0: 2

 weight of queue 1: 3

 weight of queue 2: 4

 weight of queue 3: 5

1.8  Configuring Local Port Monitoring

1.8.1  Configuring Local Port Mirroring

I. Configuration prerequisites

l           The source port is specified and whether the packets to be mirrored are inbound or outbound is specified: inbound: only mirrors the packets received via the port; outbound: only mirrors the packets sent by the port; both: mirrors the packets received and sent by the port at the same time.

l           The destination port is specified.

l           The group number of the mirroring group is specified.

II. Configuring Local port mirroring in Ethernet port view

Table 1-15 Configure Local port mirroring in Ethernet port view (1)

Operation

Command

Description

Enter system view

system-view

Create a port mirroring group

mirroring-group group-id local

Required

Enter Ethernet port view of the destination port

interface interface-type interface-number

Define the current port as the destination port

monitor-port

Required

LACP must be disabled on the destination port.

Exit current view

quit

Enter Ethernet port view of the source port

interface interface-type interface-number

Configure the source port and specify the direction of the packets to be mirrored

mirroring-port { inbound | outbound | both }

Required

 

Table 1-16 Configure Local port mirroring in Ethernet port view (2)

Operation

Command

Description

Enter system view

system-view

Create a port mirroring group

mirroring-group group-id local

Required

Enter Ethernet port view of the destination port

interface interface-type interface-number

Define the current port as the destination port

mirroring-group group-id monitor-port

Required

LACP must be disabled on the destination port

Exit current view

quit

Enter Ethernet port view of the source port

interface interface-type interface-number

Configure the source port and specify the direction of the packets to be mirrored

mirroring-group group-id mirroring-port { both | inbound | outbound }

Required

 

III. Configuring Local port mirroring in system view

Table 1-17 Configure Local port mirroring in system view

Operation