The IPQoS configuration file for a best-effort web server differs slightly from an IPQoS configuration file for a premium web server. The following procedure illustrates the similarities and differences between configuration files for the varying levels of web service. As an example, the procedure uses the configuration file from Example 3–2.
Log in to the best-effort web server.
Create a new IPQoS configuration file with a .qos extension.
fmtversion 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 taking. For an explanation of this action statement, see How to Begin 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 } |
Entry |
Description |
---|---|
name userweb |
Creates a class that is called userweb for forwarding web traffic from users. |
next_action markF12 |
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. |
enable_stats FALSE |
Enables statistics taking for the userweb class. However, because the value of enable_stats is FALSE, statistics for this class are not turned on. |
For an explanation of the class clause task, see How to Begin 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 } } |
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 userweb |
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 |
Entry |
Description |
---|---|
module dscpmk |
Invokes the marker module dscpmk |
name markAF11 |
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 } } |
Entry |
Description |
---|---|
global_stats FALSE |
Enables statistics taking for the markAF12 marker action statement. However, because the value of enable_stats is FALSE, statistics are not turned on. |
dscp_map{0–63:12} |
Assigns a DS codepoint of 12 to the packet headers of the traffic class userweb, which is currently being processed by the marker. |
next_action continue |
Indicates that no further processing is required on packets of the traffic class goldweb, and that these packets can return to the network stream. |
The DS codepoint 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 DS codepoint 12 in the DS field receive a medium-drop, high-priority service.
When you complete the IPQoS configuration file, apply the configuration, as described in How to Apply a New Configuration to the IPQoS Kernel Modules.
Task |
For Information |
---|---|
Add classes and other configuration for traffic flows from applications |
How to Configure the IPQoS Configuration File for an Applications Server |
Configure per-hop behaviors on a router | |
Activate your IPQoS configuration file |
How to Apply a New Configuration to the IPQoS Kernel Modules |