IPQoS Administration Guide

Classifier Module

In the diffserv model, the classifier is responsible for organizing selected traffic flows into groups on which to apply different service levels. The classifiers that are defined in RFC 2475 were originally designed for boundary routers. By contrast, the IPQoS classifier ipgpc is designed to handle traffic flows on hosts internal to the local network. Therefore, a network with both IPQoS systems and a diffserv router can provide a greater degree of differentiated services. For a technical description of ipgpc, refer to the ipgpc(7ipp) man page.

The ipgpc classifier does the following:

  1. Selects traffic flows that meet the criteria that are specified in the IPQoS configuration file on the IPQoS-enabled system

    The QoS policy defines various criteria that must be present in packet headers. These criteria are called selectors. The ipgpc classifier compares these selectors against the headers of packets that are received by the IPQoS system. ipgpc then selects all matching packets.

  2. Separates the packet flows into classes, network traffic with the same characteristics, as defined in the IPQoS configuration file

  3. Examines the value in the packet's differentiated service (DS) field for the presence of a differentiated services (DS) codepoint

    The presence of the DS codepoint, also known as the DSCP, indicates whether the incoming traffic has been marked by the sender with a forwarding behavior.

  4. Determines what further action is specified in the IPQoS configuration file for packets of a particular class

  5. Passes the packets to the next IPQoS module that is specified in the IPQoS configuration file, or returns the packets to the network stream

For an overview of the classifier, refer to Classifier (ipgpc) Overview. For information on invoking the classifier in the IPQoS configuration file, refer to IPQoS Configuration File.

Selectors

ipgpc supports a variety of selectors that you can use in the filter clause of the IPQoS configuration file. When you define a filter, always use the minimum number of selectors that are needed to successfully retrieve traffic of a particular class. The amount of filters you define can impact IPQoS performance.

The next table lists the selectors available for ipgpc.

Table 6–1 Filter Selectors for the IPQoS Classifier

Selector 

Argument(s) 

Information Selected 

saddr

IP address number. 

Source address. 

daddr

IP address number. 

Destination address. 

sport

Either a port number or service name, as defined in /etc/services.

Source port from which a traffic class originated. 

dport

Either a port number or service name, as defined in /etc/services.

Destination port to which a traffic class is bound. 

protocol

Either a protocol number or protocol name, as defined in /etc/protocols.

Protocol to be used by this traffic class. 

dsfield

DS codepoint. Default is zero (0). 

DS codepoint, which defines any forwarding behavior to be applied to the packet. 

if_name

Interface name. 

Interface to be used for either incoming or outgoing traffic of a particular class. 

if_groupname

Interface group name. 

Interface group to be used for either incoming or outgoing traffic of a particular class. 

user

Number of the UNIX userID or user name to be selected. If no userID or user name is on the packet, the default –1 is used. 

UserID that is supplied to an application. 

projid

Number of the project ID to be selected. 

Project ID that is supplied to an application. 

priority

Priority number. Lowest priority is 0. 

Priority that is given to packets of this class. Priority is used to order the importance of filters for the same class. 

direction

Argument can be one of the following: 

Direction of packet flow on the IPQoS machine.  

 

LOCAL_IN

Input traffic local to the IPQoS system. 

 

LOCAL_OUT

Output traffic local to the IPQoS system. 

 

FWD_IN

Input traffic to be forwarded. 

 

FWD_OUT

Output traffic to be forwarded. 

 

Wildcard that represents either LOCAL_IN and LOCAL_OUT, or FORWARD_IN and FORWARD_OUT.

precedence

Precedence value. Highest precedence is 0. 

Precedence is used to order filters with the same priority. 

ip_version

v4 or v6

Addressing scheme that is used by the packets, either IPv4 or IPv6.