IP

Reference standard: RFC 791 - Internet Protocol

Datagram structure: fields

bits 0 _ _ _ _ _ _ 7 Datagram field
octets 1-n Header
octets (n+1)-p Data

Datagram structure: header

Bit 0 is the most significant bit.

bits 0 _ _ _ _ _ _ 7 Header
octet 1, bits 0-3 Version
The value of this field indicates the format of Internet header.
octet 1, bits 4-7 IHL
Internet Header Length in 32 bits words which points to the beginning of the data. The minimum value is 5 (20 octets).
octet 2 Type of service
octets 3-4 Total length
Length of the datagram, measured in octets, including header and data.
octets 5-6 Identification
An Identifying value assigned by the sender to aid in assembling the fragment of a datagram.
octet 7, bits 0-2 Flags
octet 7, bits 3-7
octet 8
Fragment offset
This field indicates where in the datagram this field belongs. The fragment offset is measured in units of 8 octets. The first fragment has offset zero.
octet 9 Time to live
This field indicates the maximum time the datagram is allowed to remain in the Internet system.
The time is measured in units of seconds.
octet 10 Protocol
This field indicates the next level protocol used in the data portion of the Internet datagram. The values for various protocol are specified in "Assign numbers" (RFC 790).
octets 11-12 Header Checksum
A checksum on the header only. The checksum field is the 16 bits one's complement of the one's complement sum of all 16 bits words in the header.
octets 13-14-15-16 Source Address
octets 17-18-19-20 Destination Address
k octets 21-22-(n-1) Options
octet n Padding
The internet header padding is used to ensure that the header ends on a 32 bit boundary. The padding is zero.

Type of service 

The type of service provides an indication of the abstract parameters of the quality of service desired.

bits 0 _ _ _ _ _ _ 7 Type of service
bits 0-1-2 Precedence 1 1 1 Network Control
1 1 0 Internetwork Control
1 0 1 CRITIC/ECP
1 0 0 Flash override
0 1 1 Flash
0 1 0 Immediate
0 0 1 Priority
0 0 0 Routine
bit 3 Delay: 0=Normal, 1= Low
bit 4 Throughput: 0=Normal, 1= High
bit 5 Reliability: 0=Normal, 1= High
bit 6-7 Reserved

Flags

bits 0-1-2 Flags
bit 0 Rerserved, must be 0
bit 1 DF: 0 = May fragment, 1 = Don't fragment
bit 2 MF: 0 = Last fragment, 1 = More fragments

Address format 

High order bits Address format Class
0 7 bits of net, 24 bits of host a
10 14 bits of net, 16 bits of host b
110 21 bits of net, 8 bits of host c
111 escape to extended addressing mode

Option format

The option field is variable in length. There may be zero or more options. There are two cases for the format of an option:

length format of an option
1 octet single octet option type
k octets An option type octet, an option-length octet, and the actual option-data octets.

 


home     Quick start     Specifications     Connections     Features     How to?     Notes     Search     Site Map

updated:  27-Feb-04