9.2.1 RED queue in DiffServ module

A DiffServ queue (in class dsREDQueue) derived from the base class Queue is implemented in DiffServ module to provide the basic DiffServ router functionality, see dsred.{h,cc}). dsREDQueue has the following abilities:

The class dsREDQueue consists of four physical RED queues, each containing three virtual queues. The number of physical and virtual queues are defined in numPrec and numQueues_. Each combination of physical and virtual queue number is associated with a code point (or a drop preference), which specifies a certain level of service.

The physical queue is defined in class redQueue, which enables traffic differentiation by defining virtual queues with independent configuration and state parameters, see dsredq.{h,cc}. For example, the length of each virtual queue is calculated only on packets mapped to that queue. Thus, packet dropping decisions can be applied based on the state and configuration parameters of that virtual queues. Class redQueue is not equivalent to class REDQueue, which was already present in ns. Instead, it is a modified version of RED implementation with the notion of virtual queues and is only used by class redQueue to realize physical queues. All user interaction with class redQueue is handled through the command interface of class dsREDQueue.

Class dsREDQueue contains a data structure known as the Per Hop Behavior (PHB) Table In DiffServ, edge routers mark packets with code points and core routers simply respond to existing code points; both of them use PHB table to map a code point to a particular physical and virtual queue. The PHB Table is defined as an array with three fields:

struct phbParam {
   int codePt\_; // corresponding code point
   int queue\_;	// physical queue
   int prec\_;	// virtual queue (drop precedence)
};

Tom Henderson 2011-11-05