As per Relevance of the word datagram, we have this rfc below:
RFC: 791
INTERNET
DARPA INTERNET
PROTOCOL
September 1981
prepared
Defense Advanced Research Projects
Information Processing Techniques
1400 Wilson
Arlington, Virginia 22209
Information Sciences
University of Southern
4676 Admiralty
Marina del Rey, California 90291
September 1981
Internet
TABLE OF
PREFACE ........................................................
1. INTRODUCTION ..................................................... 1
1.1 Motivation .................................................... 1
1.2 Scope ......................................................... 1
1.3 Interfaces .................................................... 1
1.4 Operation ..................................................... 2
2. OVERVIEW ......................................................... 5
2.1 Relation to Other Protocols ................................... 9
2.2 Model of Operation ............................................ 5
2.3 Function Description .......................................... 7
2.4 Gateways ...................................................... 9
3. SPECIFICATION ................................................... 11
3.1 Internet Header Format ....................................... 11
3.2 Discussion ................................................... 23
3.3 Interfaces ................................................... 31
APPENDIX A: Examples & Scenarios ................................... 34
APPENDIX B: Data Transmission Order ................................ 39
GLOSSARY ............................................................ 41
REFERENCES .......................................................... 45
[Page i
September 1981
Internet
[Page ii]
September 1981
Internet
This document specifies the DoD Standard Internet Protocol.
document is based on six earlier editions of the ARPA Internet
Specification, and the present text draws heavily from them. There
been many contributors to this work both in terms of concepts and
terms of text. This edition revises aspects of addressing,
handling, option codes, and the security, precedence, compartments,
handling restriction features of the internet protocol
Jon
[Page iii
September 1981
RFC: 791
Replaces: RFC 760
IENs 128, 123, 111,
80, 54, 44, 41, 28, 26
INTERNET
DARPA INTERNET
PROTOCOL
1.
1.1.
The Internet Protocol is designed for use in interconnected systems
packet-switched computer communication networks. Such a system
been called a "catenet" [1]. The internet protocol provides
transmitting blocks of data called datagrams from sources
destinations, where sources and destinations are hosts identified
fixed length addresses. The internet protocol also provides
fragmentation and reassembly of long datagrams, if necessary,
transmission through "small packet" networks
1.2.
The internet protocol is specifically limited in scope to provide
functions necessary to deliver a package of bits (an
datagram) from a source to a destination over an interconnected
of networks. There are no mechanisms to augment end-to-end
reliability, flow control, sequencing, or other services
found in host-to-host protocols. The internet protocol can
on the services of its supporting networks to provide various
and qualities of service
1.3.
This protocol is called on by host-to-host protocols in an
environment. This protocol calls on local network protocols to
the internet datagram to the next gateway or destination host
For example, a TCP module would call on the internet module to take
TCP segment (including the TCP header and user data) as the
portion of an internet datagram. The TCP module would provide
addresses and other parameters in the internet header to the
module as arguments of the call. The internet module would
create an internet datagram and call on the local network interface
transmit the internet datagram
In the ARPANET case, for example, the internet module would call on
[Page 1]
September 1981
Internet
local net module which would add the 1822 leader [2] to the
datagram creating an ARPANET message to transmit to the IMP.
ARPANET address would be derived from the internet address by
local network interface and would be the address of some host in
ARPANET, that host might be a gateway to other networks
1.4.
The internet protocol implements two basic functions: addressing
fragmentation
The internet modules use the addresses carried in the internet
to transmit internet datagrams toward their destinations.
selection of a path for transmission is called routing
The internet modules use fields in the internet header to fragment
reassemble internet datagrams when necessary for transmission
"small packet" networks
The model of operation is that an internet module resides in each
engaged in internet communication and in each gateway
interconnects networks. These modules share common rules
interpreting address fields and for fragmenting and
internet datagrams. In addition, these modules (especially
gateways) have procedures for making routing decisions and
functions
The internet protocol treats each internet datagram as an
entity unrelated to any other internet datagram. There are
connections or logical circuits (virtual or otherwise).
The internet protocol uses four key mechanisms in providing
service: Type of Service, Time to Live, Options, and Header Checksum
The Type of Service is used to indicate the quality of the
desired. The type of service is an abstract or generalized set
parameters which characterize the service choices provided in
networks that make up the internet. This type of service
is to be used by gateways to select the actual transmission
for a particular network, the network to be used for the next hop,
the next gateway when routing an internet datagram
The Time to Live is an indication of an upper bound on the lifetime
an internet datagram. It is set by the sender of the datagram
reduced at the points along the route where it is processed. If
time to live reaches zero before the internet datagram reaches
destination, the internet datagram is destroyed. The time to live
be thought of as a self destruct time limit
[Page 2]
September 1981
Internet
The Options provide for control functions needed or useful in
situations but unnecessary for the most common communications.
options include provisions for timestamps, security, and
routing
The Header Checksum provides a verification that the information
in processing internet datagram has been transmitted correctly.
data may contain errors. If the header checksum fails, the
datagram is discarded at once by the entity which detects the error
The internet protocol does not provide a reliable
facility. There are no acknowledgments either end-to-end
hop-by-hop. There is no error control for data, only a
checksum. There are no retransmissions. There is no flow control
Errors detected may be reported via the Internet Control
Protocol (ICMP) [3] which is implemented in the internet
module
[Page 3]
September 1981
Internet
[Page 4]
September 1981
Internet
2.
2.1. Relation to Other
The following diagram illustrates the place of the internet
in the protocol hierarchy
+------+ +-----+ +-----+ +-----+
|Telnet| | FTP | | TFTP| ... | ... |
+------+ +-----+ +-----+ +-----+
| | | |
+-----+ +-----+ +-----+
| TCP | | UDP | ... | ... |
+-----+ +-----+ +-----+
| | |
+--------------------------+----+
| Internet Protocol & ICMP |
+--------------------------+----+
|
+---------------------------+
| Local Network Protocol |
+---------------------------+
Protocol
Figure 1.
Internet protocol interfaces on one side to the higher
host-to-host protocols and on the other side to the local
protocol. In this context a "local network" may be a small network
a building or a large network such as the ARPANET
2.2. Model of
The model of operation for transmitting a datagram from
application program to another is illustrated by the
scenario
We suppose that this transmission will involve one
gateway
The sending application program prepares its data and calls on
local internet module to send that data as a datagram and passes
destination address and other parameters as arguments of the call
The internet module prepares a datagram header and attaches the
to it. The internet module determines a local network address
this internet address, in this case it is the address of a gateway
[Page 5]
September 1981
Internet
It sends this datagram and the local network address to the
network interface
The local network interface creates a local network header,
attaches the datagram to it, then sends the result via the
network
The datagram arrives at a gateway host wrapped in the local
header, the local network interface strips off this header,
turns the datagram over to the internet module. The internet
determines from the internet address that the datagram is to
forwarded to another host in a second network. The internet
determines a local net address for the destination host. It
on the local network interface for that network to send
datagram
This local network interface creates a local network header
attaches the datagram sending the result to the destination host
At this destination host the datagram is stripped of the local
header by the local network interface and handed to the
module
The internet module determines that the datagram is for
application program in this host. It passes the data to
application program in response to a system call, passing the
address and other parameters as results of the call
Application
Program
\ /
Internet Module Internet Module Internet Module
\ / \ /
LNI-1 LNI-1 LNI-2 LNI-2
\ / \ /
Local Network 1 Local Network 2
Transmission
Figure 2
[Page 6]
September 1981
Internet
2.3. Function
The function or purpose of Internet Protocol is to move
through an interconnected set of networks. This is done by
the datagrams from one internet module to another until
destination is reached. The internet modules reside in hosts
gateways in the internet system. The datagrams are routed from
internet module to another through individual networks based on
interpretation of an internet address. Thus, one important
of the internet protocol is the internet address
In the routing of messages from one internet module to another
datagrams may need to traverse a network whose maximum packet size
smaller than the size of the datagram. To overcome this difficulty,
fragmentation mechanism is provided in the internet protocol
A distinction is made between names, addresses, and routes [4].
name indicates what we seek. An address indicates where it is.
route indicates how to get there. The internet protocol
primarily with addresses. It is the task of higher level (i.e.,
host-to-host or application) protocols to make the mapping
names to addresses. The internet module maps internet addresses
local net addresses. It is the task of lower level (i.e., local
or gateways) procedures to make the mapping from local net
to routes
Addresses are fixed length of four octets (32 bits). An
begins with a network number, followed by local address (called
"rest" field). There are three formats or classes of
addresses: in class a, the high order bit is zero, the next 7
are the network, and the last 24 bits are the local address;
class b, the high order two bits are one-zero, the next 14 bits
the network and the last 16 bits are the local address; in class c
the high order three bits are one-one-zero, the next 21 bits are
network and the last 8 bits are the local address
Care must be taken in mapping internet addresses to local
addresses; a single physical host must be able to act as if it
several distinct hosts to the extent of using several
internet addresses. Some hosts will also have several
interfaces (multi-homing).
That is, provision must be made for a host to have several
interfaces to the network with each having several logical
addresses
[Page 7]
September 1981
Internet
Examples of address mappings may be found in "Address Mappings" [5].
Fragmentation of an internet datagram is necessary when
originates in a local net that allows a large packet size and
traverse a local net that limits packets to a smaller size to
its destination
An internet datagram can be marked "don't fragment." Any
datagram so marked is not to be internet fragmented under
circumstances. If internet datagram marked don't fragment cannot
delivered to its destination without fragmenting it, it is to
discarded instead
Fragmentation, transmission and reassembly across a local
which is invisible to the internet protocol module is
intranet fragmentation and may be used [6].
The internet fragmentation and reassembly procedure needs to be
to break a datagram into an almost arbitrary number of pieces
can be later reassembled. The receiver of the fragments uses
identification field to ensure that fragments of different
are not mixed. The fragment offset field tells the receiver
position of a fragment in the original datagram. The
offset and length determine the portion of the original
covered by this fragment. The more-fragments flag indicates (
being reset) the last fragment. These fields provide
information to reassemble datagrams
The identification field is used to distinguish the fragments of
datagram from those of another. The originating protocol module
an internet datagram sets the identification field to a value
must be unique for that source-destination pair and protocol for
time the datagram will be active in the internet system.
originating protocol module of a complete datagram sets
more-fragments flag to zero and the fragment offset to zero
To fragment a long internet datagram, an internet protocol
(for example, in a gateway), creates two new internet datagrams
copies the contents of the internet header fields from the
datagram into both new internet headers. The data of the
datagram is divided into two portions on a 8 octet (64 bit)
(the second portion might not be an integral multiple of 8 octets
but the first must be). Call the number of 8 octet blocks in
first portion NFB (for Number of Fragment Blocks). The
portion of the data is placed in the first new internet datagram
and the total length field is set to the length of the
[Page 8]
September 1981
Internet
datagram. The more-fragments flag is set to one. The
portion of the data is placed in the second new internet datagram
and the total length field is set to the length of the
datagram. The more-fragments flag carries the same value as
long datagram. The fragment offset field of the second new
datagram is set to the value of that field in the long datagram
NFB
This procedure can be generalized for an n-way split, rather
the two-way split described
To assemble the fragments of an internet datagram, an
protocol module (for example at a destination host)
internet datagrams that all have the same value for the four fields
identification, source, destination, and protocol. The
is done by placing the data portion of each fragment in the
position indicated by the fragment offset in that fragment'
internet header. The first fragment will have the fragment
zero, and the last fragment will have the more-fragments flag
to zero
2.4.
Gateways implement internet protocol to forward datagrams
networks. Gateways also implement the Gateway to Gateway
(GGP) [7] to coordinate routing and other internet
information
In a gateway the higher level protocols need not be implemented
the GGP functions are added to the IP module
+-------------------------------+
| Internet Protocol & ICMP & GGP|
+-------------------------------+
| |
+---------------+ +---------------+
| Local Net | | Local Net |
+---------------+ +---------------+
Gateway
Figure 3.
[Page 9]
September 1981
Internet
[Page 10]
September 1981
Internet
3.
3.1. Internet Header
A summary of the contents of the internet header follows
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Version| IHL |Type of Service| Total Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Identification |Flags| Fragment Offset |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Time to Live | Protocol | Header Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Destination Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Options | Padding |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Example Internet Datagram
Figure 4.
Note that each tick mark represents one bit position
Version: 4
The Version field indicates the format of the internet header.
document describes version 4.
IHL: 4
Internet Header Length is the length of the internet header in 32
bit words, and thus points to the beginning of the data. Note
the minimum value for a correct header is 5.
[Page 11]
September 1981
Internet
Type of Service: 8
The Type of Service provides an indication of the
parameters of the quality of service desired. These parameters
to be used to guide the selection of the actual service
when transmitting a datagram through a particular network.
networks offer service precedence, which somehow treats
precedence traffic as more important than other traffic (
by accepting only traffic above a certain precedence at time of
load). The major choice is a three way tradeoff between low-delay
high-reliability, and high-throughput
Bits 0-2: Precedence
Bit 3: 0 = Normal Delay, 1 = Low Delay
Bits 4: 0 = Normal Throughput, 1 = High Throughput
Bits 5: 0 = Normal Relibility, 1 = High Relibility
Bit 6-7: Reserved for Future Use
0 1 2 3 4 5 6 7
+-----+-----+-----+-----+-----+-----+-----+-----+
| | | | | | |
| PRECEDENCE | D | T | R | 0 | 0 |
| | | | | | |
+-----+-----+-----+-----+-----+-----+-----+-----+
111 - Network
110 - Internetwork
101 - CRITIC/
100 - Flash
011 -
010 -
001 -
000 -
The use of the Delay, Throughput, and Reliability indications
increase the cost (in some sense) of the service. In many
better performance for one of these parameters is coupled with
performance on another. Except for very unusual cases at most
of these three indications should be set
The type of service is used to specify the treatment of the
during its transmission through the internet system.
mappings of the internet type of service to the actual
provided on networks such as AUTODIN II, ARPANET, SATNET, and
is given in "Service Mappings" [8].
[Page 12]
September 1981
Internet
The Network Control precedence designation is intended to be
within a network only. The actual use and control of
designation is up to each network. The Internetwork
designation is intended for use by gateway control originators only
If the actual use of these precedence designations is of concern
a particular network, it is the responsibility of that network
control the access to, and use of, those precedence designations
Total Length: 16
Total Length is the length of the datagram, measured in octets
including internet header and data. This field allows the length
a datagram to be up to 65,535 octets. Such long datagrams
impractical for most hosts and networks. All hosts must be
to accept datagrams of up to 576 octets (whether they arrive
or in fragments). It is recommended that hosts only send
larger than 576 octets if they have assurance that the
is prepared to accept the larger datagrams
The number 576 is selected to allow a reasonable sized data block
be transmitted in addition to the required header information.
example, this size allows a data block of 512 octets plus 64
octets to fit in a datagram. The maximal internet header is 60
octets, and a typical internet header is 20 octets, allowing
margin for headers of higher level protocols
Identification: 16
An identifying value assigned by the sender to aid in assembling
fragments of a datagram
Flags: 3
Various Control Flags
Bit 0: reserved, must be
Bit 1: (DF) 0 = May Fragment, 1 = Don't Fragment
Bit 2: (MF) 0 = Last Fragment, 1 = More Fragments
0 1 2
+---+---+---+
| | D | M |
| 0 | F | F |
+---+---+---+
Fragment Offset: 13
This field indicates where in the datagram this fragment belongs
[Page 13]
September 1981
Internet
The fragment offset is measured in units of 8 octets (64 bits).
first fragment has offset zero
Time to Live: 8
This field indicates the maximum time the datagram is allowed
remain in the internet system. If this field contains the
zero, then the datagram must be destroyed. This field is
in internet header processing. The time is measured in units
seconds, but since every module that processes a datagram
decrease the TTL by at least one even if it process the datagram
less than a second, the TTL must be thought of only as an
bound on the time a datagram may exist. The intention is to
undeliverable datagrams to be discarded, and to bound the
datagram lifetime
Protocol: 8
This field indicates the next level protocol used in the
portion of the internet datagram. The values for various
are specified in "Assigned Numbers" [9].
Header Checksum: 16
A checksum on the header only. Since some header fields
(e.g., time to live), this is recomputed and verified at each
that the internet header is processed
The checksum algorithm is
The checksum field is the 16 bit one's complement of the one'
complement sum of all 16 bit words in the header. For purposes
computing the checksum, the value of the checksum field is zero
This is a simple to compute checksum and experimental
indicates it is adequate, but it is provisional and may be
by a CRC procedure, depending on further experience
Source Address: 32
The source address. See section 3.2.
Destination Address: 32
The destination address. See section 3.2.
[Page 14]
September 1981
Internet
Options:
The options may appear or not in datagrams. They must
implemented by all IP modules (host and gateways). What is
is their transmission in any particular datagram, not
implementation
In some environments the security option may be required in
datagrams
The option field is variable in length. There may be zero or
options. There are two cases for the format of an option
Case 1: A single octet of option-type
Case 2: An option-type octet, an option-length octet, and
actual option-data octets
The option-length octet counts the option-type octet and
option-length octet as well as the option-data octets
The option-type octet is viewed as having 3 fields
1 bit copied flag
2 bits option class
5 bits option number
The copied flag indicates that this option is copied into
fragments on fragmentation
0 = not
1 =
The option classes are
0 =
1 = reserved for future
2 = debugging and
3 = reserved for future
[Page 15]
September 1981
Internet
The following internet options are defined
CLASS NUMBER LENGTH
----- ------ ------ -----------
0 0 - End of Option list. This option occupies
1 octet; it has no length octet
0 1 - No Operation. This option occupies only 1
octet; it has no length octet
0 2 11 Security. Used to carry Security
Compartmentation, User Group (TCC),
Handling Restriction Codes compatible with
requirements
0 3 var. Loose Source Routing. Used to route
internet datagram based on
supplied by the source
0 9 var. Strict Source Routing. Used to route
internet datagram based on
supplied by the source
0 7 var. Record Route. Used to trace the route
internet datagram takes
0 8 4 Stream ID. Used to carry the
identifier
2 4 var. Internet Timestamp
Specific Option
End of Option
+--------+
|00000000|
+--------+
Type=0
This option indicates the end of the option list. This
not coincide with the end of the internet header according
the internet header length. This is used at the end of
options, not the end of each option, and need only be used
the end of the options would not otherwise coincide with the
of the internet header
May be copied, introduced, or deleted on fragmentation, or
any other reason
[Page 16]
September 1981
Internet
No
+--------+
|00000001|
+--------+
Type=1
This option may be used between options, for example, to
the beginning of a subsequent option on a 32 bit boundary
May be copied, introduced, or deleted on fragmentation, or
any other reason
This option provides a way for hosts to send security
compartmentation, handling restrictions, and TCC (closed
group) parameters. The format for this option is as follows
+--------+--------+---//---+---//---+---//---+---//---+
|10000010|00001011|SSS SSS|CCC CCC|HHH HHH| TCC |
+--------+--------+---//---+---//---+---//---+---//---+
Type=130 Length=11
Security (S field): 16
Specifies one of 16 levels of security (eight of which
reserved for future use).
00000000 00000000 -
11110001 00110101 -
01111000 10011010 -
10111100 01001101 -
01011110 00100110 -
10101111 00010011 -
11010111 10001000 -
01101011 11000101 - Top
00110101 11100010 - (Reserved for future use
10011010 11110001 - (Reserved for future use
01001101 01111000 - (Reserved for future use
00100100 10111101 - (Reserved for future use
00010011 01011110 - (Reserved for future use
10001001 10101111 - (Reserved for future use
11000100 11010110 - (Reserved for future use
11100010 01101011 - (Reserved for future use
[Page 17]
September 1981
Internet
Compartments (C field): 16
An all zero value is used when the information transmitted
not compartmented. Other values for the compartments
may be obtained from the Defense Intelligence Agency
Handling Restrictions (H field): 16
The values for the control and release markings
alphanumeric digraphs and are defined in the
Intelligence Agency Manual DIAM 65-19, "Standard
Markings".
Transmission Control Code (TCC field): 24
Provides a means to segregate traffic and define
communities of interest among subscribers. The TCC values
trigraphs, and are available from HQ DCA Code 530.
Must be copied on fragmentation. This option appears at
once in a datagram
Loose Source and Record
+--------+--------+--------+---------//--------+
|10000011| length | pointer| route data |
+--------+--------+--------+---------//--------+
Type=131
The loose source and record route (LSRR) option provides a
for the source of an internet datagram to supply
information to be used by the gateways in forwarding
datagram to the destination, and to record the
information
The option begins with the option type code. The second
is the option length which includes the option type code and
length octet, the pointer octet, and length-3 octets of
data. The third octet is the pointer into the route
indicating the octet which begins the next source address to
processed. The pointer is relative to this option, and
smallest legal value for the pointer is 4.
A route data is composed of a series of internet addresses
Each internet address is 32 bits or 4 octets. If the pointer
greater than the length, the source route is empty (and
recorded route full) and the routing is to be based on
destination address field
[Page 18]
September 1981
Internet
If the address in destination address field has been reached
the pointer is not greater than the length, the next address
the source route replaces the address in the destination
field, and the recorded route address replaces the
address just used, and pointer is increased by four
The recorded route address is the internet module's own
address as known in the environment into which this datagram
being forwarded
This procedure of replacing the source route with the
route (though it is in the reverse of the order it must be in
be used as a source route) means the option (and the IP
as a whole) remains a constant length as the datagram
through the internet
This option is a loose source route because the gateway or
IP is allowed to use any route of any number of
intermediate gateways to reach the next address in the route
Must be copied on fragmentation. Appears at most once in
datagram
Strict Source and Record
+--------+--------+--------+---------//--------+
|10001001| length | pointer| route data |
+--------+--------+--------+---------//--------+
Type=137
The strict source and record route (SSRR) option provides
means for the source of an internet datagram to supply
information to be used by the gateways in forwarding
datagram to the destination, and to record the
information
The option begins with the option type code. The second
is the option length which includes the option type code and
length octet, the pointer octet, and length-3 octets of
data. The third octet is the pointer into the route
indicating the octet which begins the next source address to
processed. The pointer is relative to this option, and
smallest legal value for the pointer is 4.
A route data is composed of a series of internet addresses
Each internet address is 32 bits or 4 octets. If the pointer
greater than the length, the source route is empty (and
[Page 19]
September 1981
Internet
recorded route full) and the routing is to be based on
destination address field
If the address in destination address field has been reached
the pointer is not greater than the length, the next address
the source route replaces the address in the destination
field, and the recorded route address replaces the
address just used, and pointer is increased by four
The recorded route address is the internet module's own
address as known in the environment into which this datagram
being forwarded
This procedure of replacing the source route with the
route (though it is in the reverse of the order it must be in
be used as a source route) means the option (and the IP
as a whole) remains a constant length as the datagram
through the internet
This option is a strict source route because the gateway or
IP must send the datagram directly to the next address in
source route through only the directly connected
indicated in the next address to reach the next gateway or
specified in the route
Must be copied on fragmentation. Appears at most once in
datagram
Record
+--------+--------+--------+---------//--------+
|00000111| length | pointer| route data |
+--------+--------+--------+---------//--------+
Type=7
The record route option provides a means to record the route
an internet datagram
The option begins with the option type code. The second
is the option length which includes the option type code and
length octet, the pointer octet, and length-3 octets of
data. The third octet is the pointer into the route
indicating the octet which begins the next area to store a
address. The pointer is relative to this option, and
smallest legal value for the pointer is 4.
A recorded route is composed of a series of internet addresses
Each internet address is 32 bits or 4 octets. If the pointer
[Page 20]
September 1981
Internet
greater than the length, the recorded route data area is full
The originating host must compose this option with a
enough route data area to hold all the address expected.
size of the option does not change due to adding addresses.
intitial contents of the route data area must be zero
When an internet module routes a datagram it checks to see
the record route option is present. If it is, it inserts
own internet address as known in the environment into which
datagram is being forwarded into the recorded route begining
the octet indicated by the pointer, and increments the
by four
If the route data area is already full (the pointer exceeds
length) the datagram is forwarded without inserting the
into the recorded route. If there is some room but not
room for a full address to be inserted, the original datagram
considered to be in error and is discarded. In either case
ICMP parameter problem message may be sent to the
host [3].
Not copied on fragmentation, goes in first fragment only
Appears at most once in a datagram
Stream
+--------+--------+--------+--------+
|10001000|00000010| Stream ID |
+--------+--------+--------+--------+
Type=136 Length=4
This option provides a way for the 16-bit SATNET
identifier to be carried through networks that do not
the stream concept
Must be copied on fragmentation. Appears at most once in
datagram
[Page 21]
September 1981
Internet
Internet
+--------+--------+--------+--------+
|01000100| length | pointer|oflw|flg
+--------+--------+--------+--------+
| internet address |
+--------+--------+--------+--------+
| timestamp |
+--------+--------+--------+--------+
| . |
.
.
Type = 68
The Option Length is the number of octets in the option
the type, length, pointer, and overflow/flag octets (
length 40).
The Pointer is the number of octets from the beginning of
option to the end of timestamps plus one (i.e., it points to
octet beginning the space for next timestamp). The
legal value is 5. The timestamp area is full when the
is greater than the length
The Overflow (oflw) [4 bits] is the number of IP modules
cannot register timestamps due to lack of space
The Flag (flg) [4 bits] values
0 -- time stamps only, stored in consecutive 32-bit words
1 -- each timestamp is preceded with internet address of
registering entity
3 -- the internet address fields are prespecified. An
module only registers its timestamp if it matches its
address with the next specified internet address
The Timestamp is a right-justified, 32-bit timestamp
milliseconds since midnight UT. If the time is not available
milliseconds or cannot be provided with respect to midnight
then any time may be inserted as a timestamp provided the
order bit of the timestamp field is set to one to indicate
use of a non-standard value
The originating host must compose this option with a
enough timestamp data area to hold all the timestamp
expected. The size of the option does not change due to
[Page 22]
September 1981
Internet
timestamps. The intitial contents of the timestamp data
must be zero or internet address/zero pairs
If the timestamp data area is already full (the pointer
the length) the datagram is forwarded without inserting
timestamp, but the overflow count is incremented by one
If there is some room but not enough room for a full
to be inserted, or the overflow count itself overflows,
original datagram is considered to be in error and is discarded
In either case an ICMP parameter problem message may be sent
the source host [3].
The timestamp option is not copied upon fragmentation. It
carried in the first fragment. Appears at most once in
datagram
Padding:
The internet header padding is used to ensure that the
header ends on a 32 bit boundary. The padding is zero
3.2.
The implementation of a protocol must be robust. Each
must expect to interoperate with others created by
individuals. While the goal of this specification is to be
about the protocol there is the possibility of
interpretations. In general, an implementation must be
in its sending behavior, and liberal in its receiving behavior.
is, it must be careful to send well-formed datagrams, but must
any datagram that it can interpret (e.g., not object to
errors where the meaning is still clear).
The basic internet service is datagram oriented and provides for
fragmentation of datagrams at gateways, with reassembly taking
at the destination internet protocol module in the destination host
Of course, fragmentation and reassembly of datagrams within a
or by private agreement between the gateways of a network is
allowed since this is transparent to the internet protocols and
higher-level protocols. This transparent type of fragmentation
reassembly is termed "network-dependent" (or intranet)
and is not discussed further here
Internet addresses distinguish sources and destinations to the
level and provide a protocol field as well. It is assumed that
protocol will provide for whatever multiplexing is necessary within
host
[Page 23]
September 1981
Internet
To provide for flexibility in assigning address to networks
allow for the large number of small to intermediate sized
the interpretation of the address field is coded to specify a
number of networks with a large number of host, a moderate number
networks with a moderate number of hosts, and a large number
networks with a small number of hosts. In addition there is
escape code for extended addressing mode
Address Formats
High Order Bits Format
--------------- ------------------------------- -----
0 7 bits of net, 24 bits of host
10 14 bits of net, 16 bits of host
110 21 bits of net, 8 bits of host
111 escape to extended addressing
A value of zero in the network field means this network. This
only used in certain ICMP messages. The extended addressing
is undefined. Both of these features are reserved for future use
The actual values assigned for network addresses is given
"Assigned Numbers" [9].
The local address, assigned by the local network, must allow for
single physical host to act as several distinct internet hosts
That is, there must be a mapping between internet host addresses
network/host interfaces that allows several internet addresses
correspond to one interface. It must also be allowed for a host
have several physical interfaces and to treat the datagrams
several of them as if they were all addressed to a single host
Address mappings between internet addresses and addresses
ARPANET, SATNET, PRNET, and other networks are described in "
Mappings" [5].
Fragmentation and Reassembly
The internet identification field (ID) is used together with
source and destination address, and the protocol fields, to
datagram fragments for reassembly
The More Fragments flag bit (MF) is set if the datagram is not
last fragment. The Fragment Offset field identifies the
location, relative to the beginning of the original
datagram. Fragments are counted in units of 8 octets.
[Page 24]
September 1981
Internet
fragmentation strategy is designed so than an unfragmented
has all zero fragmentation information (MF = 0, fragment offset =
0). If an internet datagram is fragmented, its data portion must
broken on 8 octet boundaries
This format allows 2**13 = 8192 fragments of 8 octets each for
total of 65,536 octets. Note that this is consistent with the
datagram total length field (of course, the header is counted in
total length and not in the fragments).
When fragmentation occurs, some options are copied, but
remain with the first fragment only
Every internet module must be able to forward a datagram of 68
octets without further fragmentation. This is because an
header may be up to 60 octets, and the minimum fragment is 8 octets
Every internet destination must be able to receive a datagram of 576
octets either in one piece or in fragments to be reassembled
The fields which may be affected by fragmentation include
(1) options
(2) more fragments
(3) fragment
(4) internet header length
(5) total length
(6) header
If the Don't Fragment flag (DF) bit is set, then
fragmentation of this datagram is NOT permitted, although it may
discarded. This can be used to prohibit fragmentation in
where the receiving host does not have sufficient resources
reassemble internet fragments
One example of use of the Don't Fragment feature is to down
load a small host. A small host could have a boot strap
that accepts a datagram stores it in memory and then executes it
The fragmentation and reassembly procedures are most
described by examples. The following procedures are
implementations
General notation in the following pseudo programs: "=<" means "
than or equal", "#" means "not equal", "=" means "equal", "<-"
"is set to". Also, "x to y" includes x and excludes y; for example
"4 to 7" would include 4, 5, and 6 (but not 7).
[Page 25]
September 1981
Internet
An Example Fragmentation
The maximum sized datagram that can be transmitted through
next network is called the maximum transmission unit (MTU).
If the total length is less than or equal the maximum
unit then submit this datagram to the next step in
processing; otherwise cut the datagram into two fragments,
first fragment being the maximum size, and the second
being the rest of the datagram. The first fragment is
to the next step in datagram processing, while the second
is submitted to this procedure in case it is still too large
Notation
FO - Fragment
IHL - Internet Header
DF - Don't Fragment
MF - More Fragments
TL - Total
OFO - Old Fragment
OIHL - Old Internet Header
OMF - Old More Fragments
OTL - Old Total
NFB - Number of Fragment
MTU - Maximum Transmission
Procedure
IF TL =< MTU THEN Submit this datagram to the next
in datagram processing ELSE IF DF = 1 THEN discard
datagram
To produce the first fragment
(1) Copy the original internet header
(2) OIHL <- IHL; OTL <- TL; OFO <- FO; OMF <- MF
(3) NFB <- (MTU-IHL*4)/8;
(4) Attach the first NFB*8 data octets
(5) Correct the header
MF <- 1; TL <- (IHL*4)+(NFB*8);
Recompute Checksum
(6) Submit this fragment to the next step
datagram processing
To produce the second fragment
(7) Selectively copy the internet header (some
are not copied, see option definitions);
(8) Append the remaining data
(9) Correct the header
IHL <- (((OIHL*4)-(length of options not copied))+3)/4;
[Page 26]
September 1981
Internet
TL <- OTL - NFB*8 - (OIHL-IHL)*4);
FO <- OFO + NFB; MF <- OMF; Recompute Checksum
(10) Submit this fragment to the fragmentation test; DONE
In the above procedure each fragment (except the last) was
the maximum allowable size. An alternative might produce
than the maximum size datagrams. For example, one could
a fragmentation procedure that repeatly divided large datagrams
half until the resulting fragments were less than the
transmission unit size
An Example Reassembly
For each datagram the buffer identifier is computed as
concatenation of the source, destination, protocol,
identification fields. If this is a whole datagram (that is
the fragment offset and the more fragments fields are zero),
any reassembly resources associated with this buffer
are released and the datagram is forwarded to the next step
datagram processing
If no other fragment with this buffer identifier is on hand
reassembly resources are allocated. The reassembly
consist of a data buffer, a header buffer, a fragment block
table, a total data length field, and a timer. The data from
fragment is placed in the data buffer according to its
offset and length, and bits are set in the fragment block
table corresponding to the fragment blocks received
If this is the first fragment (that is the fragment offset
zero) this header is placed in the header buffer. If this is
last fragment ( that is the more fragments field is zero)
total data length is computed. If this fragment completes
datagram (tested by checking the bits set in the fragment
table), then the datagram is sent to the next step in
processing; otherwise the timer is set to the maximum of
current timer value and the value of the time to live field
this fragment; and the reassembly routine gives up control
If the timer runs out, the all reassembly resources for
buffer identifier are released. The initial setting of the
is a lower bound on the reassembly waiting time. This is
the waiting time will be increased if the Time to Live in
arriving fragment is greater than the current timer value but
not be decreased if it is less. The maximum this timer
could reach is the maximum time to live (approximately 4.25
minutes). The current recommendation for the initial
setting is 15 seconds. This may be changed as experience
[Page 27]
September 1981
Internet
this protocol accumulates. Note that the choice of this
value is related to the buffer capacity available and the
rate of the transmission medium; that is, data rate times
value equals buffer size (e.g., 10Kb/s X 15s = 150Kb).
Notation
FO - Fragment
IHL - Internet Header
MF - More Fragments
TTL - Time To
NFB - Number of Fragment
TL - Total
TDL - Total Data
BUFID - Buffer
RCVBT - Fragment Received Bit
TLB - Timer Lower
Procedure
(1) BUFID <- source|destination|protocol|identification
(2) IF FO = 0 AND MF = 0
(3) THEN IF buffer with BUFID is
(4) THEN flush all reassembly for this BUFID
(5) Submit datagram to next step; DONE
(6) ELSE IF no buffer with BUFID is
(7) THEN allocate reassembly
with BUFID
TIMER <- TLB; TDL <- 0;
(8) put data from fragment into data buffer
BUFID from octet FO*8
octet (TL-(IHL*4))+FO*8;
(9) set RCVBT bits from
to FO+((TL-(IHL*4)+7)/8);
(10) IF MF = 0 THEN TDL <- TL-(IHL*4)+(FO*8)
(11) IF FO = 0 THEN put header in header
(12) IF TDL # 0
(13) AND all RCVBT bits from 0
to (TDL+7)/8 are
(14) THEN TL <- TDL+(IHL*4)
(15) Submit datagram to next step
(16) free all reassembly
for this BUFID; DONE
(17) TIMER <- MAX(TIMER,TTL);
(18) give up until next fragment or timer expires
(19) timer expires: flush all reassembly with this BUFID; DONE
In the case that two or more fragments contain the same
[Page 28]
September 1981
Internet
either identically or through a partial overlap, this
will use the more recently arrived copy in the data buffer
datagram delivered
The choice of the Identifier for a datagram is based on the need
provide a way to uniquely identify the fragments of a
datagram. The protocol module assembling fragments judges
to belong to the same datagram if they have the same source
destination, protocol, and Identifier. Thus, the sender must
the Identifier to be unique for this source, destination pair
protocol for the time the datagram (or any fragment of it) could
alive in the internet
It seems then that a sending protocol module needs to keep a
of Identifiers, one entry for each destination it has
with in the last maximum packet lifetime for the internet
However, since the Identifier field allows 65,536 different values
some host may be able to simply use unique identifiers
of destination
It is appropriate for some higher level protocols to choose
identifier. For example, TCP protocol modules may retransmit
identical TCP segment, and the probability for correct
would be enhanced if the retransmission carried the same
as the original transmission since fragments of either
could be used to construct a correct TCP segment
Type of
The type of service (TOS) is for internet service quality selection
The type of service is specified along the abstract
precedence, delay, throughput, and reliability. These
parameters are to be mapped into the actual service parameters
the particular networks the datagram traverses
Precedence. An independent measure of the importance of
datagram
Delay. Prompt delivery is important for datagrams with
indication
Throughput. High data rate is important for datagrams with
indication
[Page 29]
September 1981
Internet
Reliability. A higher level of effort to ensure delivery
important for datagrams with this indication
For example, the ARPANET has a priority bit, and a choice
"standard" messages (type 0) and "uncontrolled" messages (type 3),
(the choice between single packet and multipacket messages can
be considered a service parameter). The uncontrolled messages
to be less reliably delivered and suffer less delay. Suppose
internet datagram is to be sent through the ARPANET. Let
internet type of service be given as
Precedence: 5
Delay: 0
Throughput: 1
Reliability: 1
In this example, the mapping of these parameters to those
for the ARPANET would be to set the ARPANET priority bit on
the Internet precedence is in the upper half of its range, to
standard messages since the throughput and reliability
are indicated and delay is not. More details are given on
mappings in "Service Mappings" [8].
Time to
The time to live is set by the sender to the maximum time
datagram is allowed to be in the internet system. If the
is in the internet system longer than the time to live, then
datagram must be destroyed
This field must be decreased at each point that the int