System Administration Guide: IP Services

ProcedureHow to Create an IPQoS Configuration File for a Best-Effort Web Server

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.

  1. Log in to the best-effort web server.

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

  3. Define a class that identifies traffic that is bound for the best-effort web server.


    class {
            name userweb
            next_action markAF12
            enable_stats FALSE
        }
    
    name userweb

    Creates a class that is called userweb for forwarding web traffic from users.

    next_action markAF1

    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 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.

  4. Define a filter clause to select traffic flows for the userweb class.


       filter {
           name webout
           sport 80
           direction LOCAL_OUT
           class userweb
       }
    }
    
    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.

  5. Begin the action statement to invoke the dscpmk marker.


    action {
        module dscpmk
        name markAF12
    
    module dscpmk

    Invokes the marker module dscpmk.

    name markAF12

    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.

  6. Define parameters for the marker to use for processing the traffic flow.


        params {
            global_stats FALSE
            dscp_map{0-63:12}
            next_action continue
        }
    }
    
    global_stats FALSE

    Enables statistics collection for the markAF12 marker action statement. However, because the value of enable_stats is FALSE, statistics collection does not occur.

    dscp_map{0–63:12}

    Assigns a DSCP 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 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.

  7. When you complete the IPQoS configuration file, apply the configuration.

See Also