sun.com docs.sun.com My Sun Worldwide Sites

Previous Previous     Contents     Index     Next Next

The following configuration file defines IPQoS activities on Userweb. This server hosts web sites for individuals with low-priced, or best-effort, SLAs. This level of service guarantees the best service that can be delivered to best-effort customers after the IPQoS system handles traffic from customers with more expensive SLAs.

Example 34-2 Sample Configuration for a Best-Effort Web Server

fmt_version 1.0

action {
    module ipgpc
    name ipgpc.classify
    params {
        global_stats TRUE
    }
    class {
        name Userweb
        next_action markAF12
        enable_stats FALSE
    }
    filter {
        name webout
        sport 80
        direction LOCAL_OUT
        class Userweb
   }
}
action {
    module dscpmk
    name markAF12
    params {
        global_stats FALSE
        dscp_map{0-63:12}
        next_action continue
    }
}

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

ProcedureHow to Define Filters in the IPQoS Configuration File

The next procedure shows how to define filters for a class in the IPQoS configuration file.

Before You Begin

The procedure assumes that you have already started file creation and have defined classes. The steps continue building the /var/ipqos/Goldweb.qos file that is created in How to Create the IPQoS Configuration File and Define Traffic Classes.


Note - As you create the IPQoS configuration file, be very careful to start and end each class clause and each filter clause with curly braces ({ }). For an example of the use of braces, use Example 34-1.


  1. Open the IPQoS configuration file, and locate the end of the last class that you defined.

    For example, on the IPQoS-enabled server Goldweb, you would start after the following class clause in /var/ipqos/Goldweb.qos:

    class {
            name video
            next_action markEF
            enable_stats FALSE
        }

  2. Define a filter clause to select outgoing traffic from the IPQoS system.

        filter {
            name webout
            sport 80
            direction LOCAL_OUT
            class goldweb
        }

    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 goldweb

    Identifies the class to which the filter belongs, in this instance, class goldweb.

    For syntactical and detailed information about the filter clause in the IPQoS configuration file, refer to filter Clause.

  3. Define a filter clause to select streaming video traffic on the IPQoS system.

        filter {
            name videoout
            sport videosrv
            direction LOCAL_OUT
            class video
        }

    name videoout

    Gives the name videoout to the filter.

    sport videosrv

    Selects traffic with a source port of videosrv, a previously defined port for the streaming video application on this system.

    direction LOCAL_OUT

    Further selects traffic that is outgoing from the local system.

    class video

    Identifies the class to which the filter belongs, in this instance, class video.

See Also
Previous Previous     Contents     Index     Next Next
Company Info Contact Terms of Use Privacy Copyright 1994-2007 Sun Microsystems, Inc.