IP Precedence DSCP and CoS relationships

IP Precedence DSCP and CoS relationships

As part of studying the 642-642 QoS exam course is seems quite important to understand the relationship between the various ways of marking traffic. Below are some notes I've made so far about these relationships. This is note a post about the inner working of the various PHBs or their use.

DSCP - Differentiated Services Code Point. This is a field that uses 6bits of the TOS field in an IP packet header.

The four assured forwarding classes each include three drop probability classes. In general the higher the first number the better QoS treatment of the packet and the higher the second number the higher the probability the packet will be dropped during a period of congestion. A simple formula to remember the decimal value is AF(8A)+(2B). E.g. AF31 = (83)+(21 )= 26

IP Precedence - This was used prior to the DSCP. It also uses bit from the TOS field found in IP Packet headers although only 3bits rather than the 6bits of DSCP.  These three Precedence bits overlap with the most significant bits of the DSCP.

CoS - Class of service. A 3bit field defined under the 802.1p spec and only found in 802.1q tagged Ethernet frames (cisco ISL also supports CoS). Different from Precedence and DSCP as its a layer 2 marking and some networking equipment can only act on layer 2 CoS markings.

A Table showing the relationship between IP Precedence and DSCP:

Per Hop Behaviour DSCP DSCP (binary value) DSCP (decimal value) IP Precedence IP Precedence (binary)
Best Effort BE 000000 0 0 000
AF11 001010 10
Assured Forwarding 1 AF12 001100 12 1 001
AF13 001110 14 010
AF21 010010 18
Assured Forwarding 2 AF22 010100 20 2 010
AF23 010110 22
AF31 011010 26
Assured Forwarding 3 AF32 011100 28 3 011
AF33 011110 30
AF41 100010 34
Assured Forwarding 4 AF42 100100 36 4 100
AF43 100110 38
Expedited Forwarding EF 101110 46 5 101

To enhance the backward compatibility with IP precedence DSCP has seven Class Selector PHBs. These all have zeros in the three least significant bits of the DSCP field. E.g. xxx000. The ideam being along the line that if a IP precedence marking router send a marked packet to a DSCP marking router it will have a measure of understanding.

PHB DSCP (binary value) CoS
Default/Best Effort (BE) 000000 0
Class Selector 1 (CS1) 001000 1
Class Selector 2 (CS2) 010000 2
Class Selector 3 (CS3) 011000 3
Class Selector 4 (CS4) 100000 4
Class Selector 5 (CS5) 101000 5
Class Selector 6 (CS6) 110000 6
Class Selector 7 (CS7) 111000 7

On Cisco kit these mapping can of course be customized and changed through the cli.

m00nie :)