- Table of Contents
-
- 08-ACL and QoS Configuration Examples
- 01-ACL Configuration Examples
- 02-Traffic Filtering Configuration Examples
- 03-Traffic Policing Configuration Examples
- 04-GTS and Rate Limiting Configuration Examples
- 05-Congestion Avoidance and Queue Scheduling Configuration Examples
- 06-Priority Mapping and Queue Scheduling Configuration Examples
- 07-Priority Marking and Queue Scheduling Configuration Examples
- 08-TAP Configuration Examples
- Related Documents
-
Title | Size | Download |
---|---|---|
06-Priority Mapping and Queue Scheduling Configuration Examples | 95.37 KB |
Example: Configuring priority mapping and queue scheduling
Priority configuration for the internal network traffic
Priority configuration for the Internet traffic
Applicable hardware and software versions
Configuring transmission priorities for the internal network traffic
Configuring transmission priorities for the traffic to the Internet
Introduction
This document provides examples for configuring priority mapping and queue scheduling profiles.
Prerequisites
The configuration examples in this document were created and verified in a lab environment, and all the devices were started with the factory default configuration. When you are working on a live network, make sure you understand the potential impact of every command on your network.
This document assumes that you have basic knowledge of priority mapping and queue scheduling profiles.
Example: Configuring priority mapping and queue scheduling
Network configuration
As shown in Figure 1, the Internet-accessing traffic includes the following types: HTTP, FTP, and Email, with the DSCP values 33, 35, and 27, respectively.
Configure priority mapping and queue scheduling to meet the following requirements:
· Access to the internal server farm—The traffic from the Administration department takes priority over the traffic from the R&D department. When congestion occurs, they are scheduled at a ratio of 2:1.
· Access to the Internet—The traffic from the Administration department takes priority over the traffic from the R&D department. When congestion occurs, the traffic from the Administration department is scheduled preferentially. The traffic from the R&D department is scheduled when no traffic from the Administration department exists. The three types of Internet-accessing traffic are transmitted in the following priority order: HTTP > FTP > Email. When congestion occurs, the three types of traffic are transmitted at a ratio of 2:1:1.
Analysis
Priority configuration for the internal network traffic
To meet the network requirements, you must perform the following tasks:
· For packets from the two departments to be marked with different 802.1p priorities, configure different port priority values for the interfaces connected to the two departments.
· Because the 802.1p priorities are carried in VLAN tags, you must configure Ten-GigabitEthernet 1/0/1 on Switch C to send packets carrying VLAN tags. This example uses the port link type trunk.
· To make the marked 802.1p priority actually affect the packet transmission, configure trusting the 802.1p priorities of received packets on all input interfaces along the transmission path.
· To schedule packets from different queues at the specified ratio when congestion occurs, enable WRR queuing and configure different weights for queues.
Priority configuration for the Internet traffic
To meet the network requirements, you must perform the following tasks:
· To completely prioritize the traffic from the Administration department when the interface is congested in the outbound direction, perform the following tasks:
¡ Configure SP queuing on the interface.
¡ Assign the traffic from the Administration department to a higher-priority queue.
· To determine the transmission priority based on the upper-layer protocols, configure trusting the DSCP values on the interface, so that the interface can enqueue packets based on the DSCP values.
· To assign packets with DSCP value 33 to a higher-priority queue, modify the DSCP-to-802.1p priority mapping table to map DSCP value 33 to a higher 802.1p priority value than the default. By default, DSCP values 33, 35, 27 are mapped to local precedence values 4, 4, and 3, respectively, based on the DSCP-to-802.1p priority mapping table and the 802.1p-to-local priority mapping table.
· To schedule packets from different queues at the specified ratio when congestion occurs, enable WRR queuing and configure different weights for queues.
Applicable hardware and software versions
The following matrix shows the hardware and software versions to which this configuration example is applicable:
Hardware |
Software version |
S9850-G switch series |
Release 6010P03 and later |
S6850-G switch series S6805-G switch series |
Release 6010P03 and later |
S6530X switch series |
Release 8108P22 and later |
S5590-HI switch series |
Release 6010P03 and later |
S5590-EI switch series S5500V3-HI switch series |
Release 6010P03 and later |
S6520X-EI-G switch series S6520XP-EI-G switch series |
Release 7748 and later |
S5590XP-HI-G switch series |
Release 7748 and later |
S5560-EI-G switch series |
Release 7748 and later |
S5130S-EI-G switch series |
Release 7748 and later |
S5500-D-G switch series S5100-D-G switch series |
Release 6010P03 and later |
S5130S-HI-G switch series |
Release 6010P03 and later |
S5130S-EI-G switch series (except S5130S-30C-EI-G and S5130S-54C-EI-G switches) |
Release 6010P03 and later |
S5130S-30C-EI-G switch S5130S-54C-EI-G switch |
Release 7748 and later |
Procedures
Configuring transmission priorities for the internal network traffic
1. Configure Switch C:
# Create VLANs 10 and 20.
<SwitchC> system-view
[SwitchC] vlan 10
[SwitchC-vlan10] quit
[SwitchC] vlan 20
[SwitchC-vlan20] quit
# Assign interface Ten-GigabitEthernet 1/0/2 to VLAN 10, and set the port priority to 6 for the interface. This enables the traffic from the Administration department to be marked with 802.1p priority value 6.
[SwitchC] interface ten-gigabitethernet 1/0/2
[SwitchC-Ten-GigabitEthernet1/0/2] port access vlan 10
[SwitchC-Ten-GigabitEthernet1/0/2] qos priority 6
[SwitchC-Ten-GigabitEthernet1/0/2] quit
# Assign interface Ten-GigabitEthernet 1/0/3 to VLAN 20, and set the port priority to 4 for the interface. This enables the traffic from the R&D department to be marked with 802.1p priority value 4.
[SwitchC] interface ten-gigabitethernet 1/0/3
[SwitchC-Ten-GigabitEthernet1/0/3] port access vlan 20
[SwitchC-Ten-GigabitEthernet1/0/3] qos priority 4
[SwitchC-Ten-GigabitEthernet1/0/3] quit
# Configure interface Ten-GigabitEthernet 1/0/1 as a trunk port, assign the interface to VLAN 10 and VLAN 20, and remove the interface from VLAN 1.
[SwitchC] interface ten-gigabitethernet 1/0/1
[SwitchC-Ten-GigabitEthernet1/0/1] port link-type trunk
[SwitchC-Ten-GigabitEthernet1/0/1] port trunk permit vlan 10 20
[SwitchC-Ten-GigabitEthernet1/0/1] undo port trunk permit vlan 1
[SwitchC-Ten-GigabitEthernet1/0/1] quit
2. Configure Switch B:
# Create VLANs 10, 20, 30, and 40.
<SwitchB> system-view
[SwitchB] vlan 10
[SwitchB-vlan10] quit
[SwitchB] vlan 20
[SwitchB-vlan20] quit
[SwitchB] vlan 30
[SwitchB-vlan30] quit
[SwitchB] vlan 40
[SwitchB-vlan40] quit
# Configure interface Ten-GigabitEthernet 1/0/1 as a trunk port.
[SwitchB] interface ten-gigabitethernet 1/0/1
[SwitchB-Ten-GigabitEthernet1/0/1] port link-type trunk
# Assign interface Ten-GigabitEthernet 1/0/1 to VLANs 10 and 20.
[SwitchB-Ten-GigabitEthernet1/0/1] port trunk permit vlan 10 20
# Remove interface Ten-GigabitEthernet 1/0/1 from VLAN 1.
[SwitchB-Ten-GigabitEthernet1/0/1] undo port trunk permit vlan 1
# Configure Ten-GigabitEthernet 1/0/1 to trust the 802.1p priority of received packets. Based on the 802.1p-to-local priority mapping table, traffic with 802.1p priority 4 is assigned to queue 4, and traffic with 802.1p priority 6 is assigned to queue 6.
[SwitchB-Ten-GigabitEthernet1/0/1] qos trust dot1p
[SwitchB-Ten-GigabitEthernet1/0/1] quit
# Assign interface Ten-GigabitEthernet 1/0/20 to VLAN 30.
[SwitchB] interface ten-gigabitethernet 1/0/20
[SwitchB-Ten-GigabitEthernet1/0/20] port access vlan 30
# Create VLAN interfaces and configure routing protocols to enable communication between network segments. For more information about these configurations, see H3C xxxx Layer 3—IP Routing Configuration Guide-Release xxxx.
# Enable byte-count WRR on interface Ten-GigabitEthernet 1/0/20. By default, byte-count WRR is enabled.
[SwitchB-GigabitEthernet1/0/20] qos wrr byte-count
# Configure the weight of queue 6 as two times that of queue 4. In this example, set the weight value to 4 for queue 6 and 2 for queue 4.
[SwitchB-Ten-GigabitEthernet1/0/20] qos wrr 4 group 1 byte-count 2
[SwitchB-Ten-GigabitEthernet1/0/20] qos wrr 6 group 1 byte-count 4
[SwitchB-Ten-GigabitEthernet1/0/20] quit
# Assign interface Ten-GigabitEthernet 1/0/10 to VLAN 40.
[SwitchB] interface ten-gigabitethernet 1/0/10
[SwitchB-Ten-GigabitEthernet1/0/10] port access vlan 40
[SwitchB-Ten-GigabitEthernet1/0/10] quit
Configuring transmission priorities for the traffic to the Internet
1. Configure Switch B:
# Enable SP queuing on interface Ten-GigabitEthernet 1/0/10.
[SwitchB] interface ten-gigabitethernet 1/0/10
[SwitchB-Ten-GigabitEthernet1/0/10] qos sp
2. Configure Switch A:
# Configure interface Ten-GigabitEthernet 1/0/1 to trust the DSCP values of received packets.
[SwitchA] interface ten-gigabitethernet 1/0/1
[SwitchA-Ten-GigabitEthernet1/0/1] qos trust dscp
# Modify the DSCP-to-802.1p priority mapping table to map DSCP value 33 to 802.1p priority 5 (queue 5).
[SwitchA] qos map-table dscp-dot1p
[SwitchA-maptbl-dscp-dot1p] import 33 export 5
[SwitchA-maptbl-dscp-dot1p] quit
The configuration assigns the three types of packets (HTTP, FTP, and Email) to queues 5, 4, and 3, respectively.
# Enable byte-count WRR on interface Ten-GigabitEthernet 1/0/2. By default, byte-count WRR is enabled.
[SwitchA] interface ten-gigabitethernet 1/0/2
[SwitchA-Ten-GigabitEthernet1/0/2] qos wrr byte-count
# Set the weights of the three queues at a ratio of 2:1:1 (6, 3, and 3 in this example).
[SwitchA-Ten-GigabitEthernet1/0/2] qos wrr 5 group 1 byte-count 6
[SwitchA-Ten-GigabitEthernet1/0/2] qos wrr 4 group 1 byte-count 3
[SwitchA-Ten-GigabitEthernet1/0/2] qos wrr 3 group 1 byte-count 3
Verifying the configuration
Verify the configuration on any interface on any switch, for example, Ten-GigabitEthernet 1/0/2 on Switch A.
# Verify the WRR configuration.
[SwitchA] display qos queue wrr interface ten-gigabitethernet 1/0/2
Interface: Ten-GigabitEthernet1/0/2
Output queue: Weighted Round Robin queuing
Queue ID Queue name Group Byte count
---------------------------------------------------
0 be 1 1
1 af1 1 2
2 af2 1 3
3 af3 1 3
4 af4 1 3
5 ef 1 6
6 cs6 1 7
7 cs7 1 8
Output queue: Weighted Round Robin queuing
Queue ID Queue name Group Byte count
---------------------------------------------------
0 be 1 1
1 af1 1 2
2 af2 1 3
3 af3 1 3
4 af4 1 3
5 ef 1 6
6 cs6 1 13
7 cs7 1 15
Configuration files
· Switch A:
#
qos map-table dscp-dot1p
import 33 export 5
#
interface Ten-GigabitEthernet1/0/1
port link-mode bridge
qos trust dscp
#
interface Ten-GigabitEthernet1/0/2
port link-mode bridge
qos wrr af3 group 1 byte-count 3
qos wrr af4 group 1 byte-count 3
qos wrr ef group 1 byte-count 6
#
return
· Switch B:
#
vlan 10
#
vlan 20
#
vlan 30
#
vlan 40
#
interface Ten-GigabitEthernet1/0/1
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 10 20
qos trust dot1p
#
interface Ten-GigabitEthernet1/0/10
port link-mode bridge
port access vlan 40
#
interface Ten-GigabitEthernet1/0/20
port link-mode bridge
port access vlan 30
qos wrr af4 group 1 byte-count 2
qos wrr cs6 group 1 byte-count 4
#
return
· Switch C:
#
vlan 10
#
vlan 20
#
interface Ten-GigabitEthernet1/0/1
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 10 20
#
interface Ten-GigabitEthernet1/0/2
port link-mode bridge
port access vlan 10
qos priority 6
#
interface Ten-GigabitEthernet1/0/3
port link-mode bridge
port access vlan 20
qos priority 4
#
return