navbarPDF
Strip_TechNotes

Frame Relay Traffic Shaping


Contents

Introduction
Before You Begin
     Conventions
     Prerequisites
     Components Used
Traffic Shaping
     Traffic Shaping Parameters
     Generic Traffic Shaping
     Frame Relay Traffic Shaping
Related Information

Introduction

This document provides an overview of generic traffic shaping and Frame Relay traffic shaping.

Before You Begin

Conventions

For more information on document conventions, see the Cisco Technical Tips Conventions.

Prerequisites

There are no specific prerequisites for this document.

Components Used

This document is not restricted to specific software and hardware versions.

Traffic Shaping

Traffic shaping uses a rate control mechanism called a token bucket filter. This token bucket filter is set as follows:

excess burst plus committed burst (Bc + Be) = maximum speed for the virtual circuit (VC)

Traffic above the maximum speed is buffered in a traffic shaping queue which is equal to the size of the weighted fair queue (WFQ). The Token Bucket filter does not filter traffic, but controls the rate at which traffic is sent on the outbound interface. For more information on token bucket filters, please see the Policing and Shaping Overview.

Traffic Shaping Parameters

We can use the following traffic shaping parameters:

Let's look at some of these parameters in more detail:

Access Rate (AR)

The maximum number of bits per second that an end station can transmit into the network is bounded by the access rate of the user-network interface. The line speed of the user network connection limits the access rate. You can establish this in your subscription to the service provider.

Committed Burst Size (Bc)

The maximum committed amount of data you can offer to the network is defined as Bc. Bc is a measure for the volume of data for which the network guarantees message delivery under normal conditions. It is measured during the committed rate Tc.

Excess Burst Size (Be)

The number of non-committed bits (outside of CIR) that are still accepted by the Frame Relay switch but are marked as eligible to be discarded (DE).

The token bucket is a 'virtual' buffer. It contains a number of tokens, enabling you to send a limited amount of data per time interval. The token bucket is filled with Bc bits per Tc. The maximum size of the bucket is Bc + Be. If the Be is very big and, if at T0 the bucket is filled with Bc + Be tokens, you can send Bc + Be bits at the access rate. This is not limited by Tc but by the time it takes to send the Be. This is a function of the access rate.

Committed Information Rate (CIR)

The CIR is the allowed amount of data which the network is committed to transfer under normal conditions. The rate is averaged over a increment of time Tc. The CIR is also referred to as the minimum acceptable throughput. Bc and Be are expressed in bits, Tc in seconds, and the access rate and CIR in bits per second.

Bc, Be, Tc and CIR are defined per data-link connection identifier (DLCI). Due to this, the token bucket filter controls the rate per DLCI. The access rate is valid per user-network interface. For Bc, Be and CIR incoming and outgoing values can be distinguished. If the connection is symmetrical, the values in both directions are the same. For permanent virtual circuits, we define incoming and outgoing Bc, Be and CIR at subscription time.

If the Tc is one second then:

21_new1.gif

In the example we are using here, the router sends traffic between 48 Kbps and 32 Kbps depending on congestion in the network. Networks may mark frames above Bc with DE but have plenty of spare capacity to transport the frame. The reverse is also possible: they can have limited capacity, yet discard excessive frames immediately. Networks may mark frames above Bc + Be with DE, and possibly transport it, or just drop the frames as suggested by the International Telecommunication Union Telecommunication Standardization Sector specification ITU-T I.370. Traffic shaping throttles the traffic based on backward-explicit congestion notification (BECN) tagged packets from the switch network. If you receive 50 percent BECN, the router decreases the traffic by one eighth of the current transmitted bandwidth for that particular DLCI.

Example

The transmitted speed is 42 Kb. The router decreases the speed to 42 minus 42 divided by 8 (42 - 42/8), making 36.75 Kb. If the congestion decreases after the change, the router reduces the traffic further, dropping to one eighth of current transmitted bandwidth. The traffic is reduced until it reaches the configured CIR value. However, the speed can drop under the CIR when we can still see BECNs. You can specify a bottom limit, such as CIR/2. The network is no longer congested when all frames received from the network no longer have a BECN bit for a given time interval. 200 ms is the default value for this interval.

