EoMPLS 上的HQOS on OSM
HQoS for EoMPLS Virtual Circuits
The Hierarchical Quality of Service (HQoS) for Ethernet over MPLS (EoMPLS) Virtual Circuits (VCs) feature enables hierarchical QoS services on WAN-based interfaces, allowing service providers to classify the traffic in customer EoMPLS networks before it is forwarded into the core network. This gives users of Cisco 7600 series routers greater flexibility in providing QoS services to specific customers in their EoMPLS networks.
The HQoS for EoMPLS VCs feature allows you to classify EoMPLS networks in the following ways:
•
Match on the VLAN ID that the packet contained when it was originally received at the input interface. You can match a single VLAN ID, a range of VLAN IDs, or a combination of the two, allowing you to match all or part of an EoMPLS network.
•
Match on a QoS group value that is set to the same value of the IP precedence or CoS bits that are received with the packet at the input interface.
The use of hierarchical policy maps can simplify the configuration of the router, because the same child policy map can be used in multiple parent maps. You can also match multiple VLANs with one class map, as opposed to having separate class maps for each VLAN.
The HQoS for EoMPLS VCs feature does not require any upgrades to the customer-facing interfaces, because the HQoS policy map is applied to the WAN interface, allowing the customer-facing interfaces to be standard Ethernet interfaces.
Prerequisites for the HQoS for EoMPLS VCs Feature
•
You must enable QoS on the router before using HQoS. To enable QoS globally on the router, use the mls qos command in global configuration mode. To enable QoS on an individual interface, use the mls qos interface configuration command. In addition, the mls trust command must be configured on the CE facing PE interfaces.
Restrictions for the HQoS for EoMPLS VCs Feature
The following section lists restrictions for the HQoS for EoMPLS VCs feature. Other restrictions may also apply to QoS services in general, depending on the supervisor module and line cards being used.

Note
The HQoS for EoMPLS VCs feature is supported only on PXF- based QoS configured on switched virtual interfaces (SVIs).
•
If a policy contains a class map with a match input vlan command, you cannot attach that policy map to an interface if you have already attached a service policy to a VLAN interface (a logical interface that has been created with the interface vlan command).

Note
This restriction means that match input vlan configurations and interface vlan configurations are mutually exclusive.
•
The HQoS for EoMPLS VCs feature is supported only for output (egress) interfaces (policy maps must be attached to the interface using the service-policy output command).
•
The HQoS for EoMPLS VCs feature supports only point-to-point VCs, not point-to-multipoint VCs.
•
If the parent class contains a class map with a match input vlan command, you cannot use a match exp command in a child policy map.
•
You cannot attach a child policy map to the parent class default.
•
Child and parent policy maps do not support any marking, such as the match ip dscp and set commands.
•
The HQoS for EoMPLS VCs feature does not support multiple levels of parent and child policy map nesting. Each parent policy map supports only one level of nesting. In other words, a traffic class in a parent policy map can have a maximum of one child policy map, and child policy maps cannot have their own child policy maps.

Note
You can mix flat traffic classes (that do not refer to child policy maps) and hierarchical traffic classes (that do refer to child policy maps) in the same HQoS parent policy maps.
•
You cannot apply both HQoS output policy on a main interface (using the service-policy output command) and an output policy (service-policy output command) on a subinterface of that same interface. If you attempt to do so, then attaching the HQoS output policy fails with the following error message:
Attaching service policy to main and sub-interface concurrently is not allowed
•
Policy maps can contain a maximum of 255 class maps.
•
Child policy maps support only strict priority (the priority command without any options). Parent policy maps do not support any form of the priority command.
•
When using both the priority and police commands in more than one class in a child priority map, you must configure the commands in the following order:
–
In the first class to be configured on the priority map, specify the priority command first, and then the police command.
–
In the second and any additional classes to be configured on the priority map, specify the police command first, and then the priority command.
–
The police cir command is supported only on OSM interfaces.

