A method and system for controlling the flow of packets within a network
node is disclosed. The method comprises receiving packets that are
intended for a queue, classifying each of packets into at least one of a
plurality of traffic classes and applying class-specific random early
detection to each of said packets. The system comprises a classification
engine configured to classify packets into one of a plurality of traffic
classes, class-specific random early detection (RED) logic configured to
apply class-specific RED to each of said packets that have been
classified by said classification engine; and a queue for queuing any of
said packets that are not dropped in response to application of said
class-specific RED.