Junos OS

 View Only
last person joined: 17 hours ago 

Ask questions and share experiences about Junos OS.

Sflow samples not being sent

  • 1.  Sflow samples not being sent

    Posted 09-22-2023 10:54

    Hi,

    I'm trying to setup sflow on a MX204 running Junos 19.4R2.6 but I don't see any samples begin sent to the collector.

    Here is the relevant config:

    set protocols sflow agent-id 10.177.123.20
    set protocols sflow polling-interval 5
    set protocols sflow sample-rate ingress 1000
    set protocols sflow sample-rate egress 1000
    set protocols sflow source-ip 10.177.123.20
    set protocols sflow collector 10.27.4.18 udp-port 6343
    set protocols sflow interfaces xe-0/1/0.0 sample-rate ingress 1000
    set protocols sflow interfaces xe-0/1/0.0 sample-rate egress 1000
    set protocols sflow interfaces xe-0/1/6.0 sample-rate ingress 1000
    set protocols sflow interfaces xe-0/1/6.0 sample-rate egress 1000
    

    The source is the management interface fxp0 in routing instance mgmt_junos

    set interfaces fxp0 unit 0 family inet address 10.177.123.20/24
    

    Routing is correctly configured in both instances: (This is done by route leaking)

    show route 10.27.4.18
    
    inet.0: 23 destinations, 26 routes (23 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both
    
    10.27.4.18/32      *[Static/5] 00:32:41
                        >  to 10.177.123.9 via fxp0.0
    
    mgmt_junos.inet.0: 4 destinations, 4 routes (4 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both
    
    10.27.4.18/32      *[Static/5] 00:32:41
                        >  to 10.177.123.9 via fxp0.0
    

    I see samples are being collected:

    show sflow
    
    sFlow                   : Enabled
    Adaptive fallback       : Disabled
    Sample limit            : 300 packets/second
    Sample limit Threshold  : 0 packets/second
    Polling interval        : 5 second
    Sample rate egress      : 1:1000: Enabled
    Sample rate ingress     : 1:1000: Enabled
    Agent ID                : 10.177.123.20
    Agent ID IPv6           : No valid agent IPv6
    Source IP address       : 10.177.123.20
    Source IPv6 address     : No valid source IPv6
    
    show sflow interface
    
    Interface         Status              Sample              Adapted            Polling
                                           rate             sample rate          interval
    
                   Egress  Ingress     Egress   Ingress      Egress   Ingress
    xe-0/1/0.0      Enabled Enabled    1000     1000         1000     1000         5
    xe-0/1/6.0      Enabled Enabled    1000     1000         1000     1000         5
    
    show sflow collector
    
    Collector                                  Udp-port    Dscp     Forwarding-Class                No. of samples
     address
    10.27.4.18                                 6343        0        best-effort                     158546
    

    A traffic capture doesn't show any packets being sent out:

    monitor traffic interface fxp0 no-resolve matching "host 10.27.4.18"
    verbose output suppressed, use <detail> or <extensive> for full protocol decode
    Address resolution is OFF.
    Listening on fxp0, capture size 96 bytes
    

    Can someone point me to the right direction?



    ------------------------------
    LANDER VANDENABEELE
    ------------------------------