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

Configuring SCU

To configure SCU, you must configure source filters and classes, apply the policy to the forwarding table, and enable accounting on inbound and outbound interfaces. This section contains configuration procedures, an SCU configuration example, and information on commands you can issue to verify your work:

Note: We recommend that you stop the network traffic on an interface before you modify the DCU or SCU configuration for that interface. Modifying the DCU or SCU configuration without stopping the traffic might corrupt the DCU or SCU statistics. Before you restart the traffic after modifying the configuration, enter the clear interfaces statistics command.

Configuring Route Filters and Source Classes in a Routing Policy

Begin configuring SCU by creating prefix route filters in a policy statement. These prefixes indicate the IPv4 or IPv6 source addresses to monitor. Within the policy statement, you must define and name the source classes attached to the filters.

[edit policy-options]
policy-statement policy-name {
term term-name {
from {
route-filter address/prefix;
}
then source-class class-name;
}
}

An alternate configuration method, using the forwarding-class policy action, is even more flexible. It allows your IPv4 or IPv6 route filters to apply to an SCU profile, a DCU profile, or both simultaneously. Additionally, if you have only one term, you can implement the from and then statements at the [edit policy-options policy-statement policy-name] hierarchy level.

[edit policy-options]
policy-statement policy-name {
from {
route-filter 105.15.0.0/16 orlonger;
}
then forwarding-class class-name;
}

A third option is the existing DCU parameter of destination-class. For more information on DCU, see the JUNOS Policy Framework Configuration Guide.

Applying the Policy to the Forwarding Table

Next, apply the policy you created to the forwarding table. When you apply the policy, the network prefixes you defined are marked with the appropriate source class.

[edit routing-options]
forwarding-table {
export policy-name;
}

Enabling 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. To configure SCU accounting, include the source-class-usage statement at the [edit interfaces interface-name unit logical-unit-number family (inet | inet 6) accounting] hierarchy level:

[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:

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]