0% found this document useful (0 votes)
36 views8 pages

Transport Layer Services

The transport layer is crucial in networking, providing end-to-end communication between applications on different hosts while managing data segmentation, error correction, and flow control. It utilizes protocols like TCP for reliable connections and UDP for faster, connectionless communication, ensuring efficient data transfer across networks. Key responsibilities include process-to-process delivery, multiplexing, congestion control, and maintaining data integrity.

Uploaded by

Jithin S
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views8 pages

Transport Layer Services

The transport layer is crucial in networking, providing end-to-end communication between applications on different hosts while managing data segmentation, error correction, and flow control. It utilizes protocols like TCP for reliable connections and UDP for faster, connectionless communication, ensuring efficient data transfer across networks. Key responsibilities include process-to-process delivery, multiplexing, congestion control, and maintaining data integrity.

Uploaded by

Jithin S
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Overview of the Transport Layer

The transport layer occupies a unique position in networking models: it is the second layer in the
TCP/IP model (above the Network layer) and the fourth layer in the OSI model (below the Session
layer and above the Network layer). It is fundamentally an end-to-end layer, meaning it oversees the
delivery of data from the source host to the destination host, focusing on the processes running on
those hosts rather than the intermediate network devices (which are handled by lower layers). This
end-to-end responsibility distinguishes it from the hop-to-hop focus of the Network layer. The
transport layer encapsulates data into units called segments (in TCP) or datagrams (in UDP), which
include headers with critical control information like port numbers and sequence numbers.

Working of the Transport Layer

The transport layer acts as a bridge between the upper-layer applications and the lower-layer
network infrastructure, ensuring seamless data transfer across potentially unreliable networks.

• At the Sender’s Side:

o The transport layer receives a message (a stream of bytes) from the Application
layer.

o It performs segmentation, dividing the message into smaller chunks (segments) to fit
within network constraints, such as the Maximum Segment Size (MSS), which is
derived from the network’s Maximum Transmission Unit (MTU) minus header
overhead.

o Each segment is prepended with a header containing:

▪ Source and destination port numbers: To identify the sending and receiving
processes (e.g., port 80 for HTTP).

▪ Sequence numbers: To track the order of segments (in TCP).

▪ Checksum: For error detection.

o The segmented data is then passed to the Network layer for encapsulation into
packets and transmission over the network.

• At the Receiver’s Side:

o The transport layer receives segments from the Network layer (after they’ve been
stripped of IP headers).

o It reassembles the segments by:

▪ Checking sequence numbers to arrange them in the correct order.

▪ Verifying checksums to ensure data integrity.

▪ Stripping the transport header and forwarding the reassembled message to


the appropriate application process, identified by the destination port
number.
o If errors or missing segments are detected (in TCP), it requests retransmission from
the sender.

This bidirectional process ensures that applications can communicate reliably without needing to
handle low-level network details.

Responsibilities of the Transport Layer

The transport layer performs several critical functions to enable robust communication. Below is a
detailed breakdown of each responsibility:

1. Process-to-Process Delivery

• Concept: Unlike the Data Link layer (which uses MAC addresses for device-to-device delivery)
or the Network layer (which uses IP addresses for host-to-host routing), the transport layer
ensures process-to-process delivery by identifying specific applications or services running
on a host.

• Mechanism: It uses port numbers, 16-bit identifiers (ranging from 0 to 65,535), to pinpoint
processes. Ports are categorized as:

o Well-known ports (0–1023): Assigned to standard services (e.g., 22 for SSH, 80 for
HTTP).

o Registered ports (1024–49151): Used by user applications registered with IANA.

o Ephemeral ports (49152–65535): Dynamically assigned for temporary use by client


applications.

• Example: A web browser (ephemeral port 49152) on Host A communicates with a web
server (port 80) on Host B. The transport layer ensures the browser’s request reaches the
server process, not another application like an email server (port 25).

• Technical Detail: The combination of an IP address and port number forms a socket (e.g.,
192.168.1.1:80), uniquely identifying each endpoint in a connection.
2. End-to-End Connection Between Hosts

• Concept: The transport layer establishes and manages connections between the source and
destination hosts, ensuring data flows reliably from end to end.

• Protocols:

o TCP (Transmission Control Protocol):

▪ Connection-Oriented: Uses a three-way handshake (SYN, SYN-ACK, ACK) to


establish a connection before data transfer. Example: Host A sends SYN, Host
B responds with SYN-ACK, and Host A confirms with ACK.

▪ Reliability: Guarantees delivery through acknowledgments, retransmissions,


and sequence numbers.

▪ Use Cases: File transfers (FTP), email (SMTP), web browsing (HTTP/HTTPS).

o UDP (User Datagram Protocol):

▪ Connectionless: No handshake—data is sent immediately as independent


datagrams.

▪ Best-Effort Delivery: No guarantees for order or delivery; lost packets are


not retransmitted unless handled by the application.

▪ Use Cases: Real-time applications like video streaming (e.g., RTP over UDP),
DNS queries, and VoIP.

• Details: TCP maintains connection state (e.g., ESTABLISHED, FIN_WAIT) using a finite state
machine, while UDP is stateless, sending each datagram without tracking prior interactions.

• Example: TCP ensures a downloaded file is complete, while UDP allows a video to play even
if some frames are dropped, prioritizing speed.
3. Multiplexing and Demultiplexing

• Concept: The transport layer enables multiple applications on a single host to share the
network connection simultaneously.

• Multiplexing (Sender Side):

o Collects data from various processes (e.g., a browser, email client, and chat app).

o Assigns each process a unique port number.

o Combines the data into a single stream of segments, each tagged with source and
destination ports.

