Skip to content
Ask AI

Network Quality Analysis

Table 1 Mirror View

CommandPurpose
show mirrorDisplay mirror configuration.

[Command] show mirror

[Purpose] Display mirror configuration.

[View] Privileged User View

[Use Cases]

sonic# show mirror

Table 2 Mirror Config

CommandPurpose
mirror session session-id type {span|erspan}Create a mirror session.
source interface ethernet interface_nameSpecify the source interface of the local mirror.
destination interface ethernet interface_nameSpecify the destination interface of the local mirror.
**direction ** [in|out|both]Specify local mirror diretion
origin ip address A.B.C.DSpecify the source IP of the remote mirror tunnel.
destination ip address A.B.C.DSpecify the destination IP of the remote mirror tunnel.
ip ttl ttl_valueSpecify TTL value of the remote mirror tunnel.
ip dscp dscp_valueSpecify DSCP value of the remote mirror tunnel.
queue queue-idSpecify the queue that the remote mirror tunnel is bound to.
gre_type typeSpecify the type of the remote mirror tunnel.

[Command] mirror session session-id type {span|erspan}

[Purpose] Create a mirror session.

[Parameters]

ParameterDescription
session-idMirror session ID, the range is [1,63]

[View] Global Configuration View

[Notes] Span is the local mirror type. Erspan is the remote mirror type, which sends traffic to the remote side through a GRE tunnel. Run command no mirror session session-id to delete the mirror session.

[Use Cases]

sonic# configure
sonic(config)# mirror session 0 type span
sonic(config)# mirror session 1 type erspan

[Command] source interface ethernet interface_name

[Purpose] Specify the source interface of the local mirror.

[Parameters]

ParameterDescription
interface_nameInterface name (eg.0/1)

[View] SPAN Mirror Configuration View

[Notes] Run command no source interface ethernet interface_name to delete the source interface.

[Use Cases]

sonic# configure
sonic(config)# mirror session 10 type span
sonic(config-span-mirror-10)# source interface ethernet 0/56
sonic(config-span-mirror-10)# source interface ethernet 0/4

[Command] destination interface ethernet interface_name

[Purpose] Specify the destination interface of the local mirror.

[Parameters]

ParameterDescription
interface_nameInterface name (eg.0/1)

[View] SPAN Mirror Configuration View

[Notes] Run command no destination to delete the destination interface.

[Use Cases]

sonic# configure
sonic(config)# mirror session 10 type span
sonic(config-span-mirror-10)# no source interface ethernet 0/56

[Command] **direction ** [in|out|both]

[Purpose] Specify local mirror diretion.

[View] SPAN Mirror Configuration View

[Notes] The default mirroring direction is both, i.e., both inbound and outbound directions are mirrored.

[Use Cases]

sonic# configure
sonic(config)# mirror session 10 type span
sonic(config-span-mirror-10)# direction in

[Command] origin ip address A.B.C.D

[Purpose] Specify the source IP of the remote mirror tunnel.

[Parameters]

ParameterDescription
A.B.C.DIPv4 address

[View] ERSPAN Mirror Configuration View

[Notes] Run command no origin to delete the source IP.

[Use Cases]

sonic# configure
sonic(config)# mirror session 10 type erspan
sonic(config-erspan-mirror-10)# origin ip address 10.0.0.2

[Command] destination ip address A.B.C.D

[Purpose] Specify the destination IP of the remote mirror tunnel.

[Parameters]

ParameterDescription
A.B.C.DIPv4 address

[View] ERSPAN Mirror Configuration View

[Notes] Run command no destination to delete the destination IP.

[Use Cases]

sonic# configure
sonic(config)# mirror session 10 type erspan
sonic(config-erspan-mirror-10)# destination ip address 10.0.0.2

[Command] ip ttl ttl_value

[Purpose] Specify TTL value of the remote mirror tunnel.

[Parameters]

ParameterDescription
ttl_valueTTL value, the range is [1,255]

[View] ERSPAN Mirror Configuration View

[Notes] Run command no ip ttl ttl_value to delete TTL value configuration.

[Use Cases]

sonic# configure
sonic(config)# mirror session 10 type erspan
sonic(config-erspan-mirror-10)# ip ttl 10

[Command] ipdscp dscp_value

[Purpose] Specify DSCP value of the remote mirror tunnel.

[Parameters]

