(September 29, 1995)
Daniel Z. Tabor Jr.
New Jersey Institute of Technology
Introduction to the Internet Protocol (IP):
IP (Internet Protocol) - a major connectionless
protocol that is used in internetworking.
Conceptually, IP is a central switching point in
protocol software.
IP:
Accepts/Sends datagrams
Routes
Fragments
Re-assembles
There are two distinct parts to IP:
Input - which extracts the data payload from the datagram, processes the header information, and takes the appropriate action.
Output - which handles the encapsulation of Transport Layer segments, multiplexing of several higher-level input streams, and filling in header information based on the payload.
TCP/IP (conceptually) provides three sets of services which build upon each other.
Internet software (designed around these three conceptual networking services) has achieved great success due to the architecture's robustness and adaptability.
Delivery Schemes:
The IP protocol provides a connectionless delivery system for TCP/IP
protocols
Connectionless
Unreliable service
Best-effort delivery
Packet loss, duplication, and delayed or out-of-order
delivery
Connection-oriented
Reliable delivery
Guaranteed quality decided upon
Handles packet loss, duplication, etc.
Internet Protocol:
Defines the basic unit of data transfer used throughout
the Internet: the Datagram (and the exact format of it)
Performs routing of data sent (chooses the correct
network connection or gateway)
Includes a set of rules that embody the idea of unreliable
packet delivery (processing of packets, error message
generation & conditions, discarding packets, etc.)
IP DATAGRAM
HEADER
DATA AREA
Internet Protocol:
Physical Networks
Physical networks:
Basic transfer unit (BTU) is a frame.
It includes:
Frame header
Data (IP datagram)
Source hardware address
Destination hardware address
Internet Protocol:
Internet
Internet:
Basic transfer unit (BTU) is a datagram.
It includes:
Datagram header.
Data
- (TCP segment, ICMP message, or Multicast-IP
datagram).
Source and Destination IP addresses.
Type fields.
IP Datagram Header: Datagram Format
VERS (4 bits):
Version of IP protocol used to create the datagram. IP
software is required to check the version always! (IPv4)
HLEN (4 bits):
Datagram header length in 32-bit word units. (20
octets = HLEN 5, 1 octet => 8 bits)
SERVICE TYPE (8 bits):
Specifies how the datagram should be handled.
IP Datagram Header:
Five subfields of the SERVICE TYPE Field
PRECEDENCE (3-bits):
Importance of the datagram (range is 0..7, normal
precedence ... network control)
D, T, R (1-bit each):
Type of transport requested, merely hints to routing
algorithm, NOT demands.
D - requests low delay
T - requests high throughput
R - requests high reliability
IP Datagram Header: Datagram Format
UNUSED(2-bits):
TOTAL LENGTH(16-bits):
Absolute length, maximum possible size of datagram =
65,535 octets.
IDENTIFICATION(16-bits):
Used for fragmentation reassembly of a datagram packet.
FLAGS(3-bits):
Determine how fragmentation will be handled
Bit 0 - reserved for future use.
Bit 1 - (0 = may fragment), (1 = do not fragment)
Bit 2 - (0 = last fragment), (1 = more fragments exist)
FRAGMENT OFFSET(13-bits):
Indicates where a fragment belongs in the complete
message. It is measured in 64-bit units (8 octets).
IP Datagram Header: Datagram Format
TIME TO LIVE(8-bits):
Maximum amount of time the datagram can live. (If TTL
= 0, datagram is destroyed)
Max. = 255 sec.
PROTOCOL(8-bits):
Identifies the higher-layer protocol to use. (ICMP =
1, TCP = 6, UDP = 17)
HEADER CHECKSUM(16-bits):
Checksum (of header only) for error-control.
SOURCE IP ADDRESS(32-bits):
Identifies the ultimate source of this datagram.
DESTINATION IP ADDRESS(32-bits):
Identifies the final destination of the datagram.
In routing, these fields are NEVER changed. The computation
of a new route results in a next-hop hardware address, but
does not ever change the source and destination IP
addresses.
Datagram Encapsulation:
65,535 octets is the size limit of a datagram in IP
version 4. This may/will change in IPv6.
To make internet transportation efficient, we want our
datagram to map directly into a single physical frame.
Datagram Size, MTU, and Fragmentation:
Different physical networks use different frame types and
sizes, and have a fixed upper bound on the amount of data that can be transmitted per frame.
Examples:
Ethernet = 1500 octets
proNET-10 = 2044 octets
FDDI = 4470 octets
MTU (Maximum Transfer Unit) - the upper bound limit on
data that can be carried within a frame.
It can be small (128 octets or less) making it inefficient to make all datagrams that size, requiring too much overhead.
It can be large, but this may result in excessive fragmentation during traversal of the internetwork.
Setting the MTU size:
An MTU should be set for the maximum size available for it's
local medium, unless for some reason another network in the
autonomous system cannot support frames that large.
MTUs usually change between networks. Choosing an universal
minimal size which must be supported over the entire network
will provide efficient transfer for most frames.
MTU Solution:
Pick a standard datagram size that is optimal over all
types of networks and fragment only when needed.
Fragmentation of datagrams and frames usually occurs in gateways.
A fragment size is chosen so each fragment can be shipped in a single frame.
IP represents the offset of data in multiples of 8
octets, so the fragment size must be multiple of 8. The last fragment is usually shorter than other fragments.
IP does not limit datagrams to a small size or guarantee that large datagrams will not be fragmented.
One should choose a fragment size that will not require further fragmenting at a later point in the network (avoid fragmenting a fragment).
Gateways must accept datagrams up to the highest MTU of
any network attached and a minimal (Max. size) of 576 octets.
Fragments have the same format as the original packet,
but with the appropriate flags and values set.
Reassembly:
? Reassembly at each gateway or only at the end ?
Disadvantages of only reassembling at the destination:
Fragmentation because of small MTU, those packets will
not travel efficiently.
Lost fragments. Reassembly timer will expire before missing
fragment arrives. All other fragments will be discarded,
forcing retransmisson of the entire datagram.
The IDENTIFICATION field is copied into each fragment of a datagram. The destination uses it and the source IP address
to identify each fragment.
The ID value is an unique value which is created by
IP's global counter in memory.
Reassembly:
Fragmentation flag bits allow for, or discourage
fragmentation (e.g. binary bootstrap images).
When the don't fragment bit is set, discard the
datagram at the gateway where fragmentation is needed.
Fragments arrive out-of-order and use the FRAGMENT OFFSET and TOTAL LENGTH fields to determine the correct position in the original datagram.
TIME TO LIVE - value is the number of seconds the datagram is allowed to remain in the Internet system.
Synchronizing clocks is difficult over the Internet, so
we can either decrement an estimated time or the hop count.
Hop Count - is the number of gateway hops the datagram or fragment encounters. When the hop count (TTL) = 0, the
packet is destroyed.
The PROTOCOL field specifies which high-level protocol was used to create the message carried in the DATA field. It
dictates the format of the DATA field.
A HEADER CHECKSUM ensures the integrity of the header values, but does not protect the DATA field contents.
By separating header and data checksums, it reduces the
processing time at gateways.