Chapter 3A OSI Transport Layer
Chapter 3A OSI Transport Layer
• Flow control can prevent the loss of segments on the network and
avoid the need for retransmission
6- Error Recovery
• It is possible for a piece of data to become corrupted, or lost, as it is
transmitted over the network. The transport layer can ensure that all
pieces reach their destination by having the source device retransmit
any data that is lost.
7- Initiating a Session
• The transport layer can provide connection orientation by creating a
session between the applications. These connections prepare the
applications to communicate with each other before any data is
transmitted
Data Requirements Vary
• Different applications have different requirements for their data, and
therefore different transport protocols have been developed to meet
these requirements.
• For example, users require that an e-mail or web page be completely
received. Slight delays are considered acceptable.
• In contrast, occasionally missing small parts of a telephone
conversation might be considered acceptable.
• Some protocols, such as UDP (User Datagram Protocol), provide just
the basic functions for efficiently delivering. These types of protocols
are useful for applications whose data is sensitive to delays.
• Other transport layer protocols, such as TCP (Transmission Control
Protocol), offers additional features, such as ensuring reliable delivery
between the applications.
• While these additional functions provide more robust communication
at the transport layer between applications, they have additional
overhead and make larger demands on the network.
• TCP is a transport layer protocol that can be implemented to ensure
reliable delivery of the data.
• Reliability means ensuring that each piece of data that the source
sends arrives at the destination
• At the transport layer, the three basic operations of reliability are
1. Tracking transmitted data
2. Acknowledging received data
3. Retransmitting any unacknowledged data
• Control bits (code bits) in the TCP header indicate the progress and
status of the connection.
TCP Three-Way Handshake
• The three-way handshake performs the following functions:
1. Establishes that the destination device is present on the network.
2. Verifies that the destination device has an active service and is
accepting requests on the destination port number.
3. Informs the destination device that the source client intends to
establish a communication session on that port number
• The three steps in TCP connection establishment are as follows:
• When host A receives this acknowledgment, it can now send the next
segment containing data for this session starting with byte number
11.
window size
• if host A had to wait for acknowledgment of the receipt of each 10
bytes, the network would have a lot of overhead.
• To reduce the overhead of these acknowledgments, multiple
segments of data can be sent and acknowledged with a single TCP
message in the opposite direction.
• This acknowledgment contains an acknowledgment number based on
the total number of segments received in the session.
• For example, starting with a sequence number of 2000, if 10
segments of 1000 bytes each were received, an acknowledgment
number of 12001 would be returned to the source.
window size
• The amount of data that a source can transmit before an
acknowledgment must be received
• is called the window size. Window size is a field in the TCP header
that enables the management of lost data and flow control.
TCP Retransmission
• A destination host usually only acknowledges data for contiguous
sequence bytes. If one or more segments are missing, only the data in
the segments that complete the stream is acknowledged.
• For example, if segments with sequence numbers 1500 to 3000 and
3400 to 3500 were received, the acknowledgment number would be
3001, because segments with the sequence numbers 3001 to 3399
have not been received.
• When the source host has not received an acknowledgment after a
predetermined amount of time, it will go back to the last
acknowledgment number that it received and retransmit data from
that point forward
TCP Congestion Control: Flow Control
• When the source is informed that the specified amount of data in the
segments is received, it can continue sending more data for this
session.
• The window size field in the TCP header specifies the amount of data
that can be transmitted before an acknowledgment must be received.
The initial window size is determined during the session startup
through the three-way handshake.
• Exp: the initial window size for a session represented is set to 3000
bytes. When the sender has transmitted 3000 bytes, it waits for an
acknowledgment of these bytes before transmitting more segments in
this session. After the sender has received this acknowledgment from
the receiver, the sender can transmit an additional 3000 bytes.
User Datagram Protocol (UDP)
• is a simple, connectionless protocol. It has the advantage of providing
low-overhead communication and data delivery. The segments of
communication in UDP are called datagrams.
• Applications that use UDP include DNS, video streaming and VoIP.
• Some applications, such as online games or VoIP, can tolerate loss of
some data. If these applications used TCP, they might experience large
delays while TCP detects data loss and retransmits data.
• other applications, such as DNS, will simply retry the request if they
do not receive a response, and therefore they do not need TCP to
guarantee the message delivery.
UDP Datagram Reassembly
• Many applications that use UDP send small amounts of data that can
fit in one segment. However, some applications will send larger
amounts of data that must be split into multiple segments
• When multiple datagrams are sent to a destination, they can take
different paths and arrive in the wrong order. UDP does not keep track
of sequence numbers the way TCP does.
• UDP has no way to reorder the datagrams into their transmission
order.
UDP Server Processes and Requests
• Like TCP-based applications, UDP-based server applications are
assigned well-known or registered port numbers.
• When these applications or processes are running, they will accept
• the data matched with the assigned port number.
• When UDP receives a datagram destined for one of these ports, it
forwards the application data to the appropriate application based on
its port number
UDP Client Processes
• As with TCP, client/server communication is initiated by a client
application that is requesting data from a server process.
• The UDP client process randomly selects a port number and uses this
as the source port for the conversation.
• The destination port will usually be the well-known or registered port
number assigned to the server process.
• Because UDP does not create a session, as soon as the data is ready
to be sent and the ports are identified, UDP can form the datagram
and pass it to the network layer to be addressed and sent on the
network.