Note
The priority command can be configured only with the police command. You cannot use priority together with any forms of the bandwidth or shape commands.
•
Class maps that use the match input vlan command support only the match-any option. You cannot use the match-all option in class maps that use the match input vlan command.
•
Classes using the the match input vlan command should always be placed first in the policy maps, before any classes that use flat policies.
•
Parent policy maps do not support the fair-queue command. Also, the fair-queue command is not supported for OSM interfaces.
•
You must use class-default for the input service policy on a CE-PE interface that uses the qos-group command to set CoS or IP-Precedence.
•
Service policies cannot be attached to subinterfaces for OSM interfaces.
•
OSM interfaces support only the shape average command. Other forms of the shape command are not supported on OSM interfaces.
•
The bandwidth remaining precent command is not supported on any OSM interfaces. However, the following OSMs support the bandwidth command in a parent class under a hierarchical policy map:
–
OSM-2+4GE-WAN-GBIC+

Note
For the bandwidth command, the minimum rate and the granularity are 1/255 of the bandwidth.

Note
For additional prerequisites and restrictions for HQoS in general, see the section "Configuring Hierarchical Traffic Shaping" at "Configuring Hierarchical Traffic Shaping" section on page 9-15.
Supported Features
The HQoS for EoMPLS VCs feature supports the following commands on the class maps and policy maps for output interfaces.
The following are supported on parent policy maps:
•
bandwidth—Egress class-based weighted fair queuing (CBWFQ) supported on parent policy maps on OSM-2+4GE-WAN-GBIC+ interfaces.
•
shape average—Egress shaping
The following are supported on child policy maps:
•
bandwidth—Egress class-based weighted fair queuing (CBWFQ)
•
priority—Egress low latency queuing (LLQ) (Only strict priority is supported on child maps and on OSMs.)

Note
Strict priority is supported for OSM-2+4GE-WAN-GBIC+ interfaces only.
•
queue-limit—Queue throttling
•
random-detect—Egress weighted random early detection (WRED)
•
shape average—Egress shaping
Related Commands
Do not confuse the match input vlan command with the match vlan command, which is also a class-map configuration command.
•
The match vlan command matches the VLAN ID on packets for the particular interface at which the policy map is applied. Policy maps using the match vlan command can be applied to either ingress or egress interfaces on the router, using the service-policy {input | output} command.
•
The match input vlan command matches the VLAN ID that was on packets when they were received on the ingress interface on the router. Policy maps using the match input vlan command must be applied to egress interfaces on the router, using the service-policy output command.
The match input vlan command can also be confused with the match input-interface vlan command, which matches packets being received on a logical VLAN interface that is used for inter-VLAN routing.

Tip
Because class maps also support the match input-interface command, you cannot abbreviate the input keyword when giving the match input vlan command.
Configuring the HQoS for EoMPLS VCs Feature
To use a hierarchical QoS policy map for EoMPLS traffic, you must perform the following tasks. (All tasks are required.)
•
Apply a policy map to the input interface to set the QoS group value on incoming packets. See the "Creating and Assigning a Policy Map to Mark the QoS Group at the Incoming Interface" section.
•
Create class maps that match packets on the basis of their QoS group values. See the "Configuring the Class Map to Match on a QoS Group" section.
•
Create a child policy map that uses these class maps. See the "Creating the Child Policy Map for the Egress Interface" section.
•
Create class maps that match packets on the basis of their input VLAN IDs. See the "Configuring the Class Maps for Matching on an Input VLAN" section.
•
Create a parent policy map and apply it to the output interface. See the "Creating the Parent Policy Map and Attaching It to the Egress Interface" section.

