0% found this document useful (0 votes)
315 views32 pages

Transport Layer Protocols Guide

The transport layer provides process-to-process delivery of data by using socket addresses that combine IP addresses and port numbers. It offers connection-oriented services using TCP and connectionless services using UDP. TCP provides reliable, ordered delivery using sequencing, acknowledgements and retransmissions. UDP is simpler but does not ensure delivery and does not detect or correct errors.

Uploaded by

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

Transport Layer Protocols Guide

The transport layer provides process-to-process delivery of data by using socket addresses that combine IP addresses and port numbers. It offers connection-oriented services using TCP and connectionless services using UDP. TCP provides reliable, ordered delivery using sequencing, acknowledgements and retransmissions. UDP is simpler but does not ensure delivery and does not detect or correct errors.

Uploaded by

harsharewards1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

UNIT-IV

Transport Layer
Transport Layer:

• The Transport layer is the fourth layer in the


OSI model, which provides communication
services between the computers connected
in the network.

• This Layer is the first one which breaks the


information data, supplied by Application
layer into smaller units called segments.
For example: The transport layer provides an error
checking service during the transmission of data
packets from source computer to destination
computer.
Process-to-Process Delivery
• The data link layer helps to deliver the frames
between two neighboring nodes over a link.
This process is called as node-to-node delivery.

• The network layer helps to deliver the


datagrams between two hosts. This process is
called as host-to-host delivery.
• Several processes are carried out on the
source host and destination host. Some
mechanism is needed to complete the
delivery process between the source host
and destination host.

• The transport layer helps to carry out


the process-to-process delivery i.e. the
delivery of a packet or part of message
from one process to another process.
Transport layer services

1.Socket address

2.Multiplexing and Demultiplexing

3.Connection-oriented Service and


Connection-less Services
1.Socket address: Process to process delivery
(transport layer communication) needs two
identifiers, one is IP address and the other is port
number at each end to make a connection.
• Socket address is the combinations of IP address
and port number
2.Multiplexing and Demultiplexing:

• Multiplexing is the process of combining two or


more data streams into a single physical
connection.
• TCP provides multiplexing facilities by using
source and destination port numbers.
• These port numbers allow TCP to set up a
number of virtual connections over a physical
connection and multiplex the data stream
through that connection.
• The reverse process which is delivering data to
the correct socket by the transport layer is called
demultiplexing.

3.Connection-oriented and Connection-less


Services:

• Communication can be established in two ways


between two or more devices that are
connection-oriented and connection-less.
• Network layers can offer these two different
types of services to its layer for transferring data.
• Connection-oriented services involve the
establishment and termination of the connection.

• connection-less services don’t require any


connection creation and termination processes
for transferring data.

• TCP provides Connection-oriented services.

• It uses handshake process to establish the


connection between the sender and receiver.
A handshake process includes some steps which
are:
 Client requests server to set up a connection for
transfer of data.
 Server program notifies its TCP that connection
can be accepted.
 The client transmits a SYN segment to the server.
 The server sends SYN+ACK to the client.
 Client transmits 3rd segment i.e. just ACK
segment.
 Then server terminates the connection.
• Connectionless service means that a node can
send data packets to its destination without
establishing a connection to the destination.

• This works because of error handling protocols,


which allow for error correction like requesting
retransmission.

• User Datagram Protocol (UDP) is a


connectionless protocol.
Internet transport protocols:
TCP & UDP
Transmission Control Protocol(TCP):
• It provides full transport layer services to
applications.
• It is a connection-oriented protocol that
means the connection established between
both the ends of the transmission.
• For creating the connection, TCP generates a
virtual circuit between sender and receiver for
the duration of a transmission.
• TCP is a reliable protocol as it detects the error
and retransmits the damaged frames.
• TCP protocol number is 6 and it supports
Acknowledgment.
Features Of TCP protocol:
1.Stream data transfer
2.Reliability
3.Flow Control
4.Multiplexing
5.Logical Connections
6.Full Duplex
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.
• Therefore, 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.

There are total six types of flags in control field:

1.URG: Urgent pointer is valid


