You can create your first IPQoS configuration file in whatever directory is easiest for you to maintain and use. The tasks in this chapter use the directory /var/ipqos as the location for IPQoS configuration files. The next procedure builds the initial segment of the IPQoS configuration file that is introduced in Example 3–1.
As you create the IPQoS configuration file, be very careful to start and end each action statement and clause with curly braces ({ }). For an example of the use of braces, see Example 3–1.
Log in to the premium web server, and create a new IPQoS configuration file with a .qos extension.
Every IPQoS configuration file must start with the version number fmt_version 1.0 as its first uncommented line.
Follow the opening parameter with the initial action statement, which configures the generic IP classifier ipgpc.
This initial action begins the tree of action statements that compose the IPQoS configuration file. For example, the /var/ipqos/Goldweb.qos file begins with the initial action statement to call the ipgpc classifier.
fmt_version 1.0 action { module ipgpc name ipgpc.classify |
Entry |
Description |
---|---|
fmt_version 1.0 |
Begins the IPQoS configuration file |
action { module ipgpc |
Configures the ipgpc classifier as the first action in the configuration file |
name ipgpc.classify |
Defines the name of the classifier action statement, which must always be ipgpc.classify |
For detailed syntactical information about action statements, refer to action Statement and theipqosconf(1M) man page.
Add a params clause with the statistics parameter global_stats.
params { global_stats TRUE } |
The parameter global_stats TRUE in the ipgpc.classify action enables statistics taking for that action. global_stats TRUE also enables per-class statistics taking wherever a class clause definition specifies enable_stats TRUE.
Turning on statistics impacts performance. You might want to take statistics on a new IPQoS configuration file to verify that IPQoS works properly. Later, you can turn off statistics collection by changing the argument to global_stats to FALSE.
Global statistics are but one type of parameter you can define in a params clause. For syntactical and other details about params clauses, refer to Params Clause and the ipqosconf man page.
Define a class that identifies traffic that is bound for the premium server.
class { name goldweb next_action markAF11 enable_stats FALSE } |
The previous statement is called a class clause. A class clause has the following contents.
Entry |
Description |
---|---|
name goldweb |
Creates the class goldweb to identify traffic that is bound for the Goldweb server. |
next_action markF11 |
Instructs the ipgpc module to pass packets of the goldweb class to the markAF11 action statement. The markAF11 action statement calls the dscpmk marker. |
enable_stats FALSE |
Enables statistics taking for the goldweb class. However, because the value of enable_stats is FALSE, statistics for this class are not turned on. |
For detailed information about the syntax of the class clause, see Class Clause and the ipqosconf(1M) man page.
Define a class that identifies an application that must have highest-priority forwarding.
class { name video next_action markEF enable_stats FALSE } |
Entry |
Description |
---|---|
name video |
Creates the class video to identify streaming video traffic that is outgoing from Goldweb. |
next_action markEF |
Instructs the ipgpc module to pass packets of the video class to the markEF action statement after ipgpc completes processing. The markEF action statement calls the dscpmk marker. |
enable_stats FALSE |
Enables statistics taking for the video class. However, because the value of enable_stats is FALSE, statistics for this class are not turned on. |
Task |
For Information |
---|---|
Define filters for the class you just created | |
Create another class clause for the configuration file |
How to Begin the IPQoS Configuration File and Define Traffic Classes |