IPv4 Datagram Fields
By Stephen Bucaro
If you are pursuing CompTIA Network+ certification, of if you're involved in
network troubleshooting, it's important to understand the construction of an IP
datagram. IPv4 is the most commonly used IP addressing format today, but because
the pool of available IPv4 addresses is rapidly becoming exhausted, the Internet
is beginning to change to the IPv6 format.
Sometimes an IP datagram will be called a packet because in it's route
from source to destination it can be switched from one path to another depending
upon which path is best ,in a process called packet switching. Sometimes an
IP datagram will be called a frame because of its position in the OSI
Shown below is the format and meaning of the fields in an IPv4 datagram, as defined
by RFC 0791. Everything above the data is called the header. The
information in the header determines where the data (sometimes called the payload)
goes and how its interpreted.
IPv4 Datagram Fields
Version: 4 bit field that defines the version to which IP packet belongs (IPv4 or IPv6).
Header Length: 4-bit field that defines the header length. A header
can vary in length because of Option field.
Type of Service: 8-bit field is used to carry Quality of Service information.
Total Length: 16-bit field that defines the total length of the IP datagram
including the header and the data. Because it's a 16-bit field, the biggest number
it can hold is 65,535, so the maximum size of an IP datagram can't be more than 65,535 bytes.
Identifier: 16-bit field that identifies a fragment. As a packet
travels from source to destination, it may come upon circuits who's Maximum Transfer
Unit (MTU) size is smaller than the IP packet's size. The packet must then be
divided into fragments and each fragment needs to be marked with the same identifier.
Flags: 3-bit field that defines how many fragments remain in a series of fragments.
Fragment Offset: 13-bit field that defines where in the overall message each
particular fragment should be placed.
Time to Live: 8-bit field that is set to the maximum number of routers the
packet can pass through, called hops, before the packet is dropped (usually set to 255).
Protocol: 8-bit field that identifies the higher-layer protocol (usually a
Transport layer protocol) carried in the datagram.
Header Checksum: 16-bit field that contains a checksum used for detecting errors in the IP header.
Source Address: 32-bit field that contains the packets source IP address.
Destination Address: 32-bit field that contains the packets destination IP address.
Options: an optional variable length field that is rarely used, but may be
used for purposes of debugging or gathering statistical information. If the options
field is not 32-bits, a special Padding field will be added to make sure
the size of the header remains a multiple of 32 bits.
Data: a variable length field sometimes referred to as the payload that
consists of datagrams of upper-layer protocols such as TCP, UDP, and ICMP.
More Networking Protocols and Standards:
• Video - Introducing the OSI Model
• Wireless Standards - 802.11a 802.11b 802.11g 802.11n 802.11i Explained
• Introducing OpenStack
• A Simple Description of the IPv6 Header and Datagram
• Protocol Suites
• What is PPP, PPPoA and PPPoE?
• Internet Security and VPN Network Design
• WAN Network Protocols - DSL, SONET, HDLC, DWDM, DLSW+
• Integration of IPv6 with IPv4
• TCP/IP Features