System Administration Guide: IP Services

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

Before You Begin

The procedure assumes that you have an existing IPQoS configuration file with already defined classes and already defined filters. The steps continue building the /var/ipqos/Goldweb.qos file from Example 28–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 clause 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
    
    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
        }
    }
    
    global_stats FALSE

    Enables statistics collection for the markAF11 marker action statement. However, because the value of enable_stats is FALSE, statistics are not collected.

    dscp_map{0–63:10}

    Assigns a DSCP 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 DSCP of 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 the DSCP of 10 receive a low-drop, high-priority service. Thus, outgoing traffic for premium customers on Goldweb is given the highest priority that is available for the Assured Forwarding (AF) PHB. For a table of possible DSCPs for AF, refer to Table 31–2.

  4. Start another marker action statement.


    action {
        module dscpmk
        name markEF    
    
    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
        }
    }
    
    global_stats TRUE

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

    dscp_map{0–63:46}

    Assigns a DSCP 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 class video to the acct action statement after dscpmk completes processing. The acct action statement invokes the flowacct module.

    The DSCP of 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 Expedited Forwarding (EF) per-hop behavior.


    Note –

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


    The EF PHB guarantees that packets with the DSCP 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 to streaming applications the EF PHBs in the QoS policy. For more details about the expedited forwarding PHB, refer to Expedited Forwarding (EF) PHB.

  6. Add the DSCPs 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.

See Also