HQoS Configuration
HQoS Configuration
Section titled “HQoS Configuration”show hqos-profile {all|single hqos-profile-name }
Section titled “show hqos-profile {all|single hqos-profile-name }”[Command]
show hqos-profile {all|single hqos-profile-name }
[Purpose]
View HQoS Configuration Information
[View]
System view
[Notes]
Use this command to view all HQoS information
[Use Cases]
sonic# show hqos-profile allshow hqos-user-group-profile {all|single hqos-user-group-profile-name |stats hqos-user-group-profile-name }
Section titled “show hqos-user-group-profile {all|single hqos-user-group-profile-name |stats hqos-user-group-profile-name }”[Command]
show hqos-user-group-profile {all|single hqos-user-group-profile-name |stats hqos-user-group-profile-name }
[Purpose]
View HQoS user group configuration and real-time traffic status
[View]
System view
[Notes]
Using this command to view all HQoS user group information. Real-time traffic status can be viewed when traffic exists within the user group
[Use Cases]
sonic# show hqos-user-group-profile allshow hqos-user-profile {all|single hqos-user-profile-name |stats hqos-user-profile-name}
Section titled “show hqos-user-profile {all|single hqos-user-profile-name |stats hqos-user-profile-name}”[Command]
show hqos-user-profile {all|single hqos-user-profile-name |stats hqos-user-profile-name }
[Purpose]
View HQoS user configuration and real-time traffic status
[View]
System view
[Notes]
Using this command to view all HQoS user information. Real-time traffic status can be viewed when traffic exists within the user
[Use Cases]
sonic# show hqos-user-profile allhqos enable
Section titled “hqos enable”[Command]
hqos enable
[Purpose]
Globally enable the HQoS function
[View]
System configuration view
[Use Cases]
sonic(config)# hqos enablehqos-profile name
Section titled “hqos-profile name”[Command]
hqos-profile name
[Purpose]
Create HQoS configuration
[Parameter]
| Parameter | Description |
|---|---|
| name | HQoS configuration file name |
[View]
System configuration view
[Use Cases]
sonic(config)# hqos-profile test1global rate byte/s
Section titled “global rate byte/s”[Command]
global rate byte/s
[Purpose]
Configure global rate limiting
[Parameter]
| Parameter | Description |
|---|---|
| byte/s | Rate limit speed, unit: byte/s |
[View]
hqos-profile configuration view
[Use Cases]
sonic(config)# hqos-profile test1sonic(config-hqos-test1)# global rate 125000000user-group-profile {fuzzymatch user-group-name |postmatch user-group-name |prematch user-group-name | user-group-name } {shaping pir byte/s pbs bytes }
Section titled “user-group-profile {fuzzymatch user-group-name |postmatch user-group-name |prematch user-group-name | user-group-name } {shaping pir byte/s pbs bytes }”[Command]
user-group-profile {fuzzymatch user-group-name |postmatch user-group-name |prematch user-group-name | user-group-name } {shaping pir byte/s pbs bytes }
[Purpose]
Bind user group configuration in HQoS setup, with independent rate limiting capability
[Parameter]
| Parameter | Description |
|---|---|
| user-group-name | User group name |
| byte/s | Rate limit speed, unit: byte/s |
[View]
hqos-profile configuration view
[Notes]
Custom user groups must be created prior to binding
[Use Cases]
sonic(config)# hqos-profile test1sonic(config-hqos-test1)# user-group-profile test1 shaping pir 2000000 pbs 1000000user-profile {fuzzymatch user-name |postmatch user-name |prematch user-name | user-name } {shaping pir byte/s pbs bytes }
Section titled “user-profile {fuzzymatch user-name |postmatch user-name |prematch user-name | user-name } {shaping pir byte/s pbs bytes }”[Command]
user-profile {fuzzymatch user-name |postmatch user-name |prematch user-name | user-name } {shaping pir byte/s pbs bytes }
[Purpose]
Bind a user configuration in the HQoS setup, with independent rate limiting capability
[Parameter]
| Parameter | Description |
|---|---|
| user-name | Username |
| byte/s | Rate limit speed, unit: byte/s |
[View]
hqos-profile configuration view
[Notes]
Custom users must be created prior to binding
[Use Cases]
sonic(config)# hqos-profile test1sonic(config-hqos-test1)# user-profile test1 shaping pir 2000000 pbs 1000000default-group-profile shaping pir byte/s pbs bytes
Section titled “default-group-profile shaping pir byte/s pbs bytes”[Command]
default-group-profile shaping pir byte/s pbs bytes
[Purpose]
Configure independent rate limiting for the default user group within the HQoS setup
[Parameter]
| Parameter | Description |
|---|---|
| byte/s | Rate limit speed, unit: byte/s |
[View]
hqos-profile configuration view
[Notes]
When a user is not bound to a custom user group, that user belongs to the default user group
[Use Cases]
sonic(config)# hqos-profile test1sonic(config-hqos-test1)# default-group-profile shaping pir 2000000 pbs 1000000default-user-profile shaping pir byte/s pbs bytes
Section titled “default-user-profile shaping pir byte/s pbs bytes”[Command]
default-user-profile shaping pir byte/s pbs bytes
[Purpose]
Configure independent rate limiting for the default user within the HQoS setup
[Parameter]
| Parameter | Description |
|---|---|
| byte/s | Rate limit speed, unit: byte/s |
[View]
hqos-profile configuration view
[Notes]
If a user is not bound to a custom user, they belong to the default user
[Use Cases]
sonic(config)# hqos-profile test1sonic(config-hqos-test1)# default-user-profile shaping pir 2000000 pbs 1000000hqos-user-group-profile name
Section titled “hqos-user-group-profile name”[Command]
hqos-user-group-profile name
[Purpose]
Create a custom user group
[Parameter]
| Parameter | Description |
|---|---|
| name | Custom user group name |
[View]
System configuration view
[Use Cases]
sonic(config)# hqos-user-group-profile test1counter-enable
Section titled “counter-enable”[Command]
counter-enable
[Purpose]
enable statistics
[View]
Hqos user group view
[Use Cases]
sonic(config)# hqos-user-group-profile test1sonic(config-group-test1)# counter-enableauto-user-by-ip-pool ip-pool-name
Section titled “auto-user-by-ip-pool ip-pool-name”[Command]
auto-user-by-ip-pool ip-pool-name
[Purpose]
Create custom users in batch based on IP pool
[Parameter]
| Parameter | Description |
|---|---|
| ip-pool-name | IP address pool name |
[View]
Hqos user group view
[Use Cases]
sonic(config)# hqos-user-group-profile test1sonic(config-group-test1)# auto-user-by-ip-pool testuser-profile {fuzzymatch user-name |postmatch user-name |prematch user-name | user-name} {shaping pir byte/s pbs bytes}
Section titled “user-profile {fuzzymatch user-name |postmatch user-name |prematch user-name | user-name} {shaping pir byte/s pbs bytes}”[Command]
user-profile {fuzzymatch user-name |postmatch user-name |prematch user-name | user-name } {shaping pir byte/s pbs bytes }
[Purpose]
Bind a user configuration within the custom user group, with independent rate limiting capability
[Parameter]
| Parameter | Description |
|---|---|
| user-name | Username |
| byte/s | Rate limit speed, unit: byte/s |
[View]
Custom user group configuration view
[Notes]
Custom users must be created prior to binding
[Use Cases]
sonic(config)# hqos-user-group-profile test1sonic(config-group-test1)# user-profile test1 shaping pir 2000000 pbs 1000000qos-map bind dscp_to_tc qos-map-name
Section titled “qos-map bind dscp_to_tc qos-map-name”[Command]
qos-map bind dscp_to_tc qos-map-name
[Purpose]
Bind a DSCP-based priority mapping relationship within the custom user group
[Parameter]
| Parameter | Description |
|---|---|
| qos-map-name | DSCP priority mapping table |
[View]
Custom user group configuration view
[Notes]
The DSCP-based priority mapping table must be created prior to binding
[Use Cases]
sonic(config)# hqos-user-group-profile test1sonic(config-group-test1)# qos-map bind dscp_to_tc dscp1hqos-user-profile name
Section titled “hqos-user-profile name”[Command]
hqos-user-profile name
[Purpose]
Create a custom user
[Parameter]
| Parameter | Description |
|---|---|
| name | Custom username |
[View]
System configuration view
[Notes]
The specific characteristics of a user can be configured via ACL, and the set-hqos-user field is used within the ACL to associate with a custom user
[Use Cases]
sonic(config)# hqos-user-profile test1tc-queue sequence-number mode strict|dwrr {shaping pir byte/s pbs bytes}
Section titled “tc-queue sequence-number mode strict|dwrr {shaping pir byte/s pbs bytes}”[Command]
tc-queue sequence-number mode strict|dwrr {shaping pir byte/s pbs bytes }
[Purpose]
Configure the TC scheduling mode within the custom user, with independent rate limiting capability for the TC
[Parameter]
| Parameter | Description |
|---|---|
| sequence-number | TC index: 0–7 |
| byte/s | Rate limit speed, unit: byte/s |
[View]
Custom user configuration view
[Use Cases]
sonic(config)# hqos-user-profile test1 test1sonic(config-user-test1)# tc-queue 1 mode strict shaping pir 20000000 pbs 1000000qos-map bind dscp_to_tc qos-map-name
Section titled “qos-map bind dscp_to_tc qos-map-name”[Command]
qos-map bind dscp_to_tc qos-map-name
[Purpose]
Bind a DSCP-based priority mapping relationship within the custom user
[Parameter]
| Parameter | Description |
|---|---|
| qos-map-name | DSCP priority mapping table |
[View]
Custom user configuration view
[Notes]
The DSCP-based priority mapping table must be created prior to binding
[Use Cases]
sonic(config)# hqos-user-profile test1sonic(config-user-test1)# qos-map bind dscp_to_tc dscp1hqos-profile name {shared|offload}
Section titled “hqos-profile name {shared|offload}”[Command]
hqos-profile name {shared|offload}
[Purpose]
Bind the HQoS configuration file to the traffic egress interface
[Parameter]
| Parameter | Description |
|---|---|
| name | HQoS configuration file name |
[View]
Interface view
[Notes]
The mode parameter can be omitted during configuration; by default, it operates in normal mode, where each port functions independently. In shared mode, all interfaces bound to this HQoS configuration file share the rate limit specified in the configuration
[Use Cases]
sonic(config)# interface ethernet 1sonic(config-if-1)# hqos-profile test1