Table Of Contents
Prerequisites for Enhanced Packet Marking
Restrictions for Enhanced Packet Marking
Information About Enhanced Packet Marking
Benefits of Enhanced Packet Marking
Modular Quality of Service Command-Line Interface
How to Configure Enhanced Packet Marking
Attaching the Policy Map to the Interface
Verifying the Table Map and the Policy Maps
Configuration Examples for Enhanced Packet Marking
Configuring Enhanced Packet Marking (CoS Values) Example
Configuring Enhanced Packet Marking (MPLS EXP Values) Example
Verifying the Table Map Configuration Example
Obsolete and Replaced Commands
set mpls experimental imposition
Enhanced Packet Marking
The Enhanced Packet Marking feature allows you to map and convert the marking of a packet from one value to another by using a kind of conversion chart called a table map. The table map establishes an equivalency from one value to another. For example, the table map can map and convert the class of service (CoS) value of a packet to the precedence value of the packet. This value mapping can be propagated for use on the network, as needed.
Feature Specifications for Enhanced Packet Marking
Feature History Release Modification12.2(13)T
This feature was introduced.
Supported PlatformsFor platforms supported in Cisco IOS Release 12.2(13)T, consult Cisco Feature Navigator.
Determining Platform Support Through Cisco Feature Navigator
Cisco IOS software is packaged in feature sets that are supported on specific platforms. To get updated information regarding platform support for this feature, access Cisco Feature Navigator. Cisco Feature Navigator dynamically updates the list of supported platforms as new platform support is added for the feature.
Cisco Feature Navigator is a web-based tool that enables you to quickly determine which Cisco IOS software images support a specific set of features and which features are supported in a specific Cisco IOS image. You can search by feature or release. Under the release section, you can compare releases side by side to display both the features unique to each software release and the features in common.
To access Cisco Feature Navigator, you must have an account on Cisco.com. If you have forgotten or lost your account information, send a blank e-mail to cco-locksmith@cisco.com. An automatic check will verify that your e-mail address is registered with Cisco.com. If the check is successful, account details with a new random password will be e-mailed to you. Qualified users can establish an account on Cisco.com by following the directions found at this URL:
Cisco Feature Navigator is updated regularly when major Cisco IOS software releases and technology releases occur. For the most current information, go to the Cisco Feature Navigator home page at the following URL:
Availability of Cisco IOS Software Images
Platform support for particular Cisco IOS software releases is dependent on the availability of the software images for those platforms. Software images for some platforms may be deferred, delayed, or changed without prior notice. For updated information about platform support and availability of software images for each Cisco IOS software release, refer to the online release notes or, if supported, Cisco Feature Navigator.
Contents
•
Prerequisites for Enhanced Packet Marking
•
Restrictions for Enhanced Packet Marking
•
Information About Enhanced Packet Marking
•
How to Configure Enhanced Packet Marking
•
Configuration Examples for Enhanced Packet Marking
Prerequisites for Enhanced Packet Marking
To use the Enhanced Packet Marking feature, you must have Cisco Express Forwarding (CEF) configured on both the interface sending the packet and the interface receiving the packet. For more information on CEF, refer to the Cisco IOS Switching Services Configuration Guide, Release 12.2.
Note
The Enhanced Packet Marking feature can mark both locally generated packets and CEF-switched packets.
Restrictions for Enhanced Packet Marking
If a policy map contains the set cos command and the policy map is to be attached to an IEEE 802.1Q interface, the policy map can be attached only as an output policy. For more information about attaching policy maps to interfaces, see the "Attaching the Policy Map to the Interface" section.
Information About Enhanced Packet Marking
To configure Enhanced Packet Marking, you need to understand the following concepts:
•
Benefits of Enhanced Packet Marking
•
Modular Quality of Service Command-Line Interface
Benefits of Enhanced Packet Marking
The Cisco IOS quality of service (QoS) software enables you to mark packets with values such as the CoS value, the Multiprotocol Label Switching (MPLS) EXP value, the QoS group value, the precedence value, or the differentiated services code point (DSCP) value set in the header of a packet.
Before the Enhanced Packet Marking feature was available, marking the value of a packet was accomplished by using separate set commands (for example, the set precedence command, the set dscp, command, and the set cos command). With this feature, you can create a table map in which the packet values can be defined and then used to mark packets. Rather than using the individual set commands to mark the packet values, you can define the values once in the table map.
A table map is a kind of two-way conversion chart that lists and maps one packet-marking value to another. A table map supports a many-to-one type of conversion and mapping scheme. The table map establishes a "to - from" relationship for the packet-marking values: a packet-marking value is set to one value that is taken from another value. The values are based on specific packet-marking types or categories, such as precedence or DSCP.
Table 1 lists the packet-marking types for which a "to-from" relationship can be established using the table map.
The table map can be configured for use with multiple policy maps. The policy maps can then be configured to convert and propagate the packet-marking values defined in the table map. Then the policy maps can be attached to the input or output interface of either the ingress or egress router, as appropriate to serve the QoS requirements of your network.
Modular Quality of Service Command-Line Interface
To configure the Enhanced Packet Marking feature, you must create table maps using the table-map (value mapping) command.
Once the table map has been created, traffic classes are defined and traffic policies (policy maps) are created and configured to use the table maps. Then the traffic policies (policy maps) are attached to the appropriate interfaces.
The Modular Quality of Service (QoS) Command-Line Interface (CLI) (MQC) is a command-line interface that allows you to define traffic classes, create and configure traffic policies (policy maps), and then attach these traffic policies to interfaces.
In the MQC, the class-map command is used to define a traffic class (which is then associated with a traffic policy). The purpose of a traffic class is to classify traffic.
The MQC consists of the following three processes:
•
Defining a traffic class with the class-map command.
•
Creating a traffic policy by associating the traffic class with one or more QoS features (using the policy-map command).
•
Attaching the traffic policy to the interface with the service-policy command.
A traffic class contains three major elements: a name, a series of match commands, and, if more than one match command exists in the traffic class, an instruction on how to evaluate these match commands (that is, match-all or match-any). The traffic class is named in the class-map command line; for example, if you enter the class-map cisco command while configuring the traffic class in the CLI, the traffic class would be named "cisco".
The match commands are used to specify various criteria for classifying packets. Packets are checked to determine whether they match the criteria specified in the match commands. If a packet matches the specified criteria, that packet is considered a member of the class and is forwarded according to the QoS specifications set in the traffic policy. Packets that fail to meet any of the matching criteria are classified as members of the default traffic class.
How to Configure Enhanced Packet Marking
This section describes the following tasks. Each task is identified as either required or optional.
•
Creating a Table Map (required)
•
Configuring a Policy Map (required)
•
Attaching the Policy Map to the Interface (required)
•
Verifying the Table Map and the Policy Maps (optional)
Creating a Table Map
The table map contains the mapping scheme used for establishing the "to-from" relationship and equivalency between one packet-marking value and another.
To create and configure the table map, use the following commands:
SUMMARY STEPS
1.
enable
2.
configure {terminal | memory | network}
3.
table-map table-map-name map from from-value to to-value [default default-action-or-value]
4.
exit
DETAILED STEPS
Configuring a Policy Map
After the table map has been created, a policy map must be created and configured to use the table map. This policy map sets the packet-marking values (for example, the precedence value, the DSCP value, or the CoS value) according to those values defined in the table map.
To create and configure the policy map, use the following commands:
SUMMARY STEPS
1.
enable
2.
configure {terminal | memory | network}
3.
policy map policy-map-name
4.
class {class-name | class-default}
5.
set precedence cos table table-map-name
or
set dscp cos table table-map-name
or
set cos precedence table table-map-name
or
set cos dscp table table-map-name
or
set qos-group precedence table table-map-name
or
set qos-group dscp table table-map-name
or
set mpls experimental topmost qos-group table table-map-name
or
set mpls experimental imposition precedence table table-map-name
or
set mpls experimental imposition dscp table table-map-name
or
set qos-group mpls exp topmost table table-map-name
or
set precedence qos-group table table-map-name
or
set dscp qos-group table table-map-name
6.
exit
DETAILED STEPS
What To Do Next
Create and configure as many policy maps as you must have to serve the QoS requirements of your network. To create and configure any additional policy maps you need, repeat the steps in the "Configuring a Policy Map" section. Then attach the policy maps to the appropriate interface, following the instructions in the "Attaching the Policy Map to the Interface" section.
Attaching the Policy Map to the Interface
The policy map or maps you have created must be attached to the appropriate interface, according to the needs of your network. For example, you may have to attach policy maps to either the input or the output interface on either the ingress or the egress router.
To attach a policy map to the appropriate interface, use the following commands:
SUMMARY STEPS
1.
enable
2.
configure {terminal | memory | network}
3.
interface type number
4.
pvc [name] vpi/vci [ilmi | qsaal | smds]
5.
service-policy {input | output} policy-map-name
6.
exit
DETAILED STEPS
Command or Action PurposeStep 1
enable
Example:Router> enable
Enables higher privilege levels, such as privileged EXEC mode.
•
Enter your password if prompted.
Step 2
configure {terminal | memory | network}
Example:Router# configure terminal
Enters global configuration mode.
Step 3
interface type number [name-tag]
Example:Router(config)# interface FastEthernet1/0.1
Configures the interface type specified and enters interface configuration mode.
•
Enter interface type.
Step 4
pvc [name] vpi/vci [ilmi | qsaal | smds]
Example:Router(config-if)# pvc cisco 0/16 ilmi
(Optional) Creates or assigns a name to an ATM PVC and specifies the encapsulation type on an ATM PVC.
Note
This step is required only if you are attaching the policy map to an ATM PVC. If you are not attaching the policy map to an ATM PVC, skip this step and proceed with Step 5.
Enters ATM VC configuration mode.
Step 5
service-policy {input | output} policy-map-name
Example:Router(config-if)# service-policy input policy1
Specifies the name of the policy map to be attached to the input or output direction of the interface.
Note
Policy maps can be configured on ingress or egress routers. They can also be attached in the input or output direction of an interface. The direction (input or output) and the router (ingress or egress) to which the policy map should be attached varies according your network configuration. When using the service-policy command to attach the policy map to an interface, be sure to choose the router and the interface direction that are appropriate for your network configuration.
•
Enter the policy map name.
Step 6
exit
Example:Router(config-if)# exit
(Optional) Exits global configuration mode.
Verifying the Table Map and the Policy Maps
This task allows you to verify the following items:
•
The table map has been created correctly.
•
The policy maps have been configured correctly.
•
The policy maps have been attached to the correct input or output interface of the ingress or egress router.
•
The feature is mapping, converting, and propagating the values as expected.
To verify the table map and the policy maps, use the following commands:
SUMMARY STEPS
1.
enable
2.
show table-map [table-map-name]
or
show policy-map
or
show policy-map interface interface-name
3.
exit
DETAILED STEPS
Troubleshooting Tips
The commands in the "Verifying the Table Map and the Policy Maps" section allow you to verify that you achieved the intended configuration and that the feature is functioning correctly. If, after using the show commands listed above, you find that the configuration is not correct or the feature is not functioning as expected, perform these operations:
If the configuration is not the one you intended, complete the following procedures:
•
Use the show running config command and analyze the output of the command.
•
If the policy map does not appear in the output of the show running config command, enable the logging console command.
•
Attach the policy map to the interface again.
If the packets are not being matched correctly (for example, the packet counters are not incrementing correctly), complete the following procedures:
•
Use the show policy-map command, and analyze the output of the command.
•
Use the show running config command, and analyze the output of the command.
•
Use the show policy-map interface command, and analyze the output of the command. Check the the following findings:
–
If a policy map applies queueing, and the packets are matching the correct class, but you see unexpected results, compare the number of the packets in the queue with the number of the packets matched.
–
Because CEF is required for this feature (see the "Prerequisites for Enhanced Packet Marking" section), verify that CEF is enabled.
–
If the interface is congested, and only a small number of the packets are being matched, check the tuning of the tx ring, and evaluate whether the queueing is happening on the tx ring. To do this, use the show controllers command, and look at the value of the tx count in the output of the command.
Configuration Examples for Enhanced Packet Marking
This section provides the following configuration examples:
•
Configuring Enhanced Packet Marking (CoS Values) Example
•
Configuring Enhanced Packet Marking (MPLS EXP Values) Example
•
Verifying the Table Map Configuration Example
Configuring Enhanced Packet Marking (CoS Values) Example
This section contains an example of the Enhanced Packet Marking feature configured to map CoS values.
In the example, the table-map (value mapping) command has been used to create and configure a table map called "table-map1". This table map will be used to establish a "to-from" relationship between one packet-marking value and another.
In "table-map1", a packet-marking value of 0 will be mapped to a value of 1. A packet-marking value of 2 will be mapped to a packet-marking value of 3. All other packet-marking values will, by default, be mapped to a packet-marking value of 4.
Router(config)# table-map table-map1Router(config-tablemap)# map from 0 to 1
Router(config-tablemap)# map from 2 to 3
Router(config-tablemap)# default 4
Router(config-tablemap)# exit
A policy map called "policy1" has been created and configured to use "table-map1" for setting the precedence value. In this example, the CoS value will be set according to the DSCP value defined in "table-map1".
Router(config)# policy map policy1
Router(config-pmap)# class class-default
Router(config-pmap-c)# set cos dscp table table-map1
Router(config-pmap-c)# exit
Note
As an alternative to configuring the set cos dscp table table-map1 command shown in the example, you could configure the command without specifying the table keyword and the applicable table-map-name argument (that is, you could configure the set cos dscp command). When the command is configured without the table keyword and applicable table map name, the values are copied from the specified categories. In this case, the DSCP value is copied and used to set the CoS value.
Note, however, that when the DSCP value is copied and used for the CoS value only the first three bits (that is, the class selector bits) of the DSCP value will be used to set the CoS value. For example, if the DSCP value is EF (101110), the first 3 bits of this DSCP value will be used to set the COS value, resulting in a CoS value of 5 (101).
For more information about the various set commands available for use with this feature, see the "Command Reference" section.The next process in the configuration is attaching the policy map to the output interface on the ingress router. In this example, "policy1" is attached to a FastEthernet 1/0 interface.
Router(config)# interface FastEthernet1/0
Router(config-if)# service-policy output policy1Router(config-if)# exit
Configuring Enhanced Packet Marking (MPLS EXP Values) Example
This section contains an example of the Enhanced Packet Marking feature configured to map MPLS experimental (EXP) values. Figure 1 illustrates the network topology for this configuration example.
Figure 1 Network Topology for the Enhanced Packet Marking (MPLS EXP Value) Example
For this configuration example, an IP packet arrives at the input interface (an Ethernet 1/0 interface) of the ingress label edge router (LER). The precedence value is copied and used as the MPLS EXP value of the packet when the MPLS label is imposed. This label imposition takes place at the ingress LER.
The packet leaves the ingress LER through the output interface (an Ethernet 2/0 interface), traverses through the network backbone into the MPLS cloud, and enters the egress LER.
At the input interface of the egress LER (an Ethernet 3/0 interface), the MPLS EXP value is copied and used as the QoS group value. At the output interface of the egress LER (an Ethernet 4/0 interface), the QoS group value is copied and used as the precedence value.
To accomplish configuration described above, three separate policy maps were required—policy1, policy2, and policy3. Each policy map is configured to convert and propagate different packet-marking values.
The first policy map, "policy1", is configured to copy the precedence value of the packet and use it as the MPLS EXP value during label imposition.
Router(config)# policy map policy1
Router(config-pmap)# class class-default
Router(config-pmap-c)# set mpls experimental imposition precedence
Router(config-pmap-c)# exit
Policy map "policy1" must now be attached to the input interface on the ingress LER, as shown below. In this example, "policy1" is attached to an Ethernet 1/0 interface.
Router(config)# interface Ethernet1/0
Router(config-if)# service-policy input policy1Router(config-if)# exit
When the packet leaves the LER through the output interface (the Ethernet 2/0 interface), the MPLS EXP value is copied from the precedence value during MPLS label imposition. Copying the MPLS EXP value from the precedence value ensures that the MPLS EXP value reflects the appropriate QoS treatment. The packet now proceeds through the MPLS cloud into the egress LER.
A second policy map called "policy2" has been configured to copy the MPLS EXP value in the incoming MPLS packet to the QoS group value. The QoS group value is used for internal purposes only. The QoS group value can be used with output queueing on the output interface of the egress router. The QoS group value can also be copied and used as the precedence value, as packets leave the egress LER through the output interface (the Ethernet 4/0 interface).
Router(config)# policy map policy2
Router(config-pmap)# class class-default
Router(config-pmap-c)# set qos-group mpls experimental topmost
Router(config-pmap-c)# exit
Policy map "policy2" must now be attached to the input interface on the ingress LER. In this example, "policy2" is attached to the Ethernet 3/0 interface.
Router(config)# interface Ethernet3/0
Router(config-if)# service-policy input policy2Router(config-if)# exit
A third policy map called "policy3" has been configured to copy the internal QoS group value (previously based on the MPLS EXP value) to the precedence value. The QoS group value will be copied to the precedence value as the packet leaves the egress LER through the output interface.
Router(config)# policy map policy3
Router(config-pmap)# class class-default
Router(config-pmap-c)# set precedence qos-group
Router(config-pmap-c)# exit
Policy map "policy3" must now be attached to the output interface on the egress LER. In this example, "policy3" is attached to the Ethernet 4/0 interface.
Router(config)# interface Ethernet4/0Router(config-if)# service-policy output policy3Router(config-if)# exitConfiguring these policy maps as shown (and attaching them to the correct interfaces), causes the appropriate quality of service treatment to be preserved for the packet as the packet progresses along an IP network, through an MPLS cloud, and back again into an IP network.
Note
This configuration could also have been accomplished by first creating a table map (used to map one value to another) and then specifying the table keyword and table-map-name argument in each of the set commands (for example, set precedence qos-group table tablemap1). For an example of a configuration in which a table map was created first, see the "Configuring Enhanced Packet Marking (CoS Values) Example" section.
In the MPLS configuration example, a table map was not created, and the set commands were configured without specifying the table keyword and table-map-name argument (for example, set precedence qos-group).
When the set commands are configured without specifying the table keyword and table-map-name argument, the values are copied from the specified categories. In this case, the QoS group value was copied and used to set the precedence value.
Note, however, that when the DSCP value is copied and used for the MPLS EXP value, only the first three bits (that is, the class selector bits) of the DSCP value will be used to set the MPLS value.
For more information about the various set commands available for use with this feature, see the "Command Reference" section.
Verifying the Table Map Configuration Example
To verify a table map configuration, you can use the show table-map command, the show policy-map command, and the show policy-map interface command.
The show table-map command displays the contents of one or more table maps. The show policy-map command and the show policy-map interface command display the contents and configurations of policy maps. The output of these two commands can be used to verify that the table map has been configured in the policy map and that the policy map is attached to the appropriate interface.
The following sample output of the show table-map command displays the contents of a table map called "map1". In this table map, a packet-marking value of 0 is mapped to a packet-marking value of 1. All other packet-marking values are mapped to the default value 3.
Router# show table-map map1Table Map map1from 0 to 1default 3The following sample output of the show policy-map command displays the configuration for service polices called "policy1" and "policy2". In "policy1", a table map called "table-map1" has been configured to determine the precedence based on the CoS value. In "policy2", a table map called "table-map2" has been configured to determine the CoS value based on the precedence value.
Router# show policy-map policy1Policy Map policy1Class class-defaultset precedence cos table table-map1Router# show policy-map policy2Policy Map policy2Class class-defaultset cos precedence table table-map2The following sample output of the show policy-map interface command shows the service policies attached to a FastEthernet subinterface. In this example, a service policy called "policy1" has been attached. In "policy1", a table map called "table-map1" has been configured. The values in "table-map1" will be used to map the precedence values according to the values defined in the table map.
Router# show policy-map interfaceFastEthernet1/0.1Service-policy input: policy1Class-map: class-default (match-any)0 packets, 0 bytes5 minute offered rate 0 bps, drop rate 0 bpsMatch: anyQoS Setprecedence cos table table-map1Packets marked 0Additional References
The following sections provide additional references related to Enhanced Packet Marking:
•
MIBs
•
RFCs
Related Documents
Standards
Standards TitleNo new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.
—
MIBs
To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL:
http://tools.cisco.com/ITDIT/MIBS/servlet/index
If Cisco MIB Locator does not support the MIB information that you need, you can also obtain a list of supported MIBs and download MIBs from the Cisco MIBs page at the following URL:
http://www.cisco.com/public/sw-center/netmgmt/cmtk/mibs.shtml
To access Cisco MIB Locator, you must have an account on Cisco.com. If you have forgotten or lost your account information, send a blank e-mail to cco-locksmith@cisco.com. An automatic check will verify that your e-mail address is registered with Cisco.com. If the check is successful, account details with a new random password will be e-mailed to you. Qualified users can establish an account on Cisco.com by following the directions found at this URL:
RFCs
RFCs1 TitleRFC 2475
An Architecture for Differentiated Services
RFC 2598
An Expedited Forwarding PHB
RFC 2597
Assured Forwarding PHB Group
RFC 2474
Definition of the Differentiated Services Field (DS Field) in the IPv4 and IPv6 Headers
RFC 3270
Multi-Protocol Label Switching (MPLS) Support of Differentiated Services
1 Not all supported RFCs are listed.
Technical Assistance
Command Reference
This section documents new and modified commands. All other commands used with this feature are documented in the Cisco IOS Release 12.2 command reference publications.
New Commands
•
set mpls experimental imposition
•
set mpls experimental topmost
Modified Commands
Obsolete and Replaced Commands
Table 2 lists those commands that have been replaced in Cisco IOS Release 12.2(13)T:
Table 2 Replaced IOS Commands
Command in Cisco IOS Release 12.2 Replacement Command in Cisco IOS Release 12.2(13)Tset ip dscp
set dscp
set ip precedence
set precedence
set cos
To set the Layer 2 class of service (CoS) value of an outgoing packet, use the set cos command in policy-map class configuration mode. To remove a specific CoS value setting, use the no form of this command.
set cos {cos-value | from-field [table table-map-name]}
no set cos {cos-value | from-field [table table-map-name]}
Syntax Description
Defaults
Disabled
Command Modes
Policy-map class configuration
Command History
Usage Guidelines
CoS packet marking is supported only in the Cisco Express Forwarding (CEF)-switching path.
The set cos command should be used by a router if a user wants to mark a packet that is being sent to a switch. Switches can leverage Layer 2 header information, including a CoS value marking.
The set cos command can be used only in service policies that are attached in the output direction of an interface. Packets entering an interface cannot be set with a CoS value.
The match cos and set cos commands can be used together to allow routers and switches to interoperate and provide QoS based on the CoS markings.
Layer 2 to Layer 3 mapping can be configured by matching on the CoS value because switches already can match and set CoS values. If a packet that needs to be marked to differentiate user-defined QoS services is leaving a router and entering a switch, the router should set the CoS value of the packet because the switch can process the Layer 2 header.
Using This Command with the Enhanced Packet Marking Feature
If you are using this command as part of the Enhanced Packet Marking feature, you can use this command to specify the "from-field" packet-marking category to be used for mapping and setting the CoS value. The "from-field" packet-marking categories are as follows:
•
Precedence
•
Differentiated services code point (DSCP)
If you specify a "from-field" category but do not specify the table keyword and the applicable table-map-name argument, the default action will be to copy the value associated with the "from-field" category as the CoS value. For instance, if you configure the set cos precedence command, the precedence value will be copied and used as the CoS value.
You can do the same for the DSCP marking category. That is, you can configure the set cos dscp command, and the DSCP value will be copied and used as the CoS value.
Note
If you configure the set cos dscp command, only the first three bits (the class selector bits) of the DSCP field are used.
Examples
In the following example, the policy map called "policy-cos" is created to use the values defined in a table map called "table-map1". The table map called "table-map1" was created earlier with the table-map (value mapping) command. For more information about the table-map (value mapping) command, see the table-map (value mapping) command page.
In this example, the setting of the CoS value is based on the precedence value defined in "table-map1".
Router(config)# policy-map policy-cos Router(config-pmap)# class class-default Router(config-pmap-c)# set cos precedence table table-map1 Router(config-pmap-c)# exitThe set cos command is applied when you create a service policy in QoS policy-map configuration mode. This service policy is not yet attached to an interface. For information on attaching a service policy to an interface, refer to the "Modular Quality of Service Command-Line Interface" section of the Cisco IOS Quality of Service Solutions Configuration Guide, Release 12.2.
Related Commands
set dscp
To mark a packet by setting the differentiated services code point (DSCP) value in the type of service (ToS) byte, use the set dscp command in policy-map class configuration mode. To remove a previously set DSCP value, use the no form of this command.
set dscp {dscp-value | from-field [table table-map-name]}
no set dscp {dscp-value | from-field [table table-map-name]
Syntax Description
Defaults
No default behavior or values
Command Modes
Policy-map class configuration
Command History
Release Modification12.2(13)T
This command was introduced. This command replaces the set ip dscp command.
Usage Guidelines
Once the DSCP bit is set, other quality of service (QoS) features can then operate on the bit settings.
The set dscp command cannot be used with the set precedence command to mark the same packet. The two values, DSCP and precedence, are mutually exclusive. A packet can have one value or the other, but not both.
The network gives priority (or some type of expedited handling) to marked traffic. Typically, you set the precedence value at the edge of the network (or administrative domain); data then is queued according to the precedence. Weighted fair queueing (WFQ) can speed up handling for high-precedence traffic at congestion points. Weighted Random Early Detection (WRED) ensures that high-precedence traffic has lower loss rates than other traffic during times of congestion.
The value of the dscp-value argument can be specified by the reserved keywords EF, AF11, and AF12 instead of numeric values.
Using This Command with the Enhanced Packet Marking Feature
If you are using this command as part of the Enhanced Packet Marking feature, you can use this command to specify the "from-field" packet-marking category to be used for mapping and setting the DSCP value. The "from-field" packet-marking categories are as follows:
•
Class of service (CoS)
•
QoS group
If you specify a "from-field" category but do not specify the table keyword and the applicable table-map-name argument, the default action will be to copy the value associated with the "from-field" category as the DSCP value. For instance, if you configure the set dscp cos command, the CoS value will be copied and used as the DSCP value.
Note
The CoS field is a three-bit field, and the DSCP field is a six-bit field. If you configure the set dscp cos command, only the three bits of the CoS field will be used.
If you configure the set dscp qos-group command, the QoS group value will be copied and used as the DSCP value.
The valid value range for the DSCP is a number from 0 to 63. The valid value range for the QoS group is a number from 0 to 99. Therefore, when configuring the set dscp qos-group command, note the following points:
•
If a QoS group value falls within both value ranges (for example, 44), the packet-marking value will be copied and the packets will be marked.
•
If QoS group value exceeds the DSCP range (for example, 77), the packet-marking value will not be copied and the packet will not be marked. No action is taken.
Examples
In the following example, the policy map called "policy1" is created to use the packet-marking values defined in a table map called "table-map1". The table map was created earlier with the table-map (value mapping) command. For more information about the table-map (value mapping) command, see the table-map (value mapping) command page.
In this example, the DSCP value will be set according to the CoS value defined in the table map called "table-map1".
Router(config)# policy-map policy1 Router(config-pmap)# class class-default Router(config-pmap-c)# set dscp cos table table-map1Router(config-pmap-c)# exitThe set dscp command is applied when you create a service policy in QoS policy-map configuration mode. This service policy is not yet attached to an interface. For information on attaching a service policy to an interface, refer to the "Modular Quality of Service Command-Line Interface" section of the Cisco IOS Quality of Service Solutions Configuration Guide, Release 12.2.
Related Commands
set mpls experimental imposition
To set the value of the Multiprotocol Label Switching (MPLS) experimental (EXP) field on all imposed label entries, use the set mpls experimental command in policy-map class configuration mode. To disable the setting, use the no form of this command.
set mpls experimental imposition {mpls-exp-value | from-field [table table-map-name]}
no set mpls experimental imposition {mpls-exp-value | from-field [table table-map-name]}
Syntax Description
Defaults
No default behavior or values
Command Modes
Policy-map class configuration
Command History
Usage Guidelines
The set mpls experimental imposition command is supported only on input interfaces. Use this command during label imposition. This command sets the MPLS EXP field on all imposed label entries.
Using This Command with the Enhanced Packet Marking Feature
If you are using this command as part of the Enhanced Packet Marking feature, you can use this command to specify the "from-field" packet-marking category to be used for mapping and setting the class of service (CoS) value. The "from-field" packet-marking categories are as follows:
•
Precedence
•
Differentiated services code point (DSCP)
If you specify a "from-field" category but do not specify the table keyword and the applicable table-map-name argument, the default action will be to copy the value associated with the "from-field" category as the MPLS EXP imposition value. For instance, if you configure the set mpls experimental imposition precedence command, the precedence value will be copied and used as the MPLS EXP imposition value.
You can configure the set mpls experimental imposition dscp command, and the DSCP value will be copied and used as the MPLS EXP imposition value.
Note
If you configure the set mpls experimental imposition dscp command, only the first three bits (the class selector bits) of the DSCP field are used.
Examples
In the following example, the MPLS EXP value is set to 3 on all imposed label entries:
Router(config-pmap)# set mpls experimental imposition 3
In the following example, the policy map called "policy1" is created to use the packet-marking values defined in a table map called "table-map1". The table map was created earlier with the table-map (value mapping) command. For more information about the table-map (value mapping) command, see the table-map (value mapping) command page.
In this example, the MPLS EXP imposition value will be set according to the DSCP value defined in "table-map1".
Router(config)# policy-map policy1 Router(config-pmap)# class class-default Router(config-pmap-c)# set mpls experimental imposition dscp table table-map1Router(config-pmap-c)# exitRelated Commands
set mpls experimental topmost
To set the Multiprotocol Label Switching (MPLS) experimental (EXP) field value in the topmost label on either an input or an output interface, use the set mpls experimental topmost command in policy-map class configuration mode. To disable the setting, use the no form of this command.
set mpls experimental topmost {mpls-exp-value | from-field [table table-map-name]}
no set mpls experimental topmost {mpls-exp-value | from-field [table table-map-name]}
Syntax Description
Defaults
No default behavior or values
Command Modes
Policy-map class configuration
Command History
Usage Guidelines
This command sets the MPLS EXP value only in the topmost label. This command does not affect an IP packet.
Using This Command with the Enhanced Packet Marking Feature
If you are using this command as part of the Enhanced Packet Marking feature, you can use this command to specify the "from-field" packet-marking category to be used for mapping and setting the differentiated services code point (DSCP) value. The "from-field" packet-marking categories are as follows:
•
QoS group
If you specify a "from-field" category but do not specify the table keyword and the applicable table-map-name argument, the default action will be to copy the value associated with the "from-field" category as the MPLS EXP topmost value. For instance, if you configure the set mpls experimental topmost qos-group command, the QoS group value will be copied and used as the MPLS EXP topmost value.
The valid value range for the MPLS EXP topmost value is a number from 0 to 7. The valid value range for the QoS group is a number from 0 to 99. Therefore, when configuring the set mpls exp topmost qos-group command, note the following points:
•
If a QoS group value falls within both value ranges (for example, 6), the packet-marking value will be copied and the packets will be marked.
•
If QoS group value exceeds the MPLS EXP topmost range (for example, 10), the packet-marking value will not copied and the packet will not be marked. No action is taken.
Examples
In the following example the MPLS EXP value is set to 3 in the topmost label of an input or output interface:
Router(config-pmap)# set mpls experimental topmost 3In the following example, the policy map called "policy1" is created to use the packet-marking values defined in a table map called "table-map1". The table map was created earlier with the table-map (value mapping) command. For more information about the table-map (value mapping) command, see the table-map (value mapping) command page.
In this example, the MPLS EXP value will be set according to the QoS group value defined in "table-map1".
Router(config)# policy-map policy1 Router(config-pmap)# class class-default Router(config-pmap-c)# set mpls experimental topmost qos-group table table-map1Router(config-pmap-c)# exitRelated Commands
set precedence
To set the precedence value in the packet header, use the set precedence command in policy-map class configuration mode. To remove the precedence value, use the no form of this command.
set precedence {precedence-value | from-field [table table-map-name]}
no set precedence {precedence-value | from-field [table table-map-name]}
Syntax Description
Defaults
Disabled
Command Modes
Policy-map class configuration
Command History
Release Modification12.2(13)T
This command was introduced. This command replaces the set ip precedence command.
Usage Guidelines
Once the precedence bits are set, other quality of service (QoS) features such as weighted fair queueing (WFQ) and Weighted Random Early Detection (WRED) then operate on the bit settings.
The network gives priority (or some type of expedited handling) to marked traffic through the application of WFQ or WRED at points downstream in the network. Typically, you set the precedence value at the edge of the network (or administrative domain); data then is queued according to the specified precedence. WFQ can speed up handling for certain precedence traffic at congestion points. WRED can ensure that certain precedence traffic has lower loss rates than other traffic during times of congestion.
The set precedence command cannot be used with the set dscp command to mark the same packet. The two values, DSCP and precedence, are mutually exclusive. A packet can have one value or the other, but not both.
Using This Command with the Enhanced Packet Marking Feature
If you are using this command as part of the Enhanced Packet Marking feature, you can use this command to specify the "from-field" packet-marking category to be used for mapping and setting the precedence value. The "from-field" packet-marking categories are as follows:
•
Class of service (CoS)
•
QoS group
If you specify a "from-field" category but do not specify the table keyword and the applicable table-map-name argument, the default action will be to copy the value associated with the "from-field" category as the precedence value. For instance, if you configure the set precedence cos command, the CoS value will be copied and used as the precedence value.
You can do the same for the QoS group-marking category. That is, you can configure the set precedence qos-group command, and the QoS group value will be copied and used as the precedence value.
The valid value range for the precedence value is a number from 0 to 7. The valid value range for the QoS group is a number from 0 to 99. Therefore, when configuring the set precedence qos-group command, note the following points:
•
If a QoS group value falls within both value ranges (for example, 6), the packet-marking value will be copied and the packets will be marked.
•
If QoS group value exceeds the precedence range (for example, 10), the packet-marking value will not be copied, and the packet will not be marked. No action is taken.
Examples
In the following example, the policy map called "policy-cos" is created to use the values defined in a table map called "table-map1". The table map called "table-map-1" was created earlier with the table-map (value mapping) command. For more information about the table-map (value mapping) command, see the table-map (value mapping) command page.
In this example, the precedence value will be set according to the CoS value defined in " table-map1".
Router(config)# policy-map policy-cos Router(config-pmap)# class class-default Router(config-pmap-c)# set precedence cos table table-map1Router(config-pmap-c)# exitThe set precedence command is applied when you create a service policy in QoS policy-map configuration mode. This service policy is not yet attached to an interface or to an ATM virtual circuit. For information on attaching a service policy to an interface, refer to the "Modular Quality of Service Command-Line Interface" section of the Cisco IOS Quality of Service Solutions Configuration Guide, Release 12.2.
Related Commands
set qos-group
To set a group ID that can be used later to classify packets, use the set qos-group command in policy-map class configuration mode. To remove the group ID (or value), use the no form of this command.
set qos-group {group-id | from-field [table table-map-name]}
no set qos-group {group-id | from-field [table table-map-name]}
Syntax Description
Defaults
This command is disabled by default. No group ID (or value) is specified.
Command Modes
Policy-map class configuration
Command History
Usage Guidelines
This command allows you to associate a group value with a packet. The group value can be used later to classify packets into quality of service (QoS) groups by prefix, autonomous system, and community string.
To display QoS group information, use the show ip cef command.
Using This Command with the Enhanced Packet Marking Feature
If you are using this command as part of the Enhanced Packet Marking feature, you can use this command to specify the "from-field" packet-marking category to be used for mapping and setting the precedence value. The "from-field" packet-marking categories are as follows:
•
Precedence
•
Differentiated services code point (DSCP)
•
Multiprotocol Label Switching (MPLS) Experimental (EXP) topmost
If you specify a "from-field" category but do not specify the table keyword and the applicable table-map-name argument, the default action will be to copy the value associated with the "from-field" category as the precedence value. For instance, if you configure the set qos-group precedence command, the precedence value will be copied and used as the QoS group value.
Examples
The following example sets the QoS group to 1 for all packets that match the class map called "class1". These packets are then rate-limited on the basis of the QoS group value.
Router(config)# policy-map policy1 Router(config-pmap)# class class1 Router(config-pmap-c)# set qos-group 1The following example sets the QoS group value based on the values defined in a table map called "table-map1." This table map is configured in a policy map called "policy1". Policy map "policy1" converts and propagates the QoS value according to the values defined in "table-map1".
In this example, the QoS group value will be set according to the precedence value defined in "table-map1".
Router(config)# policy map policy1
Router(config-pmap)# class class-default
Router(config-pmap-c)# set qos-group precedence table table-map1
Router(config-pmap-c)# exit
The set qos-group command is applied when you create a service policy in QoS policy-map configuration mode. This service policy is not yet attached to an interface or an ATM virtual circuit. For information on attaching a service policy to an interface, refer to the "Modular Quality of Service Command-Line Interface" section of the Cisco IOS Quality of Service Solutions Configuration Guide, Release 12.2.
Related Commands
show policy-map
To display the configuration of all classes for a specified service policy map or all classes for all existing policy maps, use the show policy-map command in EXEC mode.
show policy-map [policy-map]
Syntax Description
policy-map
(Optional) Name of the service policy map whose complete configuration is to be displayed.
Defaults
All existing policy map configurations are displayed.
Command Modes
EXEC
Command History
Usage Guidelines
The show policy-map command displays the configuration of a service policy map created using the policy-map command. You can use the show policy-map command to display all class configurations that make up any existing service policy map, whether or not that service policy map has been attached to an interface.
Examples
The following sample output of the show policy-map command displays the configuration for policy maps called "policy1" and "policy2".
In "policy1", a table map called "table-map-cos1" has been configured to determine the precedence based on the class of service (CoS) value. Policy map "policy 1" converts and propagates the packet markings defined in the table map called "table-map-cos1".
The following sample output of the show policy-map command displays the configuration for service polices called "policy1" and "policy2". In "policy1", a table map called "table-map1" has been configured to determine the precedence according to the CoS value. In "policy2", a table map called "table-map2" has been configured to determine the CoS value according to the precedence value.
Router# show policy-map policy1Policy Map policy1Class class-defaultset precedence cos table table-map1Router# show policy-map policy2Policy Map policy2Class class-defaultset cos precedence table table-map2Table 3 describes the fields shown in the display.
Related Commands
show policy-map interface
To display the packet statistics of all classes that are configured for all service policies either on the specified interface or subinterface or on a specific permanent virtual circuit (PVC) on the interface, use the show policy-map interface command in EXEC mode.
show policy-map interface interface-name [vc [vpi/] vci][dlci dlci] [input | output]
Syntax Description
Defaults
The absence of both the forward slash (/) and a vpi value causes the vpi value to default to 0. If this value is omitted, information for all virtual circuits (VCs) on the specified ATM interface or subinterface is displayed.
Command Modes
EXEC
Command History
Usage Guidelines
The show policy-map interface command displays the configuration for classes on the specified interface or the specified PVC only if a service policy has been attached to the interface or the PVC.
Examples
The following sample output of the show policy-map interface command shows the service policies attached to a FastEthernet subinterface. In this example, a service policy called "policy1" has been attached. In "policy1", a table map called "table-map1" has been configured. The values in "table-map1" will be used to map the precedence values to the corresponding class of service (CoS) values.
Router# show policy-map interfaceFastEthernet1/0.1Service-policy input: policy1Class-map: class-default (match-any)0 packets, 0 bytes5 minute offered rate 0 bps, drop rate 0 bpsMatch: anyQoS Setprecedence cos table table-map1Packets marked 0Table 4 describes the significant fields shown in the display.
Table 4 show policy-map interface Field Descriptions1
Field DescriptionService-policy input
Name of the input service policy applied to the specified interface or VC.
Class-map
Class of traffic being displayed. Output is displayed for each configured class in the policy. The choice for implementing class matches (for example, match-all or match-any) can also appear next to the traffic class.
packets, bytes
Number of the packets (also shown in bytes) identified as belonging to the class of traffic being displayed.
offered rate
Rate, in kbps, of the packets coming into the class.
Match
Match criteria specified for the class of traffic. Choices include criteria such as Precedence, IP differentiated services code point (DSCP) value, Multiprotocol Label Switching (MPLS) experimental value, access groups, and quality of service (QoS) group (set). For more information about the variety of match criteria options that are available, refer to the "Configuring the Modular Quality of Service Command-Line Interface" section in the Cisco IOS Quality of Service Solutions Configuration Guide, Release 12.2.
QoS Set
Indicates that QoS group (set) has been configured for the particular class.
precedence cos table table-map1
Indicates that a table map (called "table-map1") has been used to determine the precedence value. The precedence value will be set according to the CoS value defined in the table map.
Packets marked
Total number of packets marked for the particular class.
1 A number in parentheses may appear next to the service-policy input name and the class-map name. The number is for Cisco internal use only and can be disregarded.
Related Commands
show table-map
To display the configuration of a specified table map or all table maps, use the show table-map command in EXEC mode.
show table-map table-map-name
Syntax Description
table-map-name
Name of table map used to map one packet-marking value to another. The name can be a maximum of 64 alphanumeric characters.
Defaults
All existing table map configurations are displayed.
Command Modes
EXEC
Command History
Examples
The sample output of the show table-map command shows the contents of a table map called "map 1". In "map1", a "to-from" relationship has been established and a default value has been defined. The fields for establishing the "to-from" mappings are further defined by the policy map in which the table map will be configured. (Configuring a policy map is the next logical step after creating a table map.)
For instance, a precedence or differentiated services code point (DSCP) value of 0 could be mapped to a class of service (CoS) value of 1, or vice versa, depending on the how the values are defined in the table map. Any values not explicitly defined in a "to-from" relationship will be set to a default value.
The following sample output of the show table-map command displays the contents of a table map called "map1". In this table map, a packet-marking value of 0 is mapped to a packet-marking value of 1. All other packet-marking values are mapped to the default value 3.
Router# show table-map map1Table Map map1from 0 to 1default 3Table 5 describes the fields shown in the display.
Related Commands
table-map (value mapping)
To create and configure a mapping table for mapping and converting one packet-marking value to another, use the table-map (value mapping) command in global configuration mode. To disable the use of this table map, use the no form of the command.
table-map table-map-name map from from-value to to-value [default default-value-or-action]
no table-map table-map-name map from from-value to to-value [default default-value-or-action]
Syntax Description
Defaults
The default keyword and default-action-or-value argument sets the default value (or action) to be used if a value if not explicitly designated.
If you configure a table map but you do not specify a default-value-or-action argument for the default keyword, the default action is "copy".
Command Modes
Global configuration
Command History
Usage Guidelines
This command allows you to create a mapping table. The mapping table, a type of conversion chart, is used for establishing a "to-from" relationship between packet-marking types or categories. For example, a mapping table can be used to establish a "to-from" relationship between the following packet-marking categories:
•
Class of service (CoS)
•
Precedence
•
Differentiated services code point (DSCP)
•
Quality of service (QoS) group
•
Multiprotocol Label Switching (MPLS) experimental (EXP) imposition
•
MPLS EXP topmost
When configuring the table map, you must specify the packet-marking values to be used in the conversion. The values you can enter vary by packet-marking category.
Table 6 lists the valid value ranges you can enter for each packet-marking category.
In the following example, the table-map (value mapping) command has been configured to create a table map called "map1". In "map1", two "to-from" relationships have been established and a default value has been defined. The fields for establishing the "to-from" mappings are further defined by the policy map in which the table map will be configured. (Configuring a policy map is the next logical step after creating a table map.)
For instance, a precedence or DSCP value of 0 could be mapped to a CoS value of 0, or vice versa, depending on the how the table map is configured. Any values not explicitly defined in a "to-from" relationship will be set to a default value.
Router(config)# table-map map1Router(config-tablemap)# map from 0 to 0Router(config-tablemap)# map from 2 to 1Router(config-tablemap)# default 3Router(config-tablemap)# endRelated Commands