ParameterDescription
dscp_valueDSCP value, the range is [0,63]

[View] ERSPAN Mirror Configuration View

[Notes] Run command no ipdscp dscp_value to delete DSCP value configuration.

[Use Cases]

sonic# configure
sonic(config)# mirror session 10 type erspan
sonic(config-erspan-mirror-10)# ip dscp 10

[Command] queue queue-id

[Purpose] Specify the queue that the remote mirror tunnel is bound to.

[Parameters]

ParameterDescription
queue-idQueue ID, the range is [0,7]

[View] ERSPAN Mirror Configuration View

[Notes] Run command no queue id to unbind the queue.

[Use Cases]

sonic# configure
sonic(config)# mirror session 10 type erspan
sonic(config-erspan-mirror-10)# queue 5

[Command] gre_type type

[Purpose] Specify the type of the remote mirror tunnel.

[Parameters]

ParameterDescription
typeGRE type in 0xHHHH format.

[View] ERSPAN Mirror Configuration View

[Notes] Run command no gre_type type to delete the type configuration.

[Use Cases]

sonic# configure
sonic(config)# mirror session 10 type erspan
sonic(config-erspan-mirror-10)# gre_type 0x886e

Table 3 INT View

CommandPurpose
show collector sessionDisplay INT configuration.

[Command] show collector session

[Purpose] Display INT configuration

[View] Privileged User View

[Use Cases]

sonic# show collector session

Table 4 INT Config

CommandPurpose
collector parser enableEnable INT
collector high_delay sip A.B.C.D dip A.B.C.D cos cos_value delay_threshold delay_value ports ports_name [ttl ttl_value|dscp dscp_value|tc tc_value|df df_value] sampler_mode {**probabilistic ** [capture_rate capture_rate_value]|**microburst ** [max_packets_rate max_rate_value|max_packets_per_burst max_burst_value]} collection_mode{local[cpu_queue_ratecpu_rate_value|cpu_queue_burst_size cpu_size_value]|remote}Set a high_delay mode capture.
collector buffer_drop sip A.B.C.D dip A.B.C.D cos cos_value [ttl ttl_value|dscp dscp_value|tc tc_value|df df_value] sampler_mode {all|**probabilistic ** [capture_rate capture_rate_value]|**microburst ** [max_packets_rate max_rate_value|max_packets_per_burst max_burst_value]} collection_mode {local[cpu_queue_ratecpu_rate_value|cpu_queue_burst_size cpu_size_value]|remote}Set a buffer_drop mode capture.

[Command] collector parser enable

[Purpose] Enable INT

[View] Global Configuration View

[Notes] Run command no collector parser enable to enable INT.

[Use Cases]

sonic# configure
sonic(config)# collector parser enable

[Command] collector high_delay sip A.B.C.D dip A.B.C.D cos cos_value delay_threshold delay_value ports ports_name [ttlttl_value**|dscpdscp_value|tctc_value|df df_value] sampler_mode {probabilistic [capture_ratecapture_rate_value]|microburst [max_packets_ratemax_rate_value|max_packets_per_burstmax_burst_value]} collection_mode {local [cpu_queue_rate** cpu_rate_value|cpu_queue_burst_size cpu_size_value]|remote}

[Purpose] Set a high_delay mode capture.

[Parameters]

ParameterDescription
A.B.C.DSource and destination IPv4 addresses, used to encapsulate INT packets.
cosList of cos to monitor for BDC and HDC, can be configured with one or more, eg. 0,5-7.
delay_valueHigh Delay Threshold in nanoseconds.
ports_nameMatching ports can be configured with one or more or all, e.g. 0/0,0/4, all.
ttl_valueTTL value, default is 255, range (1-255), used to encapsulate INT packets.
dscp_valueDSCP value, default to 0, range (0-63), used to encapsulate INT packets.
tc_valueINT message export queue, default to 0, range (0-7), cannot be configured as lossless queue.
df_valueDF flag, default is 0, range (0-1).
capture_rate_valueCapture rate (1 in every N pkts) for visibility sampler in Probabilistic Capture mode. This specifies ‘N’ for the rate. N defaults to 10000, range (10-16,777,215).
max_rate_valueMax rate (pkts/sec) of buffer dropped packets to be captured, default is 8192, range (122-100,000).
max_burst_valueMax number of buffer dropped packets to be captured per burst in multiples of 64, default is 256, range (64-16,384).
cpu_rate_valueMax rate (pkts/sec) on cpu_queue, default is 1000, range (122-60,000,000).
cpu_size_valueBust size for packets on cpu_queue, default is 512, range (1-1,000,000,000).

