Configuring Sampling Instance on MX, M and T Series Routers or QFX Series Switches
You can configure active sampling by defining a sampling instance that specifies a name for the sampling parameters and bind the instance name to an FPC, MPC, or DPC. This configuration enables you to define multiple named sampling parameter sets associated with multiple destinations and protocol families per sampling destination. With the cflowd version 5 and version 8 and flow aggregation version 9, you can use templates to organize the data gathered from sampling.
To implement this feature, you include the instance
statement at the [edit forwarding-options sampling]
hierarchy
level.
The following considerations apply to the sampling instance configuration:
This configuration is supported on the IP version 4 (
inet
), IP version 6 (ipv6
), and MPLS protocol families.You can configure the router to perform sampling in either of two locations:
On the Routing Engine, using the sampled process. To select this method, use a filter (input or output) with a matching term that contains the
then
sample statement.On the Monitoring Services, Adaptive Services, or Multiservices PIC. Specify the interface name at the
[forwarding-options sampling instance instance-name family inet output interface]
hierarchy level. You can configure the same or different services PICs in a set of sampling instances.
You can configure the
rate
andrun-length
options at the[edit forwarding-options sampling input]
hierarchy level to apply common values for all families on a global basis. Alternatively, you can configure these options at the[edit forwarding-options sampling instance instance-name input]
hierarchy level to apply specific values for each instance or at the[edit forwarding-options sampling instance instance-name family family input]
hierarchy level to apply specific values for each protocol family you configure.Starting in Junos OS Release 16.1, for inline active flow monitoring, you can configure a Differentiated Services Code Point (DSCP) mapping and a forwarding class to apply to exported packets. Use the
dscp
andforwarding-class
options at the[edit forwarding-options sampling instance-name family (inet | inet6) output flow-server hostname]
hierarchy level.For MX Series devices with Modular Port Concentrators (MPCs), port-mirrored or sampled packets can be truncated (or clipped) to any length in the range of 1 through 255 bytes. Only the values 1 to 255 are valid for packet truncation on these devices. For other devices, the range is from 0 through 9216. A maximum-packet-length value of zero (0) represents that truncation is disabled, and the entire packet is mirrored or sampled.
The run-length
and maximum-packet-length
configuration statements are not supported on MX80 routers.
To associate the defined instance with a particular FPC, MPC,
or DPC, you include the sampling-instance
statement at the [edit chassis fpc number]
hierarchy level, as in the following example:
chassis { fpc 2 { sampling-instance samp1; } }
Starting in Junos OS Release 14.1, you can associate a sampling instance with an FPC in the MX Series Virtual Chassis primary or backup router. Use the sampling-instance instance-name statement at the [edit chassis member member-number fpc slot slot-number] hierarchy level, where member-number is 0 (for the primary router) or 1 (for the backup router), and slot-number is a number in the range 0 through 11.
Change History Table
Feature support is determined by the platform and release you are using. Use Feature Explorer to determine if a feature is supported on your platform.