Transport Layer

Transport layer handles reliability and is end-to-end
IMG_1F11A340E377-1.jpeg|600

Basics

Reliability Principles

Correctness

  1. All packets should be delivered (if not, inform the application about failure)
  2. No duplicates to be delivered
  3. Packets are delivered in order

Performance

  1. Low latency / high throughput
  2. Respect memory constraints of receiver
  3. Fairness

Sources of Error

Bit Error

  1. Noise
  2. Interference
  3. Fading

Packet Loss due to Congestion

Bottleneck Bandwidth

IMG_3327B5C37029-1.jpeg|400

Bottleneck Bandwidth: smallest bandwidth among the links through routers that limits the data rate from the server

Available Bandwidth bottleneck bandwidth / number of flows through bottleneck link

Reliable Transfer Protocol Design

  1. No error at all
  2. Bit errors in the packets
    • NACK resend the packet
    • ACK send next packet

bt[n+1:n+m]=f(bt[1:n])

When receiver receives br[1:n+m], it separates out the last m bits and checks if br[n+1:n+m]=f(br[1:n])

Dealing with Various Errors

Bit Error

Bit Error + Packet Loss

Bit Error + Packet Loss + Delay

Efficiency & Pipelining

Efficiency

Pipelining

Pipelining Protocols

Sliding Window Protocols

IMG_EE129C809E2F-1.jpeg|250
(An example of N=4)

Go Back N (GBN)

Transmit N packets and keep moving Tx window. Upon timeout, re-transmit all N packets in the current window.

  1. Receiver Rx has no buffer and drops out-of-order packets
  2. Transmitter Tx uses a fixed N
  3. Receiver Rx sends in-order cumulative ACK
  4. Transmitter Tx resends all N packets upon timeout or lost packet

Example
IMG_2A38D1937AF0-1.jpeg|280

Selective ACK (SACK)

For packet Px, receiver must send Ax only if xBN, with B being the receiver window base and N being the window size.

  1. Rx can buffer N out-of-order packets
  2. Rx also have a window
  3. Rx will only ACK packets that has been received (not cumulative)
  4. Tx will re-transmit the packet for which it has timed out
  5. Tx will only re-transmit the packets that have timed out

IMG_3F66326F26AD-1.jpeg|540

Window Size

We want to pick the correct window size N to keep the available/bottleneck router always occupied.
The available bandwidth is constantly changing
N must be time varying
N=f(RTT)
we call this Congestion Window