Command Line Reference
Network Management And Monitor...
SFLOW Configuration
12 min
sflow configuration show sflow \[command] show sflow \[purpose] display sflow configuration information \[view] system configuration view \[ use cases] sonic# show sflow sflow global information sflow admin state up sflow sample direction rx sflow polling interval 0 sflow agentid ethernet12 1 collectors configured name 1 ip addr 10 1 1 1 udp port 6343 show sflow interface ethernet \[command] show sflow interface ethernet interface name \[purpose] display the packet sampling rate for flow sampling \[view] system configuration view \[use cases] sonic# show sflow interface ethernet 19 sflow interface configurations + + + + \| interface | sampling rate | sampling direction | +=============+=================+======================+ + + + + sflow enable \[command] sflow enable \[purpose] enable sflow function \[view] system configuration view \[usage scenario] the sflow agent offers two sampling methods for analyzing network traffic conditions from different perspectives flow sampling and counter sampling flow sampling involves the sflow agent device sampling and analyzing packets on specified interfaces based on specific sampling directions and ratios it aims to capture detailed information about packet data content, facilitating monitoring and analysis of network behaviors counter sampling, on the other hand, involves the sflow agent device periodically collecting traffic statistics information from interfaces the sampling data collected by counter sampling is detailed in the table below unlike flow sampling, counter sampling focuses solely on the quantity of traffic on interfaces, rather than the specifics of traffic content \[use cases] sonic# configure sonic(config)# sflow enable sflow collector \[command] sflow collector name a b c d \[rf vrf name | port ] no sflow collector name \[purpose] configure sflow collector address \[parameter] parameter description name collector name, used for internal identification a b c d collector ip address port the udp destination port number for sending sflow packets,the default value is 6343 \[view] system configuration view \[use cases] sonic# configure sonic(config)# sflow collector test 192 168 0 100 6364 sflow agent id \[command] sflow agent id {ethernet|vlan|loopback|link aggregation} id no sflow agent id \[purpose] configure the ip address of the sflow agent \[parameter] parameter description {ethernet|vlan|loopback} id specify a layer 3 interface and use its ip address as the agent ip address \[view] system configuration view \[use cases] sonic# configure sonic(config)# sflow agent id loopback 0 sflow polling interval \[command] sflow polling interval { number |0} no sflow polling interval \[purpose] configure sflow counter sampling interval \[parameter] parameter description number valid range 5 300, unit seconds 0 disable counter sample \[view] system configuration view \[use cases] sonic# configure sonic(config)# sflow polling interval 100 sflow sample rate \[command] sflow sample rate number no sflow sample rate \[purpose] configure sflow sampling rate \[parameter] parameter description number valid range 8000 100000, the number of data packets sampled within a specified time interval \[view] interface view \[use cases] sonic(config)# interface ethernet 19 sonic(config if 19)# sflow sample rate 8500 sflow sample direction {rx|tx|both} \[command] sflow sample direction {rx|tx|both} \[purpose] configure sflow sample direction \[view] interface view and system configuration view \[use cases] sonic(config)# sflow sample direction rx sflow disable \[command] sflow disble \[purpose] disable sflow sampling \[view] interface view \[use cases] sonic(config)# interface ethernet 1 sonic(config if 1)# sflow disable
