Network Quality Analysis
Mirror
Mirror View
Table 1 Mirror View
Command | Purpose |
|---|---|
show mirror | Display mirror configuration. |
show mirror
[Command] show mirror
[Purpose] Display mirror configuration.
[View] Privileged User View
[Use Cases]
sonic# show mirrorMirror Config
Table 2 Mirror Config
Command | Purpose |
|---|---|
mirror session session-id type {span|erspan} | Create a mirror session. |
source interface ethernet interface_name | Specify the source interface of the local mirror. |
destination interface ethernet interface_name | Specify the destination interface of the local mirror. |
direction [in|out|both] | Specify local mirror diretion |
origin ip address A.B.C.D | Specify the source IP of the remote mirror tunnel. |
destination ip address A.B.C.D | Specify the destination IP of the remote mirror tunnel. |
ip ttl ttl_value | Specify TTL value of the remote mirror tunnel. |
ip dscp dscp_value | Specify DSCP value of the remote mirror tunnel. |
queue queue-id | Specify the queue that the remote mirror tunnel is bound to. |
gre_type type | Specify the type of the remote mirror tunnel. |
mirror session session-id type {span|erspan}
[Command] mirror session session-id type {span|erspan}
[Purpose] Create a mirror session.
[Parameters]
Parameter | Description |
|---|---|
session-id | Mirror 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 erspansource interface ethernet interface_name
[Command] source interface ethernet interface_name
[Purpose] Specify the source interface of the local mirror.
[Parameters]
Parameter | Description |
|---|---|
interface_name | Interface 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/4destination interface ethernet interface_name
[Command] destination interface ethernet interface_name
[Purpose] Specify the destination interface of the local mirror.
[Parameters]
Parameter | Description |
|---|---|
interface_name | Interface 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/56direction [in|out|both]
[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 inorigin ip address A.B.C.D
[Command] origin ip address A.B.C.D
[Purpose] Specify the source IP of the remote mirror tunnel.
[Parameters]
Parameter | Description |
|---|---|
A.B.C.D | IPv4 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.2destination ip address A.B.C.D
[Command] destination ip address A.B.C.D
[Purpose] Specify the destination IP of the remote mirror tunnel.
[Parameters]
Parameter | Description |
|---|---|
A.B.C.D | IPv4 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.2ip ttl ttl_value
[Command] ip ttl ttl_value
[Purpose] Specify TTL value of the remote mirror tunnel.
[Parameters]
Parameter | Description |
|---|---|
ttl_value | TTL 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 10ip dscp dscp_value
[Command] ipdscp dscp_value
[Purpose] Specify DSCP value of the remote mirror tunnel.
[Parameters]
Parameter | Description |
|---|---|
dscp_value | DSCP 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 10queue queue-id
[Command] queue queue-id
[Purpose] Specify the queue that the remote mirror tunnel is bound to.
[Parameters]
Parameter | Description |
|---|---|
queue-id | Queue 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 5gre_type type
[Command] gre_type type
[Purpose] Specify the type of the remote mirror tunnel.
[Parameters]
Parameter | Description |
|---|---|
type | GRE 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 0x886eInband Network Telemetry (INT)
INT View
Table 3 INT View
Command | Purpose |
|---|---|
show collector session | Display INT configuration. |
show collector session
[Command] show collector session
[Purpose] Display INT configuration
[View] Privileged User View
[Use Cases]
sonic# show collector sessionINT Config
Table 4 INT Config
Command | Purpose |
|---|---|
collector parser enable | Enable 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_rate cpu_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_rate cpu_rate_value|cpu_queue_burst_size cpu_size_value]|remote} | Set a buffer_drop mode capture. |
collector parser enable
[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 enablecollector high_delay
[Command] 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_rate cpu_rate_value|cpu_queue_burst_size cpu_size_value]|remote}
[Purpose] Set a high_delay mode capture.
[Parameters]
Parameter | Description |
|---|---|
A.B.C.D | Source and destination IPv4 addresses, used to encapsulate INT packets. |
cos | List of cos to monitor for BDC and HDC, can be configured with one or more, eg. 0,5-7. |
delay_value | High Delay Threshold in nanoseconds. |
ports_name | Matching ports can be configured with one or more or all, e.g. 0/0,0/4, all. |
ttl_value | TTL value, default is 255, range (1-255), used to encapsulate INT packets. |
dscp_value | DSCP value, default to 0, range (0-63), used to encapsulate INT packets. |
tc_value | INT message export queue, default to 0, range (0-7), cannot be configured as lossless queue. |
df_value | DF flag, default is 0, range (0-1). |
capture_rate_value | Capture 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_value | Max rate (pkts/sec) of buffer dropped packets to be captured, default is 8192, range (122-100,000). |
max_burst_value | Max number of buffer dropped packets to be captured per burst in multiples of 64, default is 256, range (64-16,384). |
cpu_rate_value | Max rate (pkts/sec) on cpu_queue, default is 1000, range (122-60,000,000). |
cpu_size_value | Bust 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 localcollector buffer_drop
[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]
Parameter | Description |
|---|---|
A.B.C.D | Source and destination IPv4 addresses, used to encapsulate INT packets. |
cos | List 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_value | TTL value, default is 255, range (1-255), used to encapsulate INT packets. |
dscp_value | DSCP value, default to 0, range (0-63), used to encapsulate INT messages. |
tc_value | INT message export queue, default to 0, range (0-7), cannot be configured as lossless queue. |
df_value | DF flag, default is 0, range (0-1). |
capture_rate_value | Capture 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_value | Max rate (pkts/sec) of buffer dropped packets to be captured, default is 8192, range (122-100,000). |
max_burst_value | Max number of buffer dropped packets to be captured per burst in multiples of 64, default is 256, range (64-16,384). |
cpu_rate_value | Max rate (pkts/sec) on cpu_queue, default is 1000, range (122-60,000,000). |
cpu_size_value | Bust 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 localsFlow
sFlow View
Table 5 sFlow View
Command | Purpose |
|---|---|
show sflow | Display global configuration of sFlow. |
show sflow interface ethernet interface_name | Display interface configuration of sFlow. |
show sflow
[Command] show sflow
[Purpose] Display global configuration of sFlow.
[View] Privileged User View
[Use Cases]
sonic# show sflowshow sflow interface ethernet interface_name
[Command] show sflow interface ethernet interface_name
[Purpose] Display interface configuration of sFlow.
[Parameters]
Parameter | Description |
|---|---|
interface_name | Interface name (eg.0/1) |
[View] Privileged User View
[Use Cases]
sonic# show sflow interface ethernet 0/0sFlow Config
Table 6 sFlow Config
Command | Purpose |
|---|---|
sflow enable | Enable sFlow feature. |
sflow collector collector-name ip-address [vrf vrf|dst_port] | Set the collector for sFlow. |
sflow polling-interval interval | Set the sampling interval for sFlow. |
sflow disable | Disable sFlow feature of the interface. |
sflow sample-rate rate | Set the sampling frequency for interface sFlow. |
sflow agent-id {ethernet|link-aggregation|loopback|mgmt|vlan} interface_name | Set 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_name | Configure the source interface of sFlow collector. |
sflow enable
[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 enablesflow collector collector-name ip-address [vrf vrf|dst_port]
[Command] sflow collector collector-name ip-address [vrf vrf|dst_port]
[Purpose] Set the collector for sFlow.
[Parameters]
Parameter | Description |
|---|---|
collector-name | Name of sFlow collector, in string form (length 1-16 characters) |
ip-address | Destination IP address. |
vrf | Specify VRF for sampling, only supports management port VRF and default VRF |
dst_port | Destination 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.4sflow polling-interval interval
[Command] sflow polling-interval interval
[Purpose] Set the sampling interval for sFlow.
[Parameters]
Parameter | Description |
|---|---|
interval | Specify 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 300sflow disable
[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 disablesflow sample-rate rate
[Command] sflow sample-rate rate
[Purpose] Configure the sampling frequency of sFlow globally or on the interface.
[Parameters]
Parameter | Description |
|---|---|
rate | Frequency 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 50000sflow agent-id {ethernet|link-aggregation|loopback|mgmt|vlan} interface_name
[Command] sflow agent-id {ethernet|link-aggregation|loopback|mgmt|vlan} interface_name
[Purpose] Configure the agent ID for sFlow sampling.
[Parameters]
Parameter | Description |
|---|---|
interface_name | Interface 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/10sflow collector collector-name source {A.B.C.D|A::B}
[Command] sflow collector collector-name source {A.B.C.D|A::B}
[Purpose] Configure the source IP of sFlow collector.
[Parameters]
Parameter | Description |
|---|---|
collector-name | Name of sFlow collector, in string form (length 1-16 characters) |
A.B.C.D | IPv4 address |
A::B | IPv6 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.1sflow 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]
Parameter | Description |
|---|---|
collector-name | Name of sFlow collector, in string form (length 1-16 characters) |
interface_name | Interface 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/24Telemetry
Telemetry Config
Table 7 Telemetry Config
Command | Purpose |
|---|---|
client | Create the Telemetry client and enter the Telemetry client configuration view. |
destination-group destination-group-name | Create 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-name | Create a Telemetry subscription and enter the Telemetry subscription configuration view. |
destination-group destination-group-name | Configure the collector group associated with the subscription. |
path-target [COUNTERS_DB| STATE_DB|OTHERS] | Configure collection target. |
paths path-name | Configure collection path. |
report-interval time | Configure reporting interval. |
report-type [periodic|stream] | Configure reporting method. |
telemetry client
[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)#destination-group destination-group-name
[Command] destination-group destination-group-name
[Purpose] Create the Telemetry collector group and enter the Telemetry collector group configuration view.
[Parameters]
Parameter | Description |
|---|---|
destination-group-name | Collector 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} port port-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]
Parameter | Description |
|---|---|
A.B.C.D | Collector IP |
A::B | Collector IPv6 |
port-number | Collector 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 8081subscription subscription-name
[Command] subscription subscription-name
[Purpose] Create a Telemetry subscription and enter the Telemetry subscription configuration view.
[Parameters]
Parameter | Description |
|---|---|
subscription-name | Subscription 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 testdestination-group destination-group-name
[Command] destination-group destination-group-name
[Purpose] Configure the collector group associated with the subscription.
[Parameters]
Parameter | Description |
|---|---|
destination-group-name | Collector 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 testpath-target [COUNTERS_DB|STATE_DB|OTHERS]
[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 OTHERSpaths path-name
[Command] paths path-name
[Purpose] Configure collection path.
[Parameters]
Parameter | Description |
|---|---|
path-name | Collection 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/cpureport-interval time
[Command] report-interval time
[Purpose] Configure reporting interval.
[Parameters]
Parameter | Description |
|---|---|
time | Interval, 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 10000report-type [periodic|stream]
[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