Note
For more information about hierarchical traffic shaping, see the section "Configuring Hierarchical Traffic Shaping" at "Configuring Hierarchical Traffic Shaping" section on page 9-15.
Creating and Assigning a Policy Map to Mark the QoS Group at the Incoming Interface
To be able to classify traffic on a QoS group, you must first create a policy map that marks incoming packets with the desired QoS group value. You can set the QoS group value to the value of either the IP precedence bits or 802.1P CoS bits of the incoming packets. You then must assign that policy map to the incoming interface (which must be a Layer 2 LAN interface). To perform these tasks, use the following procedure.
SUMMARY STEPS
1.
enable
2.
configure terminal
3.
policy-map policy-map-name
4.
description string
5.
class class-default
6.
set qos-group {cos | ip-precedence}
7.
interface if-type {slot/port | slot/subslot/port}
8.
service-policy input policy-map-name
9.
end
10.
show policy-map
show policy-map policy-map-name [class class-map]
DETAILED STEPS
|
Command or Action
|
Purpose
|
|
|---|---|---|
|
Step 1 |
enable Example:
Router> enable |
Enables privileged EXEC mode. Enter your password if prompted. |
|
Step 2 |
configure terminal Example:
Router# configure terminal |
Enters global configuration mode. |
|
Step 3 |
policy-map policy-map-name Example:
Router(config)# policy-map cos-to-qosgrp-pmap |
Creates a policy map with the specified name and enters policy-map configuration mode. • |
|
Step 4 |
description string Example:
Router(config-pmap)# description Sets QoS group to 802.1P CoS of incoming packets |
(Optional) Arbitrary string, up to 200 characters long, that describes this policy map. |
|
Step 5 |
class class-default Example:
Router(config-pmap)# class class-default |
Specifies the default class to be used for traffic with this policy, and enters policy-map class configuration mode. |
|
Step 6 |
set qos-group {cos | ip-precedence} Example:
Router(config-pmap-c)# set qos-group cos |
Sets a quality of service (QoS) group identifier (ID) that can be used later to classify packets. • • Note |
|
Step 7 |
interface if-type {slot/port | slot/subslot/port} Example:
Router(config-pmap-c)# interface GigabitEthernet 5/2 |
Enters interface configuration mode for the incoming interface. Note |
|
Step 8 |
service-policy input policy-map-name Example:
Router(config-if)# service-policy input cos-to-qosgrp-pmap |
Attaches the specified policy map to the interface for input (ingress) traffic. • |
|
Note |
||
|
Step 9 |
show policy-map show policy-map policy-map-name [class class-map] Example:
Router# show policy-map cos-to-qosgrp-pmap |
(Optional) Displays the configured class map to verify the configuration. To display all policy maps, enter the command without any options. To display a specific policy map, specify its name on the command line. You can also display a specific class that is part of a specific policy map by adding the class option. |
The following policy map sets the QoS group value to match the CoS value of the incoming packets. The policy map is then assigned to two interfaces:
policy-map cos-to-qosgroup-pmap
class class-default
set qos-group cos
...
!
interface GE 6/0
service-policy input cos-to-qosgroup-pmap
...
!
interface GE 6/1
service-policy input cos-to-qosgroup-pmap
...
What to Do Next
After attaching the policy map to the input interface, create the class map to match on the QoS group value at the egress (outgoing) interface. See the "Configuring the Class Map to Match on a QoS Group" section for details.
Configuring the Class Map to Match on a QoS Group
To be able to match EoMPLS traffic using QoS groups, you must create class maps to match traffic on the basis of the QoS group value at the egress (outgoing) interface. To create these class maps, use the following procedure.
Prerequisites
•
You must create policy maps that contain class maps that use the set qos-group command to mark incoming packets with the desired QoS group values. Then attach those policy maps to the input interfaces that are receiving the incoming traffic. See the "Creating and Assigning a Policy Map to Mark the QoS Group at the Incoming Interface" section.
•
Input interfaces must also be configured with mls trust.
Restrictions
•
A policy map that refers to a class map that uses the match qos-group command cannot have other class maps that match on the following commands:
–
match ip prec match
–
match mpls exp
•
The allowable range of values for QoS groups is from 0 to 99. The only valid values for EoMPLS traffic are from 0 to 7. This is because the QoS group value is set to the IP precedence or CoS fields in the incoming packets, and both of these fields are only 3-bit values that can range from 0 to 7.
SUMMARY STEPS
1.
enable
2.
configure terminal
3.
class-map [match-all | match-any] class-map-name
4.
match qos-group qos-group-value
5.
end
6.
show class-map class-map-name
DETAILED STEPS
The following example configuration shows all of the class maps that are allowed for matching on QoS groups for EoMPLS traffic.
class-map match-all group0
match qos-group 0
class-map match-all group1
match qos-group 1
class-map match-all group2
match qos-group 2
class-map match-all group3
match qos-group 3
class-map match-all group4
match qos-group 4
class-map match-all group5
match qos-group 5
class-map match-all group6
match qos-group 6
class-map match-all group7
match qos-group 7
What to Do Next
After creating all of the desired class maps, you must include them in a child policy map. See the next section, " Creating the Child Policy Map for the Egress Interface," for more information.
Creating the Child Policy Map for the Egress Interface
A hierarchical policy map is identical to the flat policy maps that were supported in earlier Cisco IOS software releases, except that at least one of the traffic class maps in the parent policy map refers to a child policy map. You must create the child policy maps before creating the parent policy maps.
To create a child policy map, use the following procedure. Repeat as needed to create the desired number of child policy maps.

