{"id":433,"date":"2010-02-28T23:26:19","date_gmt":"2010-02-28T22:26:19","guid":{"rendered":"http:\/\/ccievoice.ksiazek.be\/?p=433"},"modified":"2025-01-11T18:28:05","modified_gmt":"2025-01-11T17:28:05","slug":"traffic-conditioners","status":"publish","type":"post","link":"https:\/\/collaboration.ksiazek.be\/?p=433","title":{"rendered":"Traffic Conditioners"},"content":{"rendered":"<p>QoS mechanisms that limit bandwidth are called traffic conditioners and we have already given a quick definition of the two existing types:<\/p>\n<blockquote>\n<ul>\n<li><a href=\"http:\/\/ccievoice.ksiazek.be\/?p=339\" target=\"_self\">Shaping<\/a><\/li>\n<li><a href=\"http:\/\/ccievoice.ksiazek.be\/?p=336\" target=\"_self\">Policing<\/a><\/li>\n<\/ul>\n<\/blockquote>\n<p>Policing typically limits bandwidth by discarding traffic that exceeds a specified rate. However policing also can remark this traffic which is exceeding the specified rate and send the traffic anyway.<\/p>\n<p>Recall also that Policing can be applied on an inbound or outbound direction of an\u00a0interface.<\/p>\n<p>Shaping as seen before is delaying traffic as it buffers it . The only backdraw is that Shaping can be applied only in the outbound direction of an interface.<\/p>\n<p>So with Policing and Shaping , you can send traffic at an &#8220;average&#8221; rate which is less that clock rate of your interface. The average bandwidth is called the Commited Information Rate (CIR).<\/p>\n<p>Please note also the following difference between the Shaping and the Policing regarding the Burst.<\/p>\n<blockquote>\n<ul>\n<li>The number of <strong><span style=\"text-decoration: underline;\">bits<\/span><\/strong> that is sent during a toming interval is called the Commited Burst ( Bc) =&gt; SHAPING<\/li>\n<li>The number of\u00a0<span style=\"text-decoration: underline;\"><strong>bytes<\/strong><\/span> that is sent during a toming interval is called the Commited Burst ( Bc) =&gt;\u00a0POLICING<\/li>\n<\/ul>\n<\/blockquote>\n<p>The timing interval is written as Tc . So you have the following formulas.<\/p>\n<blockquote><p>CIR = Bc \/ Tc<\/p><\/blockquote>\n<p style=\"text-align: center;\">or<\/p>\n<blockquote><p>Tc = Bc \/ CIR<\/p><\/blockquote>\n<p>If you don&#8217;t use your Bc bits or bytes, then you can re-use them for the next timing interval and it is considered as Excess Burst (Be). So Be bits or bytes are the excess packets of Bc that we can send.<\/p>\n<p>Now going more in depth in Cisco technology , we will use the &#8220;metaphor&#8221; of token bucket for the Bc and Be traffic.<\/p>\n<p>So with policing , traffic that requires no more than the Bc number of bits or bytes to be transmitted is called <em><span style=\"text-decoration: underline;\">&#8220;conforming traffic&#8221;<\/span> <\/em>. Traffic that requires more than the Bc numbers of bits or bytes is said to be <span style=\"text-decoration: underline;\"><em>&#8220;exceeding traffic&#8221;<\/em><\/span>.<\/p>\n<p>Let&#8217;s see the policing approach with a single token bucket approach.<\/p>\n<p>Suppose 500 bytes currently in the token bucket . A packet comes through requiring 300 bytes. The bytes are removed from the bucket and the packet is sent. Then before the bucket has been replenished with more tokens, another 300 bytes packet comes along. Because only 200 bytes remain in the bucket, the packet can&#8217;t be sent and is discarded.<\/p>\n<p><a href=\"http:\/\/alnpcruz.preview.infomaniak.com\/wp-content\/uploads\/2010\/03\/Policing-Single-Token-Bucket.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-438\" title=\"Policing Single Token Bucket\" src=\"http:\/\/alnpcruz.preview.infomaniak.com\/wp-content\/uploads\/2010\/03\/Policing-Single-Token-Bucket.png\" alt=\"Policing Single Token Bucket\" width=\"531\" height=\"300\" srcset=\"https:\/\/collaboration.ksiazek.be\/wp-content\/uploads\/2010\/03\/Policing-Single-Token-Bucket.png 531w, https:\/\/collaboration.ksiazek.be\/wp-content\/uploads\/2010\/03\/Policing-Single-Token-Bucket-300x169.png 300w\" sizes=\"(max-width: 531px) 100vw, 531px\" \/><\/a><\/p>\n<p>Now let&#8217;s continue with an enhancement to the single token bucket approach.<\/p>\n<p>Instead to have one bucket , now a second bucket exists. The first bucket has a depth of Bc and the second bucket has a depth of Be.<\/p>\n<p>If a packet can be forwarded using bytes in the Bc bucket, it is said to be <span style=\"text-decoration: underline;\"><em>&#8220;conforming&#8221;<\/em><\/span>. If the packet can&#8217;t be forwarded using the bytes in the Bc bucket, but it can be forwarded using the bytes in the Be bucket , it is said to be <span style=\"text-decoration: underline;\"><em>&#8220;exceeding&#8221;<\/em><\/span>. If the packet can&#8217;t be forwarded using either of the bucket individually , it is said to be <span style=\"text-decoration: underline;\"><em>&#8220;violating&#8221;<\/em><\/span>.<\/p>\n<p><a href=\"http:\/\/alnpcruz.preview.infomaniak.com\/wp-content\/uploads\/2010\/03\/Policing-Dual-Token-Bucket.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-439\" title=\"Policing Dual Token Bucket\" src=\"http:\/\/alnpcruz.preview.infomaniak.com\/wp-content\/uploads\/2010\/03\/Policing-Dual-Token-Bucket.png\" alt=\"Policing Dual Token Bucket\" width=\"779\" height=\"300\" srcset=\"https:\/\/collaboration.ksiazek.be\/wp-content\/uploads\/2010\/03\/Policing-Dual-Token-Bucket.png 779w, https:\/\/collaboration.ksiazek.be\/wp-content\/uploads\/2010\/03\/Policing-Dual-Token-Bucket-300x116.png 300w, https:\/\/collaboration.ksiazek.be\/wp-content\/uploads\/2010\/03\/Policing-Dual-Token-Bucket-768x296.png 768w\" sizes=\"(max-width: 779px) 100vw, 779px\" \/><\/a><a href=\"http:\/\/alnpcruz.preview.infomaniak.com\/wp-content\/uploads\/2010\/03\/Policing-Single-Token-Bucket.png\"><\/a><\/p>\n<p>Let&#8217;s see the Cisco dual token bucket approach as Cisco also supports dual-rate policing . With dual-rate policing, you still have 2 token buckets. The first bucket is the CIR bucket, and the second bucket is the Peak Information Rate (PIR).<\/p>\n<p>These bucket are replenished with tokens at different rates, with PIR bucket being filled at a faster rate.<\/p>\n<p>When a packet arrives, the dual-rate policer checks to see whether the PIR bucket has enough tokens (that is bytes) to send the packet. If there are not sufficient tokens, the packet is said to be <span style=\"text-decoration: underline;\"><em>&#8220;violating&#8221;<\/em><\/span> and it is discarded. Otherwise, the policer checks to see whether the CIR bucket has enough tokens to forward the packet. If the packet can be sent using the CIR bucket&#8217;s tokens, the packet is <span style=\"text-decoration: underline;\"><em>&#8220;conforming&#8221;<\/em><\/span>. If the CIR bucket&#8217;s tokens are not sufficient, but the PIR bucket&#8217;s tokens are sufficient then the packet is said to be <span style=\"text-decoration: underline;\"><em>&#8220;exceeding&#8221;<\/em><\/span> and an exceed action is applied.<\/p>\n<p><a href=\"http:\/\/alnpcruz.preview.infomaniak.com\/wp-content\/uploads\/2010\/03\/Cisco-Policing-Dual-Token-Bucket.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-441\" title=\"Cisco Policing Dual Token Bucket\" src=\"http:\/\/alnpcruz.preview.infomaniak.com\/wp-content\/uploads\/2010\/03\/Cisco-Policing-Dual-Token-Bucket.png\" alt=\"Cisco Policing Dual Token Bucket\" width=\"779\" height=\"300\" srcset=\"https:\/\/collaboration.ksiazek.be\/wp-content\/uploads\/2010\/03\/Cisco-Policing-Dual-Token-Bucket.png 779w, https:\/\/collaboration.ksiazek.be\/wp-content\/uploads\/2010\/03\/Cisco-Policing-Dual-Token-Bucket-300x116.png 300w, https:\/\/collaboration.ksiazek.be\/wp-content\/uploads\/2010\/03\/Cisco-Policing-Dual-Token-Bucket-768x296.png 768w\" sizes=\"(max-width: 779px) 100vw, 779px\" \/><\/a><\/p>\n<p>So , you can specify the following various actions to perform based on whether a packet is <span style=\"text-decoration: underline;\"><em>&#8220;conforming&#8221;<\/em><\/span>, <span style=\"text-decoration: underline;\"><em>&#8220;exceeding&#8221;<\/em><\/span> or<span style=\"text-decoration: underline;\"><em> &#8220;violating&#8221;<\/em><\/span>.<\/p>\n<blockquote>\n<ul>\n<li>Transmit<\/li>\n<li>Drop<\/li>\n<li>Mark<\/li>\n<li>Multiaction<\/li>\n<\/ul>\n<\/blockquote>\n<p><span style=\"text-decoration: underline;\">CB-Shaping Config<\/span><\/p>\n<p>One of two approaches can be used when configuring Class-Based Shaping.<\/p>\n<blockquote>\n<ul>\n<li>Shaping to Average<\/li>\n<li>Shaping to Peak<\/li>\n<\/ul>\n<\/blockquote>\n<p>When you configure to shape to an average, you only want to send traffic at the CIR. However, if you configure shaping to peak, you are attempting then to send above the CIR if the bandwidth is available. Specifically, when you shape to peak, instead of just adding Bc bits to the token bucket during each timing interval, you are adding Bc+Be bits to the token bucket. The peak rate is then fiven by the following formula<\/p>\n<blockquote><p>Peak Rate = CIR * [ 1 + (Be \/ Bc)]<\/p><\/blockquote>\n<p>Recall also that althought shaping to peak can squeeze out some extra bandwidth from a WAN connection, it also can lead to multiple packets drops. !<\/p>\n","protected":false},"excerpt":{"rendered":"<p>QoS mechanisms that limit bandwidth are called traffic conditioners and we have already given a quick definition of the two existing types: Shaping Policing Policing typically limits bandwidth by discarding traffic that exceeds a specified rate. However policing also can remark this traffic which is exceeding the specified rate and send the traffic anyway. Recall [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[30,1,80,33],"tags":[59,115,117,116],"class_list":["post-433","post","type-post","status-publish","format-standard","hentry","category-ios","category-non-classe","category-qos","category-written-theory","tag-ccie-voice-written","tag-policing","tag-shaping","tag-traffic-conditioner"],"_links":{"self":[{"href":"https:\/\/collaboration.ksiazek.be\/index.php?rest_route=\/wp\/v2\/posts\/433","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/collaboration.ksiazek.be\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/collaboration.ksiazek.be\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/collaboration.ksiazek.be\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/collaboration.ksiazek.be\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=433"}],"version-history":[{"count":1,"href":"https:\/\/collaboration.ksiazek.be\/index.php?rest_route=\/wp\/v2\/posts\/433\/revisions"}],"predecessor-version":[{"id":4454,"href":"https:\/\/collaboration.ksiazek.be\/index.php?rest_route=\/wp\/v2\/posts\/433\/revisions\/4454"}],"wp:attachment":[{"href":"https:\/\/collaboration.ksiazek.be\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=433"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/collaboration.ksiazek.be\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=433"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/collaboration.ksiazek.be\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=433"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}