Wednesday 28 March 2012

IPv4 TOS Field and QoS

IPv4 TOS Field and QoS

According to [RFC791], the IPv4 TOS octet is divided into a 3 bit
Precedence field and a 3 bit TOS field. The last two bits of the TOS
octet are reserved for future use:

Bits 0-2: Precedence.
Bit 3: 0 = Normal Delay, 1 = Low Delay.
Bits 4: 0 = Normal Throughput, 1 = High Throughput.
Bits 5: 0 = Normal Reliability, 1 = High Reliability.
Bit 6-7: Reserved for Future Use.

So IPV4 TOS octet is 8 bit field with last two bits reserved for future.

The first three bit i.e. bits 0-2 are Precedence field and generally used in IP QoS for ToS mapping and Marking.

Generally there are 7 queues
�� Urgent
�� Premium
�� Real-Time
�� Critical
�� High
�� Medium
�� Low
�� Default

Which are mapped to IP Precedence field as

QoS Traffic Class QoS Level IP Precedence Bits

Urgent 7 111
Premium 6 110
Real-Time 5 101
Critical 4 100
High 3 011
Medium 2 010
Low 1 001
Default 0 000

The DSCP is nothing but the first 6 bit of the same 8 bits and the it uses the IP precedence bits to set the QoS priority class. The Diff Serv architecture also uses the 3 extra bits to prioritize and differentiate same class of traffic.

The DSCP value 0x2E ~ 0xb8 Ipv4 ToS value is used for real time traffic (EF).

Above is very basic explanation of L2/L3 QoS.  In wireless we have something known as WMM which is used for exactly same thing , to prioritize the traffic.

Please let me know in your comments whether anytime you have used this fields for your testing.