Description

This article explains on verifying if the Sflow issue at Switch end or Collector end.

Symptoms

Collector is unable to receive samples from the switch

Solution

  • Verify the UDP port number configured yyyy is same on both ends i.e. switch and collector :

[edit protocols]

User@switch # set sflow collector xx.xx.xx.xx udp-port yyyy

 

Note : You can configure a maximum of 4 collectors

 

  • Verify that sFlow technology is configured properly:
User@switch > show sflow
sFlow                   : Enabled
Adaptive fallback       : Disabled
Sample limit            : 300 packets/second
Sample limit Threshold  : 0 packets/second
Polling interval        : 20 second
Sample rate egress      : 1:1000: Enabled
Sample rate ingress     : 1:2048: Disabled
Agent ID                : zz.zz.zz.zz
Agent ID IPv6           : No valid agent IPv6
Source IP address       : zz.zz.zz.zz
Source IPv6 address     : No valid source IPv6

Note: You cannot enable sFlow technology on a Layer 3 VLAN-tagged interface.

 

 

  • Verify if the polling-interval is set to non-zero value ( Specify 0 if you do not want to poll the interface)

[edit protocols sflow] 

User@switch # set polling-interval 20  

 

Note : The polling interval can also be specified as a global parameter.

 

 

  • Verify that sFlow technology is enabled on the specified interfaces and display the sampling parameters as configured

User@switch> show sflow interface                     
Interface        Status      Sample rate    Adapted sample rate   Polling-interval
            Egress Ingress   Egress Ingress   Egress Ingress
ge-0/0/0.0  Enabled  Disabled  1000    2048    1000     2048            20

 

 

  • Verify if the Number of Samples increments to the collector configured:

User@switch> show sflow collector | refresh 2

Collector                                  Udp-port    Dscp     Forwarding-Class                No. of samples
address

xx.xx.xx.xx                               2055          0         best-effort                      10

---(refreshed at 2024-12-07 21:40:35 IST)---

xx.xx.xx.xx                               2055          0         best-effort                      30  <<--- Incrementing

 

  • Verify if there is a proper route with the expected egress interface to the collector.

User@switch> show route 10.62.129.33

inet.0: 3 destinations, 3 routes (3 active, 0 holddown, 0 hidden)
Limit/Threshold: 32768/32768 destinations
+ = Active Route, - = Last Active, * = Both

0.0.0.0/0          *[Static/5] 12w5d 03:28:41
                    >  to zz.zz.zz.zz via irb.254

Note : By default, Junos will use the default routing instance to send sFlow packets. if you're using non-default routing-instance like "mgmt_junos" to send sflow packets to the collector , then you need to create a static route with the destination IP of the collector and the next hop of the "mgmt_junos" routing table.

User@switch # set routing-options static route xx.xx.xx.xx/32 next-table mgmt_junos.inet.0


  • If still the Collector/Sflow don't collect the data properly, Try using the default registered UDP port for Sflow i.e. 6343 on both ends.

User@switch # set protocols sflow collector 192.168.10.1 udp-port 6343

 

 

  • Verify if there are Sample packets are being sent properly to the collector with the configured UDP port yyyy ( Use 6343 If default UDP port is configured )

User@switch> monitor traffic interface irb.254 no-resolve size 9000 detail matching udp
Address resolution is OFF.
Listening on irb.254, capture size 9000 bytes

15:49:08.212016 Out IP (tos 0x0, ttl 255, id 32719, offset 0, flags [none], proto: UDP (17), length: 232) zz.zz.zz.zz.59543 > xx.xx.xx.xx.yyyy: UDP, length 204

 

 

By these steps , It can conclude that S-flow is working fine on the switch by sending out the samples to the collector on the mentioned UDP port yyyy.

We need to check at the Collector side.

Modification History

2024-12-19 : Article Created

Related Information