1 / 14

CSCI 4550/8556 Computer Networks

CSCI 4550/8556 Computer Networks. Comer, Chapter 21: IP Encapsulation, Fragmentation, and Reassembly. Datagram Transmission and Frames. The IP internet layer: constructs a datagram, determines the next hop, and hands the datagram to the network interface layer.

melosa
Download Presentation

CSCI 4550/8556 Computer Networks

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CSCI 4550/8556Computer Networks Comer, Chapter 21: IP Encapsulation, Fragmentation, and Reassembly

  2. Datagram Transmission and Frames • The IP internet layer: • constructs a datagram, • determines the next hop, and • hands the datagram to the network interface layer. • The network interface layer: • binds the next hop address to the hardware address, and • prepares the datagram for transmission. • But, the hardware frame doesn’t understand IP; how is the datagram transmitted?

  3. Encapsulation • The network interface layer encapsulates each IP datagram in the data area in the hardware frame • The hardware ignores the IP datagram format. • The standards for encapsulation describe the details. • The standard defines the data type for an IP datagram, as well as others (e.g., ARP) • The receiving protocol stack interprets the data area based on the frame type.

  4. Encapsulation Across Multiple Hops • Each router in the path from the source to the destination: • unencapsulates incoming datagram from the frame; • processes the datagram - determines next hop; and • encapsulates the datagram in an outgoing frame. • Datagram may be encapsulated in a different hardware format at each hop. • The datagram itself is (almost!) unchanged.

  5. Maximum Transmission Unit: MTU • Every hardware technology specification includes the definition of the maximum size of a frame’s data area. • This size is called the maximum transmission unit (MTU). • Any datagram encapsulated in a hardware frame must be no larger than the MTU for that hardware.

  6. MTU and Datagram Transmission • IP datagrams can be larger than most hardware MTUs. For example • IP: 216 – 1, or 65535 bytes • Ethernet: 1500 bytes • Token ring: 2048 or 4096 bytes • The source can simply limit an IP datagram’s size to be no larger than the local MTU. • Thus we must pass information about the local MTU up to TCP for TCP segments. • But what about UDP datagrams? Aren’t these supposed to be treated as single “virtual frames?”

  7. MTU and Heterogeneous Networks • An internet may have networks with different MTUs. • Suppose a “downstream” network has a smaller MTU than the local network. How is the hardware frame size handled in this case?

  8. Fragmentation • It is obvious that the larger frame cannot fit in the smaller frame. • One technique to solve the problem is to limit a datagram’s size to the smallest MTU of any network in the internet. • IP uses fragmentation - datagrams can be split into pieces to fit into a network with a smaller MTU than the current network. • A router can detect that a datagram is larger than the next network’s MTU. • It then splits the datagram into pieces, each of which is no larger than the outbound network’s MTU.

  9. Fragmentation (Details) • Each fragment is an independent datagram. • It includes all IP datagram header fields. • A bit in the header indicates the datagram is a fragment. • Other fields have information for reconstructing original datagram. • FRAGMENT OFFSET gives original location of fragment • A router uses the local MTU to compute the size of each fragment. • It puts part of the data from original datagram in each fragment. • Additional information is placed in the header.

  10. Datagram Reassembly • Reconstruction of the original datagram is called reassembly . • The ultimate destination performs reassembly. • Fragments may arrive out of order; a header bit identifies the fragment containing the end of the data from the original datagram. • In the example, fragment 3 would be identified as the last fragment.

  11. Fragment Identification • Inidivudal fragments must be associated with the original datagram. • The IDENT field in each fragment matches the IDENTfield in the original datagram. • Fragments from different datagrams can arrive out of order and still be sorted out by : • matching them using the IDENTfield values; • recognizing the last fragment from the bit set in its header; and • recognizing when all fragments in an original datagram have been received.

  12. Fragment Loss • IP may drop a fragment (for many reasons). • What happens to the original datagram in this case? • A. The destination drops the entire original datagram. • How does the destination identify a lost fragment? • A timer is associated with each datagram. • If the timer expires before all fragments arrive, one or more fragments are assumed lost, and … • The entire datagram is dropped. • The source (in the application layer protocol) is assumed to retransmit if necessary.

  13. Fragmenting a Fragment • A fragment may encounter a subsequent network with an even smaller MTU. • The router fragments the fragment to fit that smaller MTU. • The resulting “subfragments” look just like the original fragments, except for their sizes. • There is no need to reassemble fragments hierarchically; “subfragments” include their position in original datagram in a header field.

  14. Summary • IP uses encapsulation to transmit datagrams in hardware frames. • Network technologies have an MTU that limits the amount of data that a single frame can carry. • IP uses fragmentation to carry datagrams larger than the network MTU.

More Related