network congestion. Dropped TCP segments cause TCP sessions to reduce their window sizes. Some applications do not use TCP and cannot handle drops (fragile flows). These approaches can prevent drops in sensitive applications: Figure summarizes these points with a graphic. Cisco IOS QoS software also provides the following mechanisms to prevent congestion: Shaping implies the existence of a queue and of sufficient memory to buffer delayed packets, while policing does not. Queuing is an outbound concept; packets going out an interface get queued and can be shaped. Only policing can be applied to inbound traffic on an interface. Ensure that you have sufficient memory when enabling shaping. In addition, shaping requires a scheduling function for later transmission of any delayed packets. This scheduling function allows you to organize the shaping queue into different queues. Examples of scheduling functions are CBWFQ and LLQ. Figure illustrates the differences between policing and shaping. Example: Packet Loss Solution
Figure shows a customer connected to the network via the WAN who is suffering from packet loss caused by interface congestion. The packet loss results in poor voice quality and slow data traffic. Upgrading the WAN link is not an option to increase quality and speed. Other options must be considered to solve the problem and restore network quality. Congestion-avoidance techniques monitor network traffic loads in an effort to anticipate and avoid congestion at common network and internetwork bottlenecks before congestion becomes a problem. These techniques provide preferential treatment for premium (priority) traffic when there is congestion while concurrently maximizing network throughput and capacity use and minimizing packet loss and delay. For example, Cisco IOS QoS congestion-avoidance features include weighted random early detection (WRED) and LLQ as possible solutions. The WRED algorithm allows for congestion avoidance on network interfaces by providing buffer management and allowing TCP traffic to decrease, or throttle back, before buffers are exhausted. Using WRED helps avoid tail drops and maximizes network use and TCP-based application performance. There is no such congestion avoidance for User Datagram Protocol (UDP)-based traffic, such as voice traffic. In case of UDP-based traffic, methods such as queuing and compression techniques help to reduce and even prevent UDP packet loss. As Figure indicates through shaping, congestion avoidance combined with queuing can be a very powerful tool for avoiding packet drops.
Content 3.2 Implementing Cisco IOS QoS 3.2.1 What is QoS? QoS is a generic term that refers to algorithms that provide different levels of quality to different types of network traffic. QoS technologies provide the elemental building blocks that will be used for future business applications in campus, WAN, and service provider networks. QoS manages the following network characteristics: Figure illustrates these points. Simple networks process traffic with a FIFO queue. However, QoS enables you to provide better service to certain flows by either raising the priority of a flow or limiting the priority of another flow. It is also important to ensure that providing priority for one or more flows does not make other flows fail. For example, the network can delay e-mail packets several minutes with no one noticing but it cannot delay VoIP packets for more than a tenth of a second before users notice the delay. Cisco IOS QoS is a tool box, and many tools can accomplish the same result. A simple analogy comes from the need to tighten a bolt: You can tighten a bolt with pliers or with a wrench. Both are equally effective, but these are different tools. It is the same with QoS tools. You will find that results can be achieved using different QoS tools depending on network traffic. Just as you would not use a screwdriver to drive a nail, you would not use an inappropriate QoS mechanism for managing flow. QoS tools can help alleviate most congestion problems. However, many times there is too much traffic for the bandwidth available. In such cases, QoS may only be a temporary fix. A simple analogy would be pouring syrup from one bottle to another. If you pour syrup into the second container faster than the neck can accommodate, the syrup will overflow and run down the side of the bottle. You could solve the problem by pouring the syrup into a funnel, which would temporarily hold the extra syrup. But eventually, if you pour the syrup quickly, the funnel will fill up and overflow as well. Congestion management, queue management, link efficiency, and traffic shaping and policing tools provide QoS within a single network element. These tools are listed in Figure . Congestion Management
Because of the bursty nature of voice, video, and data traffic, the amount of traffic sometimes exceeds the speed of a link. At this point, what will the router do? Will it buffer traffic in a single queue and let the first packet in be the first packet out? Or, will the router put packets into different queues and service certain queues more often? Congestion-management tools address these questions. Tools include PQ, CQ, WFQ, and CBWFQ. Queue Management
Because queues are finite in size, they can fill and overflow. When a queue is full, any additional packets cannot get into the queue and the tail of the flow is dropped. This is called tail drop. Routers cannot prevent packets from being dropped, even high-priority packets. Therefore, a mechanism is necessary to do two things:
  1. Try to make sure that the queue does not fill up, so that there is room for high-priority packets.
  2. Use some sort of criteria for dropping packets that are of lower priority before dropping higher-priority packets.
WRED provides both of these mechanisms. Link Efficiency
Many times, low-speed links present an issue for smaller packets. For example, the serialization delay of a 1500-byte packet on a 56-kbps link is 214 ms. If a voice packet were to get behind this big packet, the delay budget for voice would be exceeded even before the packet left the router. Link fragmentation and interleave allow this large packet to be segmented into smaller packets interleaving the voice packet. Interleaving is as important as the fragmentation. There is no reason to fragment the packet and have the voice packet go behind all the fragmented packets. Note
Serialization delay is the time that it takes to put a packet on the link. For the example just given, these mathematics apply: Packet size: 1500-byte packet x