Generic Traffic Shaping

The Generic traffic shaping feature is a media and encapsulation-independent traffic shaping tool that helps reduce the flow of outbound traffic when there is congestion within the cloud, on the link, or at the receiving endpoint router. We can set it on interfaces or subinterfaces within a router.

Generic traffic shaping is useful in the following situations:

On your Frame Relay connection, you may want the router to throttle traffic instead of sending it into the network. Throttling the traffic would limit packet loss in the service provider's cloud. The BECN-based throttling capability provided with this feature allows you to have the router dynamically throttle traffic based on receiving BECN tagged packets from the network. This throttling holds packets in the router's buffers to reduce the data flow from the router into the Frame Relay network. The router throttles traffic on a subinterface basis, and the rate is also increased when fewer BECN-tagged packets are received.

Commands for Generic Traffic Shaping

To define rate control, use this command:

traffic-shape rate bit-rate [burst-size [excess-burst-size]] [group access-list]

To throttle BECNs on a Frame Relay interface use this command:

traffic-shape adaptive [bit-rate]

To configure a Frame Relay subinterface to estimate the available bandwidth when it receives BECNs, use the traffic-shape adaptive command.

Note: You must enable traffic shaping on the interface with the traffic-shape rate command before you can use the traffic-shape adaptive command.

The bit rate specified for the traffic-shape rate command is the upper limit, and the bit rate specified for the traffic-shape adaptive command is the lower limit (usually the CIR value) at which traffic is shaped when the interface receives BECNs. The rate actually used is normally between these two rates. You should configure the traffic-shape adaptive command at both ends of the link, as it also configures the device at the flow end to reflect forward explicit congestion notification (FECN) signals as BECNs. This enables the router at the high-speed end to detect and adapt to congestion even when traffic is flowing primarily in one direction.

Example

The following example configures traffic shaping on interface 0.1 with an upper limit (usually Bc + Be) of 128 kbps and a lower limit of 64 kbps. This allows the link to run from 64 to 128 kbps, depending on the congestion level. If the central side has a upper limit of 256 kbps, you should use the lowest upper limit value.

21_new3.gif

Here's what we have configured on these routers:

Central# 
 interface serial 0 
  encapsulation-frame-relay 
 interface serial 0.1    
  traffic-shape rate 128000 
  traffic-shape adaptive 64000 


Client# 
 interface serial 0 
  encapsulation-frame-relay 
 interface serial 0.1 
  traffic-shape rate 128000 
  traffic-shape adaptive 64000 

Frame Relay Traffic Shaping

With generic traffic shaping you can only specify one peak rate (upper limit) per physical interface and one CIR (lower limit) value per subinterface. With Frame Relay traffic shaping, you start a token bucket filter per Virtual Circuit.

The traffic shaping over Frame Relay feature provides the following capabilities:

Example

Interface Serial 0 
 no ip address 
 encapsulation frame-relay 
 frame-relay traffic-shaping    
! 
interface Serial0.100 
 ip address 1.1.1.1 255.255.255.252 
 frame-relay interface-dlci 100 
 frame-relay class fast 
! 
interface Serial0.200 
 ip address 1.1.1.5 255.255.255.252    
 frame-relay interface-dlci 200 
 frame-relay class slow 
! 
map-class frame-relay slow 
 frame-relay traffic-rate 64000 128000 
! 
map-class 
 frame-relay fast 
 frame-relay traffic-rate 16000 64000 
!

In this example the router adds two token-buckets.

If incoming traffic from Ethernet is larger than the token bucket filter, the traffic is buffered up in the frame-relay traffic queue.

To view a flow chart showing packet flow when you implement Frame Relay traffic shaping, please see Frame Relay Traffic Shaping Flowchart. To view a flow chart specifically using a token bucket filter, please see Frame Relay Traffic Shaping - Token Bucket Flowchart.


Related Information


Toolbar

All contents are Copyright © 1992-2003 Cisco Systems, Inc. All rights reserved. Important Notices and Privacy Statement.


Updated: Jun 11, 2003Document ID: 16572