On routing platforms containing a Monitoring Services PIC or an Adaptive Services PIC, you can configure accounting for traffic passing through the routing platform.
To configure discard accounting, include the
accountingstatement at the[edit forwarding-options]hierarchy level:[edit forwarding-options]accountinggroup-name{output {cflowd [hostnames] {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;interface [interface-names] {engine-idnumber;engine-typenumber;source-addressaddress;}}}To configure an accounting group, include the
accountingstatement and specify agroup-name. To configure the output flow aggregation, include thecflowdstatement. For more information about flow aggregation, see Configuring Flow Aggregation (cflowd). To configure the interval before exporting an active flow, include theflow-active-timeoutstatement. The default value forflow-active-timeoutis1800seconds. To configure the interval before a flow is considered inactive, include theflow-inactive-timeoutstatement. The default value forflow-inactive-timeoutis60seconds. To configure the interface that sends out monitored information, include theinterfacestatement. Discard accounting is supported for the Monitoring Services PIC only.When you apply a firewall filter to a loopback interface, the filter might block responses from the Monitoring Services PIC. To allow responses from the Monitoring Services PIC to pass through for accounting purposes, configure a term in the firewall filter to include the Monitoring Services PIC IP address. For more detailed information about configuring firewall filters, see Firewall Filter Configuration.
You can use discard accounting for passive and active flow monitoring. For more detailed information about configuring passive and active flow monitoring, see the JUNOS Feature Guide and the JUNOS Class of Service Configuration Guide.