Tip
Different parent policy maps can use the same child policy maps, if desired.
Prerequisites
•
You must first create the class maps to be used by this policy map. See the "Configuring the Class Map to Match on a QoS Group" section.
Restrictions
Child policy maps for EoMPLS traffic have the following restrictions:
•
The set command is not supported on the child policy map.
•
Child policy maps support only strict priority (the priority command without any options). Parent policy maps do not support any form of the priority command.
•
When using both the priority and police commands in more than one class in a priority map, you must configure the commands in the following order:
–
In the first class to be configured on the priority map, specify the priority command first, and then the police command.
–
In the second and any additional classes to be configured on the priority map, specify the police command first, and then the priority command.
•
You cannot use the service-policy child-pmap-name command in child policy maps, because multi-level nesting is not supported for HQoS for EoMPLS VCs policy maps.
SUMMARY STEPS
1.
enable
2.
configure terminal
3.
policy-map child-pmap-name
4.
description string
5.
class {class-map-name | class-default}

Note
Each class action below must be preceded by a class command.
6.
shape {average} mean-rate
7.
class {class-map-name | class-default}
8.
priority
9.
police bps [burst-normal] [burst-max] conform-action action exceed-action action [violate-action action]
10.
class {class-map-name | class-default}
11.
bandwidth {bandwidth-kbps | remaining percent percentage | percent percentage}
12.
end
13.
show policy-map child-pmap-name
DETAILED STEPS
|
Command or Action
|
Purpose
|
|
|---|---|---|
|
Step 1 |
enable Example:
Router> enable |
Enables privileged EXEC mode. Enter your password if prompted. |
|
Step 2 |
configure terminal Example:
Router# configure terminal |
Enters global configuration mode. |
|
Step 3 |
policy-map child-pmap-name Example:
Router(config)# policy-map child-pmap-name |
Creates a policy map with the specified name, for use as a child policy map, and enters policy-map configuration mode. • |
|
Step 4 |
description string Example:
Router(config-pmap)# description Child policy map for input VLAN parent class |
(Optional) Arbitrary string, up to 200 characters long, that describes this policy map. |
|
Step 5 |
class {class-map-name | class-default} Example:
Router(config-pmap)# class qosgroup4 Router(config-pmap-c)# or Router(config-pmap)# class class-default |
Specifies the name of a class map that should be used with this policy, and enters policy-map class configuration mode. • • |
|
Step 6 |
shape {average} mean-rate Example:
Router(config-pmap-c)# shape average 10000000 |
(Optional) Shapes the traffic in this class by the limits specified. • • |
|
Step 7 |
class {class-map-name | class-default} Example:
Router(config-pmap)# class qosgroup5 or Router(config-pmap)# class class-default |
Specifies the name of a class map that should be used with this policy, and enters policy-map class configuration mode. • • |
|
Step 8 |
priority Example:
Router(config-pmap-c)# priority |
(Optional) Specifies that traffic in this class is priority traffic. Note |
|
Note |
||
|
Step 9 |
police bps [burst-normal] [burst-max] conform-action action exceed-action action [violate-action action] Example:
Router(config-pmap-c)# police 8000 1000 conform-action transmit exceed-action drop |
(Optional) Specifies the policing policy that should be used for traffic in this class. • • • • • • • |
|
Step 10 |
class {class-map-name | class-default} Example:
Router(config-pmap)# class qosgroup6 or Router(config-pmap)# class class-default |
Specifies the name of a class map that should be used with this policy, and enters policy-map class configuration mode. • • |
|
Step 11 |
bandwidth {bandwidth-kbps | remaining percent percentage | percent percentage} Example:
Router(config-pmap-c)# bandwidth percent 50 |
(Optional) Specifies the bandwidth that is allowed for traffic in this class. • • • |
|
Note |
||
|
Step 12 |
end Example:
Router(config-pmap-c)# end |
Exits policy-map class configuration mode and returns to privileged EXEC mode. |
|
Step 13 |
show policy-map show policy-map child-pmap-name [class class-map] Example:
Router# show policy-map child-policy1 (command output) |
(Optional) Displays the configured policy map to verify the configuration. To display all policy maps, enter the command without any options. To display a specific policy map, specify its name on the command line. You can also display a specific class that is part of a specific policy map by adding the class option. |
The following sample configuration shows a typical child policy map that refers to two of the QoS group class maps that were defined in the "Configuring the Class Map to Match on a QoS Group" section.
policy-map child
! Class for QoS Group 3 performs LLQ
class group3
priority
police 20000000 625000 625000 conform-action transmit exceed-action drop
! Class for QoS Group 4 performs CBWFQ when bandwidth usage is at 30 percent
class group4
bandwidth percent 30