[View] Global Configuration View

[Notes] Run command no collector high_delay to delete HDC.

[Use Cases]

sonic# configure
sonic(config)# collector high_delay sip 10.250.0.141 dip 10.250.0.142 cos 0 delay_threshold 100 ports 0/0,0/4 sampler_mode microburst collection_mode local

[Command] collector buffer_drop sip A.B.C.D dip A.B.C.D cos cos_value [ttl ttl_value|dscp dscp_value|tc tc_value|df df_value] sampler_mode {**all|probabilistic ** [capture_rate capture_rate_value]|**microburst ** [max_packets_rate max_rate_value|max_packets_per_burst max_burst_value]} collection_mode {**local ** [cpu_queue_rate cpu_rate_value|cpu_queue_burst_size cpu_size_value]|remote}

[Purpose] Set a buffer_drop mode capture.

[Parameters]

ParameterDescription
A.B.C.DSource and destination IPv4 addresses, used to encapsulate INT packets.
cosList of cos to monitor for BDC and HDC, cannot be configured as lossless queue, can be configured with one or more, eg. 0,5-7.
ttl_valueTTL value, default is 255, range (1-255), used to encapsulate INT packets.
dscp_valueDSCP value, default to 0, range (0-63), used to encapsulate INT messages.
tc_valueINT message export queue, default to 0, range (0-7), cannot be configured as lossless queue.
df_valueDF flag, default is 0, range (0-1).
capture_rate_valueCapture rate (1 in every N pkts) for visibility sampler in Probabilistic Capture mode. This specifies ‘N’ for the rate. N defaults to 10000, range (10-16,777,215).
max_rate_valueMax rate (pkts/sec) of buffer dropped packets to be captured, default is 8192, range (122-100,000).
max_burst_valueMax number of buffer dropped packets to be captured per burst in multiples of 64, default is 256, range (64-16,384).
cpu_rate_valueMax rate (pkts/sec) on cpu_queue, default is 1000, range (122-60,000,000).
cpu_size_valueBust size for packets on cpu_queue, default to 512, range (1-1,000,000,000).

[View] Global Configuration View

[Notes] Run command no collector buffer_drop to delete BDC.

[Use Cases]

sonic# configure
sonic# collector buffer_drop sip 10.250.0.141 dip 10.250.0.142 cos 0 sampler_mode microburst collection_mode local

Table 5 sFlow View

CommandPurpose
show sflowDisplay global configuration of sFlow.
show sflow interface ethernet interface_nameDisplay interface configuration of sFlow.

[Command] show sflow

[Purpose] Display global configuration of sFlow.

[View] Privileged User View

[Use Cases]

sonic# show sflow

[Command] show sflow interface ethernet interface_name

[Purpose] Display interface configuration of sFlow.

[Parameters]

ParameterDescription
interface_nameInterface name (eg.0/1)

[View] Privileged User View

[Use Cases]

sonic# show sflow interface ethernet 0/0

Table 6 sFlow Config

CommandPurpose
sflow enableEnable sFlow feature.
sflow collector collector-name ip-address [vrf vrf|dst_port]Set the collector for sFlow.
sflow polling-interval intervalSet the sampling interval for sFlow.
sflow disableDisable sFlow feature of the interface.
sflow sample-rate rateSet the sampling frequency for interface sFlow.
sflow agent-id {ethernet|link-aggregation|loopback|mgmt|vlan} interface_nameSet the agent ID for sFlow sampling.
sflow collector collector-name source {A.B.C.D|A::B}Configure the source IP of sFlow collector.
sflow collector collector-name source-interface {ethernet|link-aggregation|loopback|mgmt|vlan} interface_nameConfigure the source interface of sFlow collector.

[Command] sflow enable

[Purpose] Enable sFlow feature.

[View] Global Configuration View

[Notes] Run command no sflow enable to disable sFlow feature.

[Use Cases]

sonic# configure terminal
sonic(config)# sflow enable

[Command] sflow collector collector-name ip-address [vrf vrf|dst_port]

[Purpose] Set the collector for sFlow.

[Parameters]

