Download presentation
Presentation is loading. Please wait.
Published byLawrence Carr Modified over 8 years ago
1
COMPUTER NETWORKS CS610 Lecture-30 Hammad Khalid Khan
2
Review Lecture 29 IP Datagram and Datagram Forwarding Connectionless service Virtual Packets IP Datagram Format and Size Routing Table and Address Masks Best Effort Delivery
3
IP Datagram Header Format
4
VERS - version of IP (currently 4) H. LEN - header length (in units of 32 bits) SERVICE TYPE - sender's preference for low latency, high reliability (rarely used) TOTAL LENGTH - total octets in datagram IDENT, FLAGS, FRAGMENT OFFSET - used with fragmentation
5
IP Datagram Header Format TTL - time to live; decremented in each router; datagram discarded when TTL = 0 TYPE - type of protocol carried in datagram; e.g., TCP, UDP. HEADER CHECKSUM - 1s complement of 1s complement sum. SOURCE, DEST,IP ADDRESS - IP addresses of original source and ultimate destination.
6
IP Datagram Options Several options can be added to IP header: – Record route – Source route – Time stamp Header with no options has H. LEN field value 5; data begins immediately after DESTINATION IP ADDRESS. Options added between DESTINATION IP ADDRESS and data in multiples of 32 bits. Header with 96 bits of options has H. LEN field value 8.
7
Chapter 21 IP Encapsulation, Fragmentation and Reassembly
8
Datagram Transmission and Frames
9
Encapsulation Network interface layer encapsulates IP datagram as data area in hardware frame. – Hardware ignores IP datagram format – Standards for encapsulation describe details. Standard defines data type for IP datagram, as well as others (e.g., ARP). Receiving protocol stack interprets data area based on frame type.
10
Encapsulation
11
Encapsulation across Multiple Hops Each router in the path from the source to the destination: – Unencapsulates incoming datagram from frame. – Processes datagram - determines next hop. – Encapsulates datagram in outgoing frame. Datagram may be encapsulated in different hardware format at each hop. Datagram itself is (almost!) unchanged.
12
Encapsulation across Multiple Hops
13
MTU Every hardware technology specification includes the definition of the maximum size of the frame data area. Called the Maximum Transmission Unit (MTU). Any datagram encapsulated in a hardware frame must be smaller than the MTU for that hardware.
14
MTU and Heterogeneous Networks An internet may have networks with different MTUs. Suppose downstream network has smaller MTU than local network?
15
Fragmentation One technique - limits datagram size to smallest MTU of any network. IP uses fragmentation - datagrams can be split into pieces to fit in network with small MTU. Router detects datagram larger than network MTU. – Splits into pieces. – Each piece smaller than outbound network MTU.
16
Fragmentation Each fragment is an independent datagram – Includes all header fields. – Bit in header indicates datagram is a fragment. – Other fields have information for reconstructing original datagram. – FRAGMENT OFFSET gives original location of fragment. Router uses local MTU to compute size of each fragment. Puts part of data from original datagram in each fragment. Puts other information into header.
17
Fragmentation
18
Datagram Reassembly Reconstruction of original datagram is called Reassembly. Ultimate destination performs reassembly.
19
Datagram Reassembly Fragments may arrive out of order; header bit identifies fragment containing end of data from original datagram. Fragment 3 identified as last fragment.
20
Identifying a Datagram & Fragment Loss
21
Fragment Loss IP may drop fragment. What happens to original datagram? – Destination drops entire original datagram. How does destination identify lost fragment? – Sets timer with each fragment. – If timer expires before all fragments arrive, fragment assumed lost. – Datagram dropped. Source (application layer protocol) assumed to retransmit.
22
Fragmenting a Fragment Fragment may encounter subsequent network with even smaller MTU. Router fragments the fragment to fit. Resulting sub-fragments look just like original fragments (except for size). No need to reassemble hierarchically; sub-fragments include position in original datagram.
23
Summary IP Datagram Header Format Datagram Transmission and Frames Encapsulation Transmission across an Internet MTU Reassembly Identifying a Datagram Fragmentation Loss Fragmenting a Fragment
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.