0% found this document useful (0 votes)
3 views6 pages

Unit3

The document provides an overview of transport layer protocols, focusing on User Datagram Protocol (UDP) and Transmission Control Protocol (TCP), as well as Stream Control Transmission Protocol (SCTP). It details the services offered by these protocols, including end-to-end communication, reliable data transfer, flow control, and error control, along with their respective features and applications. Additionally, it explains the significance of port numbers and the mechanisms used for congestion and flow control in TCP and SCTP.

Uploaded by

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

Unit3

The document provides an overview of transport layer protocols, focusing on User Datagram Protocol (UDP) and Transmission Control Protocol (TCP), as well as Stream Control Transmission Protocol (SCTP). It details the services offered by these protocols, including end-to-end communication, reliable data transfer, flow control, and error control, along with their respective features and applications. Additionally, it explains the significance of port numbers and the mechanisms used for congestion and flow control in TCP and SCTP.

Uploaded by

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

ADVANCED COMPUTER NETWORKS

Unit-III: Transport Layer Protocols


Introduction, Services, Port numbers,

User Datagram Protocol: User datagram, UDP services, UDP Applications, Transmission control

Protocol: TCP services, TCP features, Segment, A TCP connection, State transition diagram, Windows
in TCP, Flow control and error control, TCP Congestion control, TCP Timers, SCTP: SCTP services
SCTP features, packet format, An SCTP association, flow control, error control.

Introduction to Transport Layer

The Transport Layer is the fourth layer in the OSI (Open Systems Interconnection) model
and is responsible for providing end-to-end communication services for applications. The
transport layer ensures reliable data transfer between devices on different networks. It
establishes logical connections between the sender and receiver, manages data flow, and
provides services like error detection and recovery.

Services Provided by the Transport Layer

The Transport Layer provides the following primary services:

1. End-to-End Communication: Ensures data is transferred between specific devices


on different networks.
2. Reliable Data Transfer: Guarantees that data arrives correctly and in sequence, using
mechanisms like retransmission and acknowledgments.
3. Flow Control: Prevents congestion by ensuring that data is sent at a rate the receiver
can handle.
4. Error Control: Detects and corrects errors that may occur during transmission.
5. Multiplexing: Allows multiple applications to use a single network connection by
associating each communication with a unique port number.

Port Numbers

Port numbers are used in the transport layer to identify specific processes or services running
on a device. A port number is a 16-bit number, so it ranges from 0 to 65535. They are
categorized as follows:

 Well-known ports (0-1023): Reserved for widely used protocols (e.g., HTTP (80),
FTP (21), DNS (53)).
 Registered ports (1024-49151): Used for applications that are not as widely
standardized.
 Dynamic or private ports (49152-65535): Temporarily used for communication
between client and server during a session.

For example:
ADVANCED COMPUTER NETWORKS

 HTTP typically uses port 80.


 HTTPS (secure HTTP) uses port 443.

User Datagram Protocol (UDP)

User Datagram Protocol (UDP) is a connectionless, lightweight transport layer protocol that
offers minimal overhead. It is used in applications where speed is critical and reliability is not
as important, such as streaming video or DNS queries.

User Datagram (UDP Datagram)

A UDP Datagram is the fundamental unit of data in UDP communication. It contains:

1. Source Port: 16 bits identifying the sending port.


2. Destination Port: 16 bits identifying the receiving port.
3. Length: 16 bits, specifying the length of the UDP header and data.
4. Checksum: 16 bits used for error checking of the header and data.

UDP Services

 Connectionless: UDP does not establish a connection before sending data, reducing
delay.
 Unreliable: UDP does not guarantee that packets will arrive or arrive in order, and it
does not perform retransmission or flow control.
 No Flow Control: UDP does not manage the flow of data between sender and
receiver, leading to possible packet loss or congestion.

UDP Applications

UDP is used in applications where fast transmission is more important than reliability:

 Streaming Media: Video and audio streaming (e.g., YouTube, VoIP) often use UDP
because real-time performance is prioritized over perfect delivery.
 DNS: Domain Name System (DNS) requests are typically transmitted using UDP
because DNS queries are small and require fast responses.
 Online Gaming: Many real-time multiplayer games use UDP to avoid latency caused
by retransmission and error-checking processes.

Transmission Control Protocol (TCP)

Transmission Control Protocol (TCP) is a connection-oriented, reliable transport layer


protocol that ensures data delivery in the correct order. TCP is used for applications where
data integrity is crucial.

TCP Services
ADVANCED COMPUTER NETWORKS

 Reliable Data Delivery: Ensures that data is received correctly and in order by using
acknowledgments and retransmissions.
 Flow Control: Regulates the rate at which data is sent to avoid overwhelming the
receiver.
 Congestion Control: Prevents network congestion by adjusting the sending rate
based on network conditions.
 Error Detection and Correction: Uses checksums to detect errors in the data and
requests retransmission if necessary.