ParameterDescription
collector-nameName of sFlow collector, in string form (length 1-16 characters)
ip-addressDestination IP address.
vrfSpecify VRF for sampling, only supports management port VRF and default VRF
dst_portDestination port number, the range is [1,65536], the default value is 6343.

[View] Global Configuration View

[Notes] Run command no sflow collector collector-name to delete sflow collector.

[Use Cases]

sonic# configure terminal
sonic(config)# sflow collector 1 10.0.0.3 6
sonic(config)# sflow collector 2 10.0.0.4

[Command] sflow polling-interval interval

[Purpose] Set the sampling interval for sFlow.

[Parameters]

ParameterDescription
intervalSpecify the interval in seconds. The range is from 5 to 300, and the default is 1.

[View] Global Configuration View

[Notes] Run command no sflow polling-interval to restore the sampling interval to default.

[Use Cases]

sonic# configure terminal
sonic(config)# sflow polling-interval 300

[Command] sflow disable

[Purpose] Disable sFlow feature of the interface.

[View] Physical Interface Configuration View

[Notes] Run command no sflow disable to enable sFlow feature of the interface.

[Use Cases]

sonic# configure terminal
sonic(config)# interface ethernet 0/0
sonic(config-if-0/0)# sflow disable

[Command] sflow sample-rate rate

[Purpose] Configure the sampling frequency of sFlow globally or on the interface.

[Parameters]

ParameterDescription
rateFrequency value, the range is 4096-1000000, the default value is 10000.

[View] Physical Interface Configuration View

[Notes] Run command no sflow sample-rate to restore the sampling frequency to default.

[Use Cases]

sonic# configure terminal
sonic(config)# sflow sample-rate 70000
sonic(config)# interface ethernet 0/0
sonic(config-if-0/0)# sflow sample-rate 50000
Section titled “sflow agent-id {ethernet|link-aggregation|loopback|mgmt|vlan}”

[Command] sflow agent-id {ethernet|link-aggregation|loopback|mgmt|vlan} interface_name

[Purpose] Configure the agent ID for sFlow sampling.

[Parameters]

ParameterDescription
interface_nameInterface name.

[View] Global Configuration View

[Notes] After specifying the agent ID, the agent IP address is the IP address of the specified interface. Run command no sflow sgent-id to restore the agent ID to its default value, with the agent IP address set to 240.127.1.1 by default.

[Use Cases]

sonic# configure terminal
sonic(config)# sflow agent-id ethernet 0/10

[Command] sflow collector collector-name source {A.B.C.D|A::B}

[Purpose] Configure the source IP of sFlow collector.

[Parameters]

ParameterDescription
collector-nameName of sFlow collector, in string form (length 1-16 characters)
A.B.C.DIPv4 address
A::BIPv6 address

[View] Physical Interface Configuration View

[Notes] Run command no sflow collector collector-name source to delete the source IP of sFlow collector.

[Use Cases]

sonic# configure terminal
sonic(config)# sflow collector test 39.0.0.2
sonic(config)# sflow collector test source 100.0.0.1
Section titled “sflow collector collector-name source-interface {ethernet|link-aggregation|loopback|mgmt|vlan} interface_name”

[Command] sflow collector collector-name source-interface {ethernet|link-aggregation|loopback|mgmt|vlan} interface_name

[Purpose] Configure the source interface of sFlow collector.

[Parameters]

ParameterDescription
collector-nameName of sFlow collector, in string form (length 1-16 characters)
interface_nameInterface name

[View] Physical Interface Configuration View

[Notes] Run command no sflow collector collector-name source-interface to delete the source interface of sFlow collector.

[Use Cases]

sonic# configure terminal
sonic(config)# sflow collector test 39.0.0.2
sonic(config)# sflow collector test source-interface ethernet 0/24

Table 7 Telemetry Config

CommandPurpose
clientCreate the Telemetry client and enter the Telemetry client configuration view.
destination-group destination-group-nameCreate the Telemetry collector group and enter the Telemetry collector group configuration view.
{ipv4-address A.B.C.D|ipv6-address A::B} port* port-number*Configure the collector’s IP address and port number.
subscription subscription-nameCreate a Telemetry subscription and enter the Telemetry subscription configuration view.
destination-group destination-group-nameConfigure the collector group associated with the subscription.
**path-target **[COUNTERS_DB|STATE_DB|OTHERS]Configure collection target.
paths path-nameConfigure collection path.
report-interval timeConfigure reporting interval.
**report-type **[periodic|stream]Configure reporting method.

