Guest

Cisco IOS Software Releases 12.2 T

Enhanced Packet Marking

Table Of Contents

Enhanced Packet Marking

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

Creating a Table Map

Configuring a Policy Map

What To Do Next

Attaching the Policy Map to the Interface

Verifying the Table Map and the Policy Maps

Troubleshooting Tips

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

Additional References

Related Documents

Standards

MIBs

RFCs

Technical Assistance

Command Reference

Obsolete and Replaced Commands

set cos

set dscp

set mpls experimental imposition

set mpls experimental topmost

set precedence

set qos-group

show policy-map

show policy-map interface

show table-map

table-map (value mapping)


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
Modification

12.2(13)T

This feature was introduced.

Supported Platforms

For 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:

http://www.cisco.com/register

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:

http://www.cisco.com/go/fn

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

Additional References

Command Reference

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.

Table 1 Packet-Marking Types for Which a To-From Relationship Can Be Established

The "To" Packet-Marking Type
The "From" Packet-Marking Type

Precedence

CoS

QoS group

DSCP

CoS

QoS group

CoS

Precedence

DSCP

QoS group

Precedence

DSCP

MPLS EXP topmost

MPLS EXP topmost

QoS group

MPLS EXP imposition

Precedence

DSCP


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

 
Command or Action
Purpose

Step 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 

table-map table-map-name map from from-value to to-value [default default-action-or-value]


Example:

Router(config)# table-map table-map1 map from 2 to 1

Creates a table map using the specified name and enters tablemap configuration mode.

Enter the name of the table map you want to create.

This command creates a to-from relationship between specified values.

Enter each value mapping on a separate line. Enter as many separate lines as needed for the values you want to map.

The default keyword and default-action-or-value argument sets the default value (or action) to be used if a value is not explicitly designated.

Step 4 

exit

Example:

Router(config-tablemap)# exit

(Optional) Exits tablemap configuration mode.


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

 
Command or Action
Purpose

Step 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 

policy map policy-map-name


Example:

Router(config)# policy map policy1

Creates a policy map using the specified name and enters policy map configuration mode.

Enter name of policy map you want to create.

Step 4 

class {class-name | class-default}

Example:

Router(config-pmap)# class class-default

Creates the specified class (or the default class) and enters policy-map class configuration mode.

Step 5 

set precedence cos table table-map-name

Example:

Router(config-pmap-c)# set precedence cos table table-map1


Sets the precedence value based on the CoS value (or action) defined in the table map created earlier.

 

or

or

 

set dscp cos table table-map-name

Example:

Router(config-pmap-c)# set dscp cos table table-map1


Sets the DSCP value based on the CoS value (or action) defined in the table map created earlier.

 

or

or

 

set cos precedence table table-map-name

Example:

Router(config-pmap-c)# set cos precedence table table-map-cos


Sets the CoS value based on the precedence value (or action) defined in the table map created earlier.

 

or

or

 

set cos dscp table table-map-name

Example:

Router(config-pmap-c)# set cos dscp table table-map-dscp


Sets the CoS value based on the DSCP value (or action) defined in the table map created earlier.

 

or

or

 

set qos-group precedence table table-map-name

Example:

Router(config-pmap-c)# set qos-group precedence table table-map1


Sets the QoS group value based on the precedence value (or action) defined in the table map created earlier.

 

or

or

 

set qos-group dscp table table-map-name

Example:

Router(config-pmap-c)# set qos-group dscp table table-map1


Sets the QoS group value based on the DSCP value (or action) as defined in the table map created earlier.

 

or

or

 

set mpls experimental topmost qos-group table table-map-name

Example:

Router(config-pmap-c)# set mpls experimental topmost qos-group table table-map1


Sets the MPLS EXP value based on the QoS group value (or action) as defined in the table map created earlier.

 

or

or

 

set mpls experimental imposition precedence table table-map-name

Example:

Router(config-pmap-c)# set mpls experimental imposition precedence table table-map1

Sets the MPLS EXP value (during MPLS label imposition) based on the precedence value (or action) as defined in the table map created earlier.

 

or

or

 

set mpls experimental imposition dscp table table-map-name

Example:

Router(config-pmap-c)# set mpls experimental imposition dscp table table-map1

Sets the MPLS EXP value based on the DSCP value (or action) as defined in the table map created earlier.

 

or

 
 

set qos-group mpls exp topmost table table-map-name

