📡

Understanding Reliable Data Transfer Protocols

Nov 8, 2024

Lecture Notes: Data Communication and Computer Networks

Introduction

  • Course on Data Communication and Computer Networks
  • Previous lecture: Transport Layer and its functions
    • Network Layer transports data from host to host
    • Transport Layer transfers data from process to process
    • Discussed connectionless protocols (UDP)
    • How UDP checks for errors using checksum

This Week's Topic

  • Principles of Reliable Data Transfer
    • Designing protocols to ensure data is reliably transferred over unreliable channels
    • Critical for both Transport and Data Link Layers
    • Importance of Reliable Data Transfer for application to transport layer interactions

Reliable Data Transfer Protocol Design

  1. RDT Send Function

    • Application layer generates data and calls RDT Send
    • Transport Layer processes data, adds headers, breaks into packets
    • Utilizes UDT (Unreliable Data Transfer) functions to send packets
  2. RDT Receive Function

    • Receives packets
    • Checks and extracts data
    • If correct, delivers to application layer

Connection Less Transport (UDP)

  • Error detection via checksum
  • Lacks error recovery
  • Handles data with errors by either discarding or passing with caution

Principles of Reliable Data Transfer

  • Complexity of protocol depends on channel reliability
  • Finite State Machines (FSM) for protocol design
    • States and Transitions based on events

RDT 1.0

  • Base Case: Reliable Channel (no bit flips, no loss)
  • Simple FSM for sending and receiving

RDT 2.0

  • Assumes channel with bit errors
  • Uses checksums for error detection
  • Feedback mechanism with Acknowledgements (ACK) and Negative Acknowledgements (NAK)
  • FSM involves waiting for ACK/NAK after sending a packet

RDT 2.1

  • Addresses RDT 2.0 flaws (bit flip in ACK/NAK)
  • Introduces sequence numbers to handle duplicate packets
  • Double the states compared to RDT 2.0
  • Still does not ensure ACK/NAK reception correctness

Concepts

  • Stop-and-Wait Protocols
    • Wait for ACK/NAK before sending the next packet
    • Low response time
  • Automatic Repeat Request (ARQ) Protocols
    • Retransmission based on feedback

Closing

  • Next lecture will cover FSM for RDT 2.1 and reducing NAK dependency
  • Encouraged to ask questions for clarity