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

Configuring Accounting Profiles with SCU

Perhaps the most useful application of SCU is when a source class is combined with an accounting profile. Instead of using show commands to observe SCU data, you can use an accounting profile to capture this information in a log file. This allows you to monitor and view SCU traffic statistics at your convenience.

A class usage profile collects destination or source traffic class statistics for interfaces that have the appropriate traffic class feature enabled. The profile logs these statistics by means of a file specified at the [edit accounting-options] hierarchy level. This accounting profile is a superset of the previously released destination class profile. In JUNOS Release 5.4 and later, source class profiles and destination class profiles are part of class usage profiles.

A class usage profile can collect statistics for either source or destination class usage. The destination-classes and source-classes fields are mutually exclusive and indicate the type of statistics that are collected.

To enable SCU accounting profiles, perform these steps:

To view a sample accounting profile log, see Verifying Your Work .

Configuring Standard SCU

To view the full standard SCU configuration steps, see Configuring SCU.

Associating an Accounting Profile with SCU Classes

Once your source classes are defined, implemented on the inbound and outbound interfaces, and applied to the forwarding table, you are ready to associate the source class with an accounting profile. Configure the accounting profile at the [edit accounting-options class-usage-profile] hierarchy level. You can associate either an SCU source class or a DCU destination class with the accounting profile. You can also specify the filename for the data capture, a class usage profile name, and an interval (in minutes) indicating how often you want the SCU information to be saved to the file.

[edit]
accounting-options {
file filename;
class-usage-profile profile-name {
file filename;
interval minutes;
source-classes {
source-class-name;
}
destination-classes {
destination-class-name;
}
}
}

Note: SCU accounting occurs on the outbound interface before output filter processing. If an SCU-marked packet is discarded in the router, the SCU counters can indicate more traffic than actually exists. You must use filter counters or traceoptions logs to ensure that all packets dropped by the SCU filter are recorded. If logged, you can subtract the discarded packets from the SCU counter tallies and calculate the true traffic profile.

Because DCU accounting occurs after the filtering process, DCU is unaffected by this disclaimer.

Verifying Your Work

To view the results of the SCU accounting profile you created, navigate to the /var/log directory of your router; it should contain the designated class usage profile log. The layout of an SCU profile looks like this:

profile_name,epoch-timestamp,interface-name,source-class-name,packet-count,
byte-count

An example of the actual output from a profile looks like this:

scu_profile,980313078,ge-1/0/0.0,gold,82,6888
scu_profile,980313078,ge-1/0/0.0,silver,164,13776
scu_profile,980313078,ge-1/0/0.0,bronze,0,0
scu_profile,980313678,ge-1/0/0.0,gold,82,6888
scu_profile,980313678,ge-1/0/0.0,silver,246,20664
scu_profile,980313678,ge-1/0/0.0,bronze,0,0

To view the parameters of your SCU accounting profile, you can use the show accounting-options class-usage-profile scu-profile-name command.


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