- Table of Contents
-
- 02-Configuration Examples
- 01-H3C_AAA_Configuration_Examples
- 02-H3C_ACL_Configuration_Examples
- 03-H3C_ATM_Configuration_Examples
- 04-H3C_IGMP_Configuration_Examples
- 05-H3C_IP_Source_Guard_Configuration_Examples
- 06-H3C_Ethernet_OAM_Configuration_Examples
- 07-H3C_NQA_Configuration_Examples
- 08-H3C_QinQ_Configuration_Examples
- 09-H3C_OSPF_Configuration_Examples
- 10-H3C_MPLS_TE_Configuration_Examples
- 11-H3C_OpenFlow_Configuration_Examples
- 12-H3C_NAT_Configuration_Examples
- 13-H3C_RBAC_Configuration_Examples
- 14-H3C_IRF_Configuration_Examples
- 15-H3C_POS_Interface_Configuration_Examples
- 16-H3C_CPOS_Interface_Configuration_Examples
- 17-H3C_DHCP_Relay_Redundancy_Configuration_Examples
- 18-H3C_DLDP_Configuration_Examples
- 19-H3C_IS-IS_Configuration_Examples
- 20-H3C_MPLS_L3VPN_Configuration_Examples
- 21-H3C_SSH_Configuration_Examples
- 22-H3C_Login_Management_Configuration_Examples
- 23-H3C_SNMP_Configuration_Examples
- 24-H3C_Priority_Marking_and_Queue_Scheduling_Configuration_Examples
- 25-H3C_Multicast_VPN_Configuration_Examples
- 26-H3C_BGP_Configuration_Examples
- 27-H3C_HoVPN_Configuration_Examples
- 28-H3C_L2TP_Configuration_Examples
- 29-H3C_VRRP_Configuration_Examples
- 30-H3C_Traffic_Filtering_Configuration_Examples
- 31-H3C_Samplers_and_IPv4_NetStream_Configuration_Examples
- 32-H3C_Software_Upgrade_Examples
- 33-H3C_MPLS_L2VPN_Configuration_Examples
- 34-H3C_NetStream_Configuration_Examples
- 35-H3C_Policy-Based_Routing_Configuration_Examples
- 36-H3C_Traffic_Policing_Configuration_Examples
- 37-H3C_BFD_Configuration_Examples
- 38-H3C_OSPFv3_Configuration_Examples
- 39-H3C_VPLS_Configuration_Examples
- 40-H3C_GTS_and_Rate_Limiting_Configuration_Examples
- 41-H3C_IPv6_IS-IS_Configuration_Examples
- 42-H3C_MPLS OAM_Configuration_Examples
- 43-H3C_BGP_Route_Selection_Configuration_Examples
- 44-H3C_IS-IS_Route_Summarization_Configuration_Examples
- 45-H3C_SRv6 Configuration Examples
- 46-H3C_Attack_Protection_Configuration_Examples
- 47-H3C_OSPF_Multi-Process_Configuration_Examples
- 48-H3C_OSPF_with_Multi-Instance_Configuration_Examples
- 49-H3C_ARP_Attack_Protection_Configuration_Examples
- 50-H3C_DHCPv6_Server_and_DHCPv6_Prefix_Client_Configuration_Examples
- 51-CE1 Interface Connection Configuration Examples
- 52-GRE Tunnel Establishment Using OSPF Configuration Examples
- 53-GRE Tunnel Establishment Using Static Routes Configuration Examples
- 54-OSPF over IPsec for Overseas Branch Access Configuration Examples
- 55-General QoS Configuration Examples
- 56-QoS Configuration Examples for the Financial Industry
- Related Documents
-
Title | Size | Download |
---|---|---|
24-H3C_Priority_Marking_and_Queue_Scheduling_Configuration_Examples | 147.94 KB |
Introduction
This document provides examples for configuring priority marking, 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 marking, priority mapping, and queue scheduling profiles.
Restrictions and guidelines
Marking the DSCP priority, EXP priority, 802.1p priority, local precedence, and drop priority conflicts with the following commands:
· filter deny
· redirect cpu
· primap
Example: Configuring priority marking and queue scheduling
Network configuration
As shown in Figure 1, a company uses dual uplinks to interconnect its headquarters and branches.
The company uses three service types in its intranets:
· Video service—Uses network segment 10.1.0.0/16 (10.1.1.0/24 for the headquarters, 10.1.2.0/24 for branch A, 10.1.3.0/24 for branch B, 10.1.4.0/24 for branch C, 10.1.5.0/24 for branch D, 10.1.6.0/24 for branch E, and 10.1.7.0/24 for branch F).
· Production service—Uses network segment 10.2.0.0/16 (10.2.1.0/24 for the headquarters, 10.2.2.0/24 for branch A, 10.2.3.0/24 for branch B, 10.2.4.0/24 for branch C, 10.2.5.0/24 for branch D, 10.2.6.0/24 for branch E, and 10.2.7.0/24 for branch F).
· Voice service—Uses network segment 10.3.0.0/16 (10.3.1.0/24 for the headquarters, 10.3.2.0/24 for branch A, 10.3.3.0/24 for branch B, 10.3.4.0/24 for branch C, 10.3.5.0/24 for branch D, 10.3.6.0/24 for branch E, and 10.3.7.0/24 for branch F).
Configure priority marking and queue scheduling so the video service, production service, and voice service are scheduled at a ratio of 2:1:1 when congestion occurs.
Analysis
To configure priority marking and queue scheduling, you must perform the following tasks:
· To assign different traffic types to different queues, mark different local precedence values for the service types.
· To schedule the three services at a ratio of 2:1:1, assign their queues to one WRR group and configure weights for these queues.
Procedures
Configuring Device SI
1. Configure a QoS policy on Ten-GigabitEthernet 3/1/3 to assign different traffic types to different queues:
# Create ACL 3000 to match video traffic, and create a behavior to mark the video traffic with local precedence 2.
<DeviceS1> system-view
[DeviceS1] acl advanced 3000
[DeviceS1-acl-ipv4-adv-3000] rule 0 permit ip source 10.1.1.0 0.0.0.255 destination 10.1.0.0 0.0.255.255
[DeviceS1-acl-ipv4-adv-3000] quit
[DeviceS1] traffic classifier video
[DeviceS1-classifier-video] if-match acl 3000
[DeviceS1-classifier-video] quit
[DeviceS1] traffic behavior video
[DeviceS1-behavior-video] remark local-precedence 2
[DeviceS1-behavior-video] quit
# Create ACL 3001 to match production traffic, and create a behavior to mark the production traffic with local precedence 3.
[DeviceS1] acl advanced 3001
[DeviceS1-acl-ipv4-adv-3001] rule 0 permit ip source 10.2.1.0 0.0.0.255 destination 10.2.0.0 0.0.255.255
[DeviceS1-acl-ipv4-adv-3001] quit
[DeviceS1] traffic classifier production
[DeviceS1-classifier-production] if-match acl 3001
[DeviceS1-classifier-production] quit
[DeviceS1] traffic behavior production
[DeviceS1-behavior-production] remark local-precedence 3
[DeviceS1-behavior-production] quit
# Create ACL 3002 to match voice traffic, and create a behavior to mark the voice traffic with local precedence 4.
[DeviceS1] acl advanced 3002
[DeviceS1-acl-ipv4-adv-3002] rule 0 permit ip source 10.3.1.0 0.0.0.255 destination 10.3.0.0 0.0.255.255
[DeviceS1-acl-ipv4-adv-3002] quit
[DeviceS1] traffic classifier voice
[DeviceS1-classifier-voice] if-match acl 3002
[DeviceS1-classifier-voice] quit
[DeviceS1] traffic behavior voice
[DeviceS1-behavior-voice] remark local-precedence 4
[DeviceS1-behavior-voice] quit
# Create a QoS policy named policy1, and associate the three traffic classes with their respective traffic behaviors.
[DeviceS1] qos policy policy1
[DeviceS1-qospolicy-policy1] classifier video behavior video
[DeviceS1-qospolicy-policy1] classifier production behavior production
[DeviceS1-qospolicy-policy1] classifier voice behavior voice
[DeviceS1-qospolicy-policy1] quit
# Apply the QoS policy policy1 to the inbound direction of Ten-GigabitEthernet 3/1/3.
[DeviceS1] interface ten-gigabitethernet 3/1/3
[DeviceS1-Ten-GigabitEthernet3/1/3] qos apply policy policy1 inbound
[DeviceS1-Ten-GigabitEthernet3/1/3] quit
2. Configure a queue scheduling profile on Ten-GigabitEthernet 3/1/1 and Ten-GigabitEthernet 3/1/2:
# Create a queue scheduling profile named qm1 for WRR. Configure the weights of queue 2 (for video traffic), queue 3 (for production traffic), and queue 4 (for voice traffic) as 2, 1, and 1, respectively.
[DeviceS1] qos qmprofile qm1
[DeviceS1-qmprofile-qm1] queue 2 wrr group 1 weight 2
[DeviceS1-qmprofile-qm1] queue 3 wrr group 1 weight 1
[DeviceS1-qmprofile-qm1] queue 4 wrr group 1 weight 1
[DeviceS1-qmprofile-qm1] quit
# Apply the queue scheduling profile qm1 to Ten-GigabitEthernet 3/1/1 and Ten-GigabitEthernet 3/1/2.
[DeviceS1] interface ten-gigabitethernet 3/1/1
[DeviceS1-Ten-GigabitEthernet3/1/1] qos apply qmprofile qm1
[DeviceS1-Ten-GigabitEthernet3/1/1] quit
[DeviceS1] interface ten-gigabitethernet 3/1/2
[DeviceS1-Ten-GigabitEthernet3/1/2] qos apply qmprofile qm1
[DeviceS1-Ten-GigabitEthernet3/1/2] quit
Configuring Device S2
# Configure Device S2 in the same way Device S1 is configured. (Details not shown.)
Configuring Device A1
1. Configure a QoS policy on Ten-GigabitEthernet 3/1/4 to assign different traffic types to different queues:
# Create ACL 3000 to match video traffic, and create a behavior to mark the video traffic with local precedence 2.
<Device A1> system-view
[DeviceA1] acl advanced 3000
[DeviceA1-acl-ipv4-adv-3000] rule 0 permit ip source 10.1.2.0 0.0.0.255 destination 10.1.0.0 0.0.255.255
[DeviceA1-acl-ipv4-adv-3000] quit
[DeviceA1] traffic classifier video
[DeviceA1-classifier-video] if-match acl 3000
[DeviceA1-classifier-video] quit
[DeviceA1] traffic behavior video
[DeviceA1-behavior-video] remark local-precedence 2
[DeviceA1-behavior-video] quit
# Create ACL 3001 to match production traffic, and create a behavior to mark the production traffic with local precedence 3.
[DeviceA1] acl advanced 3001
[DeviceA1-acl-ipv4-adv-3001] rule 0 permit ip source 10.2.2.0 0.0.0.255 destination 10.2.0.0 0.0.255.255
[DeviceA1-acl-ipv4-adv-3001] quit
[DeviceA1] traffic classifier production
[DeviceA1-classifier-production] if-match acl 3001
[DeviceA1-classifier-production] quit
[DeviceA1] traffic behavior production
[DeviceA1-behavior-production] remark local-precedence 3
[DeviceA1-behavior-production] quit
# Create ACL 3002 to match voice traffic, and create a behavior to mark the voice traffic with local precedence 4.
[DeviceA1] acl advanced 3002
[DeviceA1-acl-ipv4-adv-3002] rule 0 permit ip source 10.3.2.0 0.0.0.255 destination 10.3.0.0 0.0.255.255
[DeviceA1-acl-ipv4-adv-3002] quit
[DeviceA1] traffic classifier voice
[DeviceA1-classifier-voice] if-match acl 3002
[DeviceA1-classifier-voice] quit
[DeviceA1] traffic behavior voice
[DeviceA1-behavior-voice] remark local-precedence 4
[DeviceA1-behavior-voice] quit
# Create a QoS policy named policy1, and associate the three classes of traffic with their respective traffic behaviors.
[DeviceA1] qos policy policy1
[DeviceA1-qospolicy-policy1] classifier video behavior video
[DeviceA1-qospolicy-policy1] classifier production behavior production
[DeviceA1-qospolicy-policy1] classifier voice behavior voice
[DeviceA1-qospolicy-policy1] quit
# Apply the QoS policy policy1 to the inbound direction of Ten-GigabitEthernet 3/1/4.
[DeviceA1] interface ten-gigabitethernet 3/1/4
[DeviceA1-Ten-GigabitEthernet3/1/4] qos apply policy policy1 inbound
[DeviceA1-Ten-GigabitEthernet3/1/4] quit
2. Configure a queue scheduling profile on Ten-GigabitEthernet 3/1/1:
# Create a queue scheduling profile named qm1 for WRR. Configure the weights of queue 2 (for video traffic), queue 3 (for production traffic), and queue 4 (for voice traffic) as 2, 1, and 1, respectively.
[DeviceA1] qos qmprofile qm1
[DeviceA1-qmprofile-qm1] queue 2 wrr group 1 weight 2
[DeviceA1-qmprofile-qm1] queue 3 wrr group 1 weight 1
[DeviceA1-qmprofile-qm1] queue 4 wrr group 1 weight 1
[DeviceA1-qmprofile-qm1] quit
# Apply the queue scheduling profile qm1 to Ten-GigabitEthernet 3/1/1.
[DeviceA1] interface ten-gigabitethernet 3/1/1
[DeviceA1-Ten-GigabitEthernet3/1/1] qos apply qmprofile qm1
[DeviceA1-Ten-GigabitEthernet3/1/1] quit
Configuring other devices
# Configure Device A2, Device F1, and Device F2 in the same way Device A1 is configured. (Details not shown.)
Verifying the configuration
Verify the configuration on any device, for example, Device S1.
# Verify the QoS policy applied to Ten-GigabitEthernet 3/1/3.
[DeviceS1] display qos policy interface ten-gigabitethernet 3/1/3
Interface: Ten-GigabitEthernet3/1/3
Direction: Inbound
Policy: policy1
Classifier: video
Operator: AND
Rule(s) :
If-match acl 3000
Behavior: video
Marking:
Remark local-precedence 2
Classifier: production
Operator: AND
Rule(s) :
If-match acl 3001
Behavior: production
Marking:
Remark local-precedence 3
Classifier: voice
Operator: AND
Rule(s) :
If-match acl 3002
Behavior: voice
Marking:
Remark local-precedence 4
# Verify the queue scheduling profiles applied to interfaces.
[DeviceS1] display qos qmprofile interface
Interface: Ten-GigabitEthernet3/1/1
Direction: Outbound
Queue scheduling profile: qm1
Interface: Ten-GigabitEthernet3/1/2
Direction: Outbound
Queue scheduling profile: qm1
Configuration files
· Device S1:
#
traffic classifier production operator and
if-match acl 3001
#
traffic classifier video operator and
if-match acl 3000
#
traffic classifier voice operator and
if-match acl 3002
#
traffic behavior production
remark local-precedence 3
#
traffic behavior video
remark local-precedence 2
#
traffic behavior voice
remark local-precedence 4
#
qos policy policy1
classifier video behavior video
classifier production behavior production
classifier voice behavior voice
#
qos qmprofile qm1
queue af2 wrr group 1 weight 2
queue af3 wrr group 1 weight 1
queue af4 wrr group 1 weight 1
#
interface Ten-GigabitEthernet3/1/1
port link-mode route
qos apply qmprofile qm1
#
interface Ten-GigabitEthernet3/1/2
port link-mode route
qos apply qmprofile qm1
#
interface Ten-GigabitEthernet3/1/3
port link-mode route
qos apply policy policy1 inbound
#
acl advanced 3000
rule 0 permit ip source 10.1.1.0 0.0.0.255 destination 10.1.0.0 0.0.255.255
#
acl advanced 3001
rule 0 permit ip source 10.2.1.0 0.0.0.255 destination 10.2.0.0 0.0.255.255
#
acl advanced 3002
rule 0 permit ip source 10.3.1.0 0.0.0.255 destination 10.3.0.0 0.0.255.255
#
return
· Device S2:
#
traffic classifier production operator and
if-match acl 3001
#
traffic classifier video operator and
if-match acl 3000
#
traffic classifier voice operator and
if-match acl 3002
#
traffic behavior production
remark local-precedence 3
#
traffic behavior video
remark local-precedence 2
#
traffic behavior voice
remark local-precedence 4
#
qos qmprofile qm1
queue af2 wrr group 1 weight 2
queue af3 wrr group 1 weight 1
queue af4 wrr group 1 weight 1
#
qos policy policy1
classifier video behavior video
classifier production behavior production
classifier voice behavior voice
#
interface Ten-GigabitEthernet3/1/1
port link-mode route
qos apply qmprofile qm1
#
interface Ten-GigabitEthernet3/1/2
port link-mode route
qos apply qmprofile qm1
#
interface Ten-GigabitEthernet3/1/3
port link-mode route
qos apply policy policy1 inbound
#
acl advanced 3000
rule 0 permit ip source 10.1.1.0 0.0.0.255 destination 10.1.0.0 0.0.255.255
#
acl advanced 3001
rule 0 permit ip source 10.2.1.0 0.0.0.255 destination 10.2.0.0 0.0.255.255
#
acl advanced 3002
rule 0 permit ip source 10.3.1.0 0.0.0.255 destination 10.3.0.0 0.0.255.255
#
return
· Device A1:
#
traffic classifier production operator and
if-match acl 3001
#
traffic classifier video operator and
if-match acl 3000
#
traffic classifier voice operator and
if-match acl 3002
#
traffic behavior production
remark local-precedence 3
#
traffic behavior video
remark local-precedence 2
#
traffic behavior voice
remark local-precedence 4
#
qos qmprofile qm1
queue af2 wrr group 1 weight 2
queue af3 wrr group 1 weight 1
queue af4 wrr group 1 weight 1
#
qos policy policy1
classifier video behavior video
classifier production behavior production
classifier voice behavior voice
#
interface Ten-GigabitEthernet3/1/1
port link-mode route
qos apply qmprofile qm1
#
interface Ten-GigabitEthernet3/1/4
port link-mode route
qos apply policy policy1 inbound
#
acl advanced 3000
rule 0 permit ip source 10.1.2.0 0.0.0.255 destination 10.1.0.0 0.0.255.255
#
acl advanced 3001
rule 0 permit ip source 10.2.2.0 0.0.0.255 destination 10.2.0.0 0.0.255.255
#
acl advanced 3002
rule 0 permit ip source 10.3.2.0 0.0.0.255 destination 10.3.0.0 0.0.255.255
#
return
· Device A2:
#
traffic classifier production operator and
if-match acl 3001
#
traffic classifier video operator and
if-match acl 3000
#
traffic classifier voice operator and
if-match acl 3002
#
traffic behavior production
remark local-precedence 3
#
traffic behavior video
remark local-precedence 2
#
traffic behavior voice
remark local-precedence 4
#
qos qmprofile qm1
queue af2 wrr group 1 weight 2
queue af3 wrr group 1 weight 1
queue af4 wrr group 1 weight 1
#
qos policy policy1
classifier video behavior video
classifier production behavior production
classifier voice behavior voice
#
interface Ten-GigabitEthernet3/1/1
port link-mode route
qos apply qmprofile qm1
#
interface Ten-GigabitEthernet3/1/4
port link-mode route
qos apply policy policy1 inbound
#
acl advanced 3000
rule 0 permit ip source 10.1.2.0 0.0.0.255 destination 10.1.0.0 0.0.255.255
#
acl advanced 3001
rule 0 permit ip source 10.2.2.0 0.0.0.255 destination 10.2.0.0 0.0.255.255
#
acl advanced 3002
rule 0 permit ip source 10.3.2.0 0.0.0.255 destination 10.3.0.0 0.0.255.255
#
return
· Device F1:
#
traffic classifier production operator and
if-match acl 3001
#
traffic classifier video operator and
if-match acl 3000
#
traffic classifier voice operator and
if-match acl 3002
#
traffic behavior production
remark local-precedence 3
#
traffic behavior video
remark local-precedence 2
#
traffic behavior voice
remark local-precedence 4
#
qos qmprofile qm1
queue af2 wrr group 1 weight 2
queue af3 wrr group 1 weight 1
queue af4 wrr group 1 weight 1
#
qos policy policy1
classifier video behavior video
classifier production behavior production
classifier voice behavior voice
#
interface Ten-GigabitEthernet3/1/1
port link-mode route
qos apply qmprofile qm1
#
interface Ten-GigabitEthernet3/1/4
port link-mode route
qos apply policy policy1 inbound
#
acl advanced 3000
rule 0 permit ip source 10.1.7.0 0.0.0.255 destination 10.1.0.0 0.0.255.255
#
acl advanced 3001
rule 0 permit ip source 10.2.7.0 0.0.0.255 destination 10.2.0.0 0.0.255.255
#
acl advanced 3002
rule 0 permit ip source 10.3.7.0 0.0.0.255 destination 10.3.0.0 0.0.255.255
#
return
· Device F2:
#
traffic classifier production operator and
if-match acl 3001
#
traffic classifier video operator and
if-match acl 3000
#
traffic classifier voice operator and
if-match acl 3002
#
traffic behavior production
remark local-precedence 3
#
traffic behavior video
remark local-precedence 2
#
traffic behavior voice
remark local-precedence 4
#
qos qmprofile qm1
queue af2 wrr group 1 weight 2
queue af3 wrr group 1 weight 1
queue af4 wrr group 1 weight 1
#
qos policy policy1
classifier video behavior video
classifier production behavior production
classifier voice behavior voice
#
interface Ten-GigabitEthernet3/1/1
port link-mode route
qos apply qmprofile qm1
#
interface Ten-GigabitEthernet3/1/4
port link-mode route
qos apply policy policy1 inbound
#
acl advanced 3000
rule 0 permit ip source 10.1.7.0 0.0.0.255 destination 10.1.0.0 0.0.255.255
#
acl advanced 3001
rule 0 permit ip source 10.2.7.0 0.0.0.255 destination 10.2.0.0 0.0.255.255
#
acl advanced 3002
rule 0 permit ip source 10.3.7.0 0.0.0.255 destination 10.3.0.0 0.0.255.255
#
return
Related documentation
· H3C CR16000-F Routers ACL and QoS Configuration Guide
· H3C CR16000-F Routers ACL and QoS Command Reference