System Administration Guide: IP Services

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

The next procedure shows how to enable accounting on a traffic class in the IPQoS configuration file. The procedure shows how to define flow accounting for the video class, which is introduced in How to Create the IPQoS Configuration File and Define Traffic Classes. This class selects streaming video traffic, which must be billed as part of a premium customer's SLA.

Before You Begin

The procedure assumes that you have an existing IPQoS configuration file with already defined classes, filters, metering actions, if appropriate, and marking actions, if appropriate. The steps continue building the /var/ipqos/Goldweb.qos file from Example 28–1.

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

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


    action {
        module dscpmk
        name markEF
        params {
            global_stats TRUE
            dscp_map{0-63:46}
            next_action acct
        }
    }
  2. Begin an action statement that calls flow accounting.


    action {
        module flowacct
        name acct
    
    module flowacct

    Invokes the flow-accounting module flowacct.

    name acct

    Gives the name acct to the action statement

  3. Define a params clause to control accounting on the traffic class.


    params {
            global_stats TRUE
            timer 10000
            timeout 10000
            max_limit 2048
            next_action continue
        }
    }
    global_stats TRUE

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

    timer 10000

    Specifies the duration of the interval, in milliseconds, when the flow table is scanned for timed-out flows. In this parameter, that interval is 10000 milliseconds.

    timeout 10000

    Specifies the minimum interval time out value. A flow “times out” when packets for the flow are not seen during a time out interval. In this parameter, packets time out after 10000 milliseconds.

    max_limit 2048

    Sets the maximum number of active flow records in the flow table for this action instance.

    next_action continue

    Indicates that no further processing is required on packets of the traffic class video, and that these packets can return to the network stream.

    The flowacct module gathers statistical information on packet flows of a particular class until a specified timeout value is reached.

See Also