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.
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.)
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.
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.
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.