Configuration Example: Enforcing a Sub-Rate
A sub-rate is a virtual pipe that is a smaller amount than the physical capacity of a larger pipe. In this example, you need to enforce a sub-rate (that is, a 10-Mbps virtual pipe on a 1-Gbps link) on a particular link, while offering minimum bandwidth guarantees to applications such as voice, mission-critical applications, and video within that virtual pipe as follows:
The following configuration will show the policy maps that can be created to enforce this. A policy map defines a traffic policy, which configures the QoS features associated with a traffic class that was previously identified using a class map. Class maps classifying the traffic are assumed to have already been created based on parameters not given here—protocol type, port number, ACL, and so on. Multiple policy maps can be nested to influence the sequence of QoS actions. In this example, the policy map named "CHILD" will be nested within a second policy map called "PARENT" in order to ensure that the policies of "CHILD" are enforced first.
Router(config)# policy-map CHILD | Creates a policy map named "CHILD." |
Router(config-pmap)# class VOICE | Associates the class map named "VOICE" to this policy map. |
Router(config-pmap-c)# priority 1000 | Traffic classified as "VOICE" is assigned to a priority queue that has a bandwidth guarantee of 1000 Kbps (1 Mbps). |
Router(config-pmap-c)# exit | Returns to config-pmap mode. |
Router(config-pmap)# class MISSION_CRITICAL | Associates the class map named "MISSION_CRITICAL" to this policy map. |
Router(config-pmap-c)# bandwidth 2000 | Traffic classified as "MISSION_CRITICAL" is assigned to a WFQ with a bandwidth guarantee of 2000 Kbps (2 Mbps). |
Router(config-pmap-c)# exit | Returns to config-pmap mode. |
Router(config-pmap)# class VIDEO | Associates the class map named "VIDEO" to this policy map. |
Router(config-pmap-c)# bandwidth 5000 | Traffic classified as "VIDEO" is assigned to a WFQ with a bandwidth guarantee of 5000 Kbps (5 Mbps). |
Router(config-pmap-c)# exit | Returns to config-pmap mode. |
Router(config-pmap)# exit | Returns to global configuration mode. |
Router(config)# policy-map PARENT | Creates a policy map named "PARENT." |
Router(config-pmap)# class class-default | Associates the class map named "class-default" to this policy map. |
Router(config-pmap-c)# shape average 10000000 | Specifies the average rate of shaping to be 10,000,000 bps (10 Mbps). |
Router(config-pmap-c)# service-policy CHILD | Assigns the policy map named "CHILD" to this policy map; the parameters of CHILD will be followed first, and the parameters of PARENT will be followed second. |
Router(config-pmap-c)# exit | Returns to config-pmap mode. |
Router(config-pmap)# exit | Returns to global configuration mode. |