Information Technology Reference
In-Depth Information
Figure7-2
The IP Packet Format
32 bits
Version
IHL
Type-of-service
Total length
Identification
Flags
Fragment offset
Time-to-live
Protocol
Header checksum
Source address
Destination address
Options (+ padding)
Data (variable)
The fields of the IP packet are as follows:
•
Version
—Indicates the version of this IP datagram.
•
IP Header Length (IHL)
—Indicates the datagram header length in 32-bit words.
•
Type-of-Service
—Specifies how a particular upper-layer protocol would like the current datagram
to be handled. Datagrams can be assigned various levels of importance using this field.
Today this field is used primarily to provide quality of service (QoS) capabilities to TCP/IP for
applications requiring predictable bandwidth or delay. RFC 2474 describes a method by which the
TOS field is replaced by a DS field that is used to provide differentiated services (DiffServ) on
networks. This field is split into two parts. The first 6 bits are used for the DSCP codepoint, which
is used to differentiate traffic. The last 2 bits, or CU, are ignored by DiffServ-compliant nodes.
•
Total Length
—Specifies the length of the entire IP packet, including data and header, in bytes.
•
Identification
—Consists of an integer identifying this datagram. This field is used to help piece
together datagram fragments.
•
Flags
—Consists of 3 bits, of which the low-order 2 bits control fragmentation. One bit specifies
whether the packet can be fragmented; the second bit specifies whether the packet is the last
fragment in a series of fragmented packets.
•
Time-to-Live
—Maintains a counter that gradually decrements down to zero, at which point the
datagram is discarded. This keeps packets from looping endlessly.
•
Protocol
—Indicates which upper-layer protocol receives incoming packets after IP processing is
complete.
•
Header Checksum
—Helps ensure IP header integrity.
•
Source Address
—Specifies the sending node.
•
Destination Address
—Specifies the receiving node.
•
Options
—Allows IP to support various options, such as security.
•
Data
—Contains upper-layer information.