Junos OS

 View Only
last person joined: yesterday 

Ask questions and share experiences about Junos OS.
  • 1.  J-Flow config: collector is showing from my loopback address?

    Posted 09-22-2022 13:12
    Hi All, 

    I have an SRX 320 and i have applied the below config but my collector is not receiving the flow from 10.X.X.5. It is receiving it from the below configured lo0.0?

    Is there a configuration needed so that on my collector when i search for 10.X.X.5 it shows the flow and not from 172 address. Loopback is not in the same routing-instance as irb.1?

    Model: srx320
    Junos: 19.4R3-S1.3
    JUNOS Software Release [19.4R3-S1.3]

    Thanks in advance.

    set services flow-monitoring version9 template ipv4-test ipv4-template

    set forwarding-options sampling input rate 100
    set forwarding-options sampling family inet output flow-server 10.X.X.X port 2055
    set forwarding-options sampling family inet output flow-server 10.X.X.X version9 template ipv4-test
    set forwarding-options sampling family inet output inline-jflow source-address 10.X.X.5

    set routing-instances INSTANCE interface irb.1
    set interfaces irb unit 1 family inet sampling input
    set interfaces irb unit 1 family inet sampling output
    set interfaces irb unit 1 family inet address 10.X.X.5/24

    set interfaces lo0 unit 0 family inet address 172.X.X.3/32


    ------------------------------
    KEVIN MCCARTAN
    ------------------------------


  • 2.  RE: J-Flow config: collector is showing from my loopback address?

    Posted 09-22-2022 19:36
    looks like you are sending flow from a virtual router routing instance.  So the forwarding options configurations need to happen also in that same virtual router and not at the base routing instance.

    Just run the same commands under the instance name then forwarding options.

    ------------------------------
    Steve Puluka BSEET - Juniper Ambassador
    IP Architect - DQE Communications Pittsburgh, PA (Metro Ethernet & ISP - Retired)
    http://puluka.com/home
    ------------------------------



  • 3.  RE: J-Flow config: collector is showing from my loopback address?

    Posted 09-23-2022 06:43
    Thanks for that, I've now removed 
    set forwarding-options sampling input rate 500
    set forwarding-options sampling family inet output flow-server 10.X.X.106 port 2055
    set forwarding-options sampling family inet output flow-server 10.X.X.106 version9 template ipv4-test
    set forwarding-options sampling family inet output inline-jflow source-address 10.X.X.250

    and replaced with 
    set routing-instances INSTANCE forwarding-options sampling input rate 500
    set routing-instances INSTANCE forwarding-options sampling family inet output flow-server 10.X.X.106 port 2055
    set routing-instances INSTANCE forwarding-options sampling family inet output flow-server 10.X.X.106 version9 template ipv4-test
    set routing-instances INSTANCE forwarding-options sampling family inet output inline-jflow source-address 10.X.X.250

    but commit check fails with this: - it wont allow me to add sampling to the interface when its configured in the instance? 
    [edit interfaces irb unit 1 family inet]
    'sampling'
    Requires forwarding-options sampling or packet-capture config
    error: configuration check-out failed: (statements constraint check failed)

    How do I configure sampling on the interfaces?

    ------------------------------
    KEVIN MCCARTAN
    ------------------------------