- Table of Contents
-
- 02-Configuration Examples
- 01-H3C_AAA_Configuration_Examples
- 02-H3C_ACL_Configuration_Examples
- 03-H3C_IGMP_Configuration_Examples
- 04-H3C_IP_Source_Guard_Configuration_Examples
- 05-H3C_Ethernet_OAM_Configuration_Examples
- 06-H3C_NQA_Configuration_Examples
- 07-H3C_QinQ_Configuration_Examples
- 08-H3C_OSPF_Configuration_Examples
- 09-H3C_MPLS_TE_Configuration_Examples
- 10-H3C_OpenFlow_Configuration_Examples
- 11-H3C_NAT_Configuration_Examples
- 12-H3C_RBAC_Configuration_Examples
- 13-H3C_DHCP_Relay_Redundancy_Configuration_Examples
- 14-H3C_DLDP_Configuration_Examples
- 15-H3C_IS-IS_Configuration_Examples
- 16-H3C_MPLS_L3VPN_Configuration_Examples
- 17-H3C_SSH_Configuration_Examples
- 18-H3C_Login_Management_Configuration_Examples
- 19-H3C_SNMP_Configuration_Examples
- 20-H3C_Priority_Marking_and_Queue_Scheduling_Configuration_Examples
- 21-H3C_Multicast_VPN_Configuration_Examples
- 22-H3C_BGP_Configuration_Examples
- 23-H3C_HoVPN_Configuration_Examples
- 24-H3C_L2TP_Configuration_Examples
- 25-H3C_VRRP_Configuration_Examples
- 26-H3C_Traffic_Filtering_Configuration_Examples
- 27-H3C_Samplers_and_IPv4_NetStream_Configuration_Examples
- 28-H3C_MPLS_L2VPN_Configuration_Examples
- 29-H3C_NetStream_Configuration_Examples
- 30-H3C_Policy-Based_Routing_Configuration_Examples
- 31-H3C_Traffic_Policing_Configuration_Examples
- 32-H3C_BFD_Configuration_Examples
- 33-H3C_OSPFv3_Configuration_Examples
- 34-H3C_VPLS_Configuration_Examples
- 35-H3C_GTS_and_Rate_Limiting_Configuration_Examples
- 36-H3C_IPv6_IS-IS_Configuration_Examples
- 37-H3C_MPLS OAM_Configuration_Examples
- 38-H3C_BGP_Route_Selection_Configuration_Examples
- 39-H3C_IS-IS_Route_Summarization_Configuration_Examples
- 40-H3C_SRv6 Configuration Examples
- 41-H3C_Attack_Protection_Configuration_Examples
- 42-H3C_OSPF_Multi-Process_Configuration_Examples
- 43-H3C_OSPF_with_Multi-Instance_Configuration_Examples
- 44-H3C_ARP_Attack_Protection_Configuration_Examples
- 45-H3C_DHCPv6_Server_and_DHCPv6_Prefix_Client_Configuration_Examples
- 46-General QoS Configuration Examples
- 47-GRE Tunnel Establishment Using OSPF Configuration Examples
- 48-GRE Tunnel Establishment Using Static Routes Configuration Examples
- 49-QoS Configuration Examples for the Financial Industry
- Related Documents
-
Title | Size | Download |
---|---|---|
46-General QoS Configuration Examples | 105.30 KB |
Example: Configuring QoS redirection in a dual-egress scenario
Example: Configuring QoS congestion management and congestion avoidance
Example: Configuring QoS redirection in a dual-egress scenario
Network configuration
As shown in Figure 1, Device A is connected to the intranet via XGE0/0/15 and to the Internet via XGE0/0/16 and XGE0/0/17. By default, traffic from the intranet goes through XGE0/0/17 to access the Internet. For the traffic from the server to enter the public network through XGE0/0/16 and the other traffic to enter the public network through XGE0/0/17, configure a QoS policy containing traffic redirection actions on Device A.
Figure 1 Dual-port QoS redirection
Device |
Interface |
IP address |
Device A |
XGE0/0/15 |
10.1.99.9/30 |
|
XGE0/0/16 |
10.1.99.1/30 |
|
XGE0/0/17 |
10.1.99.5/30 |
Prerequisites
Configure the IP addresses of the interfaces on Device A.
Procedure
Configuring Device A
# Configure two static default routes on Device A, directing the traffic to the public network through XGE0/0/17 by default. Adjust the priority of the static default route for XGE0/0/16 to the public network to a lower priority.
<Device A> system-view
[Device A] ip route-static 0.0.0.0 0 10.1.99.6
[Device A] ip route-static 0.0.0.0 0 10.1.99.2 preference 80
# Configure ACL 3001 to match the traffic from the server to other devices in the internal network, and configure ACL 3002 to match the traffic with the source address as the server IP address.
[Device A] acl advanced 3001
[Device A-acl-ipv4-adv-3001] rule permit ip source 10.1.40.0 0.0.0.255 destination 10.
1.40.0 0.0.0.255
[Device A-acl-ipv4-adv-3001] rule permit ip source 10.1.40.0 0.0.0.255 destination 10.
1.41.0 0.0.0.255
[Device A-acl-ipv4-adv-3001] rule permit ip source 10.1.40.0 0.0.0.255 destination 10.
1.42.0 0.0.0.255
[Device A-acl-ipv4-adv-3001] quit
[Device A] acl advanced 3002
[Device A-acl-ipv4-adv-3002] rule permit ip source 10.1.40.0 0.0.0.255
[Device A-acl-ipv4-adv-3002] quit
# Configure QoS policies, allowing normal forwarding of traffic from the server to other devices in the internal network, and redirecting traffic from the server to the public network to the IP address of XGE0/0/16.
[Device A] traffic classifier c1
[Device A-classifier-c1] if-match acl 3001
[Device A-classifier-c1] quit
[Device A] traffic classifier c2
[Device A-classifier-c2] if-match acl 3002
[Device A-classifier-c2] quit
[Device A] traffic behavior b1
[Device A-behavior-b1] filter permit
[Device A-behavior-b1] quit
[Device A] traffic behavior b2
[Device A-behavior-b2] redirect next-hop 10.1.99.2
[Device A-behavior-b2] quit
[Device A] qos policy p1
[Device A-qospolicy-p1] classifier c1 behavior b1
[Device A-qospolicy-p1] classifier c2 behavior b2
[Device A-qospolicy-p1] quit
# Apply the QoS policy to the inbound direction of XGE0/0/15.
[Device A] interface ten-gigabitethernet 0/0/15
[Device A-Ten-GigabitEthernet0/0/15] qos apply policy p1 inbound
[Device A-Ten-GigabitEthernet0/0/15] quit
Verifying the configuration
# Use the display qos policy user-defined command to display the configuration of the QoS policy applied to the interface. The traffic redirecting action is in effect.
[Device A] display qos policy interface GigabitEthernet 1/0/1
Interface: Ten-GigabitEthernet0/0/15
Direction: Inbound
Policy: p1
Classifier: c1
Operator: AND
Rule(s) :
If-match acl 3001
Behavior: b1
Filter enable: Permit
Classifier: c2
Operator: AND
Rule(s) :
If-match acl 3002
Behavior: b2
Redirecting:
Redirect to next-hop 10.1.99.2 (active)
Configuration files
· Device A:
traffic classifier c1 operator and
if-match acl 3001
#
traffic classifier c2 operator and
if-match acl 3002
#
traffic behavior b1
filter permit
#
traffic behavior b2
redirect next-hop 10.1.99.2
#
qos policy p1
classifier c1 behavior b1
classifier c2 behavior b2
#
interface Ten-GigabitEthernet0/0/15
port link-mode route
ip address 10.1.99.9 255.255.255.252
#
interface Ten-GigabitEthernet0/0/16
port link-mode route
ip address 10.1.99.1 255.255.255.252
#
interface Ten-GigabitEthernet0/0/17
port link-mode route
ip address 10.1.99.5 255.255.255.252
#
#
ip route-static 0.0.0.0 0 10.1.99.2 preference 80
ip route-static 0.0.0.0 0 10.1.99.6
#
acl advanced 3001
rule 5 permit ip source 10.1.40.0 0.0.0.255 destination 10.1.41.0 0.0.0.255
rule 10 permit ip source 10.1.40.0 0.0.0.255 destination 10.1.40.0 0.0.0.255
rule 15 permit ip source 10.1.40.0 0.0.0.255 destination 10.1.42.0 0.0.0.255
#
acl advanced 3002
rule 5 permit ip source 10.1.40.0 0.0.0.255
#
Example: Configuring QoS congestion management and congestion avoidance
Network configuration
As shown in Figure 2, the server, the telephone, PC 1, and PC 2 send data to the network through Device A. The server sends critical business data, the telephone sends voice data, and PC 1 and PC 2 send non-critical business data. Device A's ingress interfaces include not only XGE0/0/15 but also other GE interfaces, while XGE0/0/16 is the only egress interface. The flow rate in the inbound direction is higher than the rate on the XGE0/0/16 interface, and congestion might occur at the XGE0/0/16 interface.
Ensure that business data sent by the server and telephone receive priority during network congestion, with the telephone guaranteed a bandwidth of 5 Mbps and the server guaranteed a bandwidth of 10 Mbps. PC 1 and PC 2 cannot be "starved" and also need to be serviced during the transmission process, so the WRR method is used to schedule their services. When congestion occurs at the XGE0/0/16 interface, discard packets based on WRED drop probability.
Figure 2 QoS congestion management and congestion avoidance network topology
Device |
Interface |
IP address |
Device A |
XGE0/0/15 |
10.1.1.1/24 |
|
XGE0/0/16 |
10.10.1.1/24 |
Prerequisites
Configure the IP addresses of the interfaces on Device A.
Procedure
Configuring Device A
# Configure ACL 3001 to match traffic from the telephone, configure ACL 3002 to match traffic from the server, configure ACL 3003 to match traffic from PC 1, and configure ACL 3004 to match traffic from PC 2.
[Device A] acl advanced 3001
[Device A-acl-ipv4-adv-3001] rule permit ip source 10.1.1.3 0.0.0.0
[Device A-acl-ipv4-adv-3001] quit
[Device A] acl advanced 3002
[Device A-acl-ipv4-adv-3002] rule permit ip source 10.1.1.2 0.0.0.0
[Device A-acl-ipv4-adv-3002] quit
[Device A] acl advanced 3003
[Device A-acl-ipv4-adv-3003] rule permit ip source 10.1.1.4 0.0.0.0
[Device A-acl-ipv4-adv-3003] quit
[Device A] acl advanced 3004
[Device A-acl-ipv4-adv-3004] rule permit ip source 10.1.1.5 0.0.0.0
[Device A-acl-ipv4-adv-3004] quit
# Configure QoS policies to mark the local precedence of traffic from the telephone, the server, PC 1, and PC 2, map traffic to different queues based on the local precedence values.
[Device A] traffic classifier Telephone
[Device A-classifier-Telephone] if-match acl 3001
[Device A-classifier-Telephone] quit
[Device A] traffic classifier Server
[Device A-classifier-Server] if-match acl 3002
[Device A-classifier-Server] quit
[Device A] traffic classifier PC1
[Device A-classifier-PC1] if-match acl 3003
[Device A-classifier-PC1] quit
[Device A] traffic classifier PC2
[Device A-classifier-PC2] if-match acl 3004
[Device A-classifier-PC2] quit
[Device A] traffic behavior Telephone
[Device A-behavior-Telephone] remark local-precedence 5
[Device A-behavior-Telephone] quit
[Device A] traffic behavior Server
[Device A-behavior-Server] remark local-precedence 4
[Device A-behavior-Server] quit
[Device A] traffic behavior PC1
[Device A-behavior-PC1] remark local-precedence 3
[Device A-behavior-PC1] quit
[Device A] traffic behavior PC2
[Device A-behavior-PC2] remark local-precedence 2
[Device A-behavior-PC2] quit
[Device A] qos policy p1
[Device A-qospolicy-p1] classifier Telephone behavior Telephone
[Device A-qospolicy-p1] classifier Server behavior Server
[Device A-qospolicy-p1] classifier PC1 behavior PC1
[Device A-qospolicy-p1] classifier PC2 behavior PC2
[Device A-qospolicy-p1] quit
# Apply the QoS policy to the inbound direction of XGE0/0/15.
[Device A] interface ten-gigabitethernet 0/0/15
[Device A-Ten-GigabitEthernet0/0/15] qos apply policy p1 inbound
[Device A-Ten-GigabitEthernet0/0/15] quit
# Configure a WRED profile to drop congested packets according to the parameters of the WRED profile.
[Device A] qos wred-profile aaa
[Device A-wred-profile-aaa] queue drop-level 0 limit-percent low-limit 70 high-limit 100 discard-probability 100
[Device A-wred-profile-aaa] queue drop-level 1 limit-percent low-limit 60 high-limit 90 discard-probability 100
[Device A-wred-profile-aaa] queue drop-level 2 limit-percent low-limit 50 high-limit 80 discard-probability 100
[Device A-wred-profile-aaa] quit
# Configure a queue scheduling profile. Use SP for the traffic from the telephone, with a minimum guaranteed bandwidth of 5 Mbps. Use SP for the traffic from the server, with a minimum guaranteed bandwidth of 10 Mbps. Use WRR for the traffic from PC 1, with a scheduling weight of 20. Use WRR for the traffic from PC 2, with a scheduling weight of 10.
[Device A] qos qmprofile aaa
[Device A-qmprofile-aaa] queue ef sp wred-profile aaa
[Device A-qmprofile-aaa] bandwidth queue ef min 5000
[Device A-qmprofile-aaa] queue af4 sp wred-profile aaa
[Device A-qmprofile-aaa] bandwidth queue af4 min 10000
[Device A-qmprofile-aaa] queue af3 wrr group 1 weight 20 wred-profile aaa
[Device A-qmprofile-aaa] queue af2 wrr group 1 weight 10 wred-profile aaa
[Device A-qmprofile-aaa] quit
# Configure a user profile to limit the total outbound traffic rate to 100 Mbps and to use the queue scheduling profile.
[Device A] user-profile aaa
[Device A-user-profile-aaa] qos user-queue cir 100000 pir 100000 qmprofile aaa outbound
# Apply the user profile to the outbound direction of XGE0/0/16.
[Device A] interface ten-gigabitethernet 0/0/16
[Device A-Ten-GigabitEthernet0/0/16] qos apply user-profile aaa outbound
[Device A-Ten-GigabitEthernet0/0/16] quit
Verifying the configuration
# Execute the display user-profile interface command to verify the configuration, state, and traffic policing information for the user profile applied. The output shows that the rate limit configuration and the queue scheduling profile both take effect.
[Device A] display user-profile interface outbound
Interface: Ten-GigabitEthernet0/0/16
Direction: Outbound
User Profile: aaa
User queue:
Limit Rate(active):
CIR 100000 (kbps), CBS 6250000 (Bytes), EBS 0 (Bytes), PIR 100000 (kbps)
QMProfile(active):
aaa
# Use the display qos policy interface command to display the configuration of the QoS policy applied to the interface.
[Device A] display qos policy interface inbound
Interface: Ten-GigabitEthernet0/0/15
Direction: Inbound
Policy: p1
Classifier: Telephone
Operator: AND
Rule(s) :
If-match acl 3001
Behavior: Telephone
Marking:
Remark local-precedence 5
Classifier: Server
Operator: AND
Rule(s) :
If-match acl 3002
Behavior: Server
Marking:
Remark local-precedence 4
Classifier: PC1
Operator: AND
Rule(s) :
If-match acl 3003
Behavior: PC1
Marking:
Remark local-precedence 3
Classifier: PC2
Operator: AND
Rule(s) :
If-match acl 3004
Behavior: PC2
Marking:
Remark local-precedence 2
Configuration files
· Device A:
#
qos wred-profile aaa
queue drop-level 0 limit-percent low-limit 70 high-limit 100 discard-probability 100
queue drop-level 1 limit-percent low-limit 60 high-limit 90 discard-probability 100
queue drop-level 2 limit-percent low-limit 50 high-limit 80 discard-probability 100
#
qos qmprofile aaa
queue af2 wrr group 1 weight 10 wred-profile aaa
queue af3 wrr group 1 weight 20 wred-profile aaa
queue af4 sp wred-profile aaa
queue ef sp wred-profile aaa
bandwidth queue af4 min 10000
bandwidth queue ef min 5000
#
traffic classifier Telephone operator and
if-match acl 3001
#
traffic classifier Server operator and
if-match acl 3002
#
traffic classifier PC1 operator and
if-match acl 3003
#
traffic classifier PC2 operator and
if-match acl 3004
#
traffic behavior Telephone
remark local-precedence 5
#
traffic behavior Server
remark local-precedence 4
#
traffic behavior PC1
remark local-precedence 3
#
traffic behavior PC2
remark local-precedence 2
#
qos policy p1
classifier Telephone behavior Telephone
classifier Server behavior Server
classifier PC1 behavior PC1
classifier PC2 behavior PC2
#
user-profile aaa
qos user-queue cir 100000 cbs 6250000 pir 100000 ebs 0 qmprofile aaa outbound
#
interface Ten-GigabitEthernet0/0/15
port link-mode route
ip address 10.1.1.1 255.255.255.0
qos apply policy p1 inbound
#
interface Ten-GigabitEthernet0/0/16
port link-mode route
ip address 10.10.1.1 255.255.255.0
qos apply user-profile aaa outbound
#
acl advanced 3001
rule 5 permit ip source 10.1.1.3 0
acl advanced 3002
rule 5 permit ip source 10.1.1.2 0
acl advanced 3003
rule 5 permit ip source 10.1.1.4 0
acl advanced 3004
rule 5 permit ip source 10.1.1.5 0
#