- play_arrow Flow Capture Services
- play_arrow Dynamically Capturing Packet Flows Using Junos Capture Vision
- play_arrow Detecting Threats and Intercepting Flows Using Junos Flow-Tap and FlowTapLite Services
- Understanding the FlowTap and FlowTapLite Services
- Understanding FlowTap and FlowTapLite Architecture
- Configuring the FlowTap Service on MX Series Routers
- Configuring a FlowTap Interface on MX Series Routers
- Configuring FlowTap and FlowTapLite Security Properties
- FlowTap and FlowTapLite Application Restrictions
- Examples: Configuring the FlowTapLite Application on MX Series and ACX Series Routers
- Configuring FlowTapLite on MX Series Routers and M320 Routers with FPCs
-
- play_arrow Inline Monitoring Services and Inband Network Telemetry
- play_arrow Inline Monitoring Services
- play_arrow Flow-Based Telemetry
- play_arrow Inband Flow Analyzer 2.0
- play_arrow Juniper Resiliency Interface
-
- play_arrow Sampling and Discard Accounting Services
- play_arrow Sampling Data Using Traffic Sampling and Discard Accounting
- play_arrow Sampling Data Using Inline Sampling
- Understand Inline Active Flow Monitoring
- Configuring Inline Active Flow Monitoring Using Routers, Switches or NFX250
- Configuring Inline Active Flow Monitoring on MX80 and MX104 Routers
- Configuring Inline Active Flow Monitoring on PTX Series Routers
- Inline Active Flow Monitoring of MPLS-over-UDP Flows on PTX Series Routers
- Inline Active Flow Monitoring on IRB Interfaces
- Example: Configuring Inline Active Flow Monitoring on MX Series and T4000 Routers
- play_arrow Sampling Data Using Flow Aggregation
- Understanding Flow Aggregation
- Enabling Flow Aggregation
- Configuring Flow Aggregation on MX, M and T Series Routers and NFX250 to Use Version 5 or Version 8 cflowd
- Configuring Flow Aggregation on MX, M, vMX and T Series Routers and NFX250 to Use Version 9 Flow Templates
- Configuring Flow Aggregation on PTX Series Routers to Use Version 9 Flow Templates
- Configuring Inline Active Flow Monitoring to Use IPFIX Flow Templates on MX, vMX and T Series Routers, EX Series Switches, NFX Series Devices, and SRX Series Firewalls
- Configuring Flow Aggregation to Use IPFIX Flow Templates on PTX Series Routers
- Configuring Observation Domain ID and Source ID for Version 9 and IPFIX Flows
- Configuring Template ID and Options Template ID for Version 9 and IPFIX Flows
- Including Fragmentation Identifier and IPv6 Extension Header Elements in IPFIX Templates on MX Series Routers
- Directing Replicated Flows from M and T Series Routers to Multiple Flow Servers
- Logging cflowd Flows on M and T Series Routers Before Export
- Configuring Next-Hop Address Learning on MX Series and PTX Series Routers for Destinations Accessible Over Multiple Paths
-
- play_arrow Real-Time Performance Monitoring and Video Monitoring Services
- play_arrow Monitoring Traffic Using Real-Time Performance Monitoring and Two-Way Active Monitoring Protocol (TWAMP)
- Understanding Using Probes for Real-Time Performance Monitoring on M, T, ACX, MX, and PTX Series Routers, EX and QFX Switches
- Configuring RPM Probes on M, MX and T Series Routers and EX Series Switches
- Understanding Real-Time Performance Monitoring on EX and QFX Switches
- Real-Time Performance Monitoring for SRX Devices
- Configuring RPM Receiver Servers
- Limiting the Number of Concurrent RPM Probes on M, MX, T and PTX Routers and EX Series Switches
- Configuring RPM Timestamping on MX, M, T, and PTX Series Routers and EX Series Switches
- Configuring the Interface for RPM Timestamping for Client/Server on a Switch (EX Series)
- Analyzing Network Efficiency in IPv6 Networks on MX Series Routers Using RPM Probes
- Configuring BGP Neighbor Discovery Through RPM
- Examples: Configuring BGP Neighbor Discovery on SRX Series Firewalls and MX, M, T and PTX Series Routers With RPM
- Trace RPM Operations
- Examples: Configuring Real-Time Performance Monitoring on MX, M, T and PTX Series Routers
- Enabling RPM on MX, M and T Series Routers and SRX Firewalls for the Services SDK
- Understand Two-Way Active Measurement Protocol
- Configure TWAMP on ACX, MX, M, T, and PTX Series Routers, EX Series and QFX10000 Series Switches
- Example: Configuring TWAMP Client and Server on MX Series Routers
- Example: Configuring TWAMP Client and Server for SRX Series Firewalls
- Understanding TWAMP Auto-Restart
- Configuring TWAMP Client and TWAMP Server to Reconnect Automatically After TWAMP Server Unavailability
- play_arrow Managing License Server for Throughput Data Export
- play_arrow Testing the Performance of Network Devices Using RFC 2544-Based Benchmarking
- Understanding RFC 2544-Based Benchmarking Tests on MX Series Routers and SRX Series Firewalls
- Understanding RFC2544-Based Benchmarking Tests for E-LAN and E-Line Services on MX Series Routers
- Supported RFC 2544-Based Benchmarking Statements on MX Series Routers
- Configuring an RFC 2544-Based Benchmarking Test
- Enabling Support for RFC 2544-Based Benchmarking Tests on MX Series Routers
- Example: Configure an RFC 2544-Based Benchmarking Test on an MX104 Router for Layer 3 IPv4 Services
- Example: Configuring an RFC 2544-Based Benchmarking Test on an MX104 Router for UNI Direction of Ethernet Pseudowires
- Example: Configuring an RFC 2544-Based Benchmarking Test on an MX104 Router for NNI Direction of Ethernet Pseudowires
- Example: Configuring RFC2544-Based Benchmarking Tests on an MX104 Router for Layer 2 E-LAN Services in Bridge Domains
- Example: Configuring Benchmarking Tests to Measure SLA Parameters for E-LAN Services on an MX104 Router Using VPLS
- play_arrow Configuring RFC 2544-Based Benchmarking Tests on ACX Series
- RFC 2544-Based Benchmarking Tests for ACX Routers Overview
- Layer 2 and Layer 3 RFC 2544-Based Benchmarking Test Overview
- Configuring RFC 2544-Based Benchmarking Tests
- Configuring Ethernet Loopback for RFC 2544-Based Benchmarking Tests
- RFC 2544-Based Benchmarking Test States
- Example: Configure an RFC 2544-Based Benchmarking Test for Layer 3 IPv4 Services
- Example: Configuring an RFC 2544-Based Benchmarking Test for NNI Direction of Ethernet Pseudowires
- Example: Configuring an RFC 2544-Based Benchmarking Test for UNI Direction of Ethernet Pseudowires
- Configuring a Service Package to be Used in Conjunction with PTP
- play_arrow Tracking Streaming Media Traffic Using Inline Video Monitoring
- Understanding Inline Video Monitoring on MX Series Routers
- Configuring Inline Video Monitoring on MX Series Routers
- Inline Video Monitoring Syslog Messages on MX Series Routers
- Generation of SNMP Traps and Alarms for Inline Video Monitoring on MX Series Routers
- SNMP Traps for Inline Video Monitoring Statistics on MX Series Routers
- Processing SNMP GET Requests for MDI Metrics on MX Series Routers
-
- play_arrow Configuration Statements and Operational Commands
Example: Sampling Instance Configuration
You can configure active sampling using a sampling instance and associate that sampling instance to a particular Flexible Port Concentrator (FPC), Modular Port Concentrator (MPC), or Dense Port Concentrator (DPC). In addition, you can define multiple sampling instances associated with multiple destinations and protocol families per sampling instance destination.
Example Network Details
The following example shows the configuration of two sampling instances on an MX480 router running Junos OS Release 9.6.

