Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Example: Configuring and Applying a Simple Filter

This example shows how to configure a simple filter.

Requirements

This example uses one of the following hardware components:

  • One Gigabit Ethernet intelligent queuing (IQ2) PIC installed on an M120, M320, or T Series router

  • One Enhanced Queuing Dense Port Concentrator (EQ DPC) installed on an MX Series router or an EX Series switch

Before you begin, make sure that you have:

  • Installed your supported router (or switch) and PIC or DPC and performed the initial router (or switch) configuration.

  • Configured basic Ethernet in the topology, and verified that traffic is flowing in the topology and that ingress IPv4 traffic is flowing into logical interface ge-0/0/1.0.

Overview

This simple filter sets the loss priority to low for TCP traffic with source address 172.16.1.1, sets the loss priority to high for HTTP (Web) traffic with source addresses in the 172.16.4.0/8 range, and sets the loss priority to low for all traffic with destination address 172.16.6.6.

Topology

The simple filter is applied as an input filter (arriving packets are checking for destination address 6.6.6.6, not queued output packets) on interface ge-0/0/1.0.

Configuration

The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using 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 commands into a text file, remove any line breaks, and then paste the commands into the CLI at the [edit] hierarchy level.

Configuring the Simple Firewall Filter

Step-by-Step Procedure

To configure the simple filter:

  1. Create the simple filter sf_classify_1.

  2. Configure classification of TCP traffic based on the source IP address.

  3. Configure classification of HTTP traffic based on the source IP address.

  4. Configure classification of other traffic based on the destination IP address.

Results

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

Applying the Simple Filter to the Logical Interface Input

Step-by-Step Procedure

To apply the simple filter to the logical interface input:

  1. Configure the logical interface to which you will apply the simple filter.

  2. Configure the interface address for the logical interface.

  3. Apply the simple filter to the logical interface input.

Results

Confirm the configuration of the interface by entering the show interfaces configuration mode command. If the command output does not display the intended configuration, repeat the instructions in this example to correct the configuration.

When you are done configuring the device, commit your candidate configuration.

Verification

Confirm that the configuration is working properly.

Displaying the Mapping of Forwarding Class Maps and Names to Queue Numbers

Purpose

Display the mapping of forwarding class names to queue numbers.

Action

Enter the show class-of-service forwarding-class operational mode command.

For information about the command output, see “show class-of-service forwarding-class” in the CLI Explorer.

Displaying CoS Queue Counters for the Interface

Purpose

Verify that the class-of-service (CoS) queue counters for the interface reflect the simple filter applied to the logical interface.

Action

Enter the show interfaces command for the physical interface on which the simple filter is applied, and specify detail or extensive output level.

In the Physical interface section, under Ingress queues, the Queue counters section displays ingress queue counters for each forwarding class.

For more detailed information about the command output, see “show interfaces” in the CLI Explorer.

Displaying CoS Queue Counter Details for the Physical Interface

Purpose

Verify that the CoS queue counter details for the physical interface reflect the simple filter applied to the logical interface.

Action

Enter the show interfaces queue command for the physical interface on which the simple filter is applied, and specify the ingress option.

For information about the command output, see “show interfaces queue” in the CLI Explorer.