Note
When using both the priority and police commands in a class, you must configure them in the following order: In the first class to be configured on the priority map, specify the priority command first, and then the police command. In the second and any additional classes to be configured on the priority map, specify the police command first, and then the priority command.
What to Do Next
After creating the child policy map, you must create the parent policy map. See the "Creating the Parent Policy Map and Attaching It to the Egress Interface" section for details.
Configuring the Class Maps for Matching on an Input VLAN
To match EoMPLS packets that are tagged with one or more specific VLAN IDs, you must create a class map that matches on those VLAN IDs. To do this, use the following procedure.
SUMMARY STEPS
1.
enable
2.
configure terminal
3.
class-map match-any class-map-name
4.
match input vlan input-vlan-list
5.
end
6.
show class-map class-map-name
DETAILED STEPS
|
Command or Action
|
Purpose
|
|
|---|---|---|
|
Step 1 |
enable Example:
Router> enable |
Enables privileged EXEC mode. Enter your password if prompted. |
|
Step 2 |
configure terminal Example:
Router# configure terminal |
Enters global configuration mode. |
|
Step 3 |
class-map match-any class-map-name Example:
Router(config)# class-map vlan-map |
Creates a class map and enters class-map configuration mode. • Note |
|
Step 4 |
match input vlan input-vlan-list Example:
Router(config-cmap)# match input vlan 10 20 30 100-1999 |
Matches packets that are tagged with a VLAN ID specified in the input-vlan-list, which can be one or both of the following: • • Note |
|
Step 5 |
end Example:
Router(config-cmap)# end |
Exits class-map configuration mode and returns to privileged EXEC mode. |
|
Step 6 |
show class-map class-map-name Example:
Router# show class-map vlan-map |
(Optional) Displays the configured class map to verify the configuration. |
The following configuration example shows a number of class maps that match either one specific VLAN ID, or a range of VLAN IDs. The last class map matches all valid VLAN IDs.
class-map match-any vlan1
match input vlan 1
class-map match-any vlan2
match input vlan 2
class-map match-any vlan3
match input vlan 3
class-map match-any vlan4
match input vlan 4
class-map match-any vlans1-4
match input vlan 1-4
class-map match-any vlans-all
match input vlan 1-4094
The following sample configuration shows multiple match input vlan commands being used in the traffic class map.
class-map match-any vlans-even
match input vlan 2 4 6 8
match input vlan 102 104 106 108
match input vlan 202 204 206 208
What to Do Next
After creating all desired class maps, you must then create the parent policy map and assign it to the egress interface. See the next section, " "Creating the Parent Policy Map and Attaching It to the Egress Interface" section," for details.
Creating the Parent Policy Map and Attaching It to the Egress Interface
After creating the class maps and child policy maps, you must create a parent policy map and attach it to the appropriate egress (output) interface. To create and attach a parent policy map, use the following procedure. Repeat as needed to create the desired number of parent policy maps.
Prerequisites
Create at least one child policy map to be used in this parent policy map. See the "Creating the Child Policy Map for the Egress Interface" section for details. (Different parent policies can use the same child policy maps, if desired.)
Restrictions
Parent policy maps have the following restrictions:
•
You cannot attach a policy with the match input vlan command to an interface if you have already attached a service policy to its VLAN interface (a logical interface that has been created with the interface vlan command). If you attempt to do so, you must then remove both types of policy maps from all interfaces, and then reattach only one type of policy map to the interfaces.
•
The priority and fair-queue commands are not supported in parent policy maps.
•
Only the shape command and the bandwidth command are supported in parent classes; other actions are not supported.
•
The bandwidth command is supported on parent policy maps only on OC-3 and OC-12 POS OSM interfaces, and on OSM-2+4GE-WAN-GBIC+ interfaces.
SUMMARY STEPS
1.
enable
2.
configure terminal
3.
policy-map parent-pmap-name
4.
description string
5.
class {class-map-name}
6.
shape {average | peak} mean-rate [Bc [Be]]
7.
bandwidth {bandwidth-kbps | percent percentage}
8.
service-policy child-pmap-name
9.
interface if-type {slot/port | slot/subslot/port}
10.
service-policy output parent-pmap-name
11.
end
12.
show policy-map parent-pmap-name
DETAILED STEPS
|
Command or Action
|
Purpose
|
|
|---|---|---|
|
Step 1 |
enable Example:
Router> enable |
Enables privileged EXEC mode. Enter your password if prompted. |
|
Step 2 |
configure terminal Example:
Router# configure terminal |
Enters global configuration mode. |
|
Step 3 |
policy-map parent-pmap-name Example:
Router(config)# policy-map parent-policy1 |
Creates a policy map with the specified name, for use as a parent policy map, and enters policy-map configuration mode. • |
|
Step 4 |
description string Example:
Router(config-pmap)# description Parent Policy Map |
(Optional) Arbitrary string, up to 200 characters long, that describes this policy map. |
|
Step 5 |
class {class-map-name} Example:
Router(config-pmap)# class vlan100 or Router(config-pmap)# class class-default |
Specifies the name of a class-map that should be used with this policy, and enters policy-map class configuration mode. • |
|
Step 6 |
shape {average} mean-rate] Example:
Router(config-pmap-c)# shape average 10000000 |
(Optional) Shapes the traffic in this class by the limits specified. • • |
|
Step 7 |
bandwidth {bandwidth-kbps | percent percentage} Example:
Router(config-pmap-c)# bandwidth percent 50 |
(Optional) Specifies the bandwidth that is allowed for traffic in this class. • • |
|
Step 8 |
service-policy child-pmap-name Example:
Router(config-pmap-c)# service-policy child-pmap-name |
Specifies a child policy map that should be applied to the traffic in this class: • |
|
Note |
||
|
Step 9 |
interface if-type {slot/port | slot/subslot/port}] Example:
Router(config)# interface ge-wan 5/2 |
Enters interface configuration mode for the specified interface. |
|
Step 10 |
service-policy output parent-pmap-name Example:
Router(config-pmap)# service-policy output parent-policy1 |
Attaches the specified parent policy map to the interface for outgoing traffic. • |
|
Step 11 |
end Example:
Router(config-pmap-c)# end |
Exits policy-map class configuration mode and returns to privileged EXEC mode. |
|
Step 12 |
show policy-map show policy-map parent-pmap-name [class class-map] Example:
Router# show policy-map vlan-map |
(Optional) Displays the configured policy map to verify the configuration. To display all policy maps, enter the command without any options. To display a specific policy map, specify its name on the command line. You can also display a specific class that is part of a specific policy map by adding the class option. |
The following sample configuration shows a parent policy map that shapes all of the traffic for three VLANs to specific maximum values. Each class in the parent policy map also specifies a child policy map that further shapes the VLAN traffic on the basis of each packet's QoS group value.
!
! Class maps to match on QoS groups (to be used in child policy map)
class-map match-all qosgroup0
match qos-group 0
class-map match-all qosgroup1
match qos-group 1
class-map match-all qosgroup2
match qos-group 2
class-map match-all qosgroup3
match qos-group 3
class-map match-all qosgroup4
match qos-group 4
class-map match-all qosgroup5
match qos-group 5
class-map match-all qosgroup6
match qos-group 6
class-map match-all qosgroup7
match qos-group 7
!
! Class maps to match on input vlan IDs (to be used in parent policy map)
class-map match-all vlan101
match input vlan 101
class-map match-all vlan102
match input vlan 102
class-map match-all vlan103
match input vlan 103
!
policy-map child-pmap
description Child policy map to shape on the basis of the QoS group values
class qosgroup1
shape average 10000000
class qosgroup2
shape average 20000000
class qosgroup5
shape average 40000000
class class-default
shape average 10000000
!
policy-map parent-pmap
description Parent pmap that shapes traffic for individual VLANs
class vlan101
shape average 70000000
service-policy child-pmap
class vlan102
shape average 80000000
service-policy child-pmap
class vlan103
shape average 90000000
service-policy child-pmap
class class-default
shape average 10000000
Configuration Examples for the HQoS for EoMPLS VCs Feature
This section contains the following sample configurations for the HQoS for EoMPLS VCs feature:
•
Simple Hierarchical Configuration Example
•
Complete Hierarchical QoS Example
•
Multiple Parent Policies Using the Same Child Policy Example
•
Common Class-Map Templates Example
Simple Hierarchical Configuration Example
The following example shows a simple hierarchical QoS configuration with one parent policy and one child policy. This configuration performs the following:
•
The parent policy shapes all outgoing traffic for VLAN 101 on the GE7/1 interface to a total maximum of 90 Mbps.
•
The child policy performs LLQ on the VLAN 101 traffic that has the QoS group set to 1, giving it 10 percent of the bandwidth.
•
The child policy allocates 10 percent of the bandwidth of the VLAN 101 traffic that has the QoS group set to 2.
•
The child policy performs WRED on the remaining VLAN 101 traffic.
class-map match-any vlan101
match input vlan 101
class-map match-all qos1
match qos-group1
class-map match-all qos-group2
match mpls experimental topmost 2
!
policy-map child-pmap
class qos1
priority
police percent 10
class qos-group2
bandwidth percent 10
class class-default
random-detect
policy-map vlan101-pmap
class vlan101
shape average 90000000 360000 360000
service-policy child-pmap
interface GigabitEthernet 7/1
service-policy output vlan101-pmap
...
Complete Hierarchical QoS Example
The following example shows a hierarchical QoS configuration with one parent policy map and two child policy maps. This configuration performs the following:
•
The input interface (Gigabit Ethernet 2/2) uses the cos-to-qosgroup-pmap policy map to set the QoS group value of incoming packets to match the packets' original 802.1P CoS values.
•
The parent policy map shapes traffic for VLAN 101 and 102 to different bandwidths, and applies separate child policy maps to each. The rest of the traffic on the interface is shaped and made subject to the random-detect method.
•
The child policy map for VLAN 101 allocates different bandwidth to traffic for QoS groups 1 and 2, and transmits all other traffic on that VLAN unchanged (subject to the parent policy map's bandwidth limitations).
•
The child policy map for VLAN 102 marks traffic with QoS group set to 2 as priority traffic, and limits all other traffic to 40 percent of the bandwidth (subject to the parent policy map's bandwidth limitations).
•
The outgoing interface (POS 8/7) attaches the parent policy map (vlan-parent) for outgoing traffic.
class-map match-any vlan101
match input vlan 101
class-map match-any vlan102
match input vlan 102
class-map match-all group1
match qos-group 1
class-map match-all group2
match qos-group 2
!
policy-map cos-to-qosgroup-pmap
class class-default
set qos-group cos
!
policy-map vlan-parent
description top-level parent policy map
class vlan101
shape average 50000000 200000 200000
service-policy 101qos
class vlan102
shape average 100000000 400000 400000
service-policy 102qos
class class-default
shape average 50000000 200000 200000
random-detect
!
policy-map 101qos
description child-level policy map for VLAN 101
class group1
bandwidth percent 10
class group2
bandwidth percent 30
policy-map 102qos
description child-level policy map for VLAN 102
class group2
police percent 10
priority
class class-default
bandwidth percent 40
!
! Customer-facing interface - the cos-to-qosgroup-pmap policy map sets the
! packet's QoS group value to match the customer's original CoS values.
interface GigabitEthernet2/2
description Customer-facing interface
ip address 192.168.100.13 255.255.255.0
switchport
switchport trunk encapsulation dot1q
switchport trunk native vlan 10
switchport trunk allowed vlan 101-1000,1002-1005
switchport mode trunk
mls qos trust
no cdp enable
service-policy input cos-to-qosgroup-pmap
...
!
interface POS8/7
description Network-Facing OSM POS
ip address 10.11.0.5 255.255.255.0
encapsulation ppp
tag-switching ip
mls qos trust dscp
service-policy output vlan-parent
...
Multiple Parent Policies Using the Same Child Policy Example
This excerpt from a sample configuration file shows several parent policy maps using the same child map.
! You can enable QoS globally or per-interface
mls qos
!
class-map match-all group1
match qos-group 1
class-map match-all group2
match qos-group 2
class-map match-any vlan101
match input vlan 101
class-map match-any vlan102
match input vlan 102
class-map match-any vlan103
match input vlan 103
class-map match-all exp-3
match mpls experimental topmost 3
!
policy-map child-pmap
class group1
shape average 10000000
class group2
shape average 20000000
!
policy-map parent1-pmap
class vlan101
shape average 60000000
service-policy child-pmap
class vlan102
shape average 80000000
service-policy child-pmap
class class-default
shape average 100000000
!
policy-map parent2-pmap
class vlan103
shape average 55000000
service-policy child-pmap
class exp-3
shape average 60000000
...
Common Class-Map Templates Example
This excerpt from a configuration file gives some common templates for class maps that can be used with your own policy maps.
! You can enable QoS globally or per-interface
mls qos
...
! Class Maps to Match on IP Precedence Bits
class-map match-any prec0
match ip precedence 0
class-map match-any prec1
match ip precedence 1
class-map match-any prec2
match ip precedence 2
class-map match-any prec3
match ip precedence 3
class-map match-any prec4
match ip precedence 4
class-map match-any prec5
match ip precedence 5
class-map match-any prec6
match ip precedence 6
class-map match-any prec7
match ip precedence 7
! Matches all non-priority precedence values
class-map match-any prec0-4
match ip precedence 0 1 2 3 4
!
! Class-Maps to Match on QoS Groups
class-map match-all group0
match qos-group 0
class-map match-all group1
match qos-group 1
class-map match-all group2
match qos-group 2
class-map match-all group3
match qos-group 3
class-map match-all group4
match qos-group 4
class-map match-all group5
match qos-group 5
class-map match-all group6
match qos-group 6
class-map match-all group7
match qos-group 7
!
! Class Maps to Match on MPLS EXP Bits
class-map match-all exp0
match mpls experimental topmost 0
class-map match-all exp1
match mpls experimental topmost 1
class-map match-all exp2
match mpls experimental topmost 2
class-map match-all exp3
match mpls experimental topmost 3
class-map match-all exp4
match mpls experimental topmost 4
class-map match-all exp5
match mpls experimental topmost 5
class-map match-all exp6
match mpls experimental topmost 6
class-map match-all exp7
match mpls experimental topmost 7
class-map match-all exp1-4
match mpls experimental topmost 1 2 3 4
!
! Sample Class-MapS to Match on VLAN
! Copy and Change the VLAN Number as Desired
class-map match-any vlan101
match input vlan 101
class-map match-any vlan102
match input vlan 102
class-map match-any vlan103
match input vlan 103
class-map match-any vlan104
match input vlan 104
class-map match-any vlans101-104
match input vlan 101-104
!
浙公网安备 33010602011771号