Chapter 21 IP Encapsulation Fragmentation and Reassembly
Download
Report
Transcript Chapter 21 IP Encapsulation Fragmentation and Reassembly
Chapter 21
IP Encapsulation,
Fragmentation, and
Reassembly
Encapsulation
Refers to embedding of data
When an IP datagram is encapsulated in a frame, the
entire datagram is placed in the data area of a frame (fig
21.1)
network hardware does not care what is inside the frame
data area
destination address in the frame is the physical address
of the next hop to which the datagram should be sent
whenever the destination computer is on a remote
network.
datagram is encapsulated in a frame appropriate to the
network being traversed
When the datagram crosses a router, the old frame
header is discarded and a new frame header a
prepended. (fig 21.2)
Maximum Transmission Unit
(MTU)
a limitation placed by the network hardware
technology on the size of a datagram (fig
21.3)
eg. Ethernet’s MTU is 1500 bytes
Fragmentation
used by an IP router to solve the problem of
different MTUs of networks
When a router sees that a datagram is larger than
the MTU of the network over which it must be
sent, the router divides the datagram in smaller
pieces called fragments, and sends each fragment
independently (fig 21.4)
A bit in the FLAGS field in the IP header
indicates whether the datagram is a fragment or a
complete datagram.
FRAGMENT OFFSET field in the IP header of a
fragment specifies where in the original datagram
the fragment belongs.
Reassembly
process of recreating the original datagram from
fragments
Fragments are forwarded to the ultimate
destination host, which reassembles them.
MORE FRAMENTS bit in the FLAGS field tells
the final host to know whether all fragments have
arrived
Intermediate routers need not reassemble
fragments
fragments may traverse different paths, making
reassembly in the intermediate routers impossible
Identifying the Datagram a
Fragment Belongs
each datagram is assigned a unique number by the
source computer in the IDENTIFICATION field
of IP header
A copy of this number is copied into each
fragment
destination computer can reassemble the
fragments to the proper datagrams by examining
the source IP address, IDENTIFCATION field,
and FRAGMENT OFFSET field.
Fragment Loss
if a fragment is lost, the destination computer
discards the remaining fragments corresponding to
the same datagram
Sender will retransmit the entire datagram since it
does not know how the datagram was fragmented
when the datagram is retransmitted, it may
traverse a different routing path and be fragmented
differently.
Fragmenting a Fragment
an intermediate router with smaller MTUs
may fragment an existing fragment by
modifying the FRAGMENT OFFSET field
The ultimate destination computer does not
know whether an incoming fragment had be
fragmented into subfragments.