Friday, November 23, 2012


TOS/ DSCP bit fields in IP-header


QOS Classification is done  based on
 in (Ethernet)L2 ----> COS field
 in (IP header)L3----> TOS field .
                                      
If we want to send IP packet over  provider’s MPLS cloud, we have to map our classes to provider classes.
MPLS frame uses  3-bits long EXP field  for classification of traffic .


TOS and DSCP:

Evolution of Naming convention for the specific  fields in IP header  : CS --> IPP--> DSCP.
The main reason for this evolution  was lack of  enough naming classes to classify traffic.
At the begining just first 3 bits of 8-bits ToS was used to name and mark traffic.
Later QoS features and class naming has changed due to fast growth of VoIP.
since QoS  is  key significant to achieve better voice quality, Engineers tried to involve more bits to mark more classes. Finally we have still 8-bits long ToS field with few class names depends on what part of the field we take.


if  you have a DSCP tag on your packets, but, you can only see ToS when capturing packet, How do you work out which ToS value equates to which DSCP value?....follow the below link...
http://www.tucny.com/Home/dscp-tos  
    Thanks to the author of this blog for sharing information.

Interested in knowing How this backward  compatibility is maintained?

 

DSCP is new method of marking.
DSCP uses all available 8 bits of ToS filed, but to maintain compatibilty with old IP Precedence standards,
i.e IP precedence only router can understand the packet coming from DSCP configured router.

When Cisco defined DSCP,
they took these 8 bits and divided into 3 groups.

First group is called Major Class
Second group is called Minfor class or Drop Precedence class
Third group is called ECN (Explicit Congestion Notification) bits.

First two groups are mainly responsible for QoS marking.
with these 6 bits,we can have 64  values in DSCP.




Instead of using  all 64 values (0-63), Cisco defined two classes-major and minor to make it backward compatible with IP Precedence.
Major Class:
Major class of traffic gives first 3 bits means values between 0-7.  This way DSCP becomes
compatible with IP Precedence and providing same set of marking that IP precedence was defining.

When Cisco defined DSCP, they defined some of the new classes :
Default Class------------>DSCP 0 ------------->IP Prec 0---------->000
Assured Forwarding (AF)classes
AF1--------------------->DSCP 1------------->IP Prec 1---------->001
AF2--------------------->DSCP 2------------->IP Prec 2---------->010
AF3--------------------->DSCP 3------------->IP Prec 3---------->011
AF4--------------------->DSCP 4------------->IP Prec 4---------->100
Expedite Forwarding(EF)class
EF----------------------->DSCP 5------------->IP Prec 5-------------->101
DSCP 6 and  DSCP 7 are reserved.

 Minor Class (Drop Precedence):
 expresses Drop Preference of the Major classes. Last bit of this Minor class is always 0.
 With two bits we can only have maximum 3 values.






But unlike Major class, In Minor classes lower is better . 
This is why it is also called drop precedence.
In Minor class, three numbers are allowed (1,2,3) for each major AF class through (1-4).
AF1 ---->  F11   AF12    AF13
AF2 ------>AF21  AF22  AF23
AF3------>AF31  AF32  AF33
AF4------>AF41  AF42  AF43

So we can have 12 DSCP AF classes with the use of Major and Minor classes
 + one default class + one EF (Expedite Forwarding) class .

Total  14 DSCP AF classes against 7 classes of IP Precedence.

Class Selector


 is the term  used when you want IP Precedence kind of flexibility in DSCP enabled router.

This is the functional equivalent to IP precedence.


No comments:

Post a Comment