traffic class, Weighted Random Early Detection (WRED) (see Appendix A.6) is used to drop packets selectively based on different priorities specified by IP precedence. Packets with a higher IP precedence are less likely to be dropped than packets with a lower precedence. Thus, higher priority traffic is delivered with a higher probability than lower priority traffic. Scheduler: The scheduling has the most impact on the level of service a packet receives. It decides on which queue, among a set of queues, to service next, for example Weighted Fair Queuing (WFQ), priority queuing, etc. Queuing: Additionally, there is also queuing function in the DiffServ router. They store the packets while they are waiting to receive service by the scheduler and depart to the next hop or DiffServ module. Weighted Fair Queuing (WFQ) WFQ is a popular scheduling algorithm to guarantee bounded delay, guaranteed throughput, and fairness [DKS89]. It is commonly used in a DiffServ node to provide different priorities for different traffic classes. The WFQ scheduling discipline offers QoS by adding a weight to the queues to assign different priority levels for different queues. Each queue is assigned a weight that determines the share of the available capacity that it will have and thus all queues share the bandwidth proportional to their weights. Traffic may be prioritized according to the packet information in the source and destination IP address fields, port numbers and information in the ToS field (e.g. DSCP). The WFQ discipline weights the traffic SO that the low-bandwidth traffic gets a fair level of priority. Let Wk be the weight of the kth queue and BW the total available IP bandwidth. If there are in total N queues and all queues are transmitting data, then the kth queue obtains a fraction of the total capacity BW as calculated in formula (3.1). But if one priority queue is empty (i.e. not utilizing its allocated bandwidth), then its spare bandwidth shall be fairly shared among the other queues according to their weights. (3.1) Th