Configure Discard Accounting
Discard accounting is similar to traffic sampling, but varies from it in two ways:
- In discard accounting, the packet is intercepted by the Monitoring PIC and is not forwarded to its destination.
- Traffic sampling allows you to limit the number of packets sampled by configuring the
max-packets-per-second,rate, andrun-lengthstatements. Discard accounting does not provide these options and a high packet count can potentially overwhelm the Monitoring PIC.To configure discard accounting, include the following statements at the [
edit forwarding-options] hierarchy level:[edit forwarding-options]accountingname{output {aggregate-export-intervalseconds;cflowdhostname{aggregation {autonomous-system;destination-prefix;protocol-port;source-destination-prefix {caida-compliant;}source-prefix;}autonomous-system-type (origin | peer);portport-number;versionformat;}flow-active-timeoutseconds;flow-inactive-timeoutseconds;interfaceinterface-name{engine-idnumber;engine-typenumber;source-addressaddress;}}}A discard instance is a named entity that specifies collector information under the
accountingnamestatement. Discard instances are referenced in firewall filtertermstatements by including thethen discard accountingnamestatement.Most of the other statements are also found at the [
edit forwarding-options sampling] hierarchy level. For information on cflowd, see Configure cflowd. The flow-active-timeoutandflow-inactive-timeoutstatements are described in Configure Flow Monitoring.To direct sampled traffic to a flow-monitoring interface, include the
interfacestatement. Theengine-idandengine-typestatements specify the accounting interface used on the traffic, and thesource-addressstatement specifies the traffic source.You cannot use rate-limiting with discard accounting; however, you can specify the duration of the interval for exporting aggregated accounting information by including the
aggregate-export-intervalstatement in the configuration. This enables you to put a boundary on the amount of traffic exported to a flow-monitoring interface.