To configure traffic sampling output, include the following statements at the [edit forwarding-options sampling output] hierarchy level:
-
aggregate-export-interval seconds;
-
cflowd hostname {
-
-
aggregation {
- autonomous-system;
- destination-prefix;
- protocol-port;
-
- source-destination-prefix {
- caida-compliant;
- }
- source-prefix;
- }
-
autonomous-system-type (origin | peer);
-
-
label-position {
-
template template-name;
- }
- (local-dump | no-local-dump);
-
port port-number;
-
source-address address;
-
version format;
- }
-
file {
-
disable;
-
filename filename;
-
files number;
-
size bytes;
- (stamp | no-stamp);
- (world-readable | no-world-readable);
- }
-
flow-active-timeout seconds;
-
flow-inactive-timeout seconds;
-
interface interface-name {
-
engine-id number;
-
engine-type number;
-
source-address address;
- }
To direct sampled traffic to a flow-monitoring interface, include the interface statement. The engine-id and engine-type statements specify the identity and type numbers of the interface; they are dynamically generated based on the Flexible PIC Concentrator (FPC), PIC, and slot numbers and the chassis type. The source-address statement specifies the traffic source.
To configure flow sampling version 9 output, you need to include the template statement at the [edit forwarding-options sampling output version9] hierarchy level. For information on cflowd, see Configuring Flow Aggregation.
The aggregate-export-interval statement is described in Configuring Discard Accounting, and the flow-active-timeout and flow-inactive-timeout statements are described in Configuring Flow Monitoring.
Traffic sampling results are automatically saved to a file in the /var/tmp directory. To collect the sampled packets in a file, include the file statement at the [edit forwarding-options sampling output] hierarchy level:
-
file {
-
disable;
-
filename filename;
-
files number;
-
size bytes;
- (stamp | no-stamp);
- (world-readable | no-world-readable);
- }