Study Notes on Transport Layer and Transport Protocols

Transport Layer: Overview

The transport layer is a crucial part of the network architecture that handles services including multiplexing, demultiplexing, reliable data transfer, flow control, and congestion control. Two main protocols in the Internet transport layer are the Transmission Control Protocol (TCP), which is connection-oriented and reliable, and the User Datagram Protocol (UDP), which is connectionless and does not guarantee reliability.

Transport-Layer Services

Multiplexing and Demultiplexing

The transport layer enables logical communication between application processes on different hosts. It manages communication through actions that segment application messages, which are passed to the network layer. At the receiver's end, segments are reassembled into messages. The two protocols operating in the transport layer of the Internet include TCP and UDP.

Metaphor

To understand the functioning of transport and network layers, consider a household analogy with children as processes and houses as hosts. When kids (processes) in Ann's house send letters (application messages) to kids in Bill's house, it's similar to how transport protocols facilitate communication between application processes.

Internet Transport Protocols

TCP (Transmission Control Protocol)
  • Characteristics: Reliable, ensures in-order delivery, provides congestion control and flow control, and establishes a connection before data transfer begins.
UDP (User Datagram Protocol)
  • Characteristics: Unreliable and unordered delivery, small header size, no congestion control, provides a best-effort service. UDP operates independently of previous segments, making it suitable for applications like video streaming or DNS queries which can tolerate packet loss and out-of-order delivery.

Multiplexing/Demultiplexing Process

When data is sent between applications, the transport layer must multiplex the outgoing segments and demultiplex received messages based on header information. A demultiplexing process at the receiver matches received segments to correct sockets using port numbers. For TCP, demultiplexing relies on a 4-tuple input consisting of source IP address, source port number, destination IP address, and destination port number.

Connectionless Transport: UDP

The User Datagram Protocol (UDP) operates without establishing connections before sending data. Each segment sent is treated independently, which reduces latency and makes it efficient in scenarios where low delay is critical.

Applications of UDP

UDP is commonly used in applications where speed is essential, including multimedia streaming (loss tolerant), DNS, and simple request-response protocols like SNMP.

Reliable Data Over UDP

While UDP does not guarantee delivery, reliability can be managed at the application layer, potentially incorporating redundancy or other error recovery methods. Applications like HTTP/3 build reliability over UDP by implementing their own protocols for managing errors.

Summary of UDP

  • Protocol Type: No frills, best-effort service.
  • Strengths: No setup overhead, can operate under network issues, checksums add to error detection.
  • Weaknesses: Segments can be lost, delivered out of order.
  • Implications: Increased control and resilience of applications over basic transport functionalities can lead to innovative application designs.