[Contents] [Prev] [Next] [Index] [Report an Error]


Configure Accounting

Juniper Networks routers can collect various kinds of data about traffic passing through the router. You can set up one or more accounting profiles that specify some common characteristics of this data, including the following:

You configure the profiles using statements in the accounting-options hierarchy; for more information, see the JUNOS Internet Software Configuration Guide: Getting Started. You must assign a unique name for each accounting profile; this name cross-references the information specified in the accounting-options hierarchy with interfaces or firewall configuration statements.

Configure Physical Interface Profiles

There are two types of accounting profiles: interface profiles and filter profiles. They have different configuration statements in the accounting-profiles hierarchy, and are implemented separately in either the interfaces or firewall hierarchy. If you reference the same profile from both a firewall filter and an interface statement within the same configuration, it causes an error.

The following is a sample accounting-options profile for an interface; for more information, see the JUNOS Internet Software Configuration Guide: Network Management.

[edit]
accounting-options {
    file if_stats {
        size 4m files 10 transfer-interval 15;
        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;
            }
        }
    }
}

To enable accounting on an interface, include the accounting-profile statement at the [edit interfaces interface-name] hierarchy level:

[edit interfaces interface-name]
accounting-profile name; 

You can also reference profiles by logical unit; for more information, see Configure Logical Interface Profiles. For information about configuring a firewall filter accounting profile, see the JUNOS Internet Software Configuration Guide: Policy Framework.


[Contents] [Prev] [Next] [Index] [Report an Error]