An Internet Protocol version 4 packet header (IPv4 packet header) contains application information, including usage and source/destination addresses. IPv4 packet headers contain 20 bytes of data and are normally 32 bits long.
A packet is a network communication data unit containing fixed or variable lengths. However, a single packet contains three portions: header, body and trailer.
A 20-byte header contains almost 13 multipurpose fields, which hold specific related object information such as application, data type and source/destination addresses. The following are detailed header field descriptions:
- Version: This contains the Internet header format and uses only four packet header bits.
- Internet header length (IHL): This 32-bit field stores IP header length information.
- Type of service (ToS): This provides network service parameters.
- Datagram size: This contains combined data and header length.
- Identification: This 16-bit field contains a specific number for primary data identification.
- Flags: This router fragment activity is controlled by three flags.
- Fragmentation offset: This is a fragment identification via offset value.
- Time to Live (TTL): This contains the total number of routers allowing packet pass-through.
- Protocol: This 8-bit field contains header transport packet information.
- Header checksum: It checks and monitors communication errors.
- Source address: It stores source IP address.
- Destination address: It stores destination IP address.
- Options: This is the last packet header field and is used for additional information. When it is used, the header length is greater than 32 bits.