CÔNG TY TNHH CÔNG NGHỆ VIỆT THÁI DƯƠNG
Logo CNTTShop.vn

NTT03, Line 1, Thống Nhất Complex, Thanh Xuân, Hà Nội.
Danh mục sản phẩm

Configure sFlow Basic Functions Example

Network Requirements

  • Device is the sFlow agent device and the route with the NMS server is reachable.
  • The NMS server monitors the interface data traffic of Device via sFlow.

Network Topology

Networking of configuring the sFlow basic functions

Figure 6-1 Networking of configuring the sFlow basic functions

Configuration Steps

Step 1: Configure VLAN and add the interface to the corresponding VLAN. (Omitted)

Step 2: Configure the IP address of the interface. (Omitted)

Step 3: Configure the sFlow function.

#Enable the sFlow agent.

Device#configure terminal
Device(config)#sflow agent ip 1.1.1.1

#Configure the destination IP address and destination UDP interface number of the sFlow statistics output packet, the interval of sending packet is 5s, and the buffer size is 1400 bytes.

Device(config)#sflow receiver 1 owner 1 ip 129.255.151.10 timeout 5 udp-port 6343 packet- size 1400

#Perform the sampler sampling for the ingress flow of interface gigabitethernet0/1 and the sampling frequency is 10.

Device(config)#interface gigabitethernet 0/1
Device(config-if-gigabitethernet0/1)#sflow sampler receiver 1 sample-rate 10 direction rx

#Perform the poller sampling for the ingress flow of interface gigabitethernet0/1 and the polling period is 20s.

Device(config-if-gigabitethernet0/1)#sflow poller 1 receiver 1 interval 20
Device(config-if-gigabitethernet0/1)#exit

Step 4: Check the result.

#View the sFlow information on Device.

Device#show sflow  
sFlow Agent Configuration: (Interval = 120, Current Tick = 0x002a6476) 
 
                Address              Receivers Samplers Pollers                     
  Version  Id   Type  Net Address  Socket  Number  Number   Number Boot  Time / Exec Time   
  ------   ---  ----  -----------  ------  ------  ------   -----------  -----/-------------- 	  	  	  	  	  	  	  
   1.3     1    IPv4  1.1.1.1      0x1c    1/78    1/156    1/156        0x00000ab2/0x002a644c   
 
sFlow Receivers Configuration: (Reset Delta = 18000, Current Tick = 0x002a6476) 
 
                                                             Datagram Maximum                           
  Index  Owner  Net Address     Port   Version  Datagram  Timeout  Reset Time / Expire Time   	  	  	  	  	  	  	
  -----  -----  --------------  -----  -------  --------  -------  -----------/-----------	  
   1     1      129.255.151.10  6343   5        1400       5       0x002a644c/0x002a6578             
 
sFlow Samplers Configuration:        
 
 Sampling Types: H - raw packet header E ethernet packet 
                 F - IPv4 packet       S IPv6 packet   
 
               Receiver Sampling Sampling Maximum Sampling Pkts Number    
   Interface  Index   Rate    Direction  Header Types    (Curr/Last)    
   ---------  ------  -----  ----------- ------ ------   -------------- 	  	  	  	  	  
   gi0/1      1       10      rx         128     H        0x0000/0x0001   
        
 
sFlow Pollers Configuration: (Current Tick = 0x002a6476)      
 
 Sampling Types: G - generic counter 
                 E - ethernet counter 
 
                        Receiver Sampling                        
   Interface Instance  Index Types Interval  Countdown    
   --------- --------  ----- ----- --------  ----------  	  	  	  	  	  
   gi0/1     1         1      G    10        0x002a65b4 

#On NMS, we can view the ingress flow information of interface gigabitethernet0/1 on Device.