Chapter-8-Transport Layer

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 19

Chapter 8: Transport Layer

Undergraduate Program
School of Electrical and Computer Engineering
Outlines
· Transportation of Data
· Port numbers
· Transport layer Protocols
· UDP
· TCP

Sem. II, 2023/24 Transport Layer 2


Transport Layer
· Transport layer is:
· Responsible for logical communication between applications
running on different hosts.
· responsible for process-to-process delivery—the delivery of a packet,
part of a message, from one process to another.

Sem. II, 2023/24 Transport Layer 3


Process-to-process delivery
· Several processes may be running on the source host and the
destination host.
· Process-to-process communication uses the client/server paradigm
· Addressing
· 16-bit port number
· Client program defines itself with a random port number
· Server process use a well known port numbers

Sem. II, 2023/24 Transport Layer 4


Cont.…

· Transport layer has the following responsibilities :


· Tracking individual conversations

· Identify, separate and manage multiple conversation

· Segmenting message(data) of reassembling segments

· Adding transport layer headers

· Use segmentation and multiplexing to enable different communication


conversations to be interleaved on the same network

Sem. II, 2023/24 Transport Layer 5


Port number
· Port numbers
· Well-known ports
· range from 0 to 1023
Example- a daytime client-server communication
· Are assigned for popular applications
like web-browsing, file transfer, emailing…
· Registered ports
· Range from 1024 to 49,151
· are assigned and controlled by lANA
(Internet Assigned Number Authority)
· Eg. CISCO’s RADUIS server is
registered with 1812 port number.
· Dynamic ports
· Range from 49,152 to 65,535
· can be used by any process
· Combination of IP and port addresses
of the source host and destination
hosts are known as socket pairs.
· sockets enable multiple connections at
client/server to be distinguishable.

Sem. II, 2023/24 Transport Layer 6


Connectionless and Connection-Oriented Service

· Connectionless Service
· no need for connection establishment or connection release

· The segments are not numbered

· Segments be delayed or lost or may arrive out of sequence

· no acknowledgment

· Connection-Oriented Service
· a connection is first established

· Then, data is transferred

· At the end, Connection is release

Sem. II, 2023/24 Transport Layer 7


Transport layer protocols

· Transport layer protocols


specify how to transfer
messages between hosts, and
responsible for managing
reliability requirements of a
conversation.

· Most commonly used


protocols are
· UDP (Connectionless)

· TCP (Connection-oriented)

Sem. II, 2023/24 Transport Layer 8


User Datagram Protocol (UDP)
· Connectionless and unreliable transport protocol
· It is best effort
· Doesn’t establish connection before sending data.
· It does not do flow control, congestion control, or retransmission upon
receipt of a bad segment.

· Very simple protocol with a minimum overhead


· It does not add anything to the services of IP except to provide process-
to-process communication instead of host-to-host communication.

· UDP segment format


· UDP segments consisting of an 8-byte header

Sem. II, 2023/24 Transport Layer 9


Cont.…
· UDP segment
reassembly:
· UDP does not track
sequence numbers
· It has no way of
reordering the
segments into their
retransmission
orders.
· It simply reassembles
the data in the order it
was received and
forwarded to the
application.

Sem. II, 2023/24 Transport Layer 10


Cont..
· UDP client process:
· Dynamically selects source port address and mostly use well-known or
registered port addresses for destination port to start conversation
· After the source and destination ports are selected, the same pair of ports
are used concluded.
Well-known ports used by UDP

Sem. II, 2023/24 Transport Layer 11


Cont..

· UDP is Suitable
· for a process that requires simple request-response
communication with little concern for flow and error control
· for multicasting, some route updating protocols such as RIP

Sem. II, 2023/24 Transport Layer 12


Transmission Control Protocol (TCP)
· Creates a virtual connection between
two TCPs to send data
· TCP provides reliability and flow
control. Basic operations include:

· Number and track data segments


transmitted to a specific host from
specific application.

· Sequence data that might arrive in


wrong order
· Acknowledge received data or
request retransmission for waiting
the data for a certain amount of time

· Send data at efficient rate


acceptable by the receiver.

Sem. II, 2023/24 Transport Layer 13


TCP features
· Session Establishment: TCP is Connection oriented-protocol that
establishes a permanent connection (session) between the source and
destination hosts prior to sensing any traffic data.

· Ensures Reliable delivery: uses an acknowledgment mechanism


· Each host uses an acknowledgment number to confirm the bytes it has
received . The acknowledgment number = the number of the next byte that
the host expects to receive.

· Provides same-order delivery: TCP implements Byte numbering to


numbers all data bytes that are transmitted in a connection.
· The numbering starts with a randomly
generated number
· E.g., random number=1057,
the total data to be sent=6000 bytes,
the bytes are numbered
from 1057 to 7056

Sem. II, 2023/24 Transport Layer 14


Conti… (TCP features)

· Supports flow and congestion control: As the network hosts have


limited resources (memory and processing power), TCP being
aware of such constraints enables for controlled data transmission.

· Supports Error control: TCP also maintains error-free segment


transmission using checksum. In case of segment corruption the
receiving host can ask for retransmission.
· Retransmission timeout (RTO) is set based of round trip time (RTT)

Sem. II, 2023/24 Transport Layer 15


TCP segment format
· The TCP header is 20 byte.

· TCP is stateful protocol, meaning it


keeps track of the state of
communication session.

· The fields are defined as follows:

Sem. II, 2023/24 Transport Layer 16


TCP-Connection establishment

· Three-Way Handshaking
· The client sends the first segment-
a SYN segment
· The server sends a SYN +ACK
segment
· The client sends the and ACK
segment

Sem. II, 2023/24 Transport Layer 17


TCP data transfer

· Sliding window: Controls the flow of data


· The size of window - minimum of congestion
window (cwnd) and receive window (rwnd)
· rwnd -the value advertised by the opposite
end in a segment containing
acknowledgment
· cwnd - determined by the network to avoid
congestion

Sem. II, 2023/24 Transport Layer 18


TCP connection termination

· Three-Way Handshaking
· The client sends the first segment- a
FIN segment
· The server informs its process of the
situation and sends the second
segment, a SYN +ACK segment
· The client sends the last segment, an
ACK segment, to confirm the receipt
of the FIN the and ACK segment from
the server and terminate the
connection.

Sem. II, 2023/24 Transport Layer 19

You might also like