traffic to be re-marked with a lower priority before the excess traffic is sent out. Traffic shaping buffers excessive traffic so that the traffic stays within the desired rate. With traffic shaping, traffic bursts are smoothed out by queuing the excess traffic to produce a steadier flow of data. Reducing traffic bursts helps reduce congestion in the network. Traffic shapers such as class-based shaping, Frame Relay traffic shaping (FRTS), or virtual IP (VIP)-based distributed traffic shaping (DTS) in Cisco IOS software do not have the ability to mark traffic. Why Use Policing?
Traffic policing is typically used to satisfy one of these requirements as summarized in Figure : Why Use Shaping?
Traffic shaping is typically used to prevent and manage congestion in ATM, Frame Relay, or Metro Ethernet networks, where asymmetric bandwidths are used along the traffic path. If shaping is not used, then buffering can occur at the slow (usually the remote) end, which can lead to queuing and cause delays, and overflow, which can cause packet drops. Traffic shaping is an attempt to control traffic in ATM, Frame Relay, or Metro Ethernet networks to optimize or guarantee performance, low latency, or bandwidth. Traffic shaping deals with the concepts of classification, queue disciplines, enforcing policies, congestion management, quality of service (QoS), and fairness. Traffic shaping provides a mechanism to control the volume of traffic being sent into a network (bandwidth throttling) by not allowing the traffic to burst aboe the subscribed (committed) rate. For this reason, traffic-shaping schemes need to be implemented at the network edges, as with ATM, Frame Relay, or Metro Ethernet, to control the traffic entering the network. It also may be necessary to identify traffic with a granularity that allows the traffic-shaping control mechanism to separate traffic into individual flows and shape them differently. Figure summarizes these points.
Content 4.7 Introducing Traffic Policing and Shaping 4.7.2 Why Use Traffic Conditioners? Traffic conditioners, QoS mechanisms that limit bandwidth, include policing and shaping. Both of these approaches limit bandwidth, but each has different characteristics, as follows: Traffic policing divides the shared resource (the upstream WAN link) among many flows. In the example shown in Figure , the router Fast Ethernet interface has an input traffic-policing policy applied to it in which the mission-critical server traffic rate is not limited but the user x file-sharing application traffic rate is limited to 56 kbps. All file-sharing application traffic from user x that exceeds the rate limit of 56 kbps will be dropped. Traffic Policing and Shaping: Example
Traffic policing tools are often configured on interfaces at the edge of a network to limit the rate of traffic entering or leaving the network. In the most common traffic-policing configurations, traffic that conforms is transmitted and traffic that exceeds is sent with a decreased priority or is dropped. Such priorities can be based on IP precedence or DSCP. Network administrators can change these configuration options to suit their network needs. Traffic-shaping tools limit the transmit rate from a source by queuing the excess traffic. This limit is typically a value lower than the line rate of the transmitting interface. Traffic shaping can be used to account for speed mismatches, which are common in nonbroadcast multiaccess (NBMA) networks such as Frame Relay and ATM. Figure shows two types of speed mismatches:
Content 4.7 Introducing Traffic Policing and Shaping 4.7.3 Policing vs. Shaping Figure shows the differences between policing and shaping. Policing can be applied to either the inbound or outbound direction, while shaping can be applied only in the outbound direction. Policing drops nonconforming traffic instead of queuing the traffic like shaping. Policing also supports marking of traffic. Traffic policing is more efficient in terms of memory utilization than traffic shaping because no additional queuing of packets is needed. Both traffic policing and shaping ensure that traffic does not exceed a bandwidth limit, but each mechanism has different impacts on the traffic: