0% found this document useful (0 votes)
24 views11 pages

Module 2 - Transport Layer

Uploaded by

Ankit Raj
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
24 views11 pages

Module 2 - Transport Layer

Uploaded by

Ankit Raj
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 11

Module 2 - Transport Layer

Learning Objective:
After studying this module, students will be able to:
1. Know what Transport Layer Functions means.
2. Understand the Transport Protocols (TCP and UDP)
3. Understand the Data Transfer and Connections; Reliability
4. Explain the Flow Control and Congestion Control
Structure
2.1 Transport Layer Functions
2.2 Transport Protocols (TCP and UDP)
2.3 Data Transfer and Connections; Reliability; Flow Control and Congestion Control
2.4 Summary
2.5 References

2.1 Transport Layer Functions

The specific functions of the transport layer are:


1. Service Point Addressing
Many programs are often running on a computer at the same time. Therefore, source-to-target
delivery is not just from one computer to another but also from a specific job (the currently
running program) on one computer to a particular position (the currently running program) on
another system. This means delivery to a running program).
Because of this, the transport layer added a specific address to the header, called a service
point address or port address.
Each packet reaches the correct computer via this address, and the transport layer gets the
complete message to the correct process.
2. Segmentation And Reconstruction
Segmentation divides a message into transmittable segments that contain sequence numbers.
This number allows this layer to reconstruct the message.
Once it reaches its destination, the message is correctly reassembled, and packets lost in
transit are identified and replaced.
3. Connection Control
It can be either of two types:
a. Connectionless Transport Layer- This transport layer treats each packet
individually and delivers it to the destination machine. In this type of transmission,
the receiver does not acknowledge receipt of the packet to the sender. This is a faster
communication technology.
b. Connection Oriented Transport Layer - It creates a connection with the transport
layer on the destination machine before sending the packet to the destination. There
are three possible steps to creating a connection:
⮚ Connection Establishment
⮚ Data Transfer
⮚ Connection Termination
The connection is closed when all the data has been sent. Connectionless services are less
reliable than connection-oriented services.
c. Multiplexing and Demultiplexing- Multiple packets from different applications will
be sent over the network, requiring a very dedicated control mechanism at the
transport layer.
The transport layer accepts packets from various processes. These packets are distinguished
by port number and passed to the network layer after adding the appropriate headers.
In demultiplexing, the receiver gets data from different processes. It receives segments of
data from the network layer and delivers them to the appropriate processes running on the
recipient's machine.
d. Flow Control
i. Transport layer is also responsible for the flow control mechanism between
adjacent layers in the TCP/IP model.
ii. Single connection does not work even when running end-to-end nodes.
iii. Flow control techniques can be applied to prevent data loss caused by senders
and slow receivers.
iv. For example, use the method of the sliding window protocol. In this method,
the Receiver sends a window back to the sender, telling it the size of the data it
has received.
v. Many programs are often running on your computer at the same time.
Therefore, source-to-target delivery is not just from one computer to another
but also from a specific job (the currently running program) on one computer
to a specific job (the currently running program) on another system. This
means delivery to a running program).
vi. Because of this, the transport layer added a specific address to the header
called a service point address or port address.
vii. Each packet reaches the correct computer via this address, and the transport
layer also gets the complete message to the right process on this computer.
e. Error control
Error control is also performed end-to-end, similar to the data link layer.
This layer ensures that the entire message arrives at the receiving transport layer without
errors (damaged, lost, or duplicated). Error correction is accomplished by retransmitting
packets.
Use the ACK and NACK services to notify the sender if the data has arrived and to check the
integrity of the data.

2.2 Transport Protocols (TCP and UDP)

Layer 3 (network layer) uses IP or Internet Protocol, a connectionless protocol that treats
each packet individually, resulting in unreliable transmission. When data is transferred from
one host to another, each packet can follow a different route even though it belongs to the
same session. This means that packets may or may not arrive in order. As such, IP reliability
is dependent on higher-layer protocols.
Transmission Control Protocol (TCP)
It is a protocol that allows data to be sent from one computer to another. It has Layer 4
protocol that provides packet acknowledgment and retransmits lost packets for increased
reliability. Better than UDP. However, due to these characteristics, there are drawbacks.

Transmission Control Protocol (TCP)


How TCP works
To ensure that each message reaches its intended destination intact, the TCP/IP model breaks
the data into smaller bundles and then reassembles them back into the original statement on
the other side. Sending information in small batches, as opposed to all at once, helps maintain
efficiency.

After a given message is split into bundles, these bundles may travel along multiple routes if
one route is congested, but the destination remains the same.

We can see that the message is being broken down, then reassembled from a different
order at the destination

For example, when a user requests her web page on the Internet, the server processes the
request and sends the HTML page back to the user. The server uses a protocol called the
HTTP protocol. He then HTTP requests the TCP layer to set up the necessary connections
and send the HTML file.

Here, TCP divides the data into smaller packets and transfers them to the Internet Protocol
(IP) layer. The packets are then sent to their destination via various routes.

Her TCP layer in the user's system waits for the transmission to complete and confirms that
all packets have been received.

