Coconote
AI notes
AI voice & video notes
Try for free
📡
Understanding Reliable Data Transfer Protocols
Sep 25, 2024
Networking Challenges and Reliable Communication
Introduction
Key challenge in networking: Reliable communication over unreliable channels.
Channels can lose, corrupt, or reorder messages.
Aim is to communicate reliably between a sender and a receiver.
Channel Models
Start with a
perfect channel model
(no message loss or corruption).
Gradually introduce
realistic assumptions
about unreliable channels:
Message loss
Bit corruption
Message reordering
Reliable Data Transfer (RDT) Protocol
Implemented at the
transport layer
.
Unidirectional channel
: Sender to receiver focus.
Bidirectional protocol communication
: Sender and receiver sides exchange messages over an unreliable channel.
Considerations
Channel characteristics
affect protocol complexity:
Message loss
Message corruption
Message reordering
Protocol entities can only know about each other through message exchange.
Interface and API
Interfaces
above and below the transport layer:
Sender side
: Data is passed from the application layer to the transport layer, becoming a transport layer segment.
Receiver side
: Transport layer segment is received, data is delivered to the receiving process.
Protocol Specification
Formal specification needed to avoid misinterpretation.
Use
finite state machines
for protocol specification:
Notion of state
State transitions due to events
Actions performed by the system
Example: Light Bulb
Illustrates state, events, and actions:
States: On and off
Events: Pressing the on or off switch
Actions: Transition between states and light emission
Developing RDT Protocol
RDT 1.0
: Perfect channel, simple finite state machines for sender and receiver.
RDT 2.0
: Deals with bit errors using:
Checksums
for error detection
Acks
(Acknowledgements) for correct message receipt
Nacks
(Negative Acknowledgements) for errors
Retransmissions
for error recovery
Human Communication Analogy
Acknowledgements (Yes, I got it)
Negative acknowledgements (No, resend it)
Retransmissions (Restate the message)
RDT 2.1 Improvements
Handles corrupted acks/nacks:
Sequence numbers
added to packets to detect duplicates.
Stop-and-wait protocol
with one-bit sequence number.
Finite state machines expanded: 4 states for different sequence numbers and actions.
RDT 2.1 Receiver
Waits for specific sequence numbers:
Sends acks for correct reception.
Sends nacks for corrupted or out-of-sequence packets.
Summary of RDT Protocols
Use of error detection (checksums), acks/nacks, retransmissions, sequence numbers.
RDT 2.2
: An ack-only version is possible.
TCP
: Relies on acks, sequence numbers, checksums, and retransmissions.
Outstanding Issues
Addressing
packet loss
in channels (to be discussed in next section).
📄
Full transcript