A system and methods are shown for traffic shaping and congestion
avoidance in a computer network such as a data-over-cable network. A
headend of the data-over-cable system includes a traffic shaper
configured to calculate a packet arrival rate from a cable modem and a
traffic conditioner configured to calculate an average queue size on an
output interface to an external network. For example, the traffic shaper
compares the packet arrival rate to three packet arrival thresholds
including a committed rate threshold, a control rate threshold and a peak
rate threshold. If the calculated packet arrival rate falls between the
committed threshold and control rate threshold, the traffic shaper
applies a link layer mechanism, such as a MAP bandwidth allocation
mechanism, to lower the transmission rate from the cable modem.