Configuring Accounting for the Logical Interface
Juniper Networks routers or switches can collect various kinds of data about traffic passing through the router or switch . 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 router or switch retains before discarding, and the number of bytes per file
- The 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 the interface-profile statement at the [edit accounting-options] hierarchy level. You configure filter profiles by including the filter-profile statement at the [edit accounting-options] hierarchy level. For more information, see the Network Management Administration Guide for Routing Devices.
You apply filter profiles by including the accounting-profile statement at the [edit firewall filter filter-name] and [edit firewall family family filter filter-name] hierarchy levels. For more information, see the Routing Policy Feature Guide for Routing Devices.
Applying an Accounting Profile to the Logical Interface
To enable accounting on a logical interface, include the accounting-profile statement:
You can include this statement at the following hierarchy level:
- [edit interfaces interface-name unit logical-unit-number]
You can also reference profiles for the physical interface; for more information, see Configuring Accounting for the Physical Interface.
Example: Applying an Accounting Profile to the Logical Interface
Configure an accounting profile for an interface and apply it to a logical interface:
To reference profiles by physical interface, see Configuring Accounting for the Physical Interface. For information about configuring a firewall filter accounting profile, see the Routing Policy Feature Guide for Routing Devices.