o Example: A host sends HTTP data (port 80) and SMTP data (port 25) in interleaved
segments over the same IP connection.

• Demultiplexing (Receiver Side):

o Receives segments from the Network layer.

o Examines the destination port in each segment’s header.

o Distributes the data to the correct process (e.g., HTTP to the browser, SMTP to the
email client).

• Technical Detail: This relies on the socket concept (IP + port) and the transport layer’s ability
to parse headers efficiently.

• Significance: Without multiplexing, each application would need a dedicated network


connection, drastically reducing efficiency.
4. Congestion Control

• Concept: Congestion occurs when too much data floods the network, overwhelming routers
and causing packet loss. The transport layer mitigates this, primarily via TCP.

• Mechanisms:

o Open-Loop Congestion Control: Prevents congestion before it happens by shaping


traffic. Example: The Leaky Bucket Algorithm regulates data flow by allowing a
steady output rate, buffering excess data, and discarding it if the buffer overflows.

o Closed-Loop Congestion Control: Reacts to congestion after it occurs. Example: TCP


uses AIMD (Additive Increase, Multiplicative Decrease):

▪ Additive Increase: Gradually increases the sending rate (e.g., by 1 segment


per round-trip time) when no congestion is detected.

▪ Multiplicative Decrease: Halves the sending rate upon detecting packet loss
(e.g., via duplicate ACKs or timeouts).

o Congestion Window (cwnd): TCP maintains a dynamic window size, adjusting it


based on network conditions.

• UDP Note: UDP doesn’t provide congestion control—applications using UDP must implement
it if needed.

• Example: During a file download, TCP slows down if the network is congested, preventing
further packet loss, while UDP might continue sending, risking dropped packets in a video
stream.
5. Data Integrity and Error Correction

• Concept: Ensures data arrives uncorrupted and complete, a key feature of TCP but optional
in UDP.

• Mechanisms:

o Checksum: Each segment includes a 16-bit checksum calculated over the header and
data. The receiver recomputes it; if it mismatches, the segment is discarded, and TCP
requests retransmission (via timeout or lack of ACK).

o Sequence Numbers: Track segment order and detect missing or duplicated data.
Example: If segments 1, 2, and 4 arrive, TCP requests retransmission of 3.

o Acknowledgments (ACKs): Positive ACKs confirm receipt; missing ACKs trigger


retransmission.

o Negative ACKs (NACKs): Rarely used in TCP but supported in some protocols to
explicitly request missing data.

• UDP Detail: Includes a checksum but doesn’t retransmit—error handling is left to the
application.

• Example: TCP ensures a financial transaction’s data is intact, while UDP might tolerate minor
corruption in a live audio stream.

6. Flow Control

• Concept: Prevents a fast sender from overwhelming a slow receiver, ensuring no data is lost
due to buffer overflow.

• Mechanism: TCP uses the sliding window protocol:

o The receiver advertises its window size (buffer capacity) in ACKs.

o The sender limits its transmission to this size, pausing if the window reaches zero.

o As the receiver processes data, the window “slides” forward, allowing more
transmissions.
• Details: The window size is dynamic, shrinking under heavy load and expanding as the
receiver catches up.

• UDP Note: No built-in flow control—applications must manage it if needed.

• Example: A server sending a large file adjusts its rate based on the client’s ability to process,
avoiding buffer overruns.

Protocols of the Transport Layer

The transport layer supports various protocols, each tailored to specific needs. Here’s a detailed look
at the most notable ones:

1. Transmission Control Protocol (TCP):

o Connection-oriented, reliable, with congestion control, flow control, and error


correction.

o Header size: 20–60 bytes (with options).

o Use: Web (HTTP/HTTPS), email (SMTP), file transfer (FTP).

2. User Datagram Protocol (UDP):

o Connectionless, lightweight, with minimal overhead (8-byte header).

o Best-effort delivery, no reliability guarantees.

o Use: DNS, video streaming, gaming.

3. Stream Control Transmission Protocol (SCTP):

o Combines TCP’s reliability with UDP’s message-oriented nature.

o Supports multi-streaming and multi-homing (multiple IP paths).

o Use: Telephony signaling (e.g., SS7 over IP).

4. Datagram Congestion Control Protocol (DCCP):

o Offers congestion control for UDP-like datagram traffic.

o Use: Real-time applications needing congestion management.

5. AppleTalk Transaction Protocol (ATP):

o Reliable, transaction-based protocol for AppleTalk networks.

o Use: Legacy Apple systems.

6. Fibre Channel Protocol (FCP):

o High-speed, reliable protocol for storage area networks (SANs).

o Use: Data center storage.

7. Reliable Data Protocol (RDP):


o Connection-oriented, designed for bulk data with reliability.

o Use: Early networking systems.

8. Reliable User Datagram Protocol (RUDP):

o Extends UDP with reliability features like ACKs and retransmissions.

o Use: Custom applications needing UDP’s speed with some reliability.

9. Structured Stream Transport (SST):

o Experimental protocol for secure, multi-stream communication.

o Use: Research and niche applications.

10. Sequenced Packet Exchange (SPX):

o Novell’s reliable, connection-oriented protocol for IPX networks.

o Use: Legacy NetWare systems.

Conclusion

The transport layer’s multifaceted responsibilities—process-to-process delivery, end-to-end


connectivity, multiplexing, congestion control, data integrity, and flow control—make it the backbone
of reliable networked communication. By leveraging protocols like TCP and UDP, it adapts to diverse
application needs, from ensuring every byte of a file transfer arrives intact to enabling real-time
video with minimal latency. Understanding its workings provides critical insight into how modern
networks function efficiently and robustly.

You might also like