Search⌘ K
AI Features

The Internet Protocol: IPV4 Packets

Understand the structure of IPv4 packets, including header fields like version, length, TTL, and protocol types. Learn how IPv4 manages forwarding loops and adapts to different data link layers through MTU variations.

The IPv4 packet format was defined in RFC 791. Apart from a few clarifications and some backward compatibility changes, the IPv4 packet format did not change significantly since the publication of RFC 791. All IPv4 packets use a 20-byte header as shown below. Some IPv4 packets contain an optional header extension that is described later.

IPv4 Packet Header

The IP version 4 header
The IP version 4 header

Fields of The Header

The main fields of the IPv4 header are:

  • A 4 bit version that indicates the version of IP used to build the header. Using a version field in the header allows the network layer protocol to evolve.
  • A 4 bit IP Header Length (IHL) that indicates the length of the IP header in 32-bit words. This field allows IPv4 to use options if required, but as it is encoded as a 4 bits field, the IPv4 header cannot be longer than 64 bytes.
  • An 8 bit DS field that is used for Quality of Service.
  • A 16 bit length field that indicates the total length of the entire IPv4 packet (header and
...