chapter 21 ip encapsulation, fragmentation, and reassembly

8
Chapter 21 Chapter 21 IP Encapsulation, IP Encapsulation, Fragmentation, and Fragmentation, and Reassembly Reassembly

Upload: arron-cox

Post on 14-Dec-2015

221 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Chapter 21 IP Encapsulation, Fragmentation, and Reassembly

Chapter 21 Chapter 21 IP Encapsulation, IP Encapsulation,

Fragmentation, and Fragmentation, and ReassemblyReassembly

Page 2: Chapter 21 IP Encapsulation, Fragmentation, and Reassembly

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

Page 3: Chapter 21 IP Encapsulation, Fragmentation, and Reassembly

Maximum Transmission Maximum Transmission Unit (MTU)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

Page 4: Chapter 21 IP Encapsulation, Fragmentation, and Reassembly

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

Page 5: Chapter 21 IP Encapsulation, Fragmentation, and Reassembly

ReassemblyReassembly 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

Page 6: Chapter 21 IP Encapsulation, Fragmentation, and Reassembly

Identifying the Datagram a Identifying the Datagram a Fragment BelongsFragment 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.

Page 7: Chapter 21 IP Encapsulation, Fragmentation, and Reassembly

Fragment LossFragment 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.

Page 8: Chapter 21 IP Encapsulation, Fragmentation, and Reassembly

Fragmenting a FragmentFragmenting 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.