This topic contains the following sections:
To configure accounting options, include the following statements at the [edit accounting-options] hierarchy level:
-
accounting-options {
-
-
class-usage-profile profile-name {
-
file filename;
-
interval minutes;
-
- destination-classes {
-
destination-class-name;
- }
-
-
source-classes {
-
source-class-name;
- }
-
-
file filename {
-
-
archive-sites {
-
site-name;
- }
-
files number;
-
nonpersistent;
-
size bytes;
-
source-classes time
-
transfer-interval minutes;
- }
-
-
filter-profile profile-name {
-
-
counters {
-
counter-name;
- }
-
file filename;
-
interval minutes;
- }
- }
-
-
interface-profile profile-name {
-
-
fields {
-
field-name;
- }
-
file filename;
-
interval minutes;
- }
-
-
mib-profile profile-name {
-
file filename;
-
interval seconds;
-
-
objects-names {
-
mib-object-name;
- }
-
operation operation-name;
- }
-
-
routing-engine-profile profile-name {
-
-
fields {
-
field-name;
- }
-
file filename;
-
interval minutes;
- }
- }
By default, accounting options are disabled.
To enable accounting options on the router, you must perform at least the following tasks:
- [edit]
-
accounting-options {
-
-
class-usage-profile profile-name {
-
file filename;
-
interval minutes;
-
-
source-classes {
-
source-class-name;
-
-
destination-classes {
-
destination-class-name;
- }
- }
-
-
file filename {
-
-
archive-sites {
-
site-name;
- }
-
files number;
-
size bytes;
-
transfer-interval minutes;
- }
-
-
filter-profile profile-name {
-
-
counters {
-
counter-name;
- }
-
file filename;
-
interval minutes;
- }
-
-
interface-profile profile-name {
-
-
fields {
-
field-name;
- }
-
file filename;
-
interval minutes;
- }
-
-
mib-profile profile-name {
-
file filename;
-
interval minutes;
-
-
objects-names {
-
mib-object-name;
- }
-
operation operation-name;
- }
-
-
routing-engine-profile profile-name{
-
-
fields {
-
field-name;
- }
-
file filename;
-
interval minutes;
- }
- }
- }
Apply an interface profile to a physical or logical interface by including the accounting-profile statement at either the [edit interfaces interface-name] or the [edit interfaces interface-name unit number] hierarchy level. For more information on interface profiles, see the JUNOS Network Interfaces Configuration Guide.
- [edit interfaces]
- interface-name {
- accounting-profile profile-name;
-
- unit number {
- accounting-profile profile-name;
- }
- }
![]() |
Note: You do not apply destination class profiles to interfaces. Although the interface needs to have the destination-class-usage statement configured, the destination class profile automatically finds all interfaces with the destination class configured. |
Apply a filter profile to a firewall filter by including the accounting-profile statement at the [edit firewall filter filter-name] hierarchy level:
- [edit firewall]
- filter filter-name {
- accounting-profile profile-name;
- }
You do not need to apply the Routing Engine profile to an interface because the statistics are collected on the Routing Engine itself.