Technology

A Brief Explanation Of IP Header

IP header is information that is attached with an IP packet at the beginning of it. The information in the header is used to transmit the packet to the defined destination. It can be 20-60 bytes in length.

Every component/field in the header has its own significance. Let’s go through each component one by one.

Version: This field indicates the current version of IP.  The same component/field is also used in the IPv6 header. This field is necessary to make ipv6 backward compatible.

Header Length: This field is of 4 bits in size and indicates the length of the Ip header. It indicates how many 32-bit words are there in the header. For example, if the size of the header is 20 bytes, the value in the header length will be 5 i.e., 0101 (32 bit * 5= 160 (20 bytes)).

Type of Service: It is also called DSCP i.e., Differentiated Services Code Point. This field defines the parameters for the requested type of service. These parameters may be used to define the processing of the datagram during transport.

The First 3 Bits are Priority Bits.

Precedence: Priority Bits

D Bit: Minimize delay.

T Bit: Maximize throughput.

R Bit: Maximize reliability.

M Bit: Minimize monetary cost.

Total Length: It defines the total length of the datagram which is (Payload + Ip header).

Identification: It is used to uniquely identify an Ip datagram. It is 16 bits in size. It was originally proposed for the fragmentation of the packet and reassembly.

Flags: There are 3 flags in the IP header.
Reserved Flag: This flag is reserved for the future and always set to zero.

DF Bit: This flag tells that the fragmentation of the packet is necessary or not.

0 – Fragment if necessary.

1 – Do not fragment.

MF Bit: This flag indicates that this packet is the last fragment or more fragments are coming.

0 – Last fragment.

1 – More fragments to come.

Fragment Offset: This field is used to reassemble the fragmented packets. It represents the number of data bytes ahead of this fragment in that Ip datagram. The size of this field is 13 bits.


TTL: Abbreviation of TTL is Time to Live which indicated the lifetime of the datagram, till when this packet will live. After every processing TTL value will be decreased by 1 and when the TTL value will become zero that packet will be discarded. The range will be 0-255.

Protocol: This field indicates the protocol number of the next protocol encapsulated. For example, the protocol number of TCP is 6, UDP is 17 and ICMP is 1.

Header Checksum: This field is used to verify the header for any error. If the header checksum value does not match with its calculated checksum that packet will be discarded. It is calculated by taking One’s complement of IP header and IP options.

Source IP Address: 32-bit IP address of source device.

Destination IP Address: 32-bit IP address of source device.

Options and Padding: It is an optional field that can be present in the Ip header or not. If the options field is added into the packet size of the Header length will be increased.

This concludes the explanation of each field in the Ip header. Packet-level understanding is very helpful for everyone while troubleshooting issues in an IPv4 environment. If you are struggling with operational issues coming into your environment or thinking to deploy any Campus Network, Data Center. Zindagi Technologies can be your transformer.

Zindagi Technologies Pvt Ltd is the best IT consultancy and professional services organization based out of New Delhi, India. We’re experts in designing and deploying large-scale data centers, service provider networks, campus networks and provide 24*7 operational services. Message us on WhatsApp at +91 97739 73971.

Author
Ankesh Singh
Network Consultant Engineer

Author

Team ZT

Leave a comment

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