IP Precedence and DSCP Values

      5 Comments on IP Precedence and DSCP Values

One of the topics of QOS that I never really tried to understand were DSCP values.  IP precedence always made sense to me but DSCP was something that I just never took the time to learn.  I’m going to give a quick run down on them below.

IP Precedence (The Older Way)
I’m calling this the old method simply because it was the first way packets at layer 3 were marked.  I’ll be careful and note that this doesn’t make it any less valuable or useful than ‘newer’ ways of marking.  So let’s take a look at where the marking is in the IP packet header.

image

The field utilized for QOS markings is referred to as the Type of Service field or TOS field.  The field is 8 bits long however IP precedence only utilizes the leftmost 3 bits.  Going back to subnet math class we know that this means we can have values of 0 to 7.  The layout of those values looks like this….

7 (111) – Reserved
6 (110) – Reserved
5 (101) – Voice Bearer
4 (100) – Video Conferencing
3 (011) – Call Signaling
2 (010) – High Priority Data
1 (001) – Medium Priority Traffic
0 (000) – Best Effort

So as you can see, these values utilized 3 bits and allowed us to have 8 different classes of traffic.  In this system the 5 rightmost bits weren’t utilized.  This worked well initially, but as QOS demands increased the need for a more diversified marking system came about. 

DSCP (The New Way)
DSCP was released with two objectives in mind.  First off, to offer a more diverse tagging methodology and secondly to be backwards compatible with IP precedence.  In order to do this, the ToS field was still used but now broken into 3 different sections.  Below I’ve illustrated the old and new way of using the ToS field.

 image 

image

So as you can see, DSCP expanded on what IP precedence was going and made use of the other 5 bits of the ToS byte.  In DSCP land, bits 7-5 are new referred to as the ‘Major’ class field.  This is effectively the same thing as the IP precedence field and is what allows DSCP to be backwards compatible with the old standard.  In addition, we now have the drop preference field which consumes bits 2 through 4.  Finally, we have the ECN bits which weren’t actually defined as part of the DSCP standard but are now used for ‘Explicit Congestion Notification’.  I wont talk much about ECN at this point.

Before I actually start explaining what each field means and does, let me just throw this out there…

Default 000000
AF11 001010
AF12 001100
AF13 001110
AF21 010010
AF22 010100
AF23 010110
AF31 011010
AF32 011100
AF33 011110
AF41 100010
AF42 100100
AF43 100110
EF 101110
CS1 001000
CS2 010000
CS3 011000
CS4 100000
CS5 101000
CS6 110000
CS7 111000

 

So now that I’ve thoroughly confused you let’s talk about the table.  You’ll notice a couple of things.  First off, the right field only has 6 bits.  This is because the classes defined within DSCP only use the leftmost 6 bits of the ToS field.  ECN is not in scope for this discussion.  Also, you’ll notice that the last bit is always 0.  Much in the same way that the original IP precedence standard said ‘we only need 3 bits to do this’ the drop preference said it only needed two bits to do its work.  So, really what we are interested in the leftmost 5 bits.  Now let’s talk details…

AF stands for ‘Assured Forwarding’ and there are 4 major classes.  As you have probably figured out, with 3 bits we can make numbers 0 through 7.  Numbers 6 and 7 are reserved and number 5 is what we call EF or ‘Expedited Forwarding’.  With AF the higher the number the better.  The exact opposite is true for the next three bits of the AF class which is the drop preference, or what some call the minor class.  The lower the drop preference the better it is.  For instance, AF41 is what is recommended for interactive multimedia video conferencing.

CS Stands for class selector and as you can tell, only uses what once were the IP precedence bits.  This is the functional equivalent to IP precedence, they just call it class selector in DSCP speak.  Note that drop preference isn’t used in any of the 7 classes.

So as you can see, DSCP gives a lot more flexibility than IP precedence did.  I’m planning on talking more about classifying and marking packets in the next couple of posts so I’ll leave you with this information for now so you can soak it all in.

5 thoughts on “IP Precedence and DSCP Values

Leave a Reply

Your email address will not be published. Required fields are marked *