You can create a table map that can be used to mark traffic attributes. A table map is a kind of two-way conversion chart that lists and maps one traffic attribute 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 traffic attributes and defines the change to be made to the attribute. That is, an attribute is set
to one value that is taken
from another value. The values are based on the specific attribute being changed. For instance, the Precedence attribute can be a number from 0 to 7, while the DSCP attribute can be a number from 0 to 63.
The following is a sample table map configuration:
table-map table-map1
map from 0 to 1
map from 2 to 3
exit
The table below lists the traffic attributes for which a to-from relationship can be established using the table map.
Table 2 Traffic Attributes for Which a To-From Relationship Can Be Established
The "To" Attribute
|
The "From" Attribute
|
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
|
Once the table map is created, you configure a policy map to use the table map. In the policy map, you specify the table map name and the attributes to be mapped by using the
table keyword and the
table-map-name argument with one of the commands listed in the table below.
Table 3 Commands Used in Policy Maps to Map Attributes
Command Used in Policy Maps
|
Maps These Attributes
|
set
cos
dscp
table
table-map-name
|
CoS to DSCP
|
set
cos
precedence
table
table-map-name
|
CoS to Precedence
|
set
dscp
cos
table
table-map-name
|
DSCP to CoS
|
set
dscp
qos-group
table
table-map-name
|
DSCP to qos-group
|
set
mpls
experimental
imposition
dscp
table
table-map-name
|
MPLS EXP imposition to DSCP
|
set
mpls
experimental
imposition
precedence
table
table-map-name
|
MPLS EXP imposition to precedence
|
set
mpls
experimental
topmost
qos-group
table
table-map-name
|
MPLS EXP topmost to QoS-group
|
set
precedence
cos
table
table-map-name
|
Precedence to CoS
|
set
precedence
qos-group
table
table-map-name
|
Precedence to QoS-group
|
set
qos-group
dscp
table
table-map-name
|
QoS-group to DSCP
|
set
qos-group
mpls
exp
topmost
table
table-map-name
|
QoS-group to MPLS EXP topmost
|
set
qos-group
precedence
table
table-map-name
|
QoS-group to Precedence
|
The following is an example of a policy map (policy2) configured to use the table map (table-map1) created earlier:
policy map policy2
class class-default
set cos dscp table table-map1
exit
In this example, a mapping relationship was created between the CoS attribute and the DSCP attribute as defined in the table map.