Example:

Router(config-pmap-c)# set qos-group mpls exp topmost table table-map1

Sets the QoS group value based on the MPLS EXP value defined in the table map.

 

or

or

 

set precedence qos-group table table-map-name

Example:

Router(config-pmap-c)# set precedence qos-group table table-map1

Sets the precedence value based on the QoS group value defined in the table map created earlier.

 

or

or

 

set dscp qos-group table table-map-name

Example:

Router(config-pmap-c)# set dscp qos-group table table-map1

Sets the DSCP value based on the QoS group value defined in the table map created earlier.

Step 6 

exit

Example:

Router(config-pmap-c)# exit

(Optional) Exits policy-map class configuration mode.


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
Purpose

Step 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

 
Command or Action
Purpose

Step 1 

enable

Example:

Router> enable

Enables higher privilege levels, such as privileged EXEC mode.

Enter your password if prompted.

Step 2 

show table-map [table-map-name]

Example:

Router# show table-map map1

Displays the configuration of a specified table map or all table maps.

 

or

or

 

show policy-map

Example:

Router# show policy-map policy1

Displays all configured policy maps.

 

or

or

 

show policy-map interface interface-name

Example:

Router# show policy-map interface s4/0


Displays 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.

Enter the interface name.

Step 3 

exit

Example:

Router# exit

(Optional) Exits EXEC mode.


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-map1

