0% found this document useful (0 votes)
3 views

Unit4 Transport Layer

The transport layer is a crucial component of the TCP/IP and OSI models, responsible for end-to-end communication between processes on different hosts. It manages process-to-process delivery, provides connection-oriented (TCP) and connectionless (UDP) services, and ensures data integrity, flow control, and congestion management. Key functions include multiplexing, error correction, and establishing reliable connections through mechanisms like the three-way handshake.
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)
3 views

Unit4 Transport Layer

The transport layer is a crucial component of the TCP/IP and OSI models, responsible for end-to-end communication between processes on different hosts. It manages process-to-process delivery, provides connection-oriented (TCP) and connectionless (UDP) services, and ensures data integrity, flow control, and congestion management. Key functions include multiplexing, error correction, and establishing reliable connections through mechanisms like the three-way handshake.
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/ 27

Computer Network(KCS-603)

UNIT IV: Transport Layer


Transport Layer

The transport Layer is the second layer in the TCP/IP model and the fourth
layer in the OSI model. It is an end-to-end layer used to deliver messages to a
host. It is termed an end-to-end layer because it provides a point-to-point
connection rather than hop-to-hop, between the source host and destination
host to deliver the services reliably.

Process to Process Delivery:

The data link layer is responsible for delivery of frames between two
neighboring nodes over a link. This is called node-to-node delivery.
The network layer is responsible for delivery of datagrams between two hosts.
This is called host-to-host delivery.
Real communication takes place between two processes (application
programs). This is called process-to-process delivery.
The transport layer is responsible for process-to-process delivery-the delivery
of a packet, part of a message, from one process to another.
• The transport layer provides a logical communication between application
processes running on different hosts.
• The transport layer protocols are implemented in the end systems but not in
the network routers.
• A computer network provides more than one protocol to the network
applications. For example, TCP and UDP are two transport layer protocols
that provide a different set of services to the network layer.
Figure 4.1 shows these three types of deliveries and their domains
Responsibilities of a Transport Layer

• The Process to Process Delivery


• End-to-End Connection between Hosts
• Multiplexing and Demultiplexing
• Congestion Control
• Data integrity and Error correction
• Flow control
1. The Process to Process Delivery
While Data Link Layer requires the MAC address (48 bits address contained
inside the Network Interface Card of every host machine) of source-
destination hosts to correctly deliver a frame and the Network layer requires
the IP address for appropriate routing of packets, in a similar way Transport
Layer requires a Port number to correctly deliver the segments of data to the
correct process amongst the multiple processes running on a particular host.
A port number is a 16-bit address used to identify any client-server program
uniquely.

2. End-to-end Connection between Hosts


The transport layer is also responsible for creating the end-to-end Connection
between hosts for which it mainly uses TCP and UDP. TCP is a secure,
connection-orientated protocol that uses a handshake protocol to establish a
robust connection between two end hosts. TCP ensures the reliable delivery of
messages and is used in various applications. UDP, on the other hand, is a
stateless and unreliable protocol that ensures best-effort delivery. It is
suitable for applications that have little concern with flow or error control and
requires sending the bulk of data like video conferencing. It is often used in
multicasting protocols.
3. Multiplexing and Demultiplexing

Multiplexing(many to one) is when data is acquired from several processes


from the sender and merged into one packet along with headers and sent as a
single packet. Multiplexing allows the simultaneous use of different processes
over a network that is running on a host.
Similarly, Demultiplexing(one to many) is required at the receiver side when
the message is distributed into different processes. Transport receives the
segments of data from the network layer distributes and delivers it to the
appropriate process running on the receiver’s machine.
4. Congestion Control
Congestion is a situation in which too many sources over a network attempt to
send data and the router buffers start overflowing due to which loss of packets
occurs. As a result, the retransmission of packets from the sources increases the
congestion further. In this situation, the Transport layer provides Congestion
Control in different ways. It uses open-loop congestion control to prevent
congestion and closed-loop congestion control to remove the congestion in a
network once it occurred.
5. Data integrity and Error Correction
The transport layer checks for errors in the messages coming from the
application layer by using error detection codes, and computing checksums, it
checks whether the received data is not corrupted and uses the ACK and NACK
services to inform the sender if the data has arrived or not and checks for the
integrity of data.
6. Flow Control
The transport layer provides a flow control mechanism between the adjacent
layers of the TCP/IP model. TCP also prevents data loss due to a fast sender and
slow receiver by imposing some flow control techniques. It uses the method of
sliding window protocol which is accomplished by the receiver by sending a
window back to the sender informing the size of data it can receive.
Connectionless Versus Connection-Oriented Service
A transport layer protocol can either be connectionless or connection-oriented.

Connectionless Service

In a connectionless service, the packets are sent from one party to another with no
need for connection establishment or connection release. The packets are not
numbered; they may be delayed or lost or may arrive out of sequence. There is no
acknowledgment either.

Connection-Oriented Service

In a connection-oriented service, a connection is first established between the


sender and the receiver. Data are transferred. At the end, the connection is
released.
Transport Layer protocols

• The transport layer is represented by two protocols: TCP and UDP.


