Support Support Downloads Knowledge Base Case Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[EX] Sflow does not work when the collector is reachable via me0 and another route is present to it via network ports



Article ID: KB23581 KB Last Updated: 20 Apr 2012Version: 2.0

This article describes the issue with sflow, when the collector is reachable via me0 (management port) and and an alternate route is available to the collector via a network port.


Sflow does not work with me0 as the agent IP, when there is an alternate route to the collector via a network port.

(xe-0/0/4)EX8200(me0)-------(ge-0/0/0)EX4200(ge-0/0/23)--------Server with sflow utility
  • EX8200's xe-0/0/4 - sflow interface

  • EX8200's me0 -

  • Ex4200 - Layer3 router

  • Collector IP -

Sflow configuration

sflow {
polling-interval 5;
sample-rate {
     ingress 10;
     egress 10;
collector {
     udp-port 6343;
interfaces xe-0/0/0.0 {
     sample-rate {
         ingress 1;
         egress 1;

Sflow sample counter is increasing, but the packets will not go out of me0. 
root> show sflow collector
Collector Udp-port No. of samples
address 6343 4484266

root> show sflow collector
Collector Udp-port No. of samples
address 6343 4484269  
<----- Number of samples increasing 

The route lookup for the collector at the kernel and PFE are different, which is the cause of this issue. 
  • Route in kernel pointing to me0; as intended: >
    root# run show route

    inet.0: 16 destinations, 16 routes (16 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both *[Static/5] 02:42:23
    > to via me0.0

  • Route in PFE (The only matching route is the default route which points to a network port)
    root# run show pfe route ip

    Slot 0

    IPv4 Route Table 0, default.0, 0x0:
    Destination NH IP Addr Type NH ID Interface
    ------------ --------------- -------- ----- ---------
    default Unicast 1358 RT-ifl 0 ae0.0 ifl 67 <-- default route pointing towards a network port


You have to set a static receive route towards the collector for appropriate forwarding of the packet.

  1. Assume the collector IP is IP1. Add a static route to IP1, as the best route via me0 to reach the collector.

  2. Add an additional static receive route, which should be the second best route to the collector.

For example:

[edit routing-options static]
root# show

route next-hop; <--- Best route via me0
route receive; 
<--- Second best route towards collector
Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search