Command Line Reference
Visibility and Monitoring
Network Quality Analysis
56 min
mirror mirror mirror view mirror view table 1 mirror view table 1 mirror view command purpose show mirror display mirror configuration show mirror show mirror \[command] show mirror \[purpose] display mirror configuration \[view] privileged user view \[use cases] sonic# show mirror mirror config mirror config table 2 mirror 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 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 erspan source interface ethernet source 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/4 destination interface ethernet destination 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/56 direction \[in|out|both] direction \[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 in origin ip address origin 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 2 destination ip address destination 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 2 ip ttl ip 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 10 ip dscp ip 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 10 queue queue 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 5 gre type gre 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 0x886e inband network telemetry (int) inband network telemetry (int) int view int view table 3 int view table 3 int view command purpose show collector session display int configuration show collector session show collector session \[command] show collector session \[purpose] display int configuration \[view] privileged user view \[use cases] sonic# show collector session int config int config table 4 int 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 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 enable collector high delay collector 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 local collector buffer drop collector 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 local sflow sflow sflow view sflow view table 5 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 sflow show sflow interface ethernet show 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/0 sflow config sflow config table 6 sflow 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 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 enable sflow collector sflow 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 4 sflow polling interval sflow 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 300 sflow disable sflow 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 disable sflow sample rate sflow 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 50000 sflow agent id {ethernet|link aggregation|loopback|mgmt|vlan} sflow 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/10 sflow collector sflow 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 1 sflow collector collector name source interface {ethernet|link aggregation|loopback|mgmt|vlan} interface name 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] 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/24 telemetry telemetry telemetry config telemetry config table 7 telemetry config table 7 telemetry config command purpose telemetry 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 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 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 \[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 8081 subscription subscription 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 test destination group destination 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 test path target \[counters db|state db|others] path 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 others paths paths 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/cpu report interval report 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 10000 report type \[periodic|stream] report 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
