Cisco IOS Release 12.0 Quality of Service Solutions Configuration Guide
Configuring Generic Traffic Shaping

Table Of Contents

Configuring Generic Traffic Shaping

Generic Traffic Shaping Configuration Task List

Configure Generic Traffic Shaping

Configure Generic Traffic Shaping for an Access List

Configure Adaptive Generic Traffic Shaping for Frame Relay Networks

Monitor the GTS Configuration

GTS Configuration Examples

Enable GTS on the Interface Example

Constrained Access Rate Example

Differing Controlled Rates through an IP Internet Example

Frame Relay Adaptability to Congestion Example

Accommodating Differing Access Speeds Example


Configuring Generic Traffic Shaping


This chapter describes the tasks for configuring QoS Generic Traffic Shaping (GTS) on a router. For a complete description of the commands mentioned in this chapter, refer to the Quality of Service Solutions Command Reference; the commands are listed alphabetically within that guide. To locate documentation of specific commands, use the command reference, master index, or search online.


Note   GTS is not supported on Integrated Services Digital Networks (ISDNs), dialup interfaces, or generic routing encapsulation (GRE) tunnel interfaces on the Cisco 7500 series router. Traffic shaping is not supported with flow switching.


Generic Traffic Shaping Configuration Task List

To configure GTS, perform the tasks in the following sections:

Configure Generic Traffic Shaping

Configure Generic Traffic Shaping for an Access List

Configure Adaptive Generic Traffic Shaping for Frame Relay Networks

Monitor the GTS Configuration

The section "GTS Configuration Examples" later in this chapter contains examples of these configuration tasks.

Configure Generic Traffic Shaping

To configure GTS for outbound traffic on an interface or subinterface, use the following command in interface configuration mode:

Command
Purpose

traffic-shape rate bit-rate [burst-size
[excess-burst-size]]

Configure traffic shaping for outbound traffic on an interface.


Configure Generic Traffic Shaping for an Access List

To configure GTS for outbound traffic on an access list, use the following commands beginning in global configuration mode:

Step
Command
Purpose

1

access-list access-list-number

Assign traffic to an access list

2

interface interface-type interface-number

Enter interface configuration mode.

3

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

Configure traffic shaping for outbound traffic on an interface for the specified access list.


Repeat Steps 1 through 3 for each type of traffic you want to rate-limit.

Configure Adaptive Generic Traffic Shaping for Frame Relay Networks

If traffic shaping is performed on a Frame Relay network using the traffic-shape rate command, you can also use the traffic-shape adaptive command to specify the minimum bit rate to which the traffic is shaped.

To configure adaptive GTS for outbound traffic on an interface or subinterface, use the following commands in interface configuration mode:

Step
Command
Purpose

1

traffic-shape rate bit-rate [burst-size
[excess-burst-size]]

Enable traffic shaping for outbound traffic on an interface.

2

traffic-shape adaptive [bit-rate]

Configure minimum bit rate to which traffic is shaped when backward explicit congestion notifications (BECNs) are received on an interface.

3

traffic-shape fecn-adapt

Configure reflection of forward explicit congestion notifications (FECNs) as BECNs.


With adaptive GTS, the router uses backward explicit congestion notifications (BECNs) to estimate the available bandwidth and adjust the transmission rate accordingly. The actual maximum transmission rate will be between the rate specified in the traffic-shape adaptive command and the rate specified in the traffic-shape rate command.

Configure these commands on both ends of the link, enabling the router at the high-speed end to detect and adapt to congestion even when traffic is flowing primarily in one direction.

Monitor the GTS Configuration

To monitor the current traffic shaping configuration and statistics, use any of the following commands in EXEC mode:

Command
Purpose

show traffic-shape [interface-name]

Show the current traffic-shaping configuration.

show traffic-shape statistics [interface-name]

Show the current traffic-shaping statistics.


GTS Configuration Examples

This section provides the following examples of GTS configurations:

Enable GTS on the Interface Example

Constrained Access Rate Example