In Figure 1, packets
from Router 1 arrive on the monitoring router's Gigabit Ethernet ge-0/1/0
interface, the packets are sampled by the services
interface sp-2/0/0
and sent to the cflowd server by the
export interface ge-1/0/4
. Packets from Router 3 arrive
on the monitoring router’s Gigabit Ethernet ge-3/1/0
interface, the packets are sampled by the services interface sp-2/1/0
and sent to the cflowd server by the export interface ge-1/0/4
. Normal traffic flow from ge-0/1/0
and ge-3/1/0
to ge-1/0/0
and on to Router 2 continues
undisturbed during the sampling process. In active flow monitoring,
both the input interface and exit interface can be any interface type
(such as SONET/SDH, Gigabit Ethernet, and so on).
Only one sampling instance can be attached to an FPC, MPC, or DPC. Multiple families can be configured under a sampling instance. Each family can have its own collector address. You can define sampling instances and attach each instance to different FPCs, or a single sampling instance can be attached to all FPCs.
The sampling configuration for this example includes the following:
Two sampling instances,
s0
ands1
, configured to collect sampling data at the[edit forwarding-options]
hierarchy level. Theflow-server
statement includes the IP address, port, and template of the flow server. Theinterface
statement includes the services interface,sp-2/0/0
orsp-2/1/0
, for flow record processing, and the source address of the incoming router on the sampled interface.The binding of the two sampling instances to FPCs 0 and 3. These are configured with the
sampling-instance
statement at the[edit chassis fpc slot]
hierarchy level.Sampling activated on the input interfaces
ge-0/1/0
andge-3/1/0
using thesampling
statement at the[edit interfaces interface-name unit unit-number family family]
hierarchy level.
In this example, the ping
command is issued on Router
1 to Router 2 via the MX480 router to generate traffic. After the
packets are generated, show
commands are issued to verify
that the sampling configuration is working as expected.
Example Router Configuration
The following output shows the configuration of an MX480 router with two sampling instances.
user@MX480–router> show configuration [...Output Truncated...] } chassis { fpc 0 { # The fpc number is associated with the interface on which sampling is enabled, ge-0/1/0 in this statement. sampling-instance s0; } fpc 3 { # The fpc number is associated with the interface on which sampling is enabled, ge-3/1/0 in this statement. sampling-instance s1; } } interfaces { ge-0/1/0 { # This interface has sampling activated. unit 0 { family inet { sampling { # Here sampling is activated. input; } address 10.0.0.1/30; } } } ge-1/0/0 { # The interface on which packets are exiting the router. unit 0 { family inet { address 192.0.2.1/30; } } } ge-1/0/4 { # The interface connected to the cflowd server. unit 0 { family inet { address 198.51.100.1/32; } } } sp-2/0/0 { # The service interface that samples the packets from Router 1. unit 0 { family inet; } } sp-2/1/0 { # The service interface that samples the packets from Router 3. unit 0 { family inet; } } ge-3/1/0 { # This interface has sampling activated. unit 0 { family inet { sampling { # Here sampling is activated. input; } address 192.168.2.1/30; } } } } forwarding-options { sampling { instance { s0 { input { rate 1; run-length 0; } family inet { output { flow-server 198.51.100.2 { # The address of the external server. port 2055; version9 { template { v4 } } } interface sp-2/0/0 { source-address 192.168.1.1; # Source address of the sampled packets } } } } s1 { input { rate 1; run-length 0; } family inet { output { flow-server 198.51.100.2 { # The address of the external server. port 2055; version9 { template { v4 } } } interface sp-2/1/0 { source-address 192.168.1.2; # Source address of the sampled packets } } } } } } } routing-options { static { route 203.0.113.0/8 next-hop 192.0.2.2; } } services { flow-monitoring { version9 { template v4 { flow-active-timeout 30; flow-inactive-timeout 30; ipv4-template; } } } }
Configuration Commands Used for the Configuration Example
The following set
commands are used for the configuration
of the sampling instance in this example. Replace the values in these
commands with values relevant to your own network.
set chassis fpc 0 sampling-instance s0
set chassis fpc 3 sampling-instance s1
set interfaces ge-0/1/0 unit 0 family inet sampling input
set interfaces ge-0/1/0 unit 0 family inet address
set interfaces ge-1/0/0 unit 0 family inet address
set interfaces sp-2/0/0 unit 0 family inet
set interfaces sp-2/1/0 unit 0 family inet
set interfaces ge-3/1/0 unit 0 family inet sampling input
set interfaces ge-3/1/0 unit 0 family inet address
set forwarding-options sampling instance s0 input rate 1
set forwarding-options sampling instance s0 input run-length 0
set forwarding-options sampling instance s0 family inet output flow-server 198.51.100.2 port 2055
set forwarding-options sampling instance s0 family inet output flow-server 198.51.100.2 version9 template v4;
set forwarding-options sampling instance s0 family inet output interface sp-2/0/0 source-address 192.168.1.1
set forwarding-options sampling instance s1 input rate 1
set forwarding-options sampling instance s1 input run-length 0
set forwarding-options sampling instance s1 family inet output flow-server 198.51.100.2 port 2055
set forwarding-options sampling instance s1 family inet output flow-server 198.51.100.2 version9 template v4;
set forwarding-options sampling instance s1 family inet output interface sp-2/1/0 source-address 192.168.1.2
set routing-options static route 203.0.113.0/8 next-hop 192.0.2.2
set services flow-monitoring version9 template v4 flow-active-timeout 30
set services flow-monitoring version9 template v4 flow-inactive-timeout 30
set services flow-monitoring version9 template v4 ipv4-template
Verifying Your Work
To verify that your configuration is working as expected, use the following commands on the router that is configured with the sampling instance:
show services accounting aggregation template template-name template-name
show services accounting flow
The following shows the output of the show
commands
issued on the MX480 router used in this configuration example:
user@MX480–router> show services accounting aggregation template template-name v4 Src Dst Port/ Port/ Source Destination ICMP ICMP Packet Address Address Type Code Proto TOS Count 10.0.0.6 203.0.113.3 100 1000 17 8 14 10.0.0.5 203.0.113.2 100 1000 17 8 15 10.0.0.3 203.0.113.3 100 1000 17 8 15 10.0.0.2 203.0.113.3 100 1000 17 8 15 10.0.0.4 203.0.113.2 100 1000 17 8 15 10.0.0.6 203.0.113.2 100 1000 17 8 15 10.0.0.4 203.0.113.3 100 1000 17 8 15 10.0.0.2 203.0.113.2 100 1000 17 8 16 10.0.0.3 203.0.113.2 100 1000 17 8 15 10.0.0.5 203.0.113.3 100 1000 17 8 15 user@MX480–router> show services accounting aggregation template template-name v4 Src Dst Port/ Port/ Source Destination ICMP ICMP Packet Address Address Type Code Proto TOS Count 10.0.0.6 203.0.113.3 100 1000 17 8 16 10.0.0.5 203.0.113.2 100 1000 17 8 17 10.0.0.3 203.0.113.3 100 1000 17 8 16 10.0.0.2 203.0.113.3 100 1000 17 8 16 10.0.0.4 203.0.113.2 100 1000 17 8 17 10.0.0.6 203.0.113.2 100 1000 17 8 17 10.0.0.4 203.0.113.3 100 1000 17 8 16 10.0.0.2 203.0.113.2 100 1000 17 8 17 10.0.0.3 203.0.113.2 100 1000 17 8 17 10.0.0.5 203.0.113.3 100 1000 17 8 16 user@MX480–router> show services accounting flow Flow information Interface name: sp-2/0/0, Local interface index: 152 Flow packets: 884, Flow bytes: 56576 Flow packets 10-second rate: 0, Flow bytes 10-second rate: 628 Active flows: 10, Total flows: 35 Flows exported: 75, Flows packets exported: 14 Flows inactive timed out: 25, Flows active timed out: 75 user@MX480–router> show services accounting flow Flow information Interface name: sp-2/0/0, Local interface index: 152 Flow packets: 898, Flow bytes: 57472 Flow packets 10-second rate: 0, Flow bytes 10-second rate: 628 Active flows: 10, Total flows: 35 Flows exported: 75, Flows packets exported: 14 Flows inactive timed out: 25, Flows active timed out: 75