Trying to configure sFlow on EX4400.
The device indicates that sampling is active however the collector is not receiving any data.
EX4400> show sflow collector detail
Sflow Collector Information
Collector Address: 10.10.10.10, Collector UDP Port: 6343
DSCP Value: 0, Forwarding Class: best-effort
Number of Counter Samples: 0, Number of Flow Samples: 0
Number of Samples: 33650, Number of Datagrams: 0
Number of Datagrams: 0.
This indicates that while the switch has generated samples (Number of Samples: 33650) it has not successfully packaged them into UDP datagrams to send to your collector at 10.10.10.10.
This should be incrementing. If it stays at zero, the switch is failing to build the export packet.
Number of Flow Samples(0): While you have a high count of "Samples," having zero "Flow Samples" suggests the switch might be seeing control plane traffic or metadata but isn't capturing actual transit traffic flows.
There is a route and an interface associated to the Collector.
In this case interface xe-0/2/1
EX4400> show route forwarding-table destination 10.10.10.10
Routing table: default.inet
Internet:
Destination Type RtRef Next hop Type Index NhRef Netif
default user 2 aa:bb:cc:dd:ee:ff ucst 1894 5 xe-0/2/1.0
default perm 0 rjct 51 1
This is the configuration:
set sFlow protocols sflow polling-interval 30
set sFlow protocols sflow sample-rate ingress 256
set sFlow protocols sflow sample-rate egress 256
set sFlow protocols sflow collector 10.10.10.10 udp-port 6343
set sFlow protocols sflow interfaces xe-0/2/1.0
Interface xe-0/2/1 is a trunk interface
set interfaces xe-0/2/1 unit 0 family ethernet-switching interface-mode trunk
set interfaces xe-0/2/1 unit 0 family ethernet-switching vlan members all
The collector is reachable
EX4400> ping 10.10.10.10
PING 10.10.10.10 (10.10.10.10): 56 data bytes
64 bytes from 10.10.10.10: icmp_seq=0 ttl=59 time=22.200 ms
64 bytes from 10.10.10.10: icmp_seq=1 ttl=59 time=60.535 ms
In this example xe-0/2/1 interface was configured for sampling but was also the interface to reach the collector. After re-configuring the Sflow to take samples from a different interface the samples will start to flow. So, by configuring xe-0/2/0 instead of xe-0/2/1 this change will get the samples from xe-0/2/0 to go to collector connected in xe-0/2/1