[ Contents] [ Prev] [ Next] [ Index] [ Report an Error]

Configuring Traffic Sampling Properties

To configure traffic sampling on any logical interface, include the input statement at the [edit forwarding-options sampling] hierarchy level:

input {
family inet {
max-packets-per-second number;
rate number;
run-length number;
}
}

When you use Routing Engine-based sampling, specify the threshold traffic value by including the max-packets-per-second statement. The value is the maximum number of packets to be sampled, beyond which the sampling mechanism begins dropping packets. The range is from 0 through 65,535. A value of 0 instructs the Packet Forwarding Engine not to sample any packets. The default value is 1000.

Note: When you configure active monitoring and specify a Monitoring Services, Adaptive Services, or MultiServices PIC in the output statement, the max-packets-per-second value is ignored.

Specify the sampling rate by setting the values for rate and run-length (see Figure 9).

Figure 9: Configure Sampling Rate

Image h1746.gif

The rate statement specifies the ratio of packets to be sampled. For example, if you configure a rate of 10, x number of packets out of every 10 is sampled, where x=run-length+1. By default, the rate is 0, which means that no traffic is sampled.

The run-length statement specifies the number of matching packets to sample following the initial one-packet trigger event. By default, the run-length is 0, which means that no more traffic is sampled after the trigger event. The range is from 0 through 20. Configuring a run length greater than 0 allows you to sample packets following those already being sampled.

If you do not include the input statement, sampling is disabled.

To collect the sampled packets in a file, include the file statement at the [edit forwarding-options sampling output] hierarchy level. For more information about the output file formats, see Configuring Traffic Sampling Output.


[ Contents] [ Prev] [ Next] [ Index] [ Report an Error]