Introduction to Data Communications
Previous 54f. IP Header Next

54f. IP Header

The IP datagram is traditional represented by many rows of 32 bits (4 octets or bytes). Each 32 bit word is stacked on top of each other as per the following diagram for the IP header:

Field				Description

Version (4 bits)	The IP version, currently it is version 4

	0		Reserved
	1-3		Unassigned
	4		IP		Internet Protocol
	5		ST		ST Datagram Mode
	6		SIP		Simple Internet Protocol
	7		TP/IX		TP/IX: The Next Internet
	8		PIP		The P Internet Protocol
	9		TUBA		TUBA
	10-14		Unassigned
	15		Reserved

IHL (4 bits)		Internet Header Length, the length of the IP header in 32 bit words.

Type of Service		Flags to indicate precedence, delay, throughput and
(8 bits)		reliability parameters.

	Bit 0-2: 	Precedence
			000 - Routine
			001 - Priority
			010 - Immediate
			011 - Flash
			100 - Flash override
			101 - CRITIC / ECP
			110 - Internet control
			111 - Network control
	Bit 3:		0 = Normal delay, 1 = Low delay
	Bit 4:		0 = Normal throughput, 1 = High throughput
	Bit 5:		0 = Normal reliability, 1 = High reliability
	Bit 6-7:	Reserved for future use.

Total Length		Total length in bytes of the IP datagram (IP header and data)
(16 bits)		Minimum length = 576, Maximum length = 65,535

Identification		Unique identifying number for this datagram
(16 bits)

Flags (3 bits)		Options that indicate if fragmentation s permitted and/or used

	Bit 0:	Reserved, allways set to 0
	Bit 1:	0 = May fragment, 1 = Don't fragment
	Bit 2:	0 = Last fragment, 1 = More fragments

Fragment Offset		Indicates where in the entire datagram, this particular fragment
(13 bits)		belongs. Measured in 64 bit units from the beginning of the
			initial datagram.

Time to live (TTL)	Measured in hop counts or seconds. Every transverse through
(8 bits)		a router or gateway will decrement the hop count. When the
			TTL equals 0, the datagram is discarded. This stops datagrams
			from circulating the network forever. Starts at TTL = 255.

Protocol		Identifies the next protocol that follows the IP header.
(8 bits)		The full listing of protocols is in
Appendix G: IP Header Protocols.
			Examples are:

	Decimal	Protocol	Description
	0			Reserved
	1	ICMP		Internet Control Message
	2	IGMP		Internet Group Management
	6	TCP		Transmission Control
	37	DDP		Datagram Delivery Protocol
	46	RSVP		Reservation Protocol
	93	AX.25		AX.25 Frames

Header Checksum		A 32 bit Cyclic Redundacy Check that may be checked at each
(32 bit)		gateway.

Source Address		An IP address indicating the sender. Ex. 142.110.237.1
(32 bit)

Destination Address	An IP address indicating the receiptient. Ex. 142.110.237.2
(32 bit)

Options			Options from the sender such as route specifications.
(variable)

Padding			Ensures that the IP header ends on a 32 bit boundary.


Introduction to Data Communications
Previous Table of Contents Next