Configuring Accounting for the Physical Interface
Juniper Networks routing platforms can collect various kinds of data about traffic passing through the routing platform. You can set up one or more accounting profiles that specify some common characteristics of this data, including the following:
- The fields used in the accounting records
- The number of files that the routing platform retains before discarding, and the number of bytes per file
- The polling period that the system uses to record the data
You configure the profiles and define a unique name for each profile using statements at the
[edit accounting-options]hierarchy level. There are two types of accounting profiles: interface profiles and filter profiles. You configure interface profiles by including theinterface-profilestatement at the[edit accounting-options]hierarchy level. You configure filter profiles by including thefilter-profilestatement at the[edit accounting-options]hierarchy level. For more information, see the JUNOS Network Management Configuration Guide.You apply filter profiles by including the
accounting-profilestatement at the[edit firewall filterfilter-name]and[edit firewall familyfamilyfilterfilter-name]hierarchy levels. For more information, see the JUNOS Policy Framework Configuration Guide.Applying an Accounting Profile to the Physical Interface
To enable accounting on an interface, include the
accounting-profilestatement at the [edit interfacesinterface-name] hierarchy level:[edit interfacesinterface-name]accounting-profilename;You can also reference profiles by logical unit; for more information, see Configuring Accounting for the Logical Interface.
Example: Applying an Accounting Profile to the Physical Interface
Configure an accounting profile for an interface and apply it to a physical interface:
[edit]accounting-options {file if_stats {size 4m files 10transfer-interval15;archive-sites {"ftp://login:password@host/path";}}interface-profile if_profile {interval 15;file if_stats {fields {input-bytes;output-bytes;input-packets;output-packets;input-errors;output-errors;}}}}[edit interfacesge-1/0/1]accounting-profileif_profile;