[Command] telemetry client

[Purpose] Create the Telemetry client and enter the Telemetry client configuration view.

[View] Global Configuration View

[Notes] Run command no telemetry client to delete the Telemetry client configuration.

[Use Cases]

sonic# configure terminal
sonic(config)# telemetry client
sonic(telemetry-client)#

[Command] destination-group destination-group-name

[Purpose] Create the Telemetry collector group and enter the Telemetry collector group configuration view.

[Parameters]

ParameterDescription
destination-group-nameCollector group name

[View] Telemetry Client Configuration View

[Notes] Run command no destination-group destination-group-name to delete the Telemetry collector group configuration.

[Use Cases]

sonic# configure terminal
sonic(config)# telemetry client
sonic(telemetry-client)# destination-group test

{ipv4-address A.B.C.D|ipv6-address A::B} portport-number

Section titled “{ipv4-address A.B.C.D|ipv6-address A::B} portport-number”

[Command] {ipv4-address A.B.C.D|ipv6-address A::B} port* port-number*

[Purpose] Configure the collector’s IP address and port number.

[Parameters]

ParameterDescription
A.B.C.DCollector IP
A::BCollector IPv6
port-numberCollector Port Number, the range is [1, 65535]

[View] Telemetry Collector Group Configuration View

[Notes] Run command no {ipv4-address A.B.C.D|ipv6-address A::B} port* port-number* to delete the Telemetry collector configuration.

[Use Cases]

sonic# configure terminal
sonic(config)# telemetry client
sonic(telemetry-client)# destination-group test
sonic(telemetry-destination-group-test)# ipv4-address 192.168.20.102 port 8081

[Command] subscription subscription-name

[Purpose] Create a Telemetry subscription and enter the Telemetry subscription configuration view.

[Parameters]

ParameterDescription
subscription-nameSubscription name

[View] Telemetry Client Configuration View

[Notes] Run command no subscription subscription-name to delete the Telemetry subscription configuration.

[Use Cases]

sonic# configure terminal
sonic(config)# telemetry client
sonic(telemetry-client)# subscription test

[Command] destination-group destination-group-name

[Purpose] Configure the collector group associated with the subscription.

[Parameters]

ParameterDescription
destination-group-nameCollector group name

[View] Telemetry Subscription Configuration View

[Notes] Run command no destination-group destination-group-name to delete the collector group associated with the subscription configuration.

[Use Cases]

sonic# configure terminal
sonic(config)# telemetry client
sonic(telemetry-client)# subscription test
sonic(telemetry-subscription-test)# destination-group test

[Command] path-target [COUNTERS_DB|STATE_DB|OTHERS] [Purpose] Configure collection target.

[View] Telemetry Subscription Configuration View

[Notes] Run command no path-target to delete the collection target configuration.

[Use Cases]

sonic# configure terminal
sonic(config)# telemetry client
sonic(telemetry-client)# subscription test
sonic(telemetry-subscription-test)# path-target OTHERS

[Command] paths path-name

[Purpose] Configure collection path.

[Parameters]

ParameterDescription
path-nameCollection path, subfolders are separated by ‘/’, multiple settings are allowed.

[View] Telemetry Subscription Configuration View

[Notes] Run command no paths path-name to delete the collection path configuration.

[Use Cases]

sonic# configure terminal
sonic(config)# telemetry client
sonic(telemetry-client)# subscription test
sonic(telemetry-subscription-test)# paths platform/cpu

[Command] report-interval time

[Purpose] Configure reporting interval.

[Parameters]

ParameterDescription
timeInterval, the unit is milliseconds, the range is [100, 1800000], with a default value of 5000 milliseconds.

[View] Telemetry Subscription Configuration View

[Notes] Run command no report-interval to delete the reporting interval configuration.

[Use Cases]

sonic# configure terminal
sonic(config)# telemetry client
sonic(telemetry-client)# subscription test
sonic(telemetry-subscription-test)# report-interval 10000

[Command] **report-type ** [periodic|stream]

[Purpose] Configure reporting method.

[View] Telemetry Subscription Configuration View

[Notes] Run command no report-type to delete the reporting method configuration.

[Use Cases]

sonic# configure terminal
sonic(config)# telemetry client
sonic(telemetry-client)# subscription test
sonic(telemetry-subscription-test)# report-type periodic