Configuration Guide
HQoS Configuration Guide
11 min
introduction introduction hqos (hierarchical quality of service) is an advanced traffic management mechanism by employing multi level queue scheduling and shaping strategies, it enables granular bandwidth control and priority assurance for complex network traffic this optimizes bandwidth utilization efficiency and ensures the service quality of critical applications (such as voice, video, etc ) traditional qos technologies typically manage traffic at a single network node or interface in contrast, hqos introduces the hierarchical concept, allowing for nested traffic management across multiple dimensions simultaneously (e g , the overall link, user groups, individual users, and different service types within a user) this makes hqos particularly well suited for network environments with diverse application scenarios hqos configuraton hqos configuraton global hqos switch global hqos switch operation command description enter the system configuration view configure globally enable hqos hqos enable create a global hqos configuration create a global hqos configuration operation command description enter the system configuration view configure create a global hqos configuration hqos profile name the following configurations are performed within the global hqos configuration view configure global rate limiting global rate byte/s unit byte/s bind custom user groups user group profile {fuzzymatch user group name |postmatch user group name |prematch user group name | user group name } {shaping pir byte/s pbs bytes } supports batch binding of user groups using the following match modes\ fuzzymatch fuzzy match; postmatch post match; prematch pre match; individual rate limiting can be configured for user groups bind custom users user profile {fuzzymatch user name |postmatch user name |prematch user name | user name } {shaping pir byte/s pbs bytes } supports batch binding of users using the following match modes\ fuzzymatch fuzzy match; postmatch post match; prematch pre match; individual rate limiting can be configured for users configure rate limiting for the default user group default group profile shaping pir byte/s pbs bytes users not bound to any custom user group belong to the default user group configure rate limiting for the default user default user profile shaping pir byte/s pbs bytes users that are not custom users belong to the default user create custom user group configuration create custom user group configuration operation command description enter the system configuration view configure create custom user groups hqos user group profile name the following configurations are performed within the custom user group view bind custom users user profile {fuzzymatch user name |postmatch user name |prematch user name | user name } {shaping pir byte/s pbs bytes } supports batch binding of users using the following match modes\ fuzzymatch fuzzy match; postmatch post match; prematch pre match; individual rate limiting can be configured for users bind dscp type priority mapping relationships qos map bind dscp to tc qos map name note that the dscp type priority mapping table must be created before binding create custom user configuration create custom user configuration operation command description enter the system configuration view configure create custom user hqos user profile name the following configurations are performed within the custom user view configure tc scheduling mode and rate limiting tc queue sequence number mode strict|dwrr {shaping pir byte/s pbs bytes } bind dscp type priority mapping relationships qos map bind dscp to tc qos map name note that the dscp type priority mapping table must be created before binding create custom user configuration create custom user configuration operation command description enter the interface view interface ethernet interface id bind the hqos configuration on the interface hqos profile name {shared|offload} by default, the normal mode is used, meaning each port operates independently in shared mode, all interfaces bound to this hqos configuration file share the rate limit specified in the configuration example of hqos configuration example of hqos configuration network requirements the company's total egress bandwidth is 800 mbps departments a and b under the company are allocated 400 mbps each within department a, video conferencing traffic requires priority scheduling and is guaranteed 100 mbps of bandwidth procedure 1 enable the hqos function sonic(config)# hqos enable 2 create users for department a and department b sonic(config)# hqos user profile a sonic(config user a)# exit sonic(config)# hqos user profile b sonic(config user b)# exit sonic(config)# access list l3 a ingress sonic(config l3 acl a)# rule 1 src ip 1 1 1 1/24 set hqos user a packet action permit sonic(config l3 acl a)# exit sonic(config)# access list l3 b ingress sonic(config l3 acl b)# rule 1 src ip 2 1 1 1/24 set hqos user b packet action permit 3 create user groups for both departments and configure rate limiting for each department sonic(config)# hqos user group profile a sonic(config group a)# user profile a shaping pir 400000000 pbs 1000000 sonic(config group a)# exit sonic(config)# hqos user group profile b sonic(config group b)# user profile b shaping pir 400000000 pbs 1000000 sonic(config group b)# exit 4 configure priority scheduling and bandwidth guarantee for the video conferencing traffic in department a sonic(config)# qos map dscp to tc dscp 46 1 sonic(config)# hqos user profile a sonic(config user a)# tc queue 1 mode strict shaping pir 100000000 pbs 1000000 sonic(config user a)# exit 5 create a global hqos configuration and bind the user groups to it sonic(config)# hqos profile test sonic(config hqos test)# user group profile a sonic(config hqos test)# user group profile b 6 apply the configuration to the port sonic(config)# interface ethernet 1 sonic(config if 1)# hqos profile test sonic(config if 1)# interface ethernet 2 sonic(config if 2)# acl a priority 1 sonic(config if 2)# interface ethernet 3 sonic(config if 3)# acl b priority 2
