Classifying at Layer
A second way to identify traffic is to look at the Type of Service (ToS) field in the Layer 3 IP header. The first six bits of this field are called the differentiated services code point (DSCP) bits. They are typically set to a decimal value of 46 for voice-bearer traffic. In the past, Cisco recommended setting voice signaling traffic to DSCP 31. However, the current recommendation is to set it to Class Selector (CS)3. You can use an access list to identify traffic with a certain DSCP value, or match against it in a class map. Example 8-4 shows an access list that looks at the DSCP value in packets. As you can see from the example, you can list the DSCP either as a decimal value or its DiffServ per-hop behavior (PHB) value. The second access list, VOICE-SIG, permits both CS3 and Assured Forwarding (AF)31 to allow for devices that might not yet be transitioned to using only CS3 for signaling. After you create the access lists, you associate them with class maps.
Example 8-4 Using an Access List to Match DSCP
VGateway(config)#ip access-list extended VOICE-BRR
VGateway(config-ext-nacl)#permit ip any any dscp ?
VGateway(config)#ip access-list extended VOICE-BRR
VGateway(config-ext-nacl)#permit ip any any dscp ?
|
<0-63> |
Differentiated services |
codepoint value |
|||||
|
af11 |
Match |
packets |
with |
AF11 |
dscp |
(001010) |
|
|
af12 |
Match |
packets |
with |
AF12 |
dscp |
(001100) |
|
|
af13 |
Match |
packets |
with |
AF13 |
dscp |
(001110) |
|
|
af21 |
Match |
packets |
with |
AF21 |
dscp |
(010010) |
|
|
af22 |
Match |
packets |
with |
AF22 |
dscp |
(010100) |
|
|
af23 |
Match |
packets |
with |
AF23 |
dscp |
(010110) |
|
|
af31 |
Match |
packets |
with |
AF31 |
dscp |
(011010) |
|
|
af32 |
Match |
packets |
with |
AF32 |
dscp |
(011100) |
|
|
af33 |
Match |
packets |
with |
AF33 |
dscp |
(011110) |
|
|
af41 |
Match |
packets |
with |
AF41 |
dscp |
(100010) |
|
|
af42 |
Match |
packets |
with |
AF42 |
dscp |
(100100) |
|
|
af43 |
Match |
packets |
with |
AF43 |
dscp |
(100110) |
|
|
cs1 |
Match |
packets |
with |
CS1(precedence 1) dscp |
(001000) |
||
|
cs2 |
Match |
packets |
with |
CS2(precedence 2) dscp |
(010000) |
||
|
cs3 |
Match |
packets |
with |
CS3(precedence 3) dscp |
(011000) |
||
|
cs4 |
Match |
packets |
with |
CS4(precedence 4) dscp |
(100000) |
||
|
cs5 |
Match |
packets |
with |
CS5(precedence 5) dscp |
(101000) |
||
|
cs6 |
Match |
packets |
with |
CS6(precedence 6) dscp |
(110000) |
||
|
cs7 |
Match |
packets |
with |
CS7(precedence 7) dscp |
(111000) |
||
|
default |
Match |
packets |
with |
default dscp (000000) |
|||
Example 8-4 Using an Access List to Match DSCP (Continued)
ef Match packets with EF dscp (101110)
VGateway(config-ext-nacl)#permit ip any any dscp ef
VGateway(config-ext-nacl)#ip access-list extended VOICE-SIG VGateway(config-ext-nacl)#permit ip any any dscp cs3 VGateway(config-ext-nacl)#permit ip any any dscp af31
Using a class map to identify traffic based on a DSCP value is shown in Example 8-5. Notice in the output of the show class-map command that, although you specified the decimal DSCP value when configuring the class map, the router has translated that to its Diffserv value of expedited forwarding (EF). The number in parenthesis in Example 8-5 is the decimal value.
Example 8-5 Using a Class Map to Match DSCP
VGateway(config)#class-map DSCP_46
VGateway(config-cmap)#match dscp 46 !
VGateway(config-cmap)#class-map CS3
VGateway(config-cmap)#match ip dscp cs3
VGateway#show class-map Class Map match-all CS3 (id 6) Match ip dscp cs1 (8)
Class Map match-all DSCP_46 (id 5) Match dscp ef (46)
Continue reading here: Using Policy Maps
Was this article helpful?