Skip to content
Ask AI

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 all

show 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 all

show 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 all

[Command]

hqos enable

[Purpose]

Globally enable the HQoS function

[View]

System configuration view

[Use Cases]

sonic(config)# hqos enable

[Command]

hqos-profile name

[Purpose]

Create HQoS configuration

[Parameter]

ParameterDescription
nameHQoS configuration file name

[View]

System configuration view

[Use Cases]

sonic(config)# hqos-profile test1

[Command]

global rate byte/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

user-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]

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

user-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]

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

default-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]

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

default-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]

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-profile name

[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-pool ip-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

user-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]

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_tc qos-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-profile name

[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

tc-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]

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_tc qos-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-profile name {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