 can be summarized as work that continuously pertains to one of the following categories: Statistics gathering. Traffic policing. Traffic shaping. Scheduling. Queuing and buffer management. Congestion avoidance and packet dropping. STATISTICS Modern network equipment systematically gathers a wealth of statistics, which can be accumulated at different levels of granularity from as fine as on a per-flow basis all the way to per-aggregates of flow. Traffic statistics can be used for mundane tasks such as network diagnostics and management and for more sophisticated goals such as billing purposes in a QoS realm. As mentioned in previous chapters, statistics can be gathered in different ways. Most platforms are based on the idea of using on-chip counters, which are incremented or decremented accordingly based on real-time traffic infor- mation. If these counters overflow at some point, then a control plane CPU will usually have to be interrupted for further assistance with appropriate code. Other systems offer different means for gath- ering statistics with special interface ports for external support. Some platforms simply do not have the traffic manager gather statistics by itself. In those cases, the network processor is designed to han- dle this chore instead. We should clarify that although the network processor can do most of the statistics keeping, only the traffic manager will typically have visibility into congestion-related statistics and information. Likewise, if packets need to be marked differently based on the congestion that they have encoun- tered, then the traffic manager must be able to support this kind of functionality. TRAFFIC MARKING, SHAPING, AND POLICING In earlier chapters, we discussed the details of the classification realm, where packets are assigned to specific flows. In the recent industry trend toward implementing SLAs, it is important that packet flows be policed. More specifically, it is imperative to ensure that whatever is specified in the corre- sponding SLA is what the flow is actu