摘要 |
The present invention discloses a method for avoiding congestion on a network device and a network device, in order to resolve a problem of a decrease in a throughput of a network device caused when the network device performs, after receiving a series of packets, packet discarding processing on the series of packets in a manner of randomly and discretely discarding packets. The method includes: determining, by a network device according to a size of currently used storage space, whether packet discarding processing needs to be performed on packets that belong to a same data flow in the currently used storage space, where there are N packets that belong to the same data flow, and N‰¥2; and if packet discarding processing needs to be performed, discarding, by the network device, continuous M packets that belong to the same data flow, where 1‰¤M‰¤N. |