Chapter No 4-OSI Transport Layer
Chapter No 4-OSI Transport Layer
Layer
Chapter 4
9/27/2024
Introduction 3
9/27/2024
5
9/27/2024
Tracking Individual
Conversations
Any host can have multiple applications
that are communicating across the
network.
Each of these applications will be
communicating with one or more
applications on remote hosts.
It is the responsibility of the transport
layer to maintain the multiple
communication streams between these
applications. SAMPLE FOOTER TEXT 6
9/27/2024
7
9/27/2024
Segmenting Data
The application layer passes large
amounts of data to the transport
layer.
The transport layer has to break the
data into smaller pieces, better
suited for transmission.
These pieces are called segments.
This process includes the
encapsulation required on each
piece of data.
8
9/27/2024
9
9/27/2024
Network Transparency:
Applications do not need to know the operational details of the network in use. The
applications generate data that is sent from one application to another, without
regard to the destination host type, the type of media over which the data must
travel, the path taken by the data, the congestion on a link, or the size of the network.
11
9/27/2024
Error Recovery
• For many reasons, 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.
13
9/27/2024
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.
• Within these sessions, the data for a
communication between the two
applications can be closely managed.
14
9/27/2024
Communication
• The transport layer of the sending host tracks all the data pieces for
each conversation and retransmits any data that the receiving host did
not acknowledge.
18
9/27/2024
■ Video streaming
UDP Header
20
9/27/2024
Port Addressing
Identifying the Conversations
• The header of each segment or datagram contains a source and destination port.
• Port numbers are assigned in various ways, depending on whether the message is a
request or a response.
• The transport layer keeps track of this port and the application that initiated the
request so that when a response is returned, it can be forwarded to the correct
application.
• The requesting application port number is used as the destination port number in the
response coming back from the server.
22
9/27/2024
Socket
The combination of the transport layer port
number and the network layer IP address
assigned to the host uniquely identifies a
particular process running on a specific host
device. This combination is called a socket.
23
9/27/2024
24
9/27/2024
Well-Known Ports
• Well-known ports (numbers 0
to 1023) are reserved for
services and applications.
26
9/27/2024
Registered Ports
• Registered ports (numbers
1024 to 49151) are
assigned to user processes
or applications.
• These processes are
primarily individual
applications that a user has
chosen to install
27
9/27/2024
28
9/27/2024
Using Both
TCP and UDP
30
9/27/2024
netstat
Command
• The netstat command is an important
network utility that you can use to verify
those connections.
32
9/27/2024
34
9/27/2024
Overhead in TCP
• After a session has been established, the destination
sends acknowledgments to the source for the segments
that it receives.
40
9/27/2024
In TCP connections, the host serving as a client initiates the session to the server. The
three steps in TCP connection establishment are as follows:
1. The initiating client sends a segment containing an initial sequence value, which
serves as a request to the server to begin a communications session.
2. The server responds with a segment containing an acknowledgment value equal to
the received sequence value plus 1, plus its own synchronizing sequence value.
The acknowledgment value is 1 greater than the sequence number because there
is no data contained to be acknowledged. This acknowledgment value enables the
client to tie the response back to the original segment that it sent to the server.
3. The initiating client responds with an acknowledgment value equal to the sequence
value it received plus 1. This completes the process of establishing the connection.
41
9/27/2024
Within the TCP segment header, the following six 1-bit fields contain control
information used to manage the TCP processes:
• URG: Urgent pointer field significant
• ACK: Acknowledgment field significant
• PSH: Push function
• RST: Reset the connection
• SYN: Synchronize sequence numbers ■ FIN: No more data from sender
These fields are referred to as flags, because the value of one of these fields
is only 1 bit and, therefore, has only two values: 1 or 0. When a bit value is
set to 1, it indicates what control information is contained in the segment.
43
9/27/2024
• To close a connection, the FIN control flag in the segment header must be
set.
1. When the client has no more data to send in the stream, it sends a
segment with the FIN flag set.
2. The server sends an ACK to acknowledge the receipt of the FIN to
terminate the session from client to server.
3. The server sends a FIN to the client, to terminate the server-to-client
session.
4. The client responds with an ACK to acknowledge the FIN from the server.
44
9/27/2024
45
9/27/2024
47
9/27/2024
48
9/27/2024
TCP Retransmission
• TCP provides methods of managing segment losses, including a
mechanism to retransmit segments with unacknowledged data.
• If one or more segments are missing, only the data in the segments that
complete the stream is acknowledged.
50
9/27/2024
Flow Control
• Flow control assists the reliability of TCP transmission by adjusting
the rate of data flow between the two services in the session.
• The TCP feedback mechanism adjusts the effective rate of data
transmission to the maximum flow that the network and destination
device can support without loss.
• TCP attempts to manage the rate of transmission so that all data will
be received, and retransmissions will be minimized.
• During the delay in receiving the acknowledgment, the sender will not
send additional segments for this session.
51
9/27/2024
52
9/27/2024
• The TCP receiving host sends the window size value to the
sending TCP to indicate the number of bytes that it is prepared to
receive
54
9/27/2024
UDP:
Communicating with
Low Overhead
UDP is a simple protocol that
provides the basic transport
layer functions.
It has much lower overhead
than TCP, because it is not
connection oriented and does
not provide retransmission,
sequencing, and flow control
mechanisms.
56
9/27/2024
UDP: Low
Overhead Versus
Reliability
• Applications that use UDP are not
always unreliable.
• Using UDP simply means that
reliability is not provided by the
transport layer protocol
• Some applications, such as online
games or VoIP, can tolerate loss of
some data.
57
9/27/2024
59
9/27/2024
61
9/27/2024
62