What are the different fields in IPV4 header format?

Jayanth Jadhav
2 min readJan 1, 2023

--

The IPv4 header is a standardized data structure that is used to transmit data across the Internet. It is composed of several fields that contain information about the packet and its destination. The fields in the IPv4 header are:

IPV4 Datagram Format
  1. Version (4 bits): Indicates the version of the IPv4 protocol being used.
  2. Header Length (4 bits): Indicates the length of the header in 32-bit words.
  3. Type of Service (8 bits): Indicates the priority of the packet and any special handling that should be applied to it.
  4. Total Length (16 bits): Indicates the total length of the packet in bytes, including the header and data.
  5. Identification (16 bits): A unique number that is used to identify the packet.
  6. Flags (3 bits): Used to control fragmentation and reassembly of the packet.
  7. Fragment Offset (13 bits): Indicates the position of this fragment in the original packet.
  8. Time to Live (8 bits): Indicates the maximum number of hops that the packet can make before it is discarded.
  9. Protocol (8 bits): Indicates the type of transport layer protocol being used (e.g. TCP, UDP).
  10. Header Checksum (16 bits): A checksum that is used to verify the integrity of the header.
  11. Source IP Address (32 bits): The IP address of the sender of the packet.
  12. Destination IP Address (32 bits): The IP address of the intended recipient of the packet.
  13. Options (variable length): Optional fields that can be used to specify additional information about the packet.
  14. Padding (variable length): Used to ensure that the header is a multiple of 32 bits in length.

The IPv4 header is usually 20 bytes in length, but the options and padding fields can make it longer. The header is followed by the data payload of the packet.

--

--

Jayanth Jadhav
Jayanth Jadhav

Written by Jayanth Jadhav

Explorer. Student. Learner for Life.

No responses yet