Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Example: Configuring and Verifying Two-Rate Tricolor Marking

This topic provides several examples of how you can configure and verify two-rate tricolor marking policers and includes the following sections:

Requirements

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

Overview

This example configures a two-rate tricolor marking policer on an input Gigabit Ethernet interface and shows commands to verify its operation.

Traffic enters the Gigabit Ethernet interface and exits a SONET/SDH OC12 interface. Oversubscription occurs when you send line-rate traffic from the Gigabit Ethernet interface out the OC12 interface.

Topology

Figure 1 shows the sample topology.

Figure 1: Tricolor Marking Sample TopologyTricolor Marking Sample Topology

Configuration

To configure two-rate tricolor marking policers, perform these tasks:

CLI Quick Configuration

To quickly configure this example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy level.

Applying a Policer to an Input Interface

Applying Profiles to an Output Interface

Marking Packets with Medium-Low Loss Priority

Example: Applying a Policer to an Input Interface

Step-by-Step Procedure

In the following example, the tricolor marking and policer are applied on the ingress Gigabit Ethernet interface. Incoming packets are metered. Packets that do not exceed the CIR are marked with low loss priority. Packets that exceed the CIR, but do not exceed the PIR, are marked with medium-high loss priority. Packets that exceed the PIR are marked with high loss priority.

The following example requires that you navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the Junos OS CLI User Guide.

  1. Configure the three-color policer.

  2. Configure the policer in a firewall filter.

  3. Apply the firewall filter (policer) as an input filter on the logical interface.

  4. Confirm the configuration.

  5. Save the configuration.

Example: Applying Profiles to an Output Interface

Step-by-Step Procedure

In the following example, transmission scheduling and weighted random early detection (WRED) profiles are applied on the output OC12 interface. The software drops traffic in the low, medium-high, and high drop priorities proportionally to the configured drop profiles.

  1. Define the drop profile.

  2. Specify the scheduler name and parameter values.

  3. Specify a scheduler map name and associate it with the scheduler configuration and forwarding class.

  4. Apply the scheduler map to the interface.

  5. Verify the configuration.

  6. Save the configuration.

Example: Marking Packets with Medium-Low Loss Priority

Step-by-Step Procedure

In the following example, the 4PLP filter and policer causes certain packets to be marked with medium-low loss priority.

The following example requires that you navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the Junos OS CLI User Guide.

  1. Configure the firewall filter.

    1. Define the three-color policer.

    2. Configure policer rate limits and actions.

    3. Configure the IPv4 firewall filter.

    4. Define the terms of the IPv4 firewall filter.

  2. Apply the filter to the interface.

Results

Confirm your configuration by entering the show interfaces and show firewall commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.

Verification

Confirm that the configuration is working properly.

Verifying Two-Rate Tricolor Marking Operation

Purpose

Action

The following operational mode commands are useful for checking the results of your configuration:

  • show class-of-service forwarding-table classifiers

  • show interfaces interface-name extensive

  • show interfaces queue interface-name

For information about these commands, see the CLI Explorer.