Computer Science Now

IP Packet Structure

Site Logo

Each IP (Internet Protocol) packet consists of a header followed by a data field.  The header length can vary between 20 and 60 bytes, and the total size of the packet can be up to 65535 bytes.  Actually, many systems cannot handle packets as large as the protocol allows, and a working maximum size is 576 bytes.

 

IP Header Data

The header must have 5 words (of 32 bits each) of defined contents, and may have up to 10 more words of optional information.

 

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Version Header
Words
Type of Service Packet Bytes
Packet ID Flags Fragment Offset
Time To Live Protocol Header Checksum
Source IP Address
Destination IP Address
0 - 10 Option Words

Version

Header words

Type of Service

Packet Bytes

Packet ID

Flags

Fragment Offset

Time To Live (TTL)

Protocol

The protocol field indicates the next level protocol used in the data portion of the IP packet.  The most common values are 6 (TCP) or 17 (UDP), but most have the 256 possible values have been assigned.  See Protocol Numbers from IANA.

Header Checksum

The exclusive OR of all 16 bit words in the header, including the header checksum, should be zero.  Each forwarding node verifies the incoming header, and recalculates the header checksum for the outgoing header.

Source IP Address

Destination IP Address

TCP Packet Structure  TCP Packet Structure  Computer science Now
RFC 0791  RFC 0791  The Internet Engineering Task Force
Protocol Numbers  Protocol Numbers  IANA
Section 3 - The IP Protocol  Section 3 - The IP Protocol  Freesoft
IPv4 Header  IPv4 Header  das Raumroboter
IP, Internet Protocol  IP, Internet Protocol  Nework Sorcery
Computer Science Now Home  Computer Science Now Home
Data Communications Index  Data Communications Index
E-Mail
Valid HTML 4.01 Transitional Valid CSS! Site Logo

copyright 2000-2006, j.h.young, revised 2/17/06

TCP Packet Structure / RFC 0791 / Protocol Numbers / Section 3 - The IP Protocol / IPv4 Header / IP, Internet Protocol /