<< Previous Contents Index Next >>

4.3. Rating

A rate block defines a rate, which can be used in a charge statement to further select traffic based on protocol, per-hop behaviour or time and date.

Note that for a rate to match, at least one of each type of clause mentioned in the rate block must match; thus if a rate includes both time and protocol specifications, one of the time ranges and one of the protocols must match a flow for the rate to apply to the flow.

4.3.1. Rating by time: the time statement

The time keyword takes a number of dates, date ranges, day ranges or time ranges. For a rate to match, any time statement in the rate may ratch, but all the ranges within a time statement must match for the time statement to match. Thus given,

any time after from 6pm to 8am from Monday to Friday matches, as does all day Saturday or Sunday or the 25th of December.

Dates must be in DD/Mon[/YYYY[/time]]. Days may be in three letter format. Times in 24-hour time, HH:MM[:SS]. Ranges are specified with a hyphen, with no whitespace between the two ranges.

4.3.2. Rating by protocol: the service statement

The service keyword takes a list of protocols defined by the protocol statement; any flow matching the protocol specification will make the rate match. Services may be negated with a leading '!', in which case if a packet flow matches, the rate does not match.

Example:

4.3.3. Rating by per-hop behaviour: the diffserv statement

The diffserv keyword selects per-hop behaviours that must match for the rate to apply. Example:


<< Previous Contents Index Next >>