• The IP protocol in the network layer delivers a datagram from a source host
to the destination host.
• The operating system supports multiuser and multiprocessing environments,
an executing program is called a process. When a host sends a message to
other host means that source process is sending a process to a destination
process. The transport layer protocols define some connections to individual
ports known as protocol ports.
• An IP protocol is a host-to-host protocol used to deliver a packet from source
host to the destination host while transport layer protocols are port-to-port
protocols that work on the top of the IP protocols to deliver the packet from
the originating port to the IP services, and from IP services to the destination
port.
• Each port is defined by a positive integer address, and it is of 16 bits.
UDP
• UDP stands for User Datagram Protocol.
• UDP is a simple protocol and it provides non sequenced transport functionality.
• UDP is a connectionless protocol.
• This type of protocol is used when reliability and security are less important than
speed and size.
• UDP is an end-to-end transport level protocol that adds transport-level
addresses, checksum error control, and length information to the data from the
upper layer.
• The packet produced by the UDP protocol is known as a user datagram.

User Datagram Format


The user datagram has a 16-byte header which is shown below:
Source port address: It defines the address of the application process that
has delivered a message. The source port address is of 16 bits address.
Destination port address: It defines the address of the application process
that will receive the message. The destination port address is of a 16-bit
address.
Total length: It defines the total length of the user datagram in bytes. It is a
16-bit field.
Checksum: The checksum is a 16-bit field which is used in error detection.

Disadvantages of UDP protocol


 UDP provides basic functions needed for the end-to-end delivery of a
transmission.
 It does not provide any sequencing or reordering functions and does not
specify the damaged packet when reporting an error.
 UDP can discover that an error has occurred, but it does not specify which
packet has been lost as it does not contain an ID or sequencing number of a
particular data segment.
TCP
TCP stands for Transmission Control Protocol.
It provides full transport layer services to applications.
It is a connection-oriented protocol means the connection established
between both the ends of the transmission.

Features Of TCP protocol

Stream data transfer:


Reliability:
Flow Control:
Multiplexing:
Logical Connections:
Full Duplex:
TCP Segment Format
Source port address: It is used to define the address of the application program in a
source computer. It is a 16-bit field.

Destination port address: It is used to define the address of the application program
in a destination computer. It is a 16-bit field.

Sequence number: A stream of data is divided into two or more TCP segments. The 32-
bit sequence number field represents the position of the data in an original data stream.

Acknowledgement number: A 32-field acknowledgement number acknowledge the


data from other communicating devices. If ACK field is set to 1, then it specifies the
sequence number that the receiver is expecting to receive.

Header Length (HLEN): It specifies the size of the TCP header in 32-bit words. The
minimum size of the header is 5 words, and the maximum size of the header is 15 words.
the maximum size of the TCP header is 60 bytes, and the minimum size of the TCP header
is 20 bytes.
Reserved: It is a six-bit field which is reserved for future use.

Control bits: Each bit of a control field functions individually and independently. A
control bit defines the use of a segment or serves as a validity check for other fields.
Differences b/w TCP & UDP

Basis for TCP UDP


Comparison
Definition TCP establishes a virtual circuit UDP transmits the data
before transmitting the data. directly to the destination
computer without verifying
whether the receiver is
ready to receive or not.
Connection Type It is a Connection-Oriented protocol It is a Connectionless
protocol
Speed slow high
Reliability It is a reliable protocol. It is an unreliable protocol.

Header size 20 bytes 8 bytes


acknowledgement It waits for the acknowledgement of It neither takes the
data and has the ability to resend acknowledgement, nor it
the lost packets. retransmits the damaged
frame.
CONNECTION MANAGEMENT

A TCP connection begins with a client doing an active open to a server.
• Assuming that the server had earlier done a passive open, the two sides engage in an
exchange of messages to establish the connection.
• Only after this connection establishment phase is over do the two sides begin sending
data.
• Likewise, as soon as a participant is done sending data, it closes one direction of the
connection, which causes TCP to initiate a round of connection termination messages.

• Connection setup is an asymmetric activity (one side does a passive open and the other
side does an active open) connection teardown is symmetric (each side has to close
the connection independently).
• Therefore it is possible for one side to have done a close, meaning that it can no longer
send data but for the other side to keep the other half of the bidirectional connection
opens and to continue sending data.
THREE WAY HANDSHAKES:

The algorithm used by TCP to establish and terminate a connection is called a three
way handshake. The client (the active participant) sends a segment to the
server(the passive participation) stating the initial sequence number it plans to
use(flag =SYN, SequenceNum =x).
The server then responds with a single segment that both acknowledges the client‟s
sequence number (Flags =ACK, Ack=x+1) and states its own beginning seque
nce number

(Flags=SYN, SequenceNum=y).

both the SYN and ACK bits are set in the


Flags field of this second message.
Finally, the client responds with a third
segment that acknowledges the
server‟s sequence number
Flags =ACK, Ack=y+1)
The "three-way handshake" is the procedure used to establish a connection.
This procedure normally is initiated by one TCP and responded to by another
TCP.
The procedure also works if two TCP simultaneously initiate the procedure.
When simultaneous attempt occurs, each TCP receives a "SYN" segment which
carries no acknowledgment after it has sent a "SYN".
Quality-of-Service

Quality-of-Service (QoS) refers to traffic control mechanisms that seek to


either differentiate performance based on application or network-operator
requirements or provide predictable or guaranteed performance to
applications, sessions, or traffic aggregates.
Basic phenomenon for QoS means in terms of packet delay and losses of
various kinds.

QoS Specification –
QoS requirements can be specified as:
 Delay
 Delay Variation(Jitter)
 Throughput
 Error Rate
There are two types of QoS Solutions:

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy