Command Line Reference
QoS Configuration
21 min
priority map configuration priority map configuration show qos map {all|dot1p to tc|dscp to tc|tc to queue} show qos map {all|dot1p to tc|dscp to tc|tc to queue} \[command] show qos map {all|dot1p to tc|dscp to tc|tc to queue} \[purpose] display qos map configuration information \[view] system view \[parameter] parameter description all display all priority mapping configuration information dot1p to tc mapping of 802 1p priority of packet to internal priority dscp to tc mapping of the dscp priority of a packet to the internal priority tc to queue mapping the priority of packet to the egress queue \[use cases] sonic(config)# show qos map all { "dot1p to tc map" { "dot1x tc" { "0" "0", "1" "1", "2" "2", "3" "3", "4" "4", "5" "5", "6" "6", "7" "7" } }, "dscp to tc map" {}, "map pfc priority to queue" {}, "pfc priority to priority group map" {}, "tc to priority group map" {}, "tc to queue map" {} } show interface qos map bind show interface qos map bind \[command] show interface qos map bind \[purpose] show all qos map and interface binding configurations \[view] system view \[use cases] sonic# show interface qos map bind { "ethernet1" { "dot1p to tc map" "\[dot1p to tc map|1]" } } show queue counters show queue counters \[command] show queue counters \[ interface name ] show queue counters clear \[purpose] view export queue statistics \[view] system view \[use cases] sonic(config)# do show queue counters 1 port txq counter/pkts counter/bytes drop/pkts drop/bytes \ ethernet1 all0 0 0 0 0 ethernet1 all1 0 0 0 0 ethernet1 all2 0 0 0 0 ethernet1 all3 0 0 0 0 ethernet1 all4 0 0 0 0 ethernet1 all5 0 0 0 0 ethernet1 all6 0 0 0 0 ethernet1 all7 0 0 0 0 qos map {dot1p to tc|dscp to tc|tc to queue} qos map {dot1p to tc|dscp to tc|tc to queue} \[command] qos map {dot1p to tc|dscp to tc|tc to queue} profile name pri origin pri mapped \[purpose] add qos mapping table template \[parameter] parameter description dot1p to tc mapping of 802 1p priority of packet to internal priority tc to queue mapping the priority of packet to the egress queue profile name qos map name pri origin pre mapping priority pri mapped priority after mapping \[view] system configuration view \[user scenario] if user need to prioritize packets received by a device based on the dot1p/dscp values carried in the packet for qos scheduling, user can configure the mapping of packet priorities to local priorities using the qos map {dot1p to tc|dscp to tc} \<profile name> \<in value> command the qos map tc to queue \<profile name> \<in value> command configures the mapping of local priorities to output queues, allowing you to implement different qos strategies based on different scheduling methods for the output queues \[notes] by default, the local priority is mapped to the queue is tc queue 0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 \[use cases] sonic(config)# qos map tc to queue queue 0 0 sonic(config)# qos map tc to queue queue 1 1 sonic(config)# qos map tc to queue queue 2 2 sonic(config)# qos map tc to queue queue 3 3 sonic(config)# qos map tc to queue queue 4 4 sonic(config)# qos map tc to queue queue 5 5 sonic(config)# qos map tc to queue queue 6 6 sonic(config)# qos map tc to queue queue 7 7 qos map all bind tc to queue qos map all bind tc to queue \[command] qos map all bind tc to queue profile name \[purpose] all interfaces are bound to qos map \[parameter] parameter description profile name qos map name \[view] system configuration view \[use cases] sonic(config)# qos map all bind tc to queue test qos map bind {dscp to tc|dot1p to tc} qos map bind {dscp to tc|dot1p to tc} \[command] qos map bind {dscp to tc|dot1p to tc} profile name \[purpose] single interface with qos map binding \[parameter] parameter description profile name qos map name \[view] interface view \[use cases] sonic(config)# interface ethernet 1 sonic(config if 1)# qos map bind dscp to tc ceshi traffic regulation traffic regulation show traffic behavior rule show traffic behavior rule \[command] show traffic behavior rule \[purpose] displays the configured aboute car policies \[view] system view \[use cases] sonic# show traffic behavior rule name type mode cir cbs \ test bytes sr tcm 100000 64000 show traffic behavior counter show traffic behavior counter \[command] show traffic behavior counters \[purpose] view the hit statistics for the car \[view] system view \[use cases] sonic# show traffic behavior counters policerid forward drop remark forward \ flow controll 1049585 12764 1810877 traffic behavior traffic behavior \[command] traffic behavior traffic behavior name no traffic behavior \[purpose] create a traffic behavior and go to the traffic behavior view, or go to the existing traffic behavior view, or bind the traffic behavior to interface \[purpose] traffic behavior name traffic behavior name \[view] system view, interface view \[use cases] sonic# configure terminal sonic(config)# traffic behavior test sonic(config traffic behavior test)# car {sr tcm|tr tcm} meter type {bytes|packets} car {sr tcm|tr tcm} meter type {bytes|packets} \[command] car {sr tcm|tr tcm} \[meter type {bytes|packets}] \[cir cir value ] \[cbs cbs value ] \[pir pir value ] \[pbs pbs value ] \[yellow packet action {drop|forward|remark}] \[red packet action {drop|forward|remark}] \[remark dot1p dot1p value ] \[remark dscp dscp value ] \[remark tc tc value ] \[purpose] create a car template to bind to traffic behavior \[parameter] parameter description sr tcm single bucket single speed mode, this mode only requires the configuration of cir and cbs tr tcm double buckets and double speed mode meter type {bytes|packets} if meter type mode is bytes :cir, pir in kbps, cbs, pbs in byteif meter type mode is packets :cir, pir in kpps, cbs, pbs in packetdefault mode is bytes cir value specifies the committed information rate (cir), which is the allowed rate at which traffic can pass through cbs value specifies the committed burst size (cbs), which is the average volume of burst traffic that can pass through an interface pir value specifies the peak information rate (pir), which is the maximum rate at which traffic can pass through pbs value specifies the peak burst size (pbs), which is the maximum volume of burst traffic that can pass through an interface \[view] traffic behavior view \[notes] when the burst size of the message < cbs value, the message is marked as green when cbs value < burst size < pbs value, the message is marked yellow when burst size > pbs value, the message is marked as red no car this command removes the car template \[use cases] sonic# configure terminal sonic(config)# traffic behavior test sonic(config traffic behavior test)# car sr tcm meter type packets cir 1000000 traffic behavior bind traffic behavior bind \[command] traffic behavior bind policer name no traffic behavior bind \[purpose] bind traffic behavior to the interface \[view] interface view \[use cases] sonic(config)# interface ethernet 1 sonic(config if 1)# traffic behavior bind test1 queue scheduling queue scheduling show interface uc tx queue show interface uc tx queue \[command] show interface uc tx queue \[purpose] display the queue scheduling method of the interface \[view] system view \[use cases] sonic# show interface uc tx queue { "ethernet1|0" { "scheduler|scheduler ethernet1 0" { "type" "strict" } }, "ethernet1|2" { "scheduler|scheduler ethernet1 2" { "type" "strict" } } } uc tx queue scheduler uc tx queue scheduler queue id mode \[strict|dwrr] \[command] uc tx queue scheduler queue id mode strict uc tx queue scheduler queue id mode dwrr weight uc tx queue scheduler \[purpose] configure a scheduling mode for queues on an interface \[parameter] parameter description queue id queue id, value range 0 7 strict enable strict priority queuing dwrr enable dwrr priority queuing weight weight of a queue, value range 0 100 \[view] interface view \[usage scenario] in a network, the queue scheduling algorithm is a core mechanism for implementing quality of service (qos) control it manages the usage of link bandwidth for different types of packets, ensuring that various data streams receive services at different levels different queues under the same interface can adopt a mixed scheduling mode of strict and dwrr in this mode, queues configured with strict mode based on priority are scheduled first when there are no packets in the strict mode queues, the system schedules dwrr queues based on their weights by default, the scheduling method for queues is dwrr (deficit weighted round robin), with equal weights of 1 this configuration allows network administrators to manage different types of traffic more flexibly, ensuring that high priority traffic receives faster processing, while low priority traffic can still effectively utilize link bandwidth \[use cases] sonic(config)# interface ethernet 1 sonic(config if 1)# uc tx queue scheduler 0 mode strict sonic(config if 1)# uc tx queue scheduler 1 mode strict sonic(config if 1)# uc tx queue scheduler 2 mode dwrr weight 80 sonic(config if 1)# uc tx queue scheduler 3 mode dwrr weight 80 uc tx queue scheduler uc tx queue scheduler queue id \[command] uc tx queue scheduler queue id \[pir pir value ]\[pbs pbs value ] \[purpose] configure queue rate limiting \[parameter] parameter description pir specifies the peak information rate of the queue, the unit is byte/s pbs specifies the peak burst size of the queue, the unit is byte \[view] interface view \[use cases] sonic(config)# interface ethernet 1 sonic(config if 1)# uc tx queue scheduler 0 pir 1000
