Configuring Marking


This chapter describes how to configure the marking features on the Cisco 1000 Series Connected Grid Routers (hereafter referred to as the Cisco CG-OS router) that you can use to define the class of traffic to which the packet belongs.

This chapter includes the following sections:

Information About Marking

Prerequisites for Marking

Guidelines and Limitations

Configuring Marking

Verifying the Marking Configuration

Configuration Examples for Marking

Information About Marking

Marking is a method that you can configure on the Cisco CG-OS router to modify the QoS fields of the outgoing packets on a Layer 3 interface. The QoS fields that you can mark are IP precedence and Differentiated Service Code Point (DSCP) in Layer 3.


Note For a list of supported Layer 3 interfaces, see Configuring Priority Queuing.


You can use marking commands in traffic classes that are referenced in a policy map. Table 4-1 lists the marking features that you can configure on the Cisco CG-OS router.

Table 4-1 Configurable Marking Features 

Marking Feature
Description

DSCP

Layer 3 DSCP.

IP precedence

Layer 3 IP precedence.

Note IP precedence uses only the lower 3 bits of the type of service (ToS) field. The Cisco CG-OS router overwrites the first 3 bits of the ToS field to 0.


Prerequisites for Marking

Marking has the following prerequisites:

You must be familiar with Chapter 2 "Using Modular QoS CLI."

You are logged on to the Cisco CG-OS router.

Guidelines and Limitations

None.

Configuring Marking

You can combine one or more of the marking features in a policy map to control the setting of QoS values. You can then apply policies to outgoing packets on an interface.

This section includes the following topics:

Configuring DSCP Marking

Configuring IP Precedence Marking

Configuring DSCP Port Marking

Configuring DSCP Marking

You can set the DSCP value in the six most significant bits of the DiffServ field of the IP header to a specific value. You can enter numeric values from 0 to 60, in addition to the standard DSCP values shown in Table 4-2.

Table 4-2 Standard DSCP Values 

Value
List of DSCP Values

af11

AF11 dscp (001010)—decimal value 10

af12

AF12 dscp (001100)—decimal value 12

af13

AF13 dscp (001110)—decimal value 14

af21

AF21 dscp (010010)—decimal value 18

af22

AF22 dscp (010100)—decimal value 20

af23

AF23 dscp (010110)—decimal value 22

af31

AF31 dscp (011010)—decimal value 26

af32

AF32 dscp (011100)—decimal value 28

af33

AF33 dscp (011110)—decimal value 30

af41

AF41 dscp (100010)—decimal value 34

af42

AF42 dscp (100100)—decimal value 36

af43

AF43 dscp (100110)—decimal value 38

cs1

CS1 (precedence 1) dscp (001000)—decimal value 8

cs2

CS2 (precedence 2) dscp (010000)—decimal value 16

cs3

CS3 (precedence 3) dscp (011000)—decimal value 24

cs4

CS4 (precedence 4) dscp (100000)—decimal value 32

cs5

CS5 (precedence 5) dscp (101000)—decimal value 40

cs6

CS6 (precedence 6) dscp (110000)—decimal value 48

cs7

CS7 (precedence 7) dscp (111000)—decimal value 56

default

Default dscp (000000)—decimal value 0

ef

EF dscp (101110)—decimal value 46



Note For more information about DSCP, see RFC 3260: An Architecture for Differentiated Services.


BEFORE YOU BEGIN

No prerequisites.

DETAILED STEPS

 
Command
Purpose

Step 1 

configure terminal

Enters configuration mode.

Step 2 

policy-map [type qos] [match-first] [qos-policy-map-name]

Creates or accesses the policy map named qos-policy-map-name, and then enters policy-map mode. The policy-map name can contain alphabetic, hyphen, or underscore characters, is case sensitive, and can be up to 40 characters.

Step 3 

class [type qos] {class-map-name | class-default}

Creates a reference to class-map-name, and enters policy-map class configuration mode. Use the class-default keyword to select all traffic that is not currently matched by classes in the policy map.

Step 4 

set dscp dscp-value

Sets the DSCP value to dscp-value. Table 4-2 summarizes the standard values.

EXAMPLE

This example shows how to configure a DSCP marking policy-map.

router# configure terminal

router(config)# policy-map policy1

router(config-pmap-qos)# class class1
router(config-pmap-c-qos)# set dscp af31

Configuring IP Precedence Marking

You can set the value of the IP precedence field in bits 0-2 of the IPv4 ToS field of the IP header.


Note The Cisco CG-OS router rewrites the last 3 bits of the ToS field to 0 for packets that match this class.


BEFORE YOU BEGIN

No prerequisites.

DETAILED STEPS

 
Command
Purpose

Step 1 

