IPQoS Administration Guide

How to Define Filters in the IPQoS Configuration File

The next procedure shows how to define filters for a class in the IPQoS configuration file. The procedure assumes that you have already begun the file and have defined classes. The steps continue building the /var/ipqos/Goldweb.qos file that is introduced in How to Begin the IPQoS Configuration File and Define Traffic Classes.


Note –

As you create the IPQoS configuration file, be very careful to start and end each class clause and filter clause with curly braces ({ }). For an example of the use of braces, use Example 3–1.


  1. Open the IPQoS configuration file, and locate the end of the last class that you defined.

    For example, on the IPQoS-enabled server Goldweb you would start after the following class clause in /var/ipqos/Goldweb.qos.


    class {
            name video
            next_action markEF
            enable_stats FALSE
        }
  2. Define a filter clause to select outgoing traffic from the IPQoS system.


        filter {
            name webout
            sport 80
            direction LOCAL_OUT
            class goldweb
        }
    

    Entry 

    Description 

    name webout

    Gives the name webout to the filter

    sport 80

    Selects traffic with a source port of 80, the well-known port for HTTP (Web) traffic 

    direction LOCAL_OUT

    Further selects traffic that is outgoing from the local system 

    class goldweb

    Identifies the class to which the filter belongs, in this instance, class goldweb

    For syntactical and detailed information about the filter clause in the IPQoS configuration file, refer to Filter Clause.

  3. Define a filter clause to select streaming video traffic on the IPQoS system.


        filter {
            name videoout
            sport videosrv
            direction LOCAL_OUT
            class video
        }
    

    Entry 

    Description 

    name videoout

    Gives the name videoout to the filter

    sport videosrv

    Selects traffic with a source port of videosrv, a previously defined port for the streaming video application on this system

    direction LOCAL_OUT

    Further selects traffic that is outgoing from the local system 

    class video

    Identifies the class to which the filter belongs, in this instance, class video

Where to Go From Here

Task 

For Information 

Define forwarding behaviors for the marker modules 

How to Define Traffic Forwarding in the IPQoS Configuration File

Define flow-control parameters for the metering modules 

How to Configure Flow Control in the IPQoS Configuration File

Activate the IPQoS configuration file 

How to Apply a New Configuration to the IPQoS Kernel Modules

Define additional filters 

How to Define Filters in the IPQoS Configuration File

Create classes for traffic flows from applications 

How to Configure the IPQoS Configuration File for an Applications Server