User Datagram Protocol (UDP)


User Datagram Protocol is also a Layer 4 protocol, but unlike Transmission Control Protocol,
it does not acknowledge packets sent. As such, it is unreliable and relies on higher layer
protocols to function. However, it is simpler, more scalable, and has less overhead when
compared to TCP. Used for streaming video and audio.
User Datagram Protocol (UDP)
Part of the Internet protocol suite called the UDP/IP suite. Unlike TCP, it is an unreliable,
connectionless protocol. Therefore, there is no need to establish a connection before data
transfer. UDP helps establish low-latency, loss-tolerant connections established over a
network. UDP allows Interprocess communication.
Transmission Control Protocol (TCP) is most Internet services' primary transport layer
protocol. They offer guaranteed delivery, reliability, etc., but all these services come with
additional overhead and latency. This is where UDP comes into play. Real-time services such
as computer games, voice or video communications, and live conferencing. Requires UDP.
Because of the need for high performance, UDP can drop packets instead of processing
delayed packets. UDP also saves bandwidth because there is no error checking.
UDP Header
The UDP header is a simple, fixed header of 8 bytes, whereas TCP can vary from 20 bytes to
60 bytes. The first 8 bytes contain all necessary header information, the rest consists of data.
Each UDP port number field is 16 bits long, so the port number range is defined as 0-65535.
Port number 0 is reserved. Port numbers help distinguish between different user requests
or processes.
Source Port: Source Port is a 2-byte long field used to identify the port number of the
source.
Destination Port: A 2-byte long field used to identify the port of the destination packet.
Length: Length is the UDP length including headers and data. This is a 16-bit field.
Checksum: The checksum is a 2-byte long field. This is the 16-bit one's complement of the
sum of the UDP header, the one's complement of the information from the IP header, and the
one's complement of the data, with a trailing 0 octet (if necessary) to make it a multiple of
two. is an embedded octet.
Note - Unlike TCP, checksum calculation is not mandatory for UDP. UDP does not provide
error or flow control. UDP therefore relies on IP and ICMP for error reporting. Also, UDP
provides a port number so that user requests can be distinguished.

Application
1. It is used for simple request-response communication when the size of the data is
small and there are less concerns about flow and error control.
2. UDP is a good protocol for multicast because it supports packet exchange.
3. It is used for some routing update protocols such as RIP (Routing Information
Protocol).
4. Typically used for real-time applications that cannot tolerate uneven delays between
sections of incoming messages.
5. The following implementation uses UDP as the transport layer protocol.
a. NTP (Network Time Protocol)
b. DNS (Domain Name Service)
c. BOOTP, DHCP.
d. NNP (Network News Protocol)
e. Protocol Quote of the Day
f. TFTP, RTSP, RIP.
6. The application layer can perform some tasks over UDP.
a. Trace Route
b. Record Route
c. Time Stamp
7. UDP takes a datagram from the network layer, attaches its headers, and sends it to the
user. So, it works fast.
8. In fact, removing the checksum field makes UDP a null protocol.
a. Reduce computer resource requirements.
b. When forwarding using multicast or broadcast.
TCP and UDP
Below are the main factors that distinguish TCP and UDP. −
1. Session Multiplexing
A single host can talk to many servers through a single IP address. When using TCP, the
server and Receiver must first establish a connection and close the connection when the
transmission is complete.
TCP also ensures that transmissions are reliable while they are being sent.
UDP, on the other hand, does not know that the packet has been received. The result is less
reliability.
2. Segmentation
Maximum transmission unit or MTU is 1500 bytes, while TCP's theoretical limit is 65495
bytes in Fast Ethernet . UDP does not allow this, so data segmentation must rely on higher-
layer protocols.
3. Flow Control
If the sender delivers data faster than the Receiver can process it, the Receiver discards the
data and looks for repetition, wasting time and resources. TCP uses a sliding window to
provide end-to-end flow control. A sliding window sends an acknowledgment from the
Receiver that indicates how much data can be received at any given time.
UDP does not support flow control, so you have to rely on higher layer protocols for this.
Connection-Oriented
TCP is connection oriented. That is, it establishes a connection for transmission and closes
the connection when transmission is complete. UDP, on the other side, is connectionless, just
like IP (Internet Protocol). TCP provides acknowledgments when packets are received, thus
ensuring reliability. If a packet is lost, a retransmission is requested. To do this, UDP relies
on higher layer protocols.

2.3 Data Transfer and Connections; Reliability; Flow Control and Congestion Control

