IP Encapsulation, Fragmentation, And Reassembly - PowerPoint PPT Presentation

1 / 26
About This Presentation
Title:

IP Encapsulation, Fragmentation, And Reassembly

Description:

When the datagram reaches its final destination, the frame that carried the ... the fragments are forwarded to the final destination, which reassembles them. ... – PowerPoint PPT presentation

Number of Views:182
Avg rating:3.0/5.0
Slides: 27
Provided by: paulom8
Category:

less

Transcript and Presenter's Notes

Title: IP Encapsulation, Fragmentation, And Reassembly


1
IP Encapsulation, Fragmentation, And Reassembly
  • Computer Science
  • Prof. Martins

2
Introduction
  • Previous chapter
  • IP datagram format
  • Routing
  • This chapter
  • IP datagram transmission

3
Datagram Transmission
  • IP software selects the next hop to Transmit the
    datagram across the physical network
  • Network hardware does not understand datagram
    format or internet addressing
  • Hardware understands frames
  • Frames may differ from network to network

4
Encapsulation
  • How can a datagram be transmitted across a
    network that does not understand the datagram
    format?
  • The answer Encapsulation
  • When an IP datagram is encapsulated in a frame,
    the entire datagram is placed in the data area of
    a frame.

5
Encapsulation
  • Figure 21.1 - An IP datagram encapsulated in
    a hardware frame. The entire datagram resides in
    the frame data area. In practice, the frame
    format used with some technologies includes a
    frame trailer as well as frame header.

6
Encapsulation
  • How does a receiver know whether the data area in
    an incoming frame contains an IP datagram or
    other data?
  • Answer The sender and receiver agree on the
    value used in the frame type field.
  • A special value is reserved for IP.

7
Encapsulation
  • In addition to placing a datagram in the data
    area of a frame, encapsulation requires the
    sender to supply the physical address of the next
    computer
  • Address binding computes the appropriate
    hardware address (ARP - chapter 19)
  • The binding translates the IP address of the next
    hop into an equivalent hardware address.

8
Summary
  • A datagram is encapsulated in a frame
  • The destination address in the frame is the
    address of the next hop
  • The destination of the next hop is obtained by
    translating the IP address of the next hop to an
    equivalent hardware address.

9
Transmission Across An Internet
Figure 21.2 - An IP datagram as it appears at
each step during a trip across an internet.
Whenever it travels across a physical network,
the datagram is encapsulated in a frame
appropriate to the network.
10
Transmission Across An Internet
  • Encapsulation applies to one transmission at a
    time
  • After the sender selects a next hop, the sender
    encapsulates the datagram in a frame and
    transmits the result across the physical network
    to the next hop.
  • When the frame receives the next hop, the
    receiving software removes the IP datagram and
    discards the frame.

11
Transmission Across An Internet
  • Frame headers do not accumulate during a trip
    through the internet.
  • Before a datagram is transmitted across a given
    network, the datagram is encapsulated
  • When the frame arrives at the next hop, the
    datagram is removed from the incoming frame,
    before being routed and encapsulated in an
    outgoing frame.

12
Transmission Across An Internet
  • When the datagram reaches its final destination,
    the frame that carried the datagram is discarded
  • The datagram appears exactly the same as when it
    was originally sent
  • When a datagram arrives in a network frame, the
    receiver extracts the datagram from the frame
    data area and discards the frame header.

13
MTU, Datagram Size, and Encapsulation
  • MTU is the Maximum Transmission Unit the
    maximum amount of data that a frame can carry.
  • In an Internet that connects heterogeneous
    networks, MTU restrictions can cause a problem

14
MTU, Datagram Size, and Encapsulation
Figure 21.3 - An example of a router that
connects two networks with different MTU values.
A frame that travels across the network 1 can
contain 1500 octets of data, while a frame that
travels across network 2 can contain at most 1000
octets of data.
15
MTU, Datagram Size, and Encapsulation
  • An IP router uses a technique known as
    fragmentation to solve the problem of
    heterogeneous MTUs.
  • When a datagram is larger than the MTU, the
    router divides the datagram into smaller pieces
    called fragments.
  • Each fragment is sent separately.

16
MTU, Datagram Size, and Encapsulation
  • A bit in the FLAGS field indicate whether a
    datagram is a fragment or a complete datagram.
  • A fragment has the same format as the other
    datagrams.
  • The FRAGMENT OFFSET field in the header of a
    fragment specifies where in the original datagram
    the fragment belongs.

17
MTU, Datagram Size, and Encapsulation
Figure 21.4 - An IP datagram divided into three
fragments. Each fragment carries some data from
the original datagram, and has an IP header
similar to the original datagram.
18
Summary
  • A datagram cannot be larger than the MTU of a
    network over which it is sent.
  • A router divides the datagram into smaller pieces
    called fragments.
  • Each fragment uses the IP datagram format, but
    carries only parts of the data.

19
Reassembly
  • The process of creating a copy of the original
    datagram from fragments is called reassembly.
  • All fragments have the same destination address
    as the original datagram.
  • The fragment that carries the final piece of data
    has an additional bit set in the header.
  • A receiver performing reassembly can tell whether
    all fragments have arrived successfully.

20
Reassembly
Figure 21.5 - An example internet in which hosts
can generate datagrams that require
fragmentation. Once a datagram has been
fragmented, the fragments are forwarded to the
final destination, which reassembles them.
21
Identifying A Datagram
  • Since IP does not guarantee delivery, some
    fragments can be lost or arrive out of order.
  • How does IP reassemble fragments that arrive out
    of order?
  • IDENTIFICATION field a unique ID number of each
    outgoing datagram.

22
Identifying A Datagram
  • When a router fragments the datagram, the router
    copies the ID number into each fragment.
  • The FRAGMENT OFFSET field tells a receiver how to
    order fragments within a given datagram

23
Fragment Loss
  • Recall that IP does not guarantee datagram
    delivery
  • Some fragments may be delayed or lost
  • Datagrams with lost fragments cannot be
    reassembled
  • Fragments may be saved temporarily.
  • IP specifies a maximum time to hold fragments.
  • After a timer expires, saved fragments are
    discarded.

24
Fragmenting a Fragment
  • If a fragment reaches another network that has a
    smaller MTU, it is possible to further fragment a
    fragment.
  • IP does not distinguish between original
    fragments and sub fragments.
  • The advantage of making all fragments the same is
    that a receiver can perform reassembly without
    first reassembling sub fragments.

25
Summary
  • An IP datagram is encapsulated in a network frame
    for transmission across a hardware network.
  • To encapsulate a datagram, the sender places the
    entire datagram in the data area of a network
    frame.
  • Each network technology defines the maximum
    amount of data (MTU) accepted.

26
Summary
  • When a router receives a datagram that is larger
    than the network MTU, the router divides the
    datagram into fragments.
  • Each fragment travels to the ultimate
    destination, which is responsible for
    reassembling fragments into the original
    datagram.
Write a Comment
User Comments (0)
About PowerShow.com