Top Ad unit 728 × 90

08: Network Layer - IP header - Version, IHL, and TOS part 4


[post_ad]
IP header

This lesson explains IP header  in a clearly simple way. IP header is  generated at the Network layer whose PDU is packet. At the Network layer, data, after being encapsulated into either TCP or UDP header at the Transport layer, is again encapsulated into IP header to be called packet. By and large, IP header contains information about the sender and receiver’s network-related stuff for accurate delivery.


IP header is composed of several fields, each one has a job to do. The header minimum length is 20 bytes, but if the options (look at the bottom of the header) are included, the maximum length would be 60 bytes. The following figure represents IP header along with its fields. To explore the function of each field, let us dissect each field alone.
Version :

The first field, which occupies 4 bits, is Version. It indicates the current protocol version being used. For example, the protocol that is largely used today is Ipv4, so if this latter is the one used for packet delivery, there will be a sign in the field which shows that. Furthermore, Ipv6 is another protocol, among others, which is gaining popularity these days, and which will replace Ipv4 in the next fifteen years. (It is thoroughly explained in the Ipv6 section).

IHL (IP Header Length) :

The next field is IHL (IP Header Length). This field indicates the length of the IP header whose normal size is 20 Bytes as shown in the above figure whereas the length, including IP options (if any), is represented in 32 Bit words,  but the field alone (IHL) occupies only 4 Bits. Since IHL field is 4 Bits, the maximum header length allowed is 60 Bytes. You are now wondering  how that 60 Bytes is calculated ! no worries ! we said that this field occupies 4 Bits, right.  And 4 Bits = 15 in decimal ( 1111= 8+4+2+1). We also said that the length of the header is 32 Bit words. Consequently,  15 multiplied by 32 gives 480 Bits which equals 60 Bytes.

Furthermore, normally the size of the header when no options are included is 20 Bytes. In this case, the IHL field will take on a value of 5 Bits (0101= 0+4+0+1). To calculate it, we multiply 5 Bits by 32 Bits to get 160 which equals 20 Bytes that is the final IP header size.

TOS (Type Of Service) :

This field has a long history traces back to the eighties. In general, it indicates the importance of a certain ip packet (datagram). By means of this field a packet can take precedence over the others, or be processed before other packets. So the type of service bits are used to assign what type of throughput, delay, and reliability we want.
As you see in the above figure, the first three bits are allocated to the Precedence field, this latter signifies how important the packet is. If it gets a high value, it means that the packet is very significant.  A router would drop a packet with low priority in case of congestion.  the table below contains a combination of bits and their possible functions that precedence field may take on :


As for Delay,  if it is set to '1', the packet requests low delay. The next one is Throughput, when set to '1', the packet requests high throughput. The same thing applies to Reliability, when set to '1' the packet requests high reliability. The following field is Reserved, which is reserved for future use. It is important to point out that these field be set to either 0 or 1 ; but when bits are set to 1, it basically help speed up the packet flow.

Significantly, TOS field was developed in 1981 and defined in RFC 791, but what is astonishing is that the bits that specify Delay, Throughput, and Reliability have never been used despite being part of TCP/IP for a long time. The only bits that has been used are the Precedence ones that  are used to assign a priority to the IP packets.


In 1992 (about ten years later), TOS was changed and defined in the this document RFC 1349. TOS now looks like this :
The above pictured figure shows that the Precedence field remains unchanged, but the two fields in the very right have been changed to what is shown in the picture. Instead of 5 bits for type of service (Delay=1 bit, Throughput=1 bit, Reliability=1 bit, Reserved=2 bits), we have now only 4 bits assigned to TOS. The final bit is MBZ ( Must Be Zero), it means that this fiel dis always set to zero in normal transmissions. According to RFC, MBZ has been used for experiments and routers will ignore this bit.

Despite of all these changes that TOS has been subjected to, it is not practically used. What is instead used is Differentiated Services.

This lesson is divided into four parts due to intensive content: first part (which is the current one), second part, third part, fourth part.
[post_ad]
08: Network Layer - IP header - Version, IHL, and TOS part 4 Reviewed by BOUFTIRA on 9:20:00 AM Rating: 5

No comments:

All Rights Reserved by Computer Networks For All © 2015 - 2017

Contact Form

Name

Email *

Message *

Powered by Blogger.