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

0

0

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

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.


Symptoms:

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


Topology
(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 - 192.168.148.10

  • Ex4200 - Layer3 router

  • Collector IP - 192.168.18.166

Sflow configuration

sflow {
agent-id 192.168.148.10;
polling-interval 5;
sample-rate {
     ingress 10;
     egress 10;
}
source-ip 192.168.148.10;
collector 192.168.18.166 {
     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
192.168.18.166 6343 4484266

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

Cause:
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 192.168.18.166

    inet.0: 16 destinations, 16 routes (16 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both

    192.168.18.128/25 *[Static/5] 02:42:23
    > to 192.168.148.11 via me0.0

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

    Slot 0

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


Solution:

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 192.168.18.166/32 next-hop 192.168.148.11; <--- Best route via me0
route 192.168.18.164/30 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