Table Of Contents
Configuring Distributed Traffic Shaping
Distributed Traffic Shaping Configuration Task List
Creating a Traffic Class
Configuring a Traffic Policy that Uses DTS
Attaching the Traffic Policy and Enabling DTS
Modifying DTS for an Existing Traffic Class
Monitoring and Maintaining DTS
Distributed Traffic Shaping Configuration Examples
DTS on Main Interface Example
Class-Based DTS on Main Interface Example
DTS on Frame Relay Point-to-Point Subinterface Example
Class-Based DTS on Frame Relay Point-to-Point Subinterface Example
Configuring Distributed Traffic Shaping
This chapter describes the tasks for configuring Distributed Traffic Shaping (DTS) feature.
For complete conceptual information, see the section "Distributed Traffic Shaping" in the chapter "Policing and Shaping Overview" in this book.
For a complete description of the DTS commands mentioned in this chapter, refer to the Cisco IOS Quality of Service Solutions Command Reference. To locate documentation of other commands that appear in this chapter, use the command reference master index or search online.
To identify the hardware platform or software image information associated with a feature, use the Feature Navigator on Cisco.com to search for information about the feature or refer to the software release notes for a specific release. For more information, see the "Identifying Supported Platforms" section in the "Using Cisco IOS Software" chapter in this book.
Distributed Traffic Shaping Configuration Task List
To configure DTS, perform the tasks described in the following sections. The tasks in the first four sections are required; the task in the last section is optional.
•
Creating a Traffic Class (Required)
•
Configuring a Traffic Policy that Uses DTS (Required)
•
Attaching the Traffic Policy and Enabling DTS (Required)
•
Modifying DTS for an Existing Traffic Class (Required)
•
Monitoring and Maintaining DTS (Optional)
See the end of this chapter for the section "Distributed Traffic Shaping Configuration Examples."
Creating a Traffic Class
DTS is enabled using the Modular Quality of Service Command-Line Interface (Modular QoS CLI) feature. The first step in enabling any feature using the Modular QoS CLI is creating a traffic class.
For information on the Modular QoS CLI along with the procedure for creating a traffic class, see the chapter "Modular Quality of Service Command-Line Interface Overview" in this book.
Configuring a Traffic Policy that Uses DTS
To enable DTS you must configure a traffic policy. You can configure traffic policies for as many classes as are defined on the router up to the maximum of 256.
To configure a traffic policy, use the policy-map command beginning in global configuration mode to specify the traffic policy name, then use the following configuration commands in policy-map configuration mode to configure the traffic class name and traffic shaping.
Traffic is directed to the traffic policy default class if it does not satisfy the match criteria of any other classes whose policies are defined in the traffic policy.
|
Command
|
Purpose
|
Step 1
|
Router(config)# policy-map policy-name
|
Specifies the name of the traffic policy to be created.
|
Step 2
|
Router(config-pmap)# class class-name
|
Specifies the name of a predefined traffic class included in the traffic policy. The class was defined in the previous step of this process.
|
Step 3
|
Router(config-pmap-c)# shape <average | peak>
<mean rate>[<burst size> [<excess burst size>]]
|
Specifies the target bits per second (bps) rate.
|
Attaching the Traffic Policy and Enabling DTS
To attach a traffic policy to the interface and enable DTS on the interface, use the following command in interface configuration mode:
Command
|
Purpose
|
Router(config-if)# service-policy output policy-name
|
Enables DTS and attaches the specified traffic policy to the interface.
|
Modifying DTS for an Existing Traffic Class
To change the amount of bandwidth allocated for an existing traffic class, use the following commands beginning in global configuration mode:
|
Command
|
Purpose
|
Step 1
|
Router(config)# policy-map policy-name
|
Specifies the name of the traffic policy containing the class to be modified.
|
Step 2
|
Router(config-pmap)# class class-name
|
Specifies the name of a traffic class you want to modify.
|
Step 3
|
Router(config-pmap-c)# shape [average | peak]
mean-rate [[burst-size] [excess-burst-size]]
|
Specifies the new values for the DTS feature.
|
Monitoring and Maintaining DTS
To monitor and maintain the DTS feature, use the following commands in EXEC mode, as needed:
Command
|
Purpose
|
Router# show interface [interface-name] shape
|
Displays detail status of the traffic shaping.
|
Router# show policy policy-name
|
Displays the configuration of all classes composing the specified traffic policy.
|
Router# show policy policy-name class class-name
|
Displays the configuration of the specified class of the specified traffic policy.
|
Distributed Traffic Shaping Configuration Examples
This section provides the following DTS configuration examples:
•
DTS on Main Interface Example
•
Class-Based DTS on Main Interface Example
•
DTS on Frame Relay Point-to-Point Subinterface Example
•
Class-Based DTS on Frame Relay Point-to-Point Subinterface Example
For information on how to configure DTS, see the section "Distributed Traffic Shaping Configuration Task List" in this chapter.
DTS on Main Interface Example
In the following example, traffic leaving interface pos1/0/0 is shaped at the rate of 10 Mbps:
Router(config)# class-map class-interface-all
Router(config-cmap)# match any
Router(config-cmap)# exit
Router(config)# policy-map dts-interface-all-action
Router(config-pmap)# class class-interface-all
Router(config-pmap-c)# shape average 10000000
Router(config-pmap-c)# exit
Router(config)# interface pos1/0/0
Router(config-if)# service-policy output dts-interface-all-action
Class-Based DTS on Main Interface Example
In the following example, two classes are created and the match criteria is defined based on the access list number. Traffic leaving interface fd4/0/0 and matches access list 10 is shaped to 16 Mbps. Traffic leaving interface fdi 4/0/0 and matches access list 20 is shaped to 8 Mbps.
Router(config)# access-list 10 permit 172.16.0.0
Router(config)# access-list 20 permit 192.168.0.0
Router(config)# class-map class1
Router(config-cmap)# match access-group 10
Router(config-cmap)# exit
Router(config)# class-map class2
Router(config-cmap)# match access-group 20
Router(config-cmap)# exit
Router(config)# policy-map dts-interface-class-action
Router(config-pmap)# class class1
Router(config-pmap-c)# shape average 16000000
Router(config-pmap-c)# exit
Router(config-pmap)# class class2
Router(config-pmap-c)# shape average 8000000
Router(config-pmap-c)# exit
Router(config-pmap)# interface fd4/0/0
Router(config-if)# service-policy output dts-interface-class-action
DTS on Frame Relay Point-to-Point Subinterface Example
In the following example, traffic leaving sub interface 6/1/0.1 or 6/1/0.2 is shaped to 1 Mbps:
Router(config)# class-map class-p2p-all
Router(config-cmap)# match any
Router(config-cmap)# exit
Router(config)# policy-map dts-p2p-all-action
Router(config-pmap)# class class-p2p-all
Router(config-pmap-c)# shape average 1000000
Router(config-pmap-c)# exit
Router(config)# interface hssi6/1/0.1 point-to-point
Router(config-subif)# service-policy output dts-p2p-all-action
Router(config-subif)# exit
Router(config)# interface hssi6/1/0.2 point-to-point
Router(config-subif)# service-policy output dts-p2p-all-action
Class-Based DTS on Frame Relay Point-to-Point Subinterface Example
In the following example, two classes are created with the match criteria defined by QoS number. Traffic leaving subinterface 6/1/0.5 or 6/1/0.6 with the QoS group number 30 shaped to 800 kbps and traffic leaving the same subinterfaces with the QoS group number 40 shaped is to 1.6 Mbps. For the incoming Frame Relay packet that has the forward explicit congestion notification (FECN) bit on, a backward explicit congestion notification (BECN) message is sent out from the interface. For the outgoing Frame Relay packets that match the QoS group number 40, the shape rate could be further reduced to 800 kbps.
Router(config)# class-map class3
Router(config-cmap)# match qos-group 30
Router(config-cmap)# exit
Router(config)# class-map class4
Router(config-cmap)# match qos-group 40
Router(config-cmap)# exit
Router(config)# policy-map dts-p2p-class-action
Router(config-pmap)# class class3
Router(config-pmap-c)# shape average 800000
Router(config-pmap-c)# shape fecn-adapt
Router(config-pmap-c)# exit
Router(config-pmap)# class class4
Router(config-pmap-c)# shape average 1600000
Router(config-pmap-c)# shape adaptive 800000
Router(config-pmap-c)# exit
Router(config)# interface serial 6/1/0.5 point-to-point
Router(config-subif)# service-policy output dts-p2p-class-action
Router(config-subif)# exit
Router(config)# interface serial 6/1/0.6 point-to-point
Router(config-subif)# service-policy output dts-p2p-class-action