The IPQoS configuration file for a best-effort web server differs slightly from an IPQoS configuration file for a premium web server. As an example, the procedure uses the configuration file from Example 28–2.
Log in to the best-effort web server.
Create a new IPQoS configuration file with a .qos extension.
fmt_vesion 1.0 action { module ipgpc name ipgpc.classify params { global_stats TRUE } |
The /var/ipqos/userweb.qos file must begin with the partial action statement to invoke the ipgpc classifier. In addition, the action statement also has a params clause to turn on statistics collection. For an explanation of this action statement, see How to Create the IPQoS Configuration File and Define Traffic Classes.
Define a class that identifies traffic that is bound for the best-effort web server.
class { name userweb next_action markAF12 enable_stats FALSE } |
Creates a class that is called userweb for forwarding web traffic from users.
Instructs the ipgpc module to pass packets of the userweb class to the markAF12 action statement after ipgpc completes processing. The markAF12 action statement invokes the dscpmk marker.
Enables statistics collection for the userweb class. However, because the value of enable_stats is FALSE, statistics collection for this class does not occur.
For an explanation of the class clause task, see How to Create the IPQoS Configuration File and Define Traffic Classes.
Define a filter clause to select traffic flows for the userweb class.
filter { name webout sport 80 direction LOCAL_OUT class userweb } } |
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 userweb.
For an explanation of the filter clause task, see How to Define Filters in the IPQoS Configuration File.
Begin the action statement to invoke the dscpmk marker.
action { module dscpmk name markAF12 |
Invokes the marker module dscpmk.
Gives the name markAF12 to the action statement.
The previously defined class userweb includes a next_action markAF12 statement. This statement sends traffic flows to the markAF12 action statement after the classifier concludes processing.
Define parameters for the marker to use for processing the traffic flow.
params { global_stats FALSE dscp_map{0-63:12} next_action continue } } |
Enables statistics collection for the markAF12 marker action statement. However, because the value of enable_stats is FALSE, statistics collection does not occur.
Assigns a DSCP of 12 to the packet headers of the traffic class userweb, which is currently being processed by the marker.
Indicates that no further processing is required on packets of the traffic class userweb, and that these packets can return to the network stream.
The DSCP of 12 instructs the marker to set all entries in the dscp map to the decimal value 12 (binary 001100). This codepoint indicates that packets of the userweb traffic class are subject to the AF12 per-hop behavior. AF12 guarantees that all packets with the DSCP of 12 in the DS field receive a medium-drop, high-priority service.
When you complete the IPQoS configuration file, apply the configuration.
To add classes and other configuration for traffic flows from applications, refer to How to Configure the IPQoS Configuration File for an Application Server.
To configure per-hop behaviors on a router, refer to How to Configure a Router on an IPQoS-Enabled Network.
To activate your IPQoS configuration file, refer to How to Apply a New Configuration to the IPQoS Kernel Modules.