IP QoS Traffic Shaping and Policing- 5Traffic Shaping and Policing Traffic Shaping and Policing • Traffic Shaping and Policing mechanisms are used to rate-limit traffic classes • They ha
Trang 1It includes the following topics:
Objectives
Upon completion of this module, you will be able to perform the following tasks:
(Class-based Policing and Class-(Class-based Shaping)
Trang 2Traffic Shaping and Policing
Overview
The lesson introduces mechanisms for traffic policing and traffic shaping
Committed Access Rate (CAR), Generic Traffic Shaping (GTS) and Frame Relay Traffic Shaping (FRTS) are introduced in this section
Objectives
Upon completion of this lesson, you will be able to perform the following tasks:
mechanisms
Trang 3© 2001, Cisco Systems, Inc IP QoS Traffic Shaping and Policing- 5
Traffic Shaping and Policing
Traffic Shaping and Policing
• Traffic Shaping and Policing mechanisms are used to rate-limit traffic classes
• They have to be able to classify packets and meter their rate of arrival
• Traffic Shaping delays excess packets to stay within the rate limit
• Traffic Policing typically drops excess traffic to stay within the limit; alternatively it can remark excess traffic
Meter
Traffic stream
Both shaping and policing mechanisms are used in a network to control the rate at which traffic is admitted into the network Both mechanisms use classification, so they can differentiate traffic They also use metering to measure the rate of traffic and compare it to the configured shaping or policing polic y
The difference between shaping and policing can be described in terms of their rate-limiting implementation:
within the desired rate limit With shaping, traffic bursts are smoothed out producing a steadier flow of data Reducing traffic bursts helps reduce congestion in the core of the network
limits Policing does not introduce any delay to traffic that conforms to traffic policies It can however, cause more TCP retransmissions, because traffic in excess of specified limits is dropped
Trang 4© 2001, Cisco Systems, Inc IP QoS Traffic Shaping and Policing-6
Why Use Rate Limiting
Why Use Rate Limiting
network with asymmetric link bandwidths
• To limit access to resources when speed access is used but not desired
high-• To limit certain applications or classes
Rate limiting is typically used to satisfy one of the following requirements:
asymmetric bandwidths are used along the traffic path This prevents the layer-2 network from dropping large amounts of traffic by differentiately dropping excess traffic at ingress to the ATM or Frame Relay networks based
on Layer-3 information (for example: IP precedence, DSCP, access list, protocol type, etc.)
is used in transport, but sub-rate access is desired
traffic follow a specified traffic -rate policy
bandwidth characteristics of a TDM system (that is, fixed maximum available bandwidth) Inbound and outbound policing can, for example, be used on one router to split a single point-to-point link into two or more virtual point-to-point links by assigning a portion of the bandwidth to each class, thus preventing any class from monopolizing the link in either direction
Trang 5© 2001, Cisco Systems, Inc IP QoS Traffic Shaping and Policing-7
Typical Traffic Shaping or Policing Applications
Typical Traffic Shaping or Policing Applications
Low-speed link High-speed
link
Output interface is not congested queuing and WRED
do not work
Congestion in WAN network results in non-intelligent layer-
2 drops
Server Farm
Implementing a virtual TDM or Leased line over a single physical link
high-2 network
The second picture shows a hosting farm, which is accessible from the Internet via
a shared link Depending on the service contract, the hosting provider may offer different bandwidth guarantees to customers, and may want to limit the resources
a particular server uses Rate limiting can be used to divide the shared resource (upstream link) between many servers
The third example shows the option of implementing virtual leased lines over a Layer-3 infrastructure, where rate-limited reserved bandwidth is available over a shared link
Trang 6© 2001, Cisco Systems, Inc IP QoS Traffic Shaping and Policing-8
Shaping vs Policing
• Benefits of Shaping
– Shaping does not drop packets
– Shaping supports interaction with Frame Relay congestion indication
• Benefits of Policing
– Policing supports marking
– Less buffer usage (shaping requires an additional queuing system)
A shaper typically delays excess traffic using a buffer, or mechanism, to hold packets and shape the flow when the data rate of the source is higher than expected Traffic shaping smoothes traffic by storing traffic above the configured rate in a queue Therefore, shaping increases buffer utilization on a router, but causes non-deterministic packet delays Shaping can also interact with a Frame Relay network, adapting to indications of Layer-2 congestion in the WAN
A policer typically:
packets in needed)
Both policing and shaping ensure that traffic does not exceed a bandwidth limit, but they have different impacts on the traffic:
connection-oriented protocols
Trang 7© 2001, Cisco Systems, Inc IP QoS Traffic Shaping and Policing-9
How do Routers Measure Traffic
configured rate limit
The metering is usually performed with an abstract model called a token bucket, which is used when processing each packet The token bucket can calculate whether the current packet conforms or exceeds the configured rate limit on an interface
Trang 8© 2001, Cisco Systems, Inc IP QoS Traffic Shaping and Policing - 10
700
Token Bucket
Token Bucket
500 bytes Conform Action 500 bytes
The token bucket is a mathematical model used in a device that regulates the data flow The mode has two basic components:
bits into the network
Tokens are put into the bucket at a certain rate by the operating system Each incoming packet, if forwarded, takes tokens from the bucket, representing the packet’s size
If the bucket fills to capacity, newly arriving tokens are discarded Discarded tokens are not available to future packets
If there are not enough tokens in the bucket to send the packet, the regulator may:
The figure shows a token bucket, with the current capacity of 700 bytes When a 500-byte packet arrives at the interface, its size is compared to the bucket capacity (in bytes) The packet conforms to the rate limit (500 bytes < 700 bytes), and the packet is forwarded 500 tokens are taken out of the token bucket leaving 200
Trang 9© 2001, Cisco Systems, Inc IP QoS Traffic Shaping and Policing - 11
in the case of shaping)
Trang 10© 2001, Cisco Systems, Inc IP QoS Traffic Shaping and Policing - 12
Token Bucket
Token Bucket
• Bc is normal burst size (specifies sustained rate)
• Be is excess burst size (specifies length of burst)
Bc+ Be
B c of tokens is added every T c [ms]
T c = B c / CIR
Time
Link Utilization
T c 2*T c 3*T c 4*T c 5*T c
B c B c B c B c B c B c
Link BW
Average BW (CIR)
B e
CIR is the Committed Information Rate (also called the committed rate, or the
In the token bucket metaphor, tokens are put into the bucket at a certain rate,
tokens are discarded Each token grants permission for a source to send a certain number of bits into the network To send a packet, the regulator must remove, from the bucket, the number of tokens equal in representation to the packet size For example, if 8000 bytes worth of tokens are placed in the bucket every 125 milliseconds, the router can steadily transmit 8000 bytes every 125 milliseconds, if traffic constantly arrives at the router
If there is no traffic at all, 8000 bytes per 125 milliseconds get accumulated in the
collects 64000 bytes worth of tokens, which can be transmitted immediately in the
which can be transmitted in a single burst, at the line rate
Trang 11Although token bucket permits burstiness, traffic bursts are bound This guarantee
is made so that traffic flow will never send faster than the token bucket's capacity
In the long-term, this means that the transmission rate will not exceed the established rate at which tokens are placed in the bucket (the committed rate)
Trang 12© 2001, Cisco Systems, Inc IP QoS Traffic Shaping and Policing - 13
Traffic Shaping and Policing
Mechanisms
Traffic Shaping and Policing
Mechanisms
– Generic Traffic Shaping (GTS)
– Frame Relay Traffic Shaping (FRTS)
Two methods are policing mechanisms:
All these methods are discussed next in specific sections
Trang 13Summary
After completing this lesson, you should be able to perform the following tasks:
mechanisms
Lesson Review
Answer the following questions:
1 How do shaping and policing mechanisms keep track of the traffic rate?
2 Which shaping mechanisms are available with the Cisco IOS software?
3 Which policing mechanisms are available with the Cisco IOS software?
4 What are the main differences between shaping and policing?
Trang 14Generic Traffic Shaping
Overview
This lesson describes the Generic Traffic Shaping (GTS) mechanism
Objectives
Upon completion of this lesson, you will be able to perform the following tasks:
Trang 15© 2001, Cisco Systems, Inc IP QoS Traffic Shaping and Policing - 18
Generic Traffic Shaping
• Can shape multiple classes ( classification )
• Can measure traffic rate of individual classes ( metering )
( shaping )
Traffic stream
Dropper Meter
Generic Traffic Shaping (GTS) shapes traffic by reducing the outbound traffic flow
to avoid congestion This is achieved by constraining traffic to a particular bit rate using the token bucket mechanism GTS is applied on a per-interface basis and can use access lists to select the traffic to shape It works with a variety of Layer-2 technologies, including Frame Relay, ATM, Switched Multi-megabit Data Service (SMDS) and Ethernet
As shown in the block diagram, GTS performs three basic functions:
policies applied to them
and exceeding traffic
configured rate limit
Trang 16© 2001, Cisco Systems, Inc IP QoS Traffic Shaping and Policing - 19
Yes
Yes
Yes
Shaping WFQ
Shaping WFQ
Arriving packets are first classified into one of the shaping classes Traffic not classified into any class is not shaped Classification can be performed using access lists
Once a packet is classified into a shaping class, its size is compared to the amount
of available token in the token bucket of that class The packet is forwarded to the main interface queue if there are enough tokens A number of tokens taken out of the token bucket is equal to the size of the packet (in bytes)
If, on the other hand, there are not enough tokens to forward the packet, the packet is buffered in the WFQ system assigned to this shaping class The router will then periodically replenish the token bucket and check if there are enough tokens to forward one or more packets out of the shaping queue Packets are scheduled out of the shaping queue according to the WFQ scheduling algorithm
Trang 17© 2001, Cisco Systems, Inc IP QoS Traffic Shaping and Policing - 20
GTS Overview
GTS Overview
• GTS is multiprotocol
any queuing mechanisms:
– FIFO Queuing
– Priority Queuing (PQ)
– Custom Queuing (CQ)
– Weighted Fair Queuing (WFQ)
The GTS implementation in Cisco IOS supports multiple protocols and works on a varie ty of interface types WFQ is used as the shaping delay queue, providing fair scheduling within a traffic class Other queuing strategies (FIFO, PQ, CQ and WFQ) may be employed after GTS to provide traffic scheduling on the shaped traffic Also, GTS only works at the output of an interface
GTS can be used to shape all outbound traffic on an interface or it can separately shape multiple classes Classification is performed using any type of access list including all non-ip access lists
Trang 18© 2001, Cisco Systems, Inc IP QoS Traffic Shaping and Policing - 21
GTS Implementation
GTS Implementation
• The software queue may have no function if the sum of all shaping rates is less than link bandwidth
Shaping Queue (WFQ)
Software Queue (FIFO, PQ,
CQ, WFQ, )
Hardware Queue (FIFO)
Dispatches packets at configured rate
Dispatches packets at line rate
Dispatches packets at line rate
Bypass the software queue
if it is empty and there is room in the hardware queue
Packet flow through GTS is implemented using three queues The first, the shaping queue, is WFQ-based and shapes traffic according to the specified rate using a token bucket model This queue dispatches packets to the software queue, which may be configured with other queuing mechanisms (PQ, CQ, WFQ or FIFO) If the software queue is empty, traffic is forwarded directly to the output hardware queue
GTS supports distributed implementation on VIP adapters This offloads traffic shaping from the route switch processor (RSP) to the Versatile Interface Processor (VIP), and constructs all of the queues in VIP packet memory Only IP traffic can be shaped with dWFQ Another requirement is that dCEF switching must be enabled
Trang 19© 2001, Cisco Systems, Inc IP QoS Traffic Shaping and Policing - 22
traffic-shape rate bit-rate [burst-size
[excess-burst-size]]
traffic-shape rate bit-rate [burst-size
[excess-burst-size]]
Router( config-if)#
To enable traffic shaping for outbound traffic on an interface, use the
traffic-shape rate interface configuration command Of the parameters to be specified,
bit-rate is the only mandatory one The burst-size and excess-burst-size are optional
Generic traffic shaping can be used in all switching paths Older Cisco IOS versions may use slower switching paths when GTS is in effect
Trang 20© 2001, Cisco Systems, Inc IP QoS Traffic Shaping and Policing-23
Default value: 1/8 of bit rate
traffic-shape rate bit-rate [burst-size
[excess-burst-size]]
traffic-shape rate bit-rate [burst-size
[excess-burst-size]]
Router(config -if)#
Bit rate (in bits per second) is configured as the average traffic rate to which the
traffic should be shaped on the output of the interface
Burst size (in bits) can be configured to allow for varying levels of allowed
burstiness That is, traffic, which bursts over the average traffic rate, also conforms if it falls within the burst rate in an interval By default, this is set to one
Trang 21© 2001, Cisco Systems, Inc IP QoS Traffic Shaping and Policing - 24
parameter, defines the excess burst of traffic, which can still be sent through the first noticed burst By default, there is no excess burst allowed
of the token bucket By default, it is directly computed from the bit rate and the
shaping, those parameters are bounded to values between 25 and 125 ms
Trang 22© 2001, Cisco Systems, Inc IP QoS Traffic Shaping and Policing - 25
Configuring GTS
Configuring GTS
• Shapes outbound traffic matched by the specified access list
• Several traffic-shape group commands can be configured on
the same interface
• The “ traffic-shape rate “ and “ traffic-shape group “ commands
cannot be mixed on the same interface
• Separate token bucket and shaping queue is maintained for
each traffic-shape group command
• Traffic not matching any access list is not shaped
traffic-shape group access-list bit-rate [burst
use the traffic-shape group interface configuration command The traffic-shape
group command allows specification of one or more previously defined access
lists to shape traffic on the interface One traffic-shape group command must be
specified for each access list on the interface
Cisco IOS uses separate token buckets and shaping queues for each class, as differentiated by the access list specification Traffic not matching any access list bypasses traffic shaping and is immediately sent to the software or hardware interface queue
Use the traffic-shape rate command if no classification is needed and shaping should be applied to all traffic Remember that the traffic-shape group command using an IP access list permitting all IP traffic is not equivalent to the traffic-shape
rate command if non-IP traffic is present in the network
Trang 23© 2001, Cisco Systems, Inc IP QoS Traffic Shaping and Policing-26
GTS Example #1
GTS Example #1
• ISP wants to sell a service in which a customer may use all of a E1 line for 30 seconds in a burst, but on a long term average is limited to 256 kbps
msec
In the first GTS example, an ISP wants to control the amount of traffic injected into the Frame Relay WAN by the customer The SP service uses an E1 line as the access line, limits the customer to 256 Kbps on the average, but also permits bursts of up to thirty seconds at the E1 line rate
The parameters are calculated based on the service requirements CIR (the average bit rate) is set at the specified average rate, the burst size is set to one eighth of the CIR (32000 bits), and the excess burst size reflects the allowed thirty-second burst at full E1 line rate
The excess burst size was calculated using the following formula:
1 Each second of transmission at line-speed requires 2 Mbits
2 Thirty second burst therefore requires 30 x 2 Mbits
3 The excess burst size is 30 x 2048000 = 61440000
It takes thirty seconds to empty the token bucket How long does it take to fill it up again?
The token bucket is emptied at 2Mbps but it is replenished at 256kbps It takes eight times as long to fill it as it does to empty it Every thirty second burst would, therefore, require a four-minute silence on the line to accumulate tokens
Trang 24© 2001, Cisco Systems, Inc IP QoS Traffic Shaping and Policing-27
Core Customer
GTS Example #1
GTS Example #1
interface ethernet 0/0 traffic -shape rate 256000 32000 61440000
! interface serial 1/0 traffic -shape rate 256000 32000 61440000
interface ethernet 0/0 traffic-shape rate 256000 32000 61440000
! interface serial1/0 traffic-shape rate 256000 32000 61440000
the configuration would be done on both the inbound and outbound interfaces
WAN
The figure shows the router configuration required to implement this service All the output traffic is shaped, and the shaping needs to be configured on all customer edge sites, which will perform admission control using GTS
Trang 25© 2001, Cisco Systems, Inc IP QoS Traffic Shaping and Policing-28
Core Customer
GTS Example #2
GTS Example #2
traffic will never use more than 64 kbps
WAN
interface ethernet 0/0 traffic-shape group 101 64000 interface serial 1/0
traffic-shape group 101 64000
! access -list 101 permit tcp any any eq www
interface ethernet 0/0 traffic -shape group 101 64000 interface serial 1/0
traffic -shape group 101 64000
! access-list 101 permit tcp any any eq www
In the second example, a customer wants to limit web usage, so that web traffic never uses more than 64 Kbps on the access link The router configuration is shown in the figure, using default parameters for traffic bursts An access list defines web traffic as the only shaped traffic All other traffic bypasses GTS and can use the full access line bandwidth
Trang 26© 2001, Cisco Systems, Inc IP QoS Traffic Shaping and Policing-29
Monitoring GTS
Monitoring GTS
Router#show traffic-shape access Target Byte Sustain Excess Interval Increment Adapt I/F list Rate Limit bits/int bits/int (ms) (bytes) Active Se3/3 100000 2000 8000 8000 80 1000 -
Router# show traffic-shape
access Target Byte Sustain Excess Interval Increment Adapt I/F list Rate Limit bits/int bits/int (ms) (bytes) Active
show traffic-shape
Router(config )#
The figure shows the results of the show traffic-shape command issued on a
To display the current traffic-shaping configuration, use the show traffic-shape command To display the current traffic -shaping statistics, use the show traffic-
shape statistics command Output of both the commands is detailed in the
ensuing figures
Information displayed includes:
by the CIR)
Trang 27© 2001, Cisco Systems, Inc IP QoS Traffic Shaping and Policing-30
Monitoring GTS
Monitoring GTS
Router# show traffic -shape statistic Access Queue Packets Bytes Packets Bytes Shaping I/F List Depth Delayed Delayed Active Se3/3 77 16091 3733112 414 96048 yes
Router# show traffic-shape statistic
Access Queue Packets Bytes Packets Bytes Shaping I/F List Depth Delayed Delayed Active Se3/3 77 16091 3733112 414 96048 yes
Depth of the associated WFQ queue for delayed packets
Number of packets/bytes sent
on the interface
Subset of the previous number of packets/bytes delayed via the WFQ queue
show traffic-shape statistic
Router(config )#
The show traffic-shape statistics command displays the statistics of traffic
shaping for all the configured interfaces Displayed in the output is:
is used (traffic-shape rate command is used on interface serial3/3 in the
example)
command since the last clearing of interface counters (16091 packets in the example)
command since the last clearing of interface counters (3733112 bytes in the example)
command since the last clearing of interface counters (414 packets in the example)
command since the last clearing of interface counters (96048 bytes in the example)
The expected result of traffic shaping is a high ratio between transmitted packets and delayed packets
Trang 28If the number of delayed packets is very high (compared to the total number of packets) then there are probably non-responsive aggressive flows being shaped and the queue depth could show high buffer utilization
If the number of delayed packets is zero then it is very likely that the access list does not match any traffic
Trang 29© 2001, Cisco Systems, Inc IP QoS Traffic Shaping and Policing - 31
Monitoring GTS
Monitoring GTS
router#show traffic-shape queue Traffic queued in shaping queue on Serial0 (depth/weight) 1/4096
Conversation 254, linktype : ip, length: 232 source: 1.1.1.1, destination: 1.1.2.47, id: 0x0001, ttl: 208, TOS: 0 prot: 17, source port 11111, destination port 22222
router# show traffic -shape queue
Traffic queued in shaping queue on Serial0 (depth/weight) 1/4096
Conversation 254, linktype: ip, length: 232 source: 1.1.1.1, destination: 1.1.2.47, id: 0x0001, ttl: 208, TOS: 0 prot: 17, source port 11111, destination port 22222
• Displays the shaping queue contents
show traffic-shape queue
Router( config)#
The show traffic-shape queue command displays the contents of the shaping
queue associated with an interface
This command can be used to determine the types of flows that are congesting the shaping queue The command displays the parameters that are used for
The example shows that there is a non-responsive UDP flow (protocol 17) congesting the shaping queue
Trang 30© 2001, Cisco Systems, Inc IP QoS Traffic Shaping and Policing - 32
GTS on Frame Relay Interfaces
GTS on Frame Relay Interfaces
(sub)interface
implemented on Frame Relay interfaces:
– Adaptation to Frame Relay congestion notification
– BECT-to-FECN reflection
– FECN creation on congestion
GTS applies on a per-interface basis, can use access lists to select the traffic to shape, and works with a variety of Layer-2 technologies, including:
Trang 31© 2001, Cisco Systems, Inc IP QoS Traffic Shaping and Policing - 33
Frame Relay Refresher
Frame Relay Refresher
• Frame Relay Explicit Congestion Notification – FECN (Forward Explicit Congestion Notification)
– BECN (Backward Explicit Congestion Notification)
– CLLM (Consolidated Link Layer Management)
• Implicit Congestion Notification
– Network discards detected by end user at higher layers
– DE (Discard Eligibility) bit
Frame Relay performs congestion notification to its Layer-2 endpoints by including congestion signaling inside the Layer-2 frame headers
in-band congestion signaling
Relay network to notify a device (FR DTE, which may be a router) that it should initiate congestion avoidance procedures
Relay network to notify a device (DTE) that it should initiate proper congestion avoidance procedures
expands on the FECN/BECN mechanism to improve congestion management
preference to other frames, if congestion occurs, to maintain the committed quality of service within the network Frames with the DE bit set are
Congestion notification may be explicit (honored by Layer-2 devices) or implicit (detected and honored by higher-layer protocols, not by the Layer-2 network) FECN/BECN and CLLM are explicit methods, while BE-setting is an implicit notification method
Trang 32© 2001, Cisco Systems, Inc IP QoS Traffic Shaping and Policing - 34
Frame 1 Frame 1 Frame 1 FECN FECN
Frame 2 Frame 2 BECN
Frame 2 BECN
Congestion this Side
No Congestion this Side
Switch monitors all transmit queues for congestion
Switch monitors all transmit queues for congestion
S e n d e r
R e c e i v e r
Frame Relay Switch
Frame Relay Switch
Frame Relay FECN/BECN Congestion Control
Frame Relay FECN/BECN Congestion Control
Same Virtual Circuit (VC)
• FR Switch detects congestion on output queue and informs:
–The receiver by setting the FECN bit on forwarded frames
–The source by setting the BECN bit on frames going in the opposite direction
A Frame Relay switch can explicitly report congestion in two directions: Forward and Backward When a frame queue inside a switch is congested, the switch will generate congestion signals based on the FECN and BECN bits If congestion occurs in a queue towards the main receiver of traffic, FECN signals are sent to the receiving Layer-2 endpoint and BECN signals are sent to the sending Layer-2 endpoint FECN and BECN bits are not sent as separate frames, but are
piggybacked inside data frames
Trang 33© 2001, Cisco Systems, Inc IP QoS Traffic Shaping and Policing - 35
GTS Frame Relay Congestion
– The GTS bit rate is reduced when BECN packets are received to reduce the data flow through congested Frame Relay network
– Adaptation is done on per (sub)interface basis
– GTS bit rate is gradually increased when the congestion is no longer present (no BECN packets are received any more)
BECN is the flag that the sending DTE (router as a Frame Relay endpoint) is able
to integrate to determine the congestion status of the Layer-2 WAN
Trang 34© 2001, Cisco Systems, Inc IP QoS Traffic Shaping and Policing - 36
GTS Frame Relay Congestion Adaptability Mechanisms
GTS Frame Relay Congestion Adaptability Mechanisms
• FECN to BECN propagation
– A test packet with BECN bit set is sent to the sender if a packet with FECN bit set is received
The first adaptation mechanism is bit-rate adaptation GTS is able to respond to Layer-2 congestion by reducing its shaping rate to three-quarters of the current rate, until the Layer-2 network recovers from congestion When BECN flags are
no longer received, the rate is slowly ramped up again to the original shaping rate This is also a lower limit of rate reduction, which bounds the reduction process so that at least some throughput is maintained The BECN-integrating functionality is performed on a per sub-interface (DLCI) basis
However, if the congestion was caused by simplex traffic (such as a multicast video stream) or by an aggressive TCP connection, it is expected that the reverse traffic (frames flowing from the receiver to the sender, marked with the BECN bit) might come by less frequently than required to feed the integration So the receiving DTE (the receiving router) can help matters when it receives a message with FECN set by first checking to see if it has any data, and if it does not,
originating a message with BECN set This message might be a Q.922 TEST RESPONSE message, which would by virtue of its message type be understood to
be a message to discard and not reply to This feature is called FECN-to-BECN propagation
Trang 35© 2001, Cisco Systems, Inc IP QoS Traffic Shaping and Policing - 37
An Example of BECN Integration
An Example of BECN Integration
BECN Integration
0 1000 2000 3000 4000 5000 6000 7000 8000 9000
1 2 3 4 5 6 7 8 9 10 1 1 12 1 3 14 15 1 6 17 1 8 19 20 21 22 2 3 24 25
time represented in units of Tc
Inc
becn becn
traffic-shape rate 64000 8000 8000 traffic-shape adaptive 32000 BECN received at Tc#1 and Tc#3 Hypothesis: no idle traffic
The figure shows the shaped rate of a token bucket-based GTS responding to BECN packets it received As mentioned, the rate is reduced to three-quarters of
shaped rate is brought up slowly, up one-sixteenth of the current rate
Trang 36© 2001, Cisco Systems, Inc IP QoS Traffic Shaping and Policing - 38
Congestion
FECN to BECN Propagation
FECN to BECN Propagation
S e n d e r
R e c e i v e r
If there is no reverse traffic, the switch is not able to set BECN in frames going back
to sender
BECN in Q.922Test
BECN in Q.922Test
FECN
Frame Relay Switch
Frame Relay Switch
The other adaptation method, FECN-to-BECN propagation, configures a Frame Relay sub-interface to reflect received FECN bits as BECN in Q.922 TEST RESPONSE messages This enables the sender to notice congestion in the Layer-
2 network, even if there is no data traffic flowing from the receiver back to the sender
Trang 37© 2001, Cisco Systems, Inc IP QoS Traffic Shaping and Policing - 39
Configuring Bit-rate Adaptation
• Configures Traffic Shaping Frame Relay bit-rate adaptation
response to continuous BECN signals Default: 1/2 the specified traffic shaping rate
• Traffic shaping has to be enabled
traffic-shape adaptive [bit-rate]
Router(config-if)#
Frame Relay bit rate adaptation is configured using the traffic-shape adaptive
command, which specifies the lower limit to which the shaped rate should be reduced in presence of incoming BECN signals By default, this is half the configured sustained (committed) rate in GTS The bit rate is configured in bits per second
Trang 38© 2001, Cisco Systems, Inc IP QoS Traffic Shaping and Policing - 40
• Configures the router to send Frame Relay TEST message with BECN bit set in response to receiving
a frame with FECN bit set
• Can be used without adaptive traffic shaping
Configuring FECN to BECN
Router( config-if)#
The traffic-shape fecn-adapt command enables the FECN-to-BECN
propagation It can be used without adaptive GTS, as configured with the previous command
This feature should be used for testing purposes only If the feature is combined with the adaptation feature it is very likely that the first delayed packet will cause the shaping to slow down to the minimum shaping rate For example:
1 Router A (sender) sends a frame with a FECN bit because it had to delay
a packet
2 Router B (receiver) replies with the TEST frame with the BECN bit set
3 Router A (sender) reduces the shaping rate due to the received BECN causing even more delay and more packets with the FECN bit set
Trang 39© 2001, Cisco Systems, Inc IP QoS Traffic Shaping and Policing - 41
GTS Frame Relay Adaptation Design
GTS Frame Relay Adaptation Design
Conservative scenario
• Set shaping rate to CIR
• Set minimum rate to MIR (or 1/2 CIR)
Optimistic scenario
• Set shaping rate to EIR
• Set minimum rate to CIR
Realistic scenario
• Set shaping rate to EIR
• Set minimum rate to MIR (or 1/2 CIR)
To illustrate different possibilities of adaptation, consider the following three scenarios for using GTS over a Frame Relay circuit
dropping, the shaping rate is set to the contracted Frame Relay CIR (Committed Information Rate) and the minimum rate of adaptation is set either
to MIR (Minimum Information Rate) or half the CIR value MIR depends on the provider’s over provisioning of the network and can be as low as one-tenth
of the CIR This configuration minimizes dropping, but does not allow excess bandwidth to be fully utilized
(Excess Information Rate) and the minimum rate to the CIR This configuration would probably cause too much dropping in a loaded Frame Relay network
setting the shaping rate to the EIR and the minimum adaptation rate to the MIR (or half the CIR) This would allow full advantage to be made of the Frame Relay network, if possible, and to adapt to a realistic level if congestion
is indicated
Trang 40© 2001, Cisco Systems, Inc IP QoS Traffic Shaping and Policing - 42
Core Customer
interface serial 0/0 traffic -shape rate 64000 8000 8000 traffic -shape adaptive 48000