Skip to content
Ask AI

HQoS Configuration

[Command] show hqos-profile {all|singlehqos-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 all

[Command] show hqos-user-group-profile {all|singlehqos-user-group-profile-name**|statshqos-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 all

[Command] show hqos-user-profile {all|singlehqos-user-profile-name**|statshqos-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 all

[Command] hqos enable

[Purpose] Globally enable the HQoS function

[View] System configuration view

[Use Cases]

sonic(config)# hqos enable

[Command] hqos-profilename

[Purpose] Create HQoS configuration

[Parameter]

ParameterDescription
nameHQoS configuration file name

[View] System configuration view

[Use Cases]

sonic(config)# hqos-profile test1

[Command] global ratebyte/s

[Purpose] Configure global rate limiting

[Parameter]

ParameterDescription
byte/sRate limit speed, unit: byte/s

[View] hqos-profile configuration view

[Use Cases]

sonic(config)# hqos-profile test1
sonic(config-hqos-test1)# global rate 125000000

[Command] user-group-profile {fuzzymatchuser-group-name**|postmatchuser-group-name|prematchuser-group-name|user-group-name} {shaping pirbyte/spbsbytes}**

[Purpose] Bind user group configuration in HQoS setup, with independent rate limiting capability

[Parameter]

ParameterDescription
user-group-nameUser group name
byte/sRate 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 test1
sonic(config-hqos-test1)# user-group-profile test1 shaping pir 2000000 pbs 1000000

[Command] user-profile {fuzzymatchuser-name**|postmatchuser-name|prematchuser-name|user-name} {shaping pirbyte/spbsbytes}**

[Purpose] Bind a user configuration in the HQoS setup, with independent rate limiting capability

[Parameter]

ParameterDescription
user-nameUsername
byte/sRate 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 test1
sonic(config-hqos-test1)# user-profile test1 shaping pir 2000000 pbs 1000000

[Command] default-group-profile shaping pirbyte/spbsbytes

[Purpose] Configure independent rate limiting for the default user group within the HQoS setup

[Parameter]

ParameterDescription
byte/sRate 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 test1
sonic(config-hqos-test1)# default-group-profile shaping pir 2000000 pbs 1000000

[Command] default-user-profile shaping pirbyte/spbsbytes

[Purpose] Configure independent rate limiting for the default user within the HQoS setup

[Parameter]

ParameterDescription
byte/sRate 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 test1
sonic(config-hqos-test1)# default-user-profile shaping pir 2000000 pbs 1000000

[Command] hqos-user-group-profilename

[Purpose] Create a custom user group

[Parameter]

ParameterDescription
nameCustom user group name

[View] System configuration view

[Use Cases]

sonic(config)# hqos-user-group-profile test1

[Command] counter-enable

[Purpose] enable statistics

[View] Hqos user group view

[Use Cases]

sonic(config)# hqos-user-group-profile test1
sonic(config-group-test1)# counter-enable

[Command] auto-user-by-ip-poolip-pool-name

[Purpose] Create custom users in batch based on IP pool

[Parameter]

ParameterDescription
ip-pool-nameIP address pool name

[View] Hqos user group view

[Use Cases]

sonic(config)# hqos-user-group-profile test1
sonic(config-group-test1)# auto-user-by-ip-pool test

[Command] user-profile {fuzzymatchuser-name**|postmatchuser-name|prematchuser-name|user-name} {shaping pirbyte/spbsbytes}**

[Purpose] Bind a user configuration within the custom user group, with independent rate limiting capability

[Parameter]

ParameterDescription
user-nameUsername
byte/sRate 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 test1
sonic(config-group-test1)# user-profile test1 shaping pir 2000000 pbs 1000000

[Command] qos-map bind dscp_to_tcqos-map-name

[Purpose] Bind a DSCP-based priority mapping relationship within the custom user group

[Parameter]

ParameterDescription
qos-map-nameDSCP 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 test1
sonic(config-group-test1)# qos-map bind dscp_to_tc dscp1

[Command] hqos-user-profilename

[Purpose] Create a custom user

[Parameter]

ParameterDescription
nameCustom 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 test1

[Command] tc-queuesequence-numbermode strict|dwrr {shaping pirbyte/spbsbytes**}**

[Purpose] Configure the TC scheduling mode within the custom user, with independent rate limiting capability for the TC

[Parameter]

ParameterDescription
sequence-numberTC index: 0–7
byte/sRate limit speed, unit: byte/s

[View] Custom user configuration view

[Use Cases]

sonic(config)# hqos-user-profile test1 test1
sonic(config-user-test1)# tc-queue 1 mode strict shaping pir 20000000 pbs 1000000

[Command] qos-map bind dscp_to_tcqos-map-name

[Purpose] Bind a DSCP-based priority mapping relationship within the custom user

[Parameter]

ParameterDescription
qos-map-nameDSCP 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 test1
sonic(config-user-test1)# qos-map bind dscp_to_tc dscp1

[Command] hqos-profilename**{shared|offload}**

[Purpose] Bind the HQoS configuration file to the traffic egress interface

[Parameter]

ParameterDescription
nameHQoS 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 1
sonic(config-if-1)# hqos-profile test1