2.ACK: Acknowledgement number is valid( used in
case of cumulative acknowledgement)
3.PSH: Request for push
4.RST: Reset the connection
5.SYN: Synchronize sequence numbers
6.FIN: Terminate the connection
• Window Size: The window is a 16-bit field that
defines the size of the window.
• Checksum: The checksum is a 16-bit field used in
error detection
• Urgent pointer: If URG flag is set to 1, then this
16-bit field is an offset from the sequence
number indicating that it is a last urgent data
byte.
• Options and padding: It defines the optional
fields that convey the additional information to
the receiver.
User Datagram Protocol (UDP)
• UDP stands for User Datagram Protocol. It is a
Transport Layer Protocol, which is a part of the
Internet Protocol Suite and an alternative
communication protocol to Transmission
Control Protocol (TCP).
• UDP is the simplest transport layer protocol
designed to send data over the Internet.
• It picks the datagram from the network layer
and attaches the header then forwards it to
the user.
•.

• UDP is considered as connectionless protocol


because it doesn't require a virtual circuit to be
established before any data transfer occurs.
• UDP protocol number is 17. It is used for VoIP,
video streaming, gaming and live broadcasts.
• It is faster and needs fewer resources and
allows missing packets.
• UDP can be used for multicasting as it supports
packet switching.
• It can be used for transaction-based protocols,
such as DNS or Network Time Protocol (NTP).
• It can be used by routing protocols such as RIP
and OSPF.
UDP Header Format
• UDP headers contain a set of parameters called
fields. A UDP header has four fields which are as
follows:
Source Port: It is a 2 Byte field that tells the port
number of a source.
Destination Port: It is also a 2 Byte long field that
tells the port number of the destination.
Length: It is the total length of the UDP, including
the header and the data. It is a 16-bits field.
Checksum: It is a 2 Byte long field that is used to
check errors, e.g., it is used in IPv6 and sometimes
in IPv4.
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.
Elements of Transport Protocol

• To establish a reliable service between two


machines on a network, transport protocols are
implemented, which somehow resembles the
data link protocols implemented at layer 2.

• The major difference lies in the fact that the data


link layer uses a physical channel between two
routers while the transport layer uses a subnet.
Addressing -
• Transport Layer deals with addressing or labeling
a frame. It also differentiates between a
connection and a transaction.

• Connection identifiers are ports or sockets that


label each frame, so the receiving device knows
which process it has been sent from.

• This helps in keeping track of multiple-message


conversations. Ports or sockets address multiple
conservations in the same location.
Connection Establishment/Release-
• The transport layer creates and releases the
connection across the network.

• This includes a naming mechanism so that a


process on one machine can indicate with whom
it wishes to communicate.

• The transport layer enables us to establish and


delete connections across the network to
multiplex several message streams onto one
communication channel.
Error Control-
• Error detection and error recovery are an
integral part of reliable service, and they are
necessary to perform error control mechanisms
on an end-to-end basis.

• To control errors from lost or duplicate


segments, the transport layer enables unique
segment sequence numbers to the different
packets of the message, creating virtual circuits,
allowing only one virtual circuit per session.
Flow Control-
• The underlying rule of flow control is to maintain a
synergy between a fast process and a slow process.
The transport layer enables a fast process to keep
pace with a slow one.

• Acknowledgements are sent back to manage end-


to-end flow control. Go back N algorithms are used
to request retransmission of packets starting with
packet number N.

• Selective Repeat is used to request specific packets


to be retransmitted.
Multiplexing/De multiplexing-
• The transport layer establishes a separate network
connection for each transport connection required
by the session layer. To improve throughput, the
transport layer establishes multiple network
connections.

• When the issue of throughput is not important, it


multiplexes several transport connections onto the
same network connection, thus reducing the cost of
establishing and maintaining the network
connections. When several connections are
multiplexed, they call for demultiplexing at the
receiving end.
Fragmentation and re-assembly-
• When the transport layer receives a large
message from the session layer, it breaks the
message into smaller units depending upon the
requirement.

• This process is called fragmentation. Thereafter,


it is passed to the network layer. Conversely,
when the transport layer acts as the receiving
process, it reorders the pieces of a message
before reassembling them into a message.

You might also like