The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
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:
•Verifying the Marking Configuration
•Configuration Examples for 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.
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.
None.
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 IP Precedence Marking
•Configuring DSCP Port 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.
Note For more information about DSCP, see RFC 3260: An Architecture for Differentiated Services.
No prerequisites.
|
|
|
---|---|---|
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. |
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
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.
No prerequisites.
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
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.
Note•You 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.
Install and configure the interface within the Cisco CG-OS router.
|
|
|
---|---|---|
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. |
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
To display the marking configuration information, enter the following command.
|
|
---|---|
show policy-map |
Displays all policy maps. |
The following example shows how to configure marking:
configure terminal
policy-map type qos untrust_dcsp
class class-default
set dscp 0