TCP Features

 Connection-Oriented: Before sending data, a connection must be established through


a three-way handshake.
 Full Duplex: Data can be sent and received simultaneously.
 Ordered Data Transfer: Guarantees that data arrives in the order in which it was
sent.
 Error Recovery: If a packet is lost or corrupted, TCP ensures that it is retransmitted.

Segment

A TCP segment is the unit of data exchange in TCP, and it consists of:

 Header: Contains control information, such as sequence numbers, acknowledgment


numbers, flags (SYN, ACK, FIN), and window size.
 Data: The actual payload being transferred between sender and receiver.

A TCP Connection

A TCP connection is established using the three-way handshake:

1. SYN: The client sends a SYN (synchronize) packet to the server to initiate the
connection.
2. SYN-ACK: The server responds with a SYN-ACK packet, acknowledging the
connection request.
3. ACK: The client sends an ACK (acknowledgment) packet, completing the handshake.

Once the connection is established, data can flow between the client and server. The
connection is closed using a four-way handshake when communication is done.

State Transition Diagram

The TCP state transition diagram illustrates the states a TCP connection can go through
during its lifecycle. Some key states include:

 LISTEN: Waiting for incoming connection requests.


 SYN_SENT: The connection initiation request has been sent.
 ESTABLISHED: The connection is open, and data can be exchanged.
 FIN_WAIT: The connection is being closed.
ADVANCED COMPUTER NETWORKS

The transitions between these states are triggered by events like receiving packets, timeouts,
and acknowledgment of data.

Windows in TCP

TCP uses a concept called the sliding window for flow control. The window is a buffer that
allows the sender to transmit multiple packets before needing an acknowledgment, but only a
certain amount of data can be in transit at any given time.

 The window size (advertised by the receiver) determines how much data can be sent
without waiting for an acknowledgment.
 If the sender receives an acknowledgment, the window slides forward, and new data
can be sent.

Flow Control and Error Control in TCP

 Flow Control: Ensures the sender does not overwhelm the receiver. It’s managed
using the sliding window technique, which is adjusted based on the receiver’s buffer
space.
 Error Control: Achieved using checksums for data integrity. If a packet is lost or
corrupted, TCP automatically retransmits it. Sequence numbers are used to ensure
the correct order of packets.

TCP Congestion Control

TCP employs several mechanisms to avoid congestion:

1. Slow Start: Initially, TCP sends a small amount of data and gradually increases the
sending rate as it gets acknowledgments.
2. Congestion Avoidance: If packet loss is detected (via timeout or duplicate ACKs),
TCP reduces the window size, slowing down the data transmission.
3. Fast Retransmit: If three duplicate ACKs are received (indicating packet loss), TCP
retransmits the lost packet immediately without waiting for a timeout.
4. Fast Recovery: TCP continues sending data after packet loss but adjusts the
congestion window to avoid further congestion.

TCP Timers

TCP uses several timers to manage its connection, including:

1. Retransmission Timer: Defines how long TCP should wait for an acknowledgment
before retransmitting a packet.
ADVANCED COMPUTER NETWORKS

2. Persist Timer: Ensures that the sender continues trying to send data when the
receiver’s window size is zero.
3. Keep-Alive Timer: Ensures that the connection is still alive by sending periodic
probes if no data is transmitted for a certain period.

SCTP (Stream Control Transmission Protocol)

SCTP is a transport layer protocol that combines features of both TCP and UDP. It is
connection-oriented like TCP, but it provides message-oriented communication like UDP.
SCTP is mainly used in applications requiring high availability and fault tolerance, such as
telecommunication networks.

SCTP Services

SCTP provides:

1. Reliable Message Delivery: Like TCP, it ensures messages are reliably delivered,
even in case of network failures.
2. Multihoming: SCTP supports multiple IP addresses for a single connection,
providing fault tolerance if one address becomes unavailable.
3. Ordered and Unordered Delivery: SCTP can deliver messages in the order they
were sent, or it can send them out of order, depending on the application’s needs.

SCTP Features

 Multi-streaming: SCTP allows multiple independent streams of data within a single


connection, which avoids head-of-line blocking.
 Congestion and Flow Control: SCTP uses similar techniques to TCP for congestion
control and flow control.
 Multihoming: SCTP supports using multiple network paths between endpoints,
ensuring higher reliability in case of network failure.

SCTP Packet Format

SCTP packets consist of:

1. Common Header: Contains control information for the connection.


2. Chunks: Data segments, which may be control messages or user data.

An SCTP Association

An SCTP association is similar to a TCP connection. It is established using a four-way


handshake and can carry multiple streams of data.

Flow Control and Error Control in SCTP


ADVANCED COMPUTER NETWORKS

 Flow Control: SCTP uses a similar sliding window mechanism as TCP to control the
flow of data.
 Error Control: SCTP provides reliable data delivery by retransmitting lost packets,
using checksums for error detection, and ensuring that data is received in the correct
order.

You might also like