Router(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 policy1

Router(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 policy1

Router(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 policy2

Router(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/0
Router(config-if)# service-policy output policy3
Router(config-if)# exit

Configuring 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 map1

 Table Map map1
 from 0 to 1
 default 3

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 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 policy1

  Policy Map policy1
    Class class-default
      set precedence cos table table-map1

Router# show policy-map policy2

   Policy Map policy2
    Class class-default
      set cos precedence table table-map2

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 according to the values defined in the table map.

Router# show policy-map interface

 FastEthernet1/0.1 

  Service-policy input: policy1

    Class-map: class-default (match-any)
      0 packets, 0 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: any 
      QoS Set
        precedence cos table table-map1
          Packets marked 0

Additional References

The following sections provide additional references related to Enhanced Packet Marking:

Related Documents

Standards

MIBs

RFCs

Technical Assistance

Related Documents

Related Topic
Document Title

QoS commands: complete command syntax, command modes, command history, defaults, usage guidelines, and examples

Cisco IOS Quality of Service Solutions Command Reference, Release 12.2

Modular QoS CLI (MQC)

"Modular Quality of Service Command-Line Interface" section of the Cisco IOS Quality of Service Solutions Configuration Guide, Release 12.2

Additional match criteria that can be used for packet classification

"Configuring the Modular Quality of Service Command-Line Interface" section of the Cisco IOS Quality of Service Solutions Configuration Guide, Release 12.2

Class-based marking

Class-Based Marking, Cisco IOS Release 12.2(2)T feature module

Instructions for configuring CEF

Cisco IOS Switching Services Configuration Guide, Release 12.2

CEF-related commands: complete command syntax, command modes, command history, defaults, usage guidelines, and examples

Cisco IOS Switching Services Command Reference, Release 12.2

MPLS commands: complete command syntax, command modes, command history, defaults, usage guidelines, and examples

Cisco IOS Switching Services Command Reference, Release 12.2

MPLS tunneling modes

MPLS DiffServ Tunneling Modes, Cisco IOS Release 12.2(13)T feature module


Standards

Standards
Title

No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.


MIBs

MIBs
MIBs Link

No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.

To obtain lists of supported MIBs by platform and Cisco IOS release, and to download MIB modules, go to the Cisco MIB website on Cisco.com at the following URL:

http://www.cisco.com/public/sw-center/netmgmt/cmtk/mibs.shtml


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:

http://www.cisco.com/register

RFCs

RFCs1
Title

RFC 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

Description
Link

Technical Assistance Center (TAC) home page, containing 30,000 pages of searchable technical content, including links to products, technologies, solutions, technical tips, and tools. Registered Cisco.com users can log in from this page to access even more content.

http://www.cisco.com/public/support/tac/home.shtml


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 dscp

set mpls experimental imposition

set mpls experimental topmost

set precedence

show table-map

table-map (value mapping)

Modified Commands

set cos

set qos-group

show policy-map

show policy-map interface

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)T

set 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

cos-value

Specific IEEE 802.1Q CoS value from 0 to 7.

from-field

Specific packet-marking category to be used to set the CoS value of the packet. If you are using a table map for mapping and converting packet-marking values, this establishes the "map from" packet-marking category. packet-marking category keywords are as follows:

precedence

dscp

table

(Optional) Used in conjunction with the from-field argument. Indicates that the values set in a specified table map will be used to set the CoS value.

table-map-name

(Optional) Used in conjunction with the table keyword. Name of the table map used to specify the CoS value. The table map name can be a maximum of 64 alphanumeric characters.


Defaults

Disabled

Command Modes

Policy-map class configuration

Command History

Release
Modification

12.1(5)T

This command was introduced.

12.2(13)T

This command was modified for the Enhanced Packet Marking feature. A mapping table (table map) can now be used to convert and propagate packet-marking values.


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)# exit 

The 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

Command
Description

match cos

Matches a packet on the basis of Layer 2 CoS marking.

policy-map

Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.

service-policy

Attaches a policy map to an input interface or VC, or an output interface or VC, to be used as the service policy for that interface or VC.

set dscp

Marks a packet by setting the Layer 3 DSCP value in the ToS byte.

set precedence

Sets the precedence value in the packet header.

show policy-map

Displays the configuration of all classes for a specified service policy map or all classes for all existing policy maps.

show policy-map class

Displays the configuration for the specified class of the specified policy map.

show policy-map interface

Displays the configuration of all classes configured for all service policies on the specified interface or displays the classes for the service policy for a specific PVC on the interface.


show table-map

Displays the configuration of a specified table map or all table maps.

table-map (value mapping)

Creates and configures a mapping table for mapping and converting one packet-marking value to another.


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

dscp-value

A number from 0 to 63 that sets the DSCP value. The following reserved keywords can be specified instead of numeric values:

EF (expedited forwarding)

AF11 (assured forwarding class AF11)

AF12 (assured forwarding class AF12)

from-field

Specific packet-marking category to be used to set the DSCP value of the packet. If you are using a table map for mapping and converting packet-marking values, this establishes the "map from" packet-marking category. Packet-marking category keywords are as follows:

cos

qos-group

table

(Optional) Used in conjunction with the from-field argument. Indicates that the values set in a specified table map will be used to set the DSCP value.

table-map-name

(Optional) Used in conjunction with the table keyword. Name of the table map used to specify the DSCP value. The name can be a maximum of 64 alphanumeric characters.


Defaults

No default behavior or values

Command Modes

Policy-map class configuration

Command History

Release
Modification

12.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-map1
Router(config-pmap-c)# exit

The 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

Command
Description

policy-map

Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.

service-policy

Attaches a policy map to an input interface or VC, or an output interface or VC, to be used as the service policy for that interface or VC.

set cos

Sets the Layer 2 CoS value of an outgoing packet.

set precedence

Sets the precedence value in the packet header.

show policy-map

Displays the configuration of all classes for a specified service policy map or all classes for all existing policy maps.

show policy-map class

Displays the configuration for the specified class of the specified policy map.

show policy-map interface

Displays the configuration of all classes configured for all service policies on the specified interface or displays the classes for the service policy for a specific PVC on the interface.

show table-map

Displays the configuration of a specified table map or all table maps.

table-map (value mapping)

Creates and configures a mapping table for mapping and converting one packet-marking value to another.


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

mpls-exp-value

Specifies the value used to set MPLS EXP bits defined by the policy map. Valid values are numbers from 0 to 7.

from-field

Specific packet-marking category to be used to set the MPLS EXP imposition value. If you are using a table map for mapping and converting packet-marking values, this establishes the "map from" packet-marking category. Packet-marking category keywords are as follows:

precedence

dscp

table

(Optional) Used in conjunction with the from-field argument. Indicates that the values set in a specified table map will be used to set the MPLS EXP imposition value.

table-map-name

(Optional) Used in conjunction with the table keyword. Name of the table map used to specify the MPLS EXP imposition value. The name can be a maximum of 64 alphanumeric characters.


Defaults

No default behavior or values

Command Modes

Policy-map class configuration

Command History

Release
Modification

12.2(13)T

This command replaces (renames) the set mpls experimental command, introduced in 12.1(5)T. The set mpls experimental imposition command was modified for the Enhanced Packet Marking feature. A mapping table (table map) can now be used to convert and propagate packet-marking values.


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-map1
Router(config-pmap-c)# exit

Related Commands

Command
Description

set dscp

Marks a packet by setting the Layer 3 DSCP value in the ToS byte.

set mpls experimental topmost

Sets the MPLS EXP field value in the topmost label on either an input or an output interface.

set precedence

Sets the precedence value in the packet header.

show table-map

Displays the configuration of a specified table map or all table maps.

table-map (value mapping)

Creates and configures a mapping table for mapping and converting one packet-marking value to another.


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

mpls-exp-value

Specifies the value used to set MPLS experimental bits defined by the policy map. Valid values are numbers from 0 to 7.

from-field

Specific packet-marking category to be used to set the MPLS EXP imposition value. If you are using a table map for mapping and converting packet-marking values, this establishes the "map from" packet-marking category. Packet-marking category keywords are as follows:

qos-group

table

(Optional) Used in conjunction with the from-field argument. Indicates that the values set in a specified table map will be used to set the MPLS EXP value.

table-map-name

(Optional) Used in conjunction with the table keyword. Name of the table map used to specify the MPLS EXP value. The name can be a maximum of 64 alphanumeric characters.


Defaults

No default behavior or values

Command Modes

Policy-map class configuration

Command History

Release
Modification

12.2(13)T

This command was introduced.


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 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 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-map1
Router(config-pmap-c)# exit

Related Commands

Command
Description

match mpls experimental topmost

Matches the MPLS EXP field value in the topmost label.

set mpls experimental imposition

Sets the value of the MPLS EXP field on all imposed label entries.

set qos-group

Sets a group ID that can be used later to classify packets.

show table-map

Displays the configuration of a specified table map or all table maps.

table-map (value mapping)

Creates and configures a mapping table for mapping and converting one packet-marking value to another.


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

precedence-value

A number from 0 to 7 that sets the precedence bit in the packet header.

from-field

Specific packet-marking category to be used to set the precedence value of the packet. If you are using a table map for mapping and converting packet-marking values, this establishes the "map from" packet-marking category. Packet-marking category keywords are as follows:

cos

qos-group

table

(Optional) Used in conjunction with the from-field argument. Indicates that the values set in a specified table map will be used to set the precedence value.

table-map-name

(Optional) Used in conjunction with the table keyword. Name of the table map used to specify a precedence value based on the class of service (CoS) value. The name can be a maximum of 64 alphanumeric characters.


Defaults

Disabled

Command Modes

Policy-map class configuration

Command History

Release
Modification

12.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-map1
Router(config-pmap-c)# exit

The 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

Command
Description

policy-map

Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.

service-policy

Attaches a policy map to an input interface or VC, or an output interface or VC, to be used as the service policy for that interface or VC.

set cos

Sets the Layer 2 CoS value of an outgoing packet.

set dscp

Marks a packet by setting the Layer 3 DSCP value in the ToS byte.

set qos-group

Sets a group ID that can be used later to classify packets.

show policy-map

Displays the configuration of all classes for a specified service policy map or all classes for all existing policy maps.

show policy-map interface

Displays the configuration for all classes configured for all service policies on the specified interface or displays the classes for the service policy for a specific PVC on the interface.

show table-map

Displays the configuration of a specified table map or all table maps.

table-map (value mapping)

Creates and configures a mapping table for mapping and converting one packet-marking value to another.


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

group-id

Group ID number in the range from 0 to 99.

from-field

Specific packet-marking category to be used to set the QoS group value of the packet. If you are using a table map for mapping and converting packet-marking values, this establishes the "map from" packet-marking category. Packet-marking category keywords are as follows:

precedence

dscp

mpls exp topmost

table

(Optional) Used in conjunction with the from-field argument. Indicates that the values set in a specified table map will be used to set the QoS group value.

table-map-name

(Optional) Used in conjunction with the table keyword. Name of the table map used to specify the QoS group value.


Defaults

This command is disabled by default. No group ID (or value) is specified.

Command Modes

Policy-map class configuration

Command History

Release
Modification

11.1 CC

This command was introduced.

12.0(5)XE

This command was integrated into Cisco IOS Release 12.0(5)XE. This command was included in the Modular Quality of Service Command-Line Interface (MQC) feature.

12.2(13)T

This command was modified for the Enhanced Packet Marking feature. A mapping table (table map) can now be used to convert and propagate packet-marking values.


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 1

The 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

Command
Description

policy-map

Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.

service-policy

Attaches a policy map to an input interface or VC, or an output interface or VC, to be used as the service policy for that interface or VC.

set dscp

Marks a packet by setting the Layer 3 DSCP value in the ToS byte.

set mpls experimental topmost

Sets the MPLS EXP field value in the topmost label on either an input or an output interface.

set precedence

Sets the precedence value in the packet header.

show policy-map

Displays the configuration of all classes for a specified service policy map or all classes for all existing policy maps.

show policy-map interface

Displays the configuration of all classes configured for all service policies on the specified interface or displays the classes for the service policy for a specific PVC on the interface.

show table-map

Displays the configuration of a specified table map or all table maps.

table-map (value mapping)

Creates and configures a mapping table for mapping and converting one packet-marking value to another.


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

Release
Modification

12.0(5)T

This command was introduced.

12.0(5)XE

This command was incorporated into Cisco IOS Release 12.0(5)XE.

12.0(7)S

This command was incorporated into Cisco IOS Release 12.0(7)S.

12.1(1)E

This command was incorporated into Cisco IOS Release 12.1(1)E.

12.2(4)T

This command was modified for the Two-Rate Policer. It now can display burst parameters and associated actions.

12.2(8)T

The command was modified for the Policer Enhancement — Multiple Actions feature. This command now displays the multiple actions configured for packets marked as conforming to, exceeding, or violating a specific rate.

12.2(13)T

This command was modified for the Enhanced Packet Marking feature. A mapping table (table map) can now be used to convert and propagate packet-marking values.


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 policy1

  Policy Map policy1
    Class class-default
      set precedence cos table table-map1

Router# show policy-map policy2

   Policy Map policy2
    Class class-default
      set cos precedence table table-map2

Table 3 describes the fields shown in the display.

Table 3 show policy-map Field Descriptions 

Field
Description

Policy Map

Name of the policy map being displayed.

Class

Name of the class in the policy map being displayed.

set precedence table table-map-cos1

or

set cos table table-map-cos2

Name of the set command used to set the specified value.

For instance, set precedence table table-map1 indicates that a table map called table-map1 has been configured to set the Precedence value based on the values defined in the table map.

Alternately, set cos table table-map2 indicates that a table map called table-map2 has been configured to set the CoS value based on the values defined in the table map.


Related Commands

Command
Description

policy-map

Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.

show policy-map class

Displays the configuration for the specified class of the specified policy map.

show policy-map interface

Displays the configuration of all classes configured for all service policies on the specified interface or displays the classes for the service policy for a specific PVC on the interface.

show table-map

Displays the configuration of a specified table map or all table maps.

table-map (value mapping)

Creates and configures a mapping table for mapping and converting one packet-marking value to another.


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

interface-name

Name of the interface or subinterface whose policy configuration is to be displayed.

vc

(Optional) For ATM interfaces only, shows the policy configuration for a specified PVC. The name can be up to 16 characters long.

vpi/

(Optional) ATM network virtual path identifier (VPI) for this PVC. On the Cisco 7200 and 7500 series routers, this value ranges from 0 to 255.

The vpi and vci arguments cannot both be set to 0; if one is 0, the other cannot be 0.

vci

(Optional) ATM network virtual channel identifier (VCI) for this PVC. This value ranges from 0 to 1 less than the maximum value set for this interface by the atm vc-per-vp command. Typically, the lower values 0 to 31 are reserved for specific traffic (F4 Operation, Administration, and Maintenance (OAM), switched virtual circuit (SVC) signaling, Integrated Local Management Interface (ILMI), and so on) and should not be used.

The VCI is a 16-bit field in the header of the ATM cell. The VCI value is unique only on a single link, not throughout the ATM network, because it has local significance only.

The vpi and vci arguments cannot both be set to 0; if one is 0, the other cannot be 0.

dlci

(Optional) Indicates a specific PVC for which policy configuration will be displayed.

dlci

(Optional) A specific data-link connection identifier (DLCI) number used on the interface. Policy configuration for the corresponding PVC will be displayed when a DLCI is specified.

input

(Optional) Indicates that the statistics for the attached input policy will be displayed.

output

(Optional) Indicates that the statistics for the attached output policy will be displayed.


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

Release
Modification

12.0(5)T

This command was introduced.

12.0(5)XE

This command was integrated into Cisco IOS Release 12.0(5)XE.

12.0(7)S

This command was integrated into Cisco IOS Release 12.0(7)S.

12.1(1)E

This command was integrated into Cisco IOS Release 12.1(1)E.

12.1(2)T

This command was integrated into Cisco IOS Release 12.1(2)T. This command was modified to display information about the policy for all Frame Relay PVCs on the interface, or, if a DLCI is specified, the policy for that specific PVC. This command was also modified to display the total number of the packets marked by the QoS set action.

12.1(3)T

This command was integrated into Cisco IOS Release 12.1(3)T. This command was modified to display per-class accounting statistics.

12.2(4)T

This command was modified for the Two-Rate Policer. It now can display burst parameters and associated actions.

12.2(8)T

The command was modified for the Policer Enhancement — Multiple Actions feature. This command now displays the multiple actions configured for packets conforming to, exceeding, or violating a specific rate.

12.2(13)T

This command was modified for the Enhanced Packet Marking feature. A mapping table (table map) can now be used to convert and propagate packet-marking values.


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 interface

 FastEthernet1/0.1 

  Service-policy input: policy1

    Class-map: class-default (match-any)
      0 packets, 0 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: any 
      QoS Set
        precedence cos table table-map1
          Packets marked 0

Table 4 describes the significant fields shown in the display.

Table 4 show policy-map interface Field Descriptions1  

Field
Description

Service-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

Command
Description

policy-map

Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.

show policy-map

Displays the configuration of all classes for a specified service policy map or all classes for all existing policy maps.

show policy-map class

Displays the configuration for the specified class of the specified policy map.

show table-map

Displays the configuration of a specified table map or all table maps.

table-map (value mapping)

Creates and configures a mapping table for mapping and converting one packet-marking value to another.


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

Release
Modification

12.2(13)T

This command was introduced.


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 map1

 Table Map map1
 from 0 to 1
 default 3


Table 5 describes the fields shown in the display.

Table 5 show policy-map interface Field Descriptions 

Field
Description

Table Map

The name of the table map being displayed.

from, to

The values of the "to-from" relationship established by the table-map (value mapping) command and further defined by the policy map in which the table map will be configured.

default

The default action to be used for any values not explicitly defined in a "to-from" relationship by the table-map (value mapping) command. If a default action is not specified in the table-map (value mapping) command, the default action is "copy".


Related Commands

Command
Description

policy-map

Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.

show policy-map

Displays the configuration of all classes for a specified service policy map or all classes for all existing policy maps.

show policy-map class

Displays the configuration for the specified class of the specified policy map.

table-map (value mapping)

Creates and configures a mapping table for mapping and converting one packet-marking value to another.


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

table-map-name

Name of table map to be created. The name can be a maximum of 64 alphanumeric characters.

map from

Indicates that a "map from" value will be used.

from-value

The "map from" value of the packet-marking category. The value range varies according to the packet-marking category from which you want to map and convert. For more information, see the "Usage Guidelines" section below.

to

Indicates that a "map to" value will be used.

to-value

The "map to" value of the packet-marking category. The value range varies according to the packet-marking category to which you want to map and convert. For more information, see the "Usage Guidelines" section below.

default

(Optional) Indicates that a default value or action will be used.

default-value-or-action

(Optional) The default value or action to be used if a "to-from" relationship has not been explicitly configured. Default actions are "ignore" and "copy". If neither action is specified, "copy" is used.


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

Release
Modification

12.2(13)T

This command was introduced.


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.

Table 6 Valid Value Ranges

packet-marking Category
Value Ranges

CoS

Specific IEEE 802.1Q number in the range from 0 to 7.

Precedence

Number in the range from 0 to 7

DSCP

Number in the range from 0 to 63.

QoS Group

Number in the range from 0 to 99

MPLS EXP imposition

Number in the range from 0 to 7.

MPLS EXP topmost

Number in the range from 0 to 7.


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 map1
Router(config-tablemap)# map from 0 to 0
Router(config-tablemap)# map from 2 to 1
Router(config-tablemap)# default 3
Router(config-tablemap)# end

Related Commands

Command
Description

policy-map

Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.

show policy-map

Displays the configuration of all classes for a specified service policy map or all classes for all existing policy maps.

show policy-map class

Displays the configuration for the specified class of the specified policy map.

show policy-map interface

Displays the packet statistics of all classes that are configured for all service policies either on the specified interface or subinterface or on a specific PVC on the interface.

show table-map

Displays the configuration of a specified table map or all table maps.