Forum Discussion

Anonymous's avatar
Anonymous
9 years ago

Juniper Netflow configuration examples

Like most of you, I have a long list of "To-do's" in our LogicMonitor deployment.  One that I just recently crossed off is capturing Netflow.  More accurately, capturing sFlow from Juniper EX/QFX s...
  • Michael_Dieter's avatar
    9 years ago

    OK, I've finally had a chance to validate this configuration and I can tell you that it works, with a few minor alterations....see below.

    I have deployed this on an MX-80 running Junos 13.3R9.13.  One other relevant addendum to my original "you need to know your MX HW & SW in detail" caveat: I have 20 x1 GE and 2 x 10GE MIC-3D powering my physical interfaces; if you have anything else consult Juniper documentation for sampling support information.  good luck with that :(

    set chassis fpc 1 sampling-instance NETFLOW-INSTANCE

    #####The above statement is valid for MX-240, MX-480, and MX-960 HW, though you will need to specify the fpc you want to use.  Also, there are very likely some limitations with regards to the number of sampling instances per fpc that you can create, the total number of instances that can be configured per chassis, and whether any single instance can span multiple fpc.

    #####The below statement is valid for MX-80 HW.  Given that MX-80 has a single tfeb, there are almost certainly much stricter limitations that govern the configuration of the number and deployment of sampling instances.

    set chassis tfeb0 slot 0 sampling-instance NETFLOW-INSTANCE

     

    #####From here down is the same regardless of MX model, though of course the physical and logical interfaces will vary.


    set chassis network-services ip

    set services flow-monitoring  version9 template LM-V9 option-refresh-rate seconds 25
    set services flow-monitoring  version9 template LM-V9 template-refresh-rate seconds 15
    set services flow-monitoring  version9 template LM-V9 ipv4-template


    set forwarding-options sampling instance NETFLOW-INSTANCE input rate 1 run-length 0
    set forwarding-options sampling instance NETFLOW-INSTANCE family inet output flow-server 192.168.1.2 port 2055
    set forwarding-options sampling instance NETFLOW-INSTANCE family inet output flow-server 192.168.1.2 source 192.168.10.1   source-address 192.168.10.1
    set forwarding-options sampling instance NETFLOW-INSTANCE family inet output flow-server 192.168.1.2 version9 template LM-V9
    set forwarding-options sampling instance NETFLOW-INSTANCE family inet output inline-jflow source-address 192.168.10.1

    set interfaces ge-1/3/3 unit 2630 family inet sampling input
    set interfaces ge-1/3/3 unit 2630 family inet sampling output