configure terminal

Enters configuration mode.

Step 2 

policy-map [type qos] [match-first] [policy-map-name]

Creates or accesses the policy map named policy-map-name, and then enters policy-map mode type qos (default). The policy-map name can contain alphabetic, hyphen, or underscore characters, is case sensitive, and can be up to 40 characters.

Step 3 

class [type qos] {class-map-name | class-default}

Creates a reference to class-map-name and enters class-map class configuration mode. The class is added to the end of the policy map.

Use the class-default keyword to select all traffic that is not currently matched by classes in the policy map.

Step 4 

set precedence precedence-value

Sets the IP precedence value to precedence-value. The value can range from 0 to 7.

EXAMPLE

This example shows how to configure IP precedence marking on the Cisco CG-OS router.

router# configure terminal
router(config)# policy-map policy1

router(config-pmap-qos)# class class1

router(config-pmap-c-qos)# set precedence 3

 
   

Configuring DSCP Port Marking

The default behavior of the Cisco CG-OS router is to preserve the DSCP value, or to trust DSCP. To make the port untrusted, change the DSCP value. Unless you configure a QoS policy and attach that policy to specified interfaces, the Cisco CG-OS router preserves the DSCP value.


NoteYou can attach only one policy type qos map to each interface in each direction.

The DSCP value is trust on the Layer 3 port of a Cisco CG-OS router.


BEFORE YOU BEGIN

Install and configure the interface within the Cisco CG-OS router.

DETAILED STEPS

 
Command
Purpose

Step 1 

configure terminal

Enters configuration mode.

Step 2 

policy-map [type qos] [match-first] [qos-policy-map-name]

Creates or accesses the policy map named qos-policy-map-name and then enters policy-map mode. The policy-map name can contain alphabetic, hyphen, or underscore characters, is case sensitive, and can be up to 40 characters.

Step 3 

class [type qos] {class-map-name | class-default} [insert-before before-class-map-name]

Creates a reference to class-map-name and enters policy-map class configuration mode. The class is added to the end of the policy map unless insert-before is used to specify the class to insert before. Use the class-default keyword to select all traffic that is not currently matched by classes in the policy map.

Step 4 

set dscp-value

Sets the DSCP value to dscp-value. Table 4-2 shows valid values.

Step 5 

exit

Returns to policy-map configuration mode.

Step 6 

class [type qos] {class-map-name | class-default} [insert-before before-class-map-name]

Creates a reference to class-map-name, and enters policy-map class configuration mode. The class is added to the end of the policy map unless insert-before is used to specify the class to insert before. Use the class-default keyword to select all traffic that is not currently matched by classes in the policy map.

Step 7 

set dscp-value

Sets the DSCP value to dscp-value. Table 4-2 shows valid values.

Step 8 

exit

Returns to policy-map configuration mode.

Step 9 

class [type qos] {class-map-name | class-default} [insert-before before-class-map-name]

Creates a reference to class-map-name, and enters policy-map class configuration mode. The class is added to the end of the policy map unless insert-before is used to specify the class to insert before. Use the class-default keyword to select all traffic that is not currently matched by classes in the policy map.

Step 10 

set dscp-value

Sets the DSCP value to dscp-value. Table 4-2 shows valid values.

Step 11 

exit

Returns to policy-map configuration mode.

Step 12 

interface ethernet {slot/port}

Enters interface mode to configure the Ethernet interface for DSCP marking.

interface cellular {slot/port}

Enters interface mode to configure the cellular (3G) interface for DSCP marking.

interface wimax {slot/port}

Enters interface mode to configure the WiMax interface for DSCP marking.

Step 13 

service-policy [type qos] {input | output} {policy-map-name} [no-stats]

Adds policy-map-name to the input packets of the interface. You can attach only one input policy and one output policy to an interface.

EXAMPLE

This example how to configure DSCP marking.

router# configure terminal
router(config)# policy-map policy1
router(config-pmap)# class class1
router(config-pmap-c-qos)# set dscp af31
router(config-pmap-c-qos)# exit
router(config-pmap-qos)# class class2
router(config-pmap-c-qos)# set dscp af13
router(config-pmap-c-qos)# exit
router(config-pmap-qos)# class class-default
router(config-pmap-c-qos)# set dscp af22
router(config-pmap-c-qos)# exit
router(config-pmap-qos)# exit
router(config)# interface cellular 3/1 
router(config-if)# service-policy input policy1

Verifying the Marking Configuration

To display the marking configuration information, enter the following command.

Command
Purpose

show policy-map

Displays all policy maps.


Configuration Examples for Marking

The following example shows how to configure marking:

configure terminal
  policy-map type qos untrust_dcsp
   class class-default
     set dscp 0