What transport adds
The network layer gets a packet to the destination host. The transport layer gets data to the correct process on that host.
A complete guide to process-to-process delivery, port numbers, socket addresses, multiplexing, congestion concepts, TCP reliability, UDP simplicity, and when each protocol fits.
The transport layer is between application and network layers. It creates logical communication between processes running on different hosts.
The network layer gets a packet to the destination host. The transport layer gets data to the correct process on that host.
Transport duties include process-to-process communication, port addressing, encapsulation/decapsulation, multiplexing/demultiplexing, connection service choice, and sometimes flow/error control.
The transport layer creates the appearance of a logical connection between application processes even though packets travel through lower layers and routers.
Port numbers solve the problem of multiple processes using the network on the same host.
Port numbers range from 0 to 65535. Well-known ports from 0 to 1023 are assigned and controlled by IANA.
A socket address combines an IP address and a port number. It identifies one process endpoint.
A TCP connection is identified by source IP, source port, destination IP, and destination port. Different source ports allow the same client to open multiple sessions to the same server.
The transport layer packages application messages and sorts traffic from many processes.
The transport layer takes an application message, adds a transport header, and creates a segment or datagram.
The receiver removes the transport header and delivers the message to the process identified by the port number.
Multiplexing combines data from multiple processes downward. Demultiplexing separates incoming data upward to the right process.
Transport protocols can choose speed and simplicity or reliability and control.
Segments are independent. There is no handshaking, no flow control, and no error control in the basic UDP service.
A connection is established before data transfer and terminated afterward. Segments belong to a relationship, enabling reliability.
Flow control prevents sender from overflowing receiver buffers. Congestion control reduces load when the network capacity is exceeded.
TCP is used when reliable ordered delivery matters more than low overhead.
TCP establishes and terminates connections, numbers bytes, acknowledges received data, retransmits missing data, and uses buffers/windows to handle different sender and receiver rates.
TCP sequence numbers are assigned to individual bytes, not just segments. If a segment starts at byte 8001 and carries 1000 bytes, it covers 8001 through 9000.
The acknowledgment number is the next byte expected. After receiving bytes 8001-9000, ACK = 9001.
The client sends SYN, the server replies SYN+ACK, and the client replies ACK. Then data transfer can begin.
The receive window tells the sender how much data can be sent before waiting for acknowledgment, preventing receiver-buffer overflow.
UDP is useful when the application values speed, low overhead, or real-time behavior more than built-in reliability.
UDP is connectionless. Each segment is handled independently. There is no built-in flow control, error control, or ordered delivery.
DNS often sends one short request and expects one quick response, so UDP fits. Real-time audio/video can tolerate small loss better than retransmission delay.
Applications that cannot tolerate loss, errors, or out-of-order arrival should not rely on UDP alone. Examples include large file downloads or e-mail delivery style reliability.
| Concept | Meaning | Exam clue |
|---|---|---|
| TCP | Reliable, ordered, connection-oriented | HTTP/file transfer/e-mail style reliability |
| UDP | Connectionless, independent, low overhead | DNS, streaming, real-time apps |
| ACK | TCP acknowledgment | Next expected byte |
Use this as the last-pass memory page before a quiz or exam.
These questions target the facts, comparisons, and calculations that are easiest to test.
Answer: The process/application on a host.
Explanation: IP finds the host; port finds the process.
Answer: SYN, SYN+ACK, ACK.
Explanation: That is the three-way handshake.
Answer: 2001.
Explanation: ACK is the next expected byte.
Answer: DNS is usually a short request and quick response.
Explanation: UDP avoids connection setup overhead.
Answer: It has no built-in reliability or ordering.
Explanation: Loss or out-of-order arrival would corrupt the transfer unless handled elsewhere.