Traffic shaping is a technology that has traditionally been used in Frame-Relay and ATM WAN technologies. Many frame and ATM networks have a hub and spoke architecture where all WAN traffic must traverse the headquarters site. Since the headquarters site is aggregating WAN services, the headquarters normally has much higher interface speeds than the branch routers. The headquarters router will attempt to send traffic to the branch location at much higher speeds than the branch routers local loop connection will allow if traffic shaping is not implemented. Traffic shaping will allow the WAN administrator to limit the throughput from the headquarters to the speed of the branch location. Traffic shaping is very similar to policing in the respect that it is a limiting technology that configures a maximum possible rate. Shaping is a much more liberal mechanism when compared to policing. Policing normally drops or marks down exceeding traffic, while shaping queues exceeding traffic. Shaping can result in very large delays due to the large default size of the shaping queue (1000 packets by default). It is best practice to shape the entire link (or PVC) and queue individual traffic classes within the shaping queue. A hierarchical policy-map must be created to meet this goal. Let’s take a look at an example policy that can be used to shape a metropolitan Ethernet link to the committed information rate (CIR) purchased from the provider. In our example, Global Knowledge (GK) has purchased a metropolitan Ethernet link for their brand new New York City training center. The service provider hand off at the point of demarcation is a fiber Gigabit Ethernet (GE) link. Although the GE link is capable of transporting traffic at 1,000Mbps, the CIR purchased from the carrier is 10Mbps. The disadvantage of this type of model is that traffic will be indiscriminately dropped by the carrier when GK’s rate exceeds 10Mbps. To ensure the timely transporting of high priority traffic, GK has decided to traffic shape traffic on the carrier link to 10Mbps. Traffic will be guaranteed within the 10Mbps link. The shaping command is configured as a percentage of interface bandwidth or in bits per second. The following policy-map will shape all traffic to 10Mbps. Within the 10Mbps shaper, the llq-policy policy-map will queue traffic. Policy-map shape-all Class class-default Shape average 10000000 Service-policy llq-policy Before we explore the llq-policy, we should spend some time talking about the token bucket model used in traffic shaping technologies. The shaping mechanism will de-queue traffic from the shaping gate on a time interval known as the Tc (T sub c). The Tc will default to a value based on the mathematical formula Tc = Bc / CIR. The CIR is the configured shaping rate, but the Bc will default to 8000 unless otherwise configured. If the Tc is too large, high priority traffic may suffer a very large delay. Cisco recommends configuring the Bc and CIR values in such a way that they result in a Tc of 10ms. The easiest way to do this is to configure a Bc value with two less zeros than the CIR. This will result in a Tc of 10ms (recall that a millisecond is 1/1,000 of a second). A 10000000bps CIR would then need a Bc value configured to 100000. The shaping command would be changed to the following: Shape average 10000000 100000 The Bc value may be hard to see with these large values. In a policy where traffic was shaped to 768000 (768kbps), the Bc value would be 7680 as follows: Shape average 768000 7680 Let’s get back to the following example: Policy-map shape-all Class class-default Shape average 10000000 100000 Service-policy llq-policy The llq-policy is a child policy of shape-all that is limited to a maximum bandwidth of 10Mbps. Bandwidth guarantees in this class will ensure that traffic on this interface will be limited to 10Mbps. Exceeding traffic will be queued and prioritized as specified in the llq-policy. Policy-map llq-policy Class voice Priority percent 10 Class real-time-video Priority percent 15 Class one-way-video Bandwidth percent 10 Class signaling Bandwidth percent 1 Class mission-critical Bandwidth percent 20 Class transactional Bandwidth percent 10 Class bulk-data Bandwidth percent 10 Class network-management Bandwidth percent 3 Class scavenger Bandwidth percent 1 Class routing Bandwidth percent 1 Class class-default Bandwidth percent 19 Traffic shaping is an egress (output) QoS technology and can only be configured on router interfaces. There may be some exceptions on the 6500 series switch WAN modules, but I have not personally tried to configure a shaping policy on these types of interfaces. I have tried to configure a shaping policy on the 3750 switch and the command is not there. Do not confuse the shaped round robbing (SRR) congestion management (queueing) technique used on the 2960/2970/3560/3750 swiches with shaping. The technologies are very different. SRR is very similar to weighted round robin (WRR), but the PQ in SRR can be limited (shaped). The priority queue portion of the switch-based WRR queuing method was unlimited (preemptive scheduler) which could cause queue starvation to other queues. We can talk about this more if you would like. Feel free to comment on the blog. Ask question, make comments, and keep me honest. The next blog will discuss link efficiency QoS mechanisms used on slow speed interfaces. REFERENCES Comparing Traffic Policing and Traffic Shaping for Bandwidth Limiting http://www.cisco.com/en/US/tech/tk543/tk545/technologies_tech_note09186a00800a3a25.shtml QoS FAQ http://www.cisco.com/en/US/tech/tk543/tk545/technologies_q_and_a_item09186a00800cdfab.shtml Global Knowledge – Cisco Quality of Service class http://www.globalknowledge.com/training/course.asp?pageid=9&courseid=7578&catid=206&country=United+States Cisco QoS SRND http://www.cisco.com/univercd/cc/td/doc/solution/esm/qossrnd.pdf
Class-based Shaping
Analysis
Feb 24, 20095 mins