Layer 3 (network layer) uses IP or Internet Protocol, which is a connectionless protocol that
treats each packet individually, resulting in unreliable transmission. When data is transferred
from one host to another, each packet can travel a different path even if it belongs to the same
session. This means that packets may or may not arrive in order. As such, IP reliability is
dependent on higher-layer protocols.
Transmission Control Protocol (TCP)
It is a protocol that allows data to be sent from one computer to another. TCP is a layer 4
protocol that provides packet acknowledgment and retransmits missing packets, making it
more reliable. Better than UDP. However, due to these characteristics, there are drawbacks.
User Datagram Protocol (UDP)
User Datagram Protocol is also a Layer 4 protocol, but unlike Transmission Control Protocol,
it does not acknowledge packets sent. As such, it is unreliable and relies on higher layer
protocols to function. However, it is simpler, more scalable, and has less overhead when
compared to TCP. Used for streaming video and audio.
TCP and UDP
Below are the main factors that distinguish TCP and UDP. −
Session Multiplexing
A single host can talk to many servers over a single IP address. When using TCP, the server
and Receiver must first establish a connection and close the connection when the
transmission is complete.
A data transmission or transmission is information sent from one place to another via a
communication method. For example, in digital data transmission, data signals are sent and
received using binary code. Another example is that all the text, images and other data has
been transferred over the Internet to your computer in order to display this page. In order for
files to appear on your USB drive, you must first copy or move them from your hard drive to
the USB drive.
How Information Moves Over the Internet
Data can be sent to and received from your computer over the Internet using any of the
following methods.
a. Send
Uploads data when the user sends or wants to send it to the Internet. Online file storage such
as NAS and SAN are often used to store uploaded data.
b. Receive
Downloads data when the user wants to receive or retrieve data from the Internet. Data is
often downloaded from NAS or SAN file storage systems.
c. Receiving and Sending
Users can also directly upload and download data to other computers over the Internet. Peer-
to-peer communication allows users to transfer files directly between computers, bypassing
file storage systems.
In computer networks, reliable protocols notify senders of the delivery of transmitted data. In
contrast, unreliable protocols offer no guarantee of data delivery to the intended recipient.
Reliability is synonymous with assurance, a term used by the ITU and the ATM Forum in the
context of the ATM Service-Specific Coordination Function (for example, guaranteed
transparent delivery using AAL). Therefore, it will be slower and less scalable. This is often
not a problem for unicast protocols, but can be a problem for reliable multicast protocols.

a. TCP, the primary protocol used on the Internet, is a reliable unicast protocol.
b. TCP also ensures that transmissions are reliable while they are being sent.
c. UDP, on the other hand, does not know that the packet has been received. The result
is less reliability.
Segmentation
Maximum transmission unit or MTU is 1500 bytes, while TCP's theoretical limit is 65495
bytes in Fast Ethernet. UDP does not allow this, so data segmentation must rely on higher-
layer protocols.
Flow Control
If the sender delivers data faster than the Receiver can process it, the Receiver discards the
data and looks for repetition, wasting time and resources. TCP uses a sliding window to
provide end-to-end flow control. A sliding window sends an acknowledgment from the
Receiver that indicates how much data can be received at any given time.
UDP does not support flow control, so you have to rely on higher layer protocols for this.
Connection-Oriented
TCP is connection oriented. That is, it establishes a connection for transmission and closes
the connection when transmission is complete. UDP, on the other hand, is connectionless,
just like IP (Internet Protocol).
TCP provides acknowledgments when packets are received, thus ensuring reliability. If a
packet is lost, a retransmission is requested. To do this, UDP relies on higher layer protocols.

Flow control and congestion control are traffic control methods for different situations. The
main distinction between flow control and congestion control is that flow control allows the
receiver to control the rate of traffic received from the sender. Congestion control, on the
other hand, controls the rate of traffic from the sender to the network. Let's see the
distinction between flow control and congestion control:

S.no Flow Control Congestion Control

1. Traffic from sender to receiver is Traffic entering the network from a


controlled, to avoid overwhelming the sender is controlled by reducing the
slow receiver. rate of packets.
Here, the sender has to
control/modulate his own rate to
achieve optimal network utilization.

2. Flow control is typically used in the data Congestion control is applied in the
link layer. network and transport layer.

3. In this, the Receiver's data is prevented In this, Network is prevented from


from being overwhelmed. congestion.

4. In flow control, the sender needs to take In this, many algorithms designed for
measures to avoid the receiver from transport layer/network layer define
being overwhelmed depending on how endpoints should behave to avoid
feedback from the receiver and also in congestion.
absence of any feedback.

5. Types of Flow control are Mechanisms designed to prevent


network congestions are
a. Stop and Wait – For every frame
transmitted, the sender expects a. Network Queue Management
ACK from the receiver.
b. Sliding Window – ACK needed
only after the sender transmits
data until the window is full,
which is allocated initially by the
receiver.

2.4 Summary
⮚ The transport layer is the key to understanding layered protocols. It offers a variety of
services, the most important of which is an end-to-end, reliable, connection-oriented
stream of bytes from sender to receiver. It is accessed through service primitives that
allow connection establishment, use, and release.
⮚ Transport protocols must be able to perform connection management over unreliable
networks.
⮚ Connection establishment is complicated by the presence of delayed duplicate packets
that can reappear at inopportune moments. It must handle all service primitives,
manage connections and timers, and allocate and consume credits. The Internet has
two main transport protocols: UDP and TCP.
2.5 References
1. Tannenbaum, “Computer Network”, Pearson Education
2. Godbole, “Data Communications and Networking”, Tata Mc Graw-Hill
3. Forouzan,” Communications and Networking”, Tata Mc Graw-Hill

You might also like