Differing Controlled Rates through an IP Internet Example

Frame Relay Adaptability to Congestion Example

Accommodating Differing Access Speeds Example

Enable GTS on the Interface Example

This example shows the configuration of two traffic-shaped interfaces on a router. Ethernet 0 is configured to limit User Datagram Protocol (UDP) traffic to 1 Mbps. Ethernet 1 is configured to limit all output to 5 Mbps.

access-list 101 permit udp any any
interface Ethernet0
 traffic-shape group 101 1000000 125000 125000
!
interface Ethernet1
 traffic-shape rate 5000000 625000 625000

The following is a sample display for the show traffic-shape command for the example shown:

Router# show traffic-shape

Interface   Ethernet0

       Access Target    Byte   Sustain   Excess    Interval  Increment    Adapt
VC     List   Rate      Limit  bits/int  bits/int  (ms)      (bytes)      Active
-      101    1000000   31250  125000    125000    125       15625        -

Interface   Ethernet1

       Access Target    Byte   Sustain   Excess    Interval  Increment    Adapt
VC     List   Rate      Limit  bits/int  bits/int  (ms)      (bytes)      Active
-             5000000   156250 625000    625000    125       78125        -

The following is a sample display for the show traffic-shape statistics command for the example shown:

Router# show traffic-shape statistics

          Access Queue     Packets   Bytes     Packets   Bytes     Shaping
I/F       List   Depth                         Delayed   Delayed   Active
Et0       101    0         2         180       0         0         no
Et1              0         0         0         0         0         no

Constrained Access Rate Example

In this example, a customer may use all of a T1 line for 30 seconds in a burst, but the long-term average is limited to 64 kbps. This configuration restricts the amount of load the system can induce on the outbound network interface.

interface <his interface or sub-interface> 
 traffic-shape rate 64000 8000 46080000 

If you need to restrict the amount of load the system can induce both outbound and inbound, and therefore the total load the system can induce on the Internet Service Provider (ISP), configure traffic shaping on both the inbound and outbound interfaces, as in the following example:

interface <serial interface or sub-interface> 
 traffic-shape rate 64000 8000 46320000 
interface <LAN interface> 
 traffic-shape rate 64000 8000 46320000 

Differing Controlled Rates through an IP Internet Example

Perhaps you need to restrict the flow of NNTP to each of some set of sites across an intervening backbone to 64 kbps. This example illustrates how to configure that control and provide one site with 256 kbps:

access-list 101 permit <nntp to hither> 
access-list 102 permit <nntp to thither> 
access-list 103 permit <nntp to yon> 
!
interface <the (sub-)interface leading to the above places> 
 traffic-shape group 101 64000 
 traffic-shape group 102 64000 
 traffic-shape group 103 256000 

Separate token buckets are maintained for each access list, and traffic not matching any access list is not shaped at all.

Frame Relay Adaptability to Congestion Example

This example does not restrict flow across a Frame Relay subinterface that has been layered onto a single DLC. However, in the presence of BECN bits from the network, the flow is throttled back to the committed information rate (CIR). The access rate of the interface is assumed to be 1544 kbps, and the CIR is 64 kbps.

interface <relevant sub-interface> 
 traffic-shape rate 1544000 
 traffic-shape adaptive 64000 
 traffic-shape fecn-adapt

If the traffic-shape fecn-adapt command is configured at both ends of the link, the far end will reflect received FECNs as BECNs in Q.922 TEST RESPONSE messages.

Accommodating Differing Access Speeds Example

Frame Relay networks are often asymmetrical, that is, the access rate at one site may differ from the access rate at another. In such cases, it may be worthwhile to configure the faster rate to shape to the access rate of the slower, as well as to respond to BECNs. Using the previous example as a starting point, in which the access rate is 1544 kbps and the CIR is 64 kbps, and the access rate at the far end is 128 kbps, the configuration of the subinterfaces would be as follows:

     interface <relevant sub-interface> 
     traffic-shape rate 128000 
     traffic-shape adaptive 64000