Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Basic Single-Rate Three-Color Policers

Single-Rate Three-Color Policer Overview

A single-rate three-color policer defines a bandwidth limit and a maximum burst size for guaranteed traffic and a second burst size for peak traffic. A single-rate three-color policer is most useful when a service is structured according to packet length and not peak arrival rate.

Single-rate three-color policing meters a traffic stream based on the following configured traffic criteria:

  • Committed information rate (CIR)—Bandwidth limit for guaranteed traffic.

  • Committed burst size (CBS)—Maximum packet size permitted for bursts of data that exceed the CIR.

  • Excess burst size (EBS)—Maximum packet size permitted for peak traffic.

Single-rate tricolor marking (single-rate TCM) classifies traffic as belonging to one of three color categories and performs congestion-control actions on the packets based on the color marking:

  • Green—Traffic that conforms to either the bandwidth limit or the burst size for guaranteed traffic (CIR or CBS). For a green traffic flow, single-rate  marks the packets with an implicit loss priority of low and transmits the packets.

  • Yellow—Traffic that exceeds both the bandwidth limit and the burst size for guaranteed traffic (CIR and CBS) but not the burst size for peak traffic (EBS). For a yellow traffic flow, single-rate marks the packets with an implicit loss priority of medium-high and transmits the packets.

  • Red—Traffic that exceeds the burst size for peak traffic (EBS), single-rate  marks packets with an implicit loss priority of high and, optionally, discards the packets.

If congestion occurs downstream, the packets with higher loss priority are more likely to be discarded.

Note:

For both single-rate and two-rate three-color policers, the only configurable action is to discard packets in a red traffic flow.

The discard action for a tricolor marking policer for a firewall filter is supported on the M120 routers, M320 routers with Enhanced-III FPCs, M7i and M10i routers with the Enhanced CFEB (CFEB-E), and MX Series routers with MPCs, so it is not necessary to include the logical-interface-policer statement for them.

Example: Configuring a Single-Rate Three-Color Policer

This example shows how to configure a single-rate three-color policer.

Requirements

No special configuration beyond device initialization is required before configuring this example.

Overview

A single-rate three-color policer meters a traffic flow against a bandwidth limit and burst-size limit for guaranteed traffic, plus a second burst-size limit for excess traffic. Traffic that conforms to the limits for guaranteed traffic is categorized as green, and nonconforming traffic falls into one of two categories:

  • Nonconforming traffic that does not exceed the burst size for excess traffic is categorized as yellow.

  • Nonconforming traffic that exceeds the burst size for excess traffic is categorized as red.

Each category is associated with an action. For green traffic, packets are implicitly set with a loss-priority value of low and then transmitted. For yellow traffic, packets are implicitly set with a loss-priority value of medium-high and then transmitted. For red traffic, packets are implicitly set with a loss-priority value of high and then transmitted. If the policer configuration includes the optional action statement (action loss-priority high then discard), then packets in a red flow are discarded instead.

You can apply a three-color policer to Layer 3 traffic as a firewall filter policer only. You reference the policer from a stateless firewall filter term, and then you apply the filter to the input or output of a logical interface at the protocol level.

Topology

In this example, you apply a color-aware, single-rate three-color policer to the input IPv4 traffic at logical interface ge-2/0/5.0. The IPv4 firewall filter term that references the policer does not apply any packet-filtering. The filter is used only to apply the three-color policer to the interface.

You configure the policer to rate-limit traffic to a bandwidth limit of 40 Mbps and a burst-size limit of 100 KB for green traffic but also allow an excess burst-size limit of 200 KB for yellow traffic. Only nonconforming traffic that exceeds the peak burst-size limit is categorized as red. In this example, you configure the three-color policer action loss-priority high then discard, which overrides the implicit marking of red traffic to a high loss priority.

Configuration

The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Use the CLI Editor in Configuration Mode.

To configure this example, perform the following tasks:

CLI Quick Configuration

To quickly configure this example, copy the following configuration commands into a text file, remove any line breaks, and then paste the commands into the CLI at the [edit] hierarchy level.

Configuring a Single-Rate Three-Color Policer

Step-by-Step Procedure

To configure a single-rate three-color policer:

  1. Enable configuration of a three-color policer.

  2. Configure the color mode of the single-rate three-color policer.

  3. Configure the single-rate guaranteed traffic limits.

  4. Configure the single-rate burst-size limit that is used to classify nonconforming traffic.

  5. (Optional) Configure the action for nonconforming traffic.

    For three-color policers, the only configurable action is to discard packets in a red traffic flow. In this example, packets in a red traffic flow have been implicitly marked with a high packet loss priority (PLP) level because the traffic flow exceeded the rate-limiting defined by the single rate-limit (specified by the committed-information-rate 40m statement) and the larger burst-size limit (specified by the excess-burst-size 200k statement). Because the optional action statement is included, this example takes the more severe action of discarding packets in a red traffic flow.

Results

Confirm the configuration of the hierarchical policer by entering the show firewall configuration command. If the command output does not display the intended configuration, repeat the instructions in this procedure to correct the configuration.

Configuring an IPv4 Stateless Firewall Filter That References the Policer

Step-by-Step Procedure

To configure a standard stateless firewall filter that references the policer:

  1. Enable configuration of an IPv4 standard stateless firewall filter.

  2. Specify the filter term that references the policer.

    Note that the term does not specify any match conditions. The firewall filter passes all packets to the policer.

Results

Confirm the configuration of the firewall filter by entering the show firewall configuration mode command. If the command output does not display the intended configuration, repeat the instructions in this procedure to correct the configuration.

Applying the Filter to the Logical Interface

Step-by-Step Procedure

To apply the filter to the logical interface:

  1. (MX Series routers only) (Optional) Reclassify all incoming packets on the logical interface ge-2/0/5.0 to assured forwarding, regardless of any preexisting classification.

    The classifier name can be a configured classifier or one of the default classifiers.

  2. Enable configuration of the logical interface.

  3. Configure an IP address.

  4. Reference the filter as an input filter.

Results

Confirm the configuration of the interface by entering the show class-of-service and show interfaces configuration mode commands. If the command output does not display the intended configuration, repeat the instructions in this procedure to correct the configuration.

If you are done configuring the device, enter commit from configuration mode.

Verification

Confirm that the configuration is working properly.

Displaying the Firewall Filters Applied to the Logical Interface

Purpose

Verify that the firewall filter is applied to IPv4 input traffic at the logical interface.

Action

Use the show interfaces operational mode command for the logical interface ge-2/0/5.0, and specify detail mode. The Protocol inet section of the command output displays IPv4 information for the logical interface. Within that section, the Input Filters field displays the name of the firewall filter applied to IPv4 input traffic at the logical interface.