Textbook Notes (280,000)
CA (170,000)
U of A (2,000)
ECE (30)
ECE495 (20)
mint (20)
Chapter 5

ECE495 Chapter Notes - Chapter 5: Committed Information Rate, Token Bucket, Traffic Shaping


Department
Electrical and Computer Engineering
Course Code
ECE495
Professor
mint
Chapter
5

This preview shows pages 1-3. to view the full 9 pages of the document.
Traffic Shaping, Policing, and Link Efficiency v1.01 – Aaron Balchunas
* * *
All original material copyright © 2010 by
Aaron Balchunas (aaron@routeralley.com),
unless otherwise noted. All other material copyright © of their respective owners.
This material may be copied and used freely, but may not be altered or sold without the expressed written
consent of the owner of the above copyright. Updated material may be found at http://www.routeralley.com.
1
- Traffic Shaping, Policing, and Link Efficiency -
Traffic Shaping vs. Policing
There are two methods for managing traffic that exceeds a specified rate:
Traffic shaping
Traffic policing
These methods are often necessary on the edge separating a customer’s
network from a provider’s network. Providers often force the customer to
adhere to a specific policy of service (or committed rate).
This policy is referred to as the Service Level Agreement (SLA) between
the customer and provider. Shaping and policing mechanisms differ in how
each handles violations of the SLA.
Shaping is usually implemented on the customer side, and will buffer
traffic that exceeds the provider’s committed rate. Thus, shaping can slow
the traffic rate and siphon out traffic in compliance with the provider’s SLA.
Buffering traffic will often create delay and jitter, which can negatively
impact sensitive traffic types. Shaping also requires sufficient memory to
queue buffered traffic. Shaping provides no mechanism to re-mark traffic
that exceeds the committed rate.
Policing is usually implemented on the provider side, and will either drop
or re-mark traffic that exceeds the provider’s committed rate. TCP traffic
that is dropped will be forced to resend, which may result in TCP global
synchronization or starvation issues.
Policing can be implemented for both inbound and outbound traffic on an
interface. Shaping can only occur on outbound traffic on an interface.
(Reference: http://www.cisco.com/en/US/tech/tk543/tk545/technologies_tech_note09186a00800a3a25.shtml)

Only pages 1-3 are available for preview. Some parts have been intentionally blurred.

Traffic Shaping, Policing, and Link Efficiency v1.01 – Aaron Balchunas
* * *
All original material copyright © 2010 by
Aaron Balchunas (aaron@routeralley.com),
unless otherwise noted. All other material copyright © of their respective owners.
This material may be copied and used freely, but may not be altered or sold without the expressed written
consent of the owner of the above copyright. Updated material may be found at http://www.routeralley.com.
2
Transfer Rate – The Token Bucket System
Cisco describes the regulation of a transfer rate as a token bucket system,
which is comprised of three parts:
Committed Information Rate (CIR) – specifies the traffic rate
dictated by the SLA, measured in bits per second (bps).
Burst Rate (B
c
) – specifies the amount of traffic to be sent within a
given time interval, measured in bits.
Time Interval (T
c
) – identifies the time interval for each burst,
measured in seconds or sometimes milliseconds.
The CIR is calculated using the formula:
CIR (bps) = B
c
(bits) / T
c
(seconds)
With a token bucket system, the bucket is filled with tokens, and each token
represents one byte. Thus, to transmit a 50-byte packet, the bucket must
contain a minimum of 50 tokens. Tokens are consumed as traffic is
transferred, and the bucket is refilled with tokens at the speed of the CIR. If
the bucket is full, then excess tokens will spill out and are wasted. The
capacity of the bucket is defined by the burst rate.
If the data (in bytes) to be transmitted is less than the number of tokens
currently in the bucket, then the traffic is conforming to the policy and is
(usually) forwarded.
If the data (in bytes) to be transmitted is more than the number of tokens
currently in the bucket, then the traffic is exceeding the policy. This excess
traffic can be shaped (buffered) or policed (dropped or re-marked),
depending on the configured policy.
The above describes a One Token Bucket system. Some SLA policies
allow for bursts that are higher than the normal burst rate (B
c
), during
periods of non-congestion. This is referred to as the excess burst (B
e
) rate.
The excess burst rate is an optional configuration option, and is defined as a
Two Token Bucket system. Excess tokens are not wasted, but are instead
placed in an excess bucket. The capacity of this bucket is defined by the
excess burst rate. Traffic that exceeds the normal token bucket can borrow
tokens from the excess bucket – but will usually be dropped first during
congestion. Traffic that exceeds the excess bucket is violating the policy.
(Reference: http://www.cisco.com/en/US/docs/ios/12_2/qos/configuration/guide/qcfpolsh.html)

Only pages 1-3 are available for preview. Some parts have been intentionally blurred.

Traffic Shaping, Policing, and Link Efficiency v1.01 – Aaron Balchunas
* * *
All original material copyright © 2010 by
Aaron Balchunas (aaron@routeralley.com),
unless otherwise noted. All other material copyright © of their respective owners.
This material may be copied and used freely, but may not be altered or sold without the expressed written
consent of the owner of the above copyright. Updated material may be found at http://www.routeralley.com.
3
Configuring Traffic Shaping
Shaping is usually implemented on the customer side, and will buffer
traffic that exceeds the provider’s committed rate. Shaping will thus slow the
traffic rate and siphon out traffic in compliance with the provider’s SLA.
Cisco IOS devices support multiple methods of traffic shaping:
Generic Traffic Shaping (GTS) – implements shaping on a per-
interface basis using the traffic-shape command.
Class-Based Shaping – implements shaping on a per-class basis
using the shape command within a MQC policy-map.
Distributed Traffic Shaping (DTS) – offloads traffic shaping from
the router processor to Versatile Interface Processors (VIPs). DTS is
only available on high-end Cisco platforms.
Frame Relay Traffic Shaping (FRTS) – implements Frame-Relay
specific shaping mechanisms, such as BECN or FECN. FRTS is only
available on a Frame-Relay interface or subinterface, and is covered
extensively in the Frame-Relay guide.
To configure basic Generic Traffic Shaping (GTS):
Router(config)# interface serial0/0
Router(config-if)# traffic-shape rate 256000 64000 64000
The traffic-shape rate command is followed by three values, representing:
The committed information rate (CIR)
The normal burst rate (B
c
)
The excess burst rate (B
e
)
If the normal burst (B
c
) and excess burst (B
e
) values are equal, then excess
burst is not allowed. Specific traffic can be shaped using an access-list:
Router(config)# access-list 101 permit tcp any any eq 80
Router(config)# interface serial0/0
Router(config-if)# traffic-shape group 101 256000 64000 64000
Class-Based Shaping is accomplished within a policy-map:
Router(config)# policy-map MYPOLICY
Router(config-pmap)# class MYMAP
Router(config-pmap-c)# shape 256000 64000 64000
(Reference: http://www.cisco.com/en/US/docs/ios/12_2/qos/configuration/guide/qcfgts.html;
http://www.cisco.com/en/US/docs/ios/12_2/qos/configuration/guide/qcfcbshp.html)
You're Reading a Preview

Unlock to view full version