The next procedure shows how to define filters for a class in the IPQoS configuration file.
The procedure assumes that you have already started file creation and have defined classes. The steps continue building the /var/ipqos/Goldweb.qos file that is created in How to Create the IPQoS Configuration File and Define Traffic Classes.
As you create the IPQoS configuration file, be very careful to start and end each class clause and each filter clause with curly braces ({ }). For an example of the use of braces, use Example 28–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 } |
Define a filter clause to select outgoing traffic from the IPQoS system.
filter { name webout sport 80 direction LOCAL_OUT class goldweb } |
Gives the name webout to the filter.
Selects traffic with a source port of 80, the well-known port for HTTP (web) traffic.
Further selects traffic that is outgoing from the local system.
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.
Define a filter clause to select streaming video traffic on the IPQoS system.
filter { name videoout sport videosrv direction LOCAL_OUT class video } |
Gives the name videoout to the filter.
Selects traffic with a source port of videosrv, a previously defined port for the streaming video application on this system.
Further selects traffic that is outgoing from the local system.
Identifies the class to which the filter belongs, in this instance, class video.
To define forwarding behaviors for the marker modules, refer to How to Define Traffic Forwarding in the IPQoS Configuration File.
To define flow-control parameters for the metering modules, refer to How to Configure Flow Control in the IPQoS Configuration File.
To activate the IPQoS configuration file, refer to How to Apply a New Configuration to the IPQoS Kernel Modules.
To define additional filters, refer to How to Define Filters in the IPQoS Configuration File.
To create classes for traffic flows from applications, refer to How to Configure the IPQoS Configuration File for an Application Server.