LOGBOOK

HELP

1 / 38
Other keys: showSpace: good1-4: rate0: skip5: flag

Question

What is the role of the transport layer and what are its main responsibilities?

Answer

The transport layer provides logical communication between applications on different hosts; its main jobs are tracking conversations, segmenting/reassembling data, adding port-number headers, and multiplexing multiple conversations onto one network.

Role of the Transport Layer:

The transport layer is responsible for logical communications between applications running on different hosts. It serves as the link between the application layer and the lower layers responsible for network transmission.

Main Responsibilities:

Responsibility Description
Tracking conversations Maintain multiple simultaneous communication streams
Segmenting data Break data into segments and reassemble at destination
Adding header information Include source/destination port numbers
Identifying applications Use port numbers to direct data to correct application
Multiplexing Interleave multiple conversations on same network

Key insight: The transport layer enables multiple applications to share the network simultaneously through segmentation and multiplexing.

Go deeper:

  • doc Transport layer — Wikipedia overview of end-to-end services, segmentation, and the TCP/UDP split.
  • doc Multiplexing — how many conversations are interleaved over one link, the core transport-layer trick.
Frequency-division multiplexing (FDM): The spectrum of each input signal is shifted to a distinct frequency range.
Frequency-division multiplexing (FDM): The spectrum of each input signal is shifted to a distinct frequency range.
original image: Matthias Bock vectorization: Own work · CC BY-SA 3.0 · Wikimedia Commons
or press any other key

Question

What are the two main transport layer protocols and how do they differ?

Answer

The two protocols are TCP and UDP: TCP is connection-oriented, reliable, ordered, and has more overhead (20-byte header); UDP is connectionless, best-effort, unordered, and lightweight (8-byte header).

TCP vs UDP at a glance

* TCP buys reliability and ordering with a heavier header; UDP stays connectionless and lightweight. *

TCP vs UDP Comparison:

Feature TCP UDP
Connection Connection-oriented Connectionless
Reliability Guaranteed delivery Best-effort (unreliable)
Ordering Same-order delivery No ordering
Flow Control Yes No
Acknowledgment Yes No
Overhead Higher (20+ bytes header) Lower (8 bytes header)

TCP (Transmission Control Protocol):

  • Establishes session before sending data
  • Numbers and tracks segments
  • Acknowledges received data
  • Retransmits unacknowledged data
  • Like sending tracked packages

UDP (User Datagram Protocol):

  • No connection establishment
  • No acknowledgment of receipt
  • No retransmission of lost data
  • Like sending a non-registered letter

Go deeper:

TCP sequence numbers and receive windows behave very much like a clock. The receive window shifts each time the receiver receives and acknowledges a new segment of data. Once it runs out of sequence numbers, the sequence number loops back to 0.
TCP sequence numbers and receive windows behave very much like a clock. The receive window shifts each time the receiver receives and acknowledges a new segment of data. Once it runs out of sequence numbers, the sequence number loops back to 0.
Mike de · CC BY-SA 3.0 · Wikimedia Commons
or press any other key