1204 CHAPTER 94: SFLOW CONFIGURATION
Operation of sFlow sFlow operates as follows:
1 With sFlow enabled, a physical port encapsulates received data into packets and 
sends them to the sFlow agent.
2 The sFlow agent periodically collects interface statistics on all sFlow enabled ports.
3 When the sFlow packet buffer overflows or the one-second timer expires, the 
sFlow agent sends the sFlow packets to the specified sFlow collector.
Configuring sFlow Follow these steps to configure sFlow:
c
CAUTION:
■ The sFlow agent and sFlow collector must not have the same IP address.
■ Currently, you can specify at most two sFlow collectors on the Switch 4800G 
Family.
Displaying sFlow
sFlow Configuration 
Example
Network requirements
■ Host A and Server are connected to Switch through GigabitEthernet 1/0/1 and 
GigabitEthernet 1/0/2 respectively.
■ Host B works as an sFlow collector with IP address 3.3.3.2 and port number 
6343, and is connected to Switch through GigabitEthernet 1/0/3.
To do…  Use the command…  Remarks 
Enter system view  system-view - 
Configure an IP address for 
the sFlow agent 
sflow agent ip ip-address Required
Not configured by default. 
Specify the IP address and 
port number of the sFlow 
collector 
sflow collector ip ip-address 
[ port port-num ] 
Required
Not specified by default. 
Set the sFlow interval  sflow interval interval-time Optional
20 seconds by default. 
Enter interface view  interface interface-type 
interface-number 
- 
Enable sFlow in the inbound 
or outbound direction 
sflow enable { both | 
inbound | outbound } 
Required
Not enabled by default. 
Specify the sFlow sampling 
mode 
sflow sampling-mode 
{ determine | random } 
Optional
random by default.
Currently, the determine 
mode is not supported on the 
Switch 4800G. 
Specify the sFlow sampling 
rate 
sflow sampling-rate rate Optional
200000 by default.
To do…  Use the command…  Remarks 
Display sFlow configuration 
information 
display sflow  Available in any view