IPQoS Administration Guide

How to Define Traffic Forwarding in the IPQoS Configuration File

The next procedure shows how to define traffic forwarding by adding per-hop behaviors for a class into the IPQoS configuration file. The procedure assumes that you have an existing IPQoS configuration file with already-defined classes and filters. The steps continue building the /var/ipqos/Goldweb.qos file from Example 3–1.


Note –

The procedure shows how to configure traffic forwarding by using the dscpmk marker module. For information about traffic forwarding on VLAN systems by using the dlclosmk marker, refer to Using the dlcosmk Marker With VLAN Devices.


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

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


    filter {
            name videoout
            sport videosrv
            direction LOCAL_OUT
            class video
        }
    }

    Note that this filter is at the end of the ipgpc classifier action statement. Therefore, you need a closing brace to terminate the filter and a second closing brace to terminate the action statement.

  2. Invoke the marker with the following action statement.


    action {
        module dscpmk
        name markAF11
    

    Entry 

    Description 

    module dscpmk

    Calls the marker module dscpmk

    name markAF11

    Gives the name markAF11 to the action statement

    The previously defined class goldweb includes a next_action markAF11 statement. This statement sends traffic flows to the markAF11 action statement after the classifier concludes processing.

  3. Define actions for the marker to take on the traffic flow.


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

    Entry 

    Description 

    global_stats FALSE

    Enables statistics taking for the markAF11 marker action statement. However, because the value of enable_stats is FALSE, statistics are not turned on.

    dscp_map{0–63:10}

    Assigns a DS codepoint of 10 to the packet headers of the traffic class goldweb, 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 10 instructs the marker to set all entries in the dscp map to the decimal value 10 (binary 001010). This codepoint indicates that packets of the goldweb traffic class are subject to the AF11 per-hop behavior. AF11 guarantees that all packets with DS codepoint 10 receive a low-drop, high-priority service. Thus, outgoing traffic for premium customers on Goldweb is given the highest priority available for the Assured Forwarding PHB. For a table of possible DS codepoints for AF, refer to Table 6–2.

  4. Start another marker action statement.


    action {
        module dscpmk
        name markEF    
    

    Entry 

    Description 

    module dscpmk

    Calls the marker module dscpmk

    name markEF

    Gives the name markEF to the action statement

  5. Define actions for the marker to take on the traffic flow.


        params {
            global_stats TRUE
            dscp_map{0-63:46}
            next_action acct
        }
    }
    

    Entry 

    Description 

    global_stats TRUE

    Enables statistics taking on class video, which selects streaming video packets.

    dscp_map{0–63:46}

    Assigns a DS codepoint of 46 to the packet headers of the traffic class video, which is currently being processed by the marker.

    next_action acct

    Instructs the dscpmk module to pass packets of the video class to the acct action statement after dscpmk completes processing. The acct action statement invokes the flowacct module.

    The DS codepoint 46 instructs the dscpmk module to set all entries in the dscp map to the decimal value 46 (binary 101110) in the DS field. This codepoint indicates that packets of the video traffic class are subject to the EF per-hop behavior.


    Note –

    The recommended codepoint for EF is 46 (binary 101110). Other DS codepoints assign AF PHBs to a packet.


    The EF PHB guarantees that packets with the DS codepoint of 46 are given the highest precedence by IPQoS and diffserv-aware systems. Streaming applications require highest-priority service, which is the rationale behind assigning them EF PHBs in the QoS policy. For more details about the expedited forwarding PHB, refer to Expedited Forwarding (EF) PHB.

  6. Add the DS codepoints that you have just created to the appropriate files on the diffserv router. For more information, refer to How to Configure a Router on an IPQoS-Enabled Network.

Where to Go From Here

Task 

For Information 

Start gathering flow-accounting statistics on traffic flows 

How to Enable Accounting for a Class in the IPQoS Configuration File

Define forwarding behaviors for the marker modules 

How to Define Traffic Forwarding in the IPQoS Configuration File

Define flow-control parameters for the metering modules 

How to Configure Flow Control in the IPQoS Configuration File

Activate the IPQoS configuration file 

How to Apply a New Configuration to the IPQoS Kernel Modules

Define additional filters 

How to Define Filters in the IPQoS Configuration File

Create classes for traffic flows from applications 

How to Configure the IPQoS Configuration File for an Applications Server