Patent ID: 8542586

Claim:
A method implemented in a network element to shape packet traffic rates of packets in-transit from a plurality of channels to a port within the network element, the port shared by the plurality of channels for transmitting the packets, the method comprising the steps of: initializing a port load value and port excess value for the port, the port load value to track load for the port across the plurality of channels and the port excess value to track use of bandwidth on the port between a committed information rate (CIR) and an excess information rate (EIR) across the plurality of channels; receiving packets through each of the plurality of channels and storing the received packets in a respective queue for each channel; monitoring a status of each queue as empty or not empty; monitoring a status of each queue as excess or not excess, wherein excess is a state where a threshold number of packets has been stored in a queue for a channel; subtracting a CIR from the port load value when an empty queue becomes active by storing at least one packet; adding the CIR to the port load value when an active queue becomes empty; adding a difference between an EIR and the CIR for a channel to the port excess value when a queue of the channel becomes excess by meeting the threshold number; subtracting the difference between the EIR and the CIR for the channel from the port excess value when the excess queue for the channel becomes not excess; calculating an oversubscription ratio based on the port load value and port excess value; calculating a shaping rate for each of the plurality of channels by distributing a difference in CIR and EIR for a port across the plurality of channels by applying an over-subscription ratio for each channel; and shaping the traffic for each of the plurality channels using the shaping rate for bandwidth allocation.