Follow these steps to configure Juniper flow monitoring with NetFlow Analyzer:
The following example demonstrates how to configure Junos Traffic Vision for flow monitoring
Enabling the Services Interface Card
set interfaces ms-2/0/0 unit 0 family inet
Configuring the Template and Timers
set services flow-monitoring version9 template template1
set services flow-monitoring version9 template template1 flow-active-timeout 120
set services flow-monitoring version9 template template1 flow-inactive-timeout 60
set services flow-monitoring version9 template template1 ipv4-template
set services flow-monitoring version9 template template1 template-refresh-rate packets 100
set services flow-monitoring version9 template template1 template-refresh-rate seconds 600
set services flow-monitoring version9 template template1 option-refresh-rate packets 100
set services flow-monitoring version9 template template1 option-refresh-rate seconds 600
Configuring Service Set Properties
set services service-set ss1 jflow-rules sampling
set services service-set ss1 sampling-service service-interface ms-2/0/0.0
Configuring Forwarding Options and Flow Server Settings
set forwarding-options sampling input rate 10
set forwarding-options sampling input run-length 18
set forwarding-options sampling family inet output flow-server 10.44.4.3 port 1055
set forwarding-options sampling family inet output flow-server 10.44.4.3 version9 template template1
set forwarding-options sampling family inet output interface ms-2/0/0.0 source-address 203.0.113.1
The following example requires you to navigate through multiple levels of the configuration hierarchy.
Configure the services interface.
[edit interfaces] user@router1# set interfaces ms-2/0/0 unit 0 family inet
user@router1# set interfaces ms-2/0/0 unit 1 family inet6
user@router1# set interfaces ms-2/0/0 unit 2 family mpls
Configure the template properties and the export policy timers.
[edit services]
user@router1# set flow-monitoring version9 template template1
user@router1# set flow-monitoring version9 template template1 flow-active-timeout 120
user@router1# set flow-monitoring version9 template template1 flow-inactive-timeout 60
user@router1# set flow-monitoring version9 template template1 ipv4-template
user@router1# set flow-monitoring version9 template template1 template-refresh-rate packets 100
user@router1# set flow-monitoring version9 template template1 template-refresh-rate seconds 600
user@router1# set flow-monitoring version9 template template1 option-refresh-rate packets 100
user@router1# set flow-monitoring version9 template template1 option-refresh-rate seconds 600
Configure service set properties.
[edit services]
user@router1# set service-set ss1 jflow-rules sampling
user@router1# set service-set ss1 sampling-service service-interface ms-2/0/0.0
Configure forwarding options and flow-server properties.
[edit forwarding-options]
user@router1# set sampling input rate 10
user@router1# set sampling input run-length 18
user@router1# set sampling family inet output flow-server 10.44.4.3 port 1055
user@router1# set sampling family inet output flow-server 10.44.4.3 version9 template template1
user@router1# set sampling family inet output interface ms-2/0/0.0 source-address 203.0.113.1
For more details on the configuration, visit Juniper's jFlow v9 configuration page.