Transport Services, Multiplexing, and Demultiplexing
The Transport Layer
Transport protocols provide logical communication between application processes running on different hosts. At the sender, the transport layer adds a transport header to an application message to form a transport packet, called a segment. This is multiplexing. At the receiver, the network layer extracts the transport segment from the datagram and hands it to the transport layer, which processes the segment and delivers data to the application process. This is demultiplexing.
Applications can use two very different transport protocols: UDP and TCP. UDP provides an unreliable, connectionless service, so it cannot guarantee that data sent by one process arrives intact at the destination process. TCP provides a reliable, connection-oriented service. Using flow control, sequence numbers, acknowledgments, and timers, TCP ensures correct, ordered delivery to the receiving process.
Connectionless Multiplexing and Demultiplexing
A UDP socket is identified by a two-tuple containing the destination IP address and destination port number. If two UDP segments have different source IP addresses or source ports but the same destination IP and port, they are delivered through the same socket to the same destination process.
When A sends a UDP segment to B, its source port is part of the return address. When B replies to A, it obtains the values from the segment sent by A.
KNOWLEDGE QUIZ
Connection-Oriented Multiplexing and Demultiplexing
A TCP socket is identified by a four-tuple: source IP address, source port number, destination IP address, and destination port number. Unlike UDP, two TCP segments with different source IP addresses or source ports are delivered to different sockets.
Route two clients to sockets
Unlock the complete interactive lab, deeper explanations, and curated reference answers.
KNOWLEDGE QUIZ
Identify sockets and reply addresses
A:9157, B:5775, and A:9158 each send to C:6428 using UDP, then independently establish TCP connections to C:80. List receiving identifiers and socket counts in the chapter's model. Give the source and destination of C's UDP reply to B.