Configuring Traffic Shaping

To configure Frame Relay traffic shaping, you must first enter the map class configuration mode
so you can define a map class. You enter the map class with the global configuration command
map-class frame-relay name. The name parameter is the name you use to apply the map class
to the VC where you want traffic shaping performed. The command looks like the following:

RouterA#config t
RouterA(config)#map-class frame-relay scott
RouterA(config-map-class)#

Notice that the map-class frame-relay scott command changes the prompt to
config-map-class. This enables you to configure the parameters for your map class.
The map class is used to define the average and peak rates allowed in each VC associated
with the map class. The map class mechanism enables you to specify that the router can dynamically
fluctuate the rate at which it sends traffic, depending on the BECNs received. It also
enables you to configure queuing on a per-VC basis.
To define the average and peak rate for links that are faster than the receiving link can handle,
use the following command:
RouterA(config-map-class)#frame-relay traffic-rate average [peak]
The average parameter sets the average rate in bits per second, which is your CIR. Now, how
do you calculate the peak value? First, start with the EIR. The EIR is the average rate over which
bits will be marked with DE and is given by the formula EIR = Be/Tc, with Be being excessive
burst and Tc representing the committed rate measurement interval. The peak value is then calculated
by taking the CIR plus EIR, or peak = CIR + EIR.

The peak parameter is optional. An example of a line is as follows:
RouterA(config-map-class)#frame-relay traffic-rate 9600 18000
To specify that the router should dynamically fluctuate the rate at which it is sending traffic
depending on the number of BECNs received, use the following command:
RouterA(config-map-class)#frame-relay adaptive-shaping becn
To set bandwidth usage for protocols, you can configure traffic shaping to use queuing on
a per-VC basis. To perform this function, use the following commands:
RouterA(config-map-class)#frame-relay custom-queue-list number
RouterA(config-map-class)#frame-relay priority-group number
You can use either command, depending on the type of queuing you are using. The number
parameter at the end of the command is the queue list number. A detailed discussion of queuing
is presented in the next chapter.
After the map class parameters are completed, you then need to configure the traffic shaping
on the interface you want. The following commands are used to perform traffic shaping on an
interface and to apply the map class and its parameters to a subinterface and, by association, its
corresponding VC:

RouterA#config t
RouterA(config)#interface serial0
RouterA(config-if)#frame-relay traffic-shaping
RouterA(config-if)#interface serial0.16 point-to-point
RouterA(config-subif#frame-relay class scott
RouterA(config-subif)#frame-relay interface-dlci 16

You first must enable traffic shaping and per-VC queuing on the interface with the
frame-relay traffic-shaping command. You can then go to the interface or subinterface
and assign the map class by using the frame-relay class name command. The example
just shown uses the name scott because that is the name of the map class defined in the
earlier example.
After you have completed the configuration, use the show running-config and the show
frame-relay pvc commands to verify the configuration.