System Administration Guide: IP Services

ProcedureHow to Create the IPQoS Configuration File and Define Traffic Classes

You can create your first IPQoS configuration file in whatever directory is easiest for you to maintain. 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 28–1.


Note –

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 28–1.


  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.

  2. 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
    
    fmt_version 1.0

    Begins the IPQoS configuration file.

    action {

    Begins the action statement.

    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 the ipqosconf(1M) man page.

  3. Add a params clause with the statistics parameter global_stats.


    params {
              global_stats TRUE
       }
    

    The parameter global_stats TRUE in theipgpc.classify statement enables statistics gathering for that action. global_stats TRUE also enables per-class statistics gathering wherever a class clause definition specifies enable_stats TRUE.

    Turning on statistics impacts performance. You might want to gather 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(1M) man page.

  4. Define a class that identifies traffic that is bound for the premium server.


    class { 
            name goldweb 
            next_action markAF11   
            enable_stats FALSE 
        }
    

    This statement is called a class clause. A class clause has the following contents.

    name goldweb

    Creates the class goldweb to identify traffic that is bound for the Goldweb server.

    next_action markAF11

    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.

  5. Define a class that identifies an application that must have highest-priority forwarding.


    class {
            name video
            next_action markEF
            enable_stats FALSE
        }
    
    name video

    Creates the class video to identify streaming video traffic that is outgoing from the Goldweb server.

    next_action markEF

    Instructs the ipgpc module to pass packets of the video class to the markEF statement after ipgpc completes processing. The markEF statement calls the dscpmk marker.

    enable_stats FALSE

    Enables statistics collection for the video class. However, because the value of enable_stats is FALSE, statistics collection for this class is not turned on.

See Also