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


Enable Accounting on Inbound and Outbound Interfaces

Unlike DCU, which only requires implementation on a single interface, accounting for SCU must be enabled on two interfaces: the inbound and outbound physical or logical interfaces traversed by the source class. You must define explicitly the two interfaces on which SCU monitored traffic is expected to arrive and depart. This is because SCU performs two lookups in the routing table: a source address (SA) and a destination address (DA) lookup. In contrast, DCU only has a single destination address lookup. By specifying the addresses involved in the additional SCU SA lookup, you minimize the performance impact on your router.

An individual SCU interface can be configured as an input interface, an output interface, or both. SCU can be enabled in an IPv4 (family inet) or IPv6 (family inet6) network. You configure SCU accounting with the following commands:

[edit]
interfaces 
    interface-name {
        unit unit-number {
            family (inet | inet6) {
                accounting {
                    source-class-usage {
                        (input | output | [input output]);
                    }
                    destination-class-usage;
                }
            }
        }
    }
}

After the full SCU configuration is enabled, every packet arriving on an SCU input interface is subjected to an SA-based lookup and then a DA-based lookup. In addition, an individual set of counters for every configured SCU class is maintained by the router on a per-interface and per-protocol family basis.

When you enable SCU or DCU, keep the following information in mind:

    A packet arrives on a router interface configured for both SCU and DCU. The packet's 
source address matches an SCU class and its destination matches a DCU class. 
Consequently, the packet is subjected to a source lookup, marked with the SCU class, 
and the DCU class is ignored. As a result, the packet is forwarded to the outbound 
interface with only the SCU class still intact.
    However, the outbound interface lacks an SCU configuration. As the packet is ready 
to leave the router, the router notices the output interface is not configured for SCU and 
the packet is not counted by SCU. Likewise, even though the prefix matched the DCU 
prefix, the DCU counters do not increment since DCU was superseded by SCU at the 
inbound interface.

To solve this problem, make sure you configure both the inbound and outbound interfaces completely or configure only one class type per interface per direction.


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