Brendan Ang

Search

Search IconIcon to open search

Transport Layer

Last updated Jan 20, 2023 Edit Source

# Transport Layer

The transport layer provides for logical communication between application processes running on different hosts. This means that application processes can send messages to each other without worrying about the details of the underlying physical infrastructure.

12 kids in Ann’s house sending letters to 12 kids in Bill’s house. Ann and Bill are responsible for mail collection and distribution, and interfaces with the postal carrier.

  • hosts = houses
  • processes = kids
  • app messages = letters in envelopes
  • transport protocol = Ann and Bill who demux to in-house siblings
  • network-layer protocol = postal service

# Multiplexing and Demultiplexing

Multiplexing and demultiplexing is the extension of the host-to-host delivery service provided by the network layer to a process-to-process delivery service for applications running on the hosts.

A host can have multiple network processes running, and each can have 1 or more sockets for which data passes from the network.

# Transport Layer Protocols

# UDP

A barebones transport protocol for the Internet is User Datagram Protocol

# TCP

Transmission Control Protocol provides a reliable channel service to the applications which invoke it.

# Principles of Reliable Data Transfer

# Fundamentals

We can incrementally build a reliable data transfer (rdt) protocol using finite state machines

# RDT 1.0 reliable under channel

# RDT 2.0 error checking

Add error checking through checksum calculation, acknowledgements (ACKs) and negative acknowledgements (NAKs), and have the sender retransmit the corrupted sentence.

# RDT 2.1 ACK corruption

The fatal flaw in rdt 2.0 is that the ACK or NAK packets may in itself be corrupted. How should the protocol recover from such errors? Here are some ideas:

# RDT 2.2 NAK-less

We can remove the need for NAKs by sending an ACK only for the last correctly received packet. If the sender receives 2 ACKs for the same packet, it knows that the following packet was not received correctly.

# RDT 3.0 Lossy channels

The data packet, along with ACKs can be lost. We need ways to detect the loss, and actions to take to recover from the loss. Sender side recovery: Wait for some timeout delay to receive an ACK, else retransmit.

  1. Start a timer each time a packet is sent
  2. Respond to a timer interrupt by retransmission. This introduces duplicate packets which are handled by RDT 2.2
  3. Stop the timer

# Pipelining

RDT 3.0 has a big performance implication due to its stop-and-wait protocol. We can boost performance by allowing the sender to send multiple packets without waiting for an ACK.

# Go-Back-N (GBN)

We need a way to determine the range of sequence numbers needed. This depends on how error recovery is performed. Go-Back-N allows the sender to transmit multiple packets without waiting for ACK but this number is constrained to no more than some maximum N. A sliding window protocol: