Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Accounting Options Configuration

This topic contains the following sections:

Accounting Options—Full Configuration

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 timetransfer-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 (Accounting Options) seconds;object-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.

Note: Do not configure MIB objects related to interface octets or packets for a MIB profile, because it can cause the SNMP walk or a CLI show command to time out.

Minimum Accounting Options Configuration

To enable accounting options on the router, you must perform at least the following tasks:

  • Configure accounting options by including a file statement and one or more source-class-usage, destination-class-profile, filter-profile, interface-profile, mib-profile, or routing-engine-profile statements at the [edit accounting-options] hierarchy level:

    [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 (Accounting Options) minutes;}mib-profile profile-name {file filename;interval minutes;object-names {mib-object-name;}operation operation-name;}routing-engine-profile profile-name {fields {field-name;}file filename;interval minutes;}}}
  • Apply the profiles to the chosen interfaces or filters.

    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 logical-unit-number] hierarchy level. For more information about interface profiles, see the Junos® OS Network Interfaces.

    [edit interfaces]
    interface-name {accounting-profile profile-name;unit logical-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.

Modified: 2015-06-30

Supported Platforms

Modified: 2015-06-30