SlideShare a Scribd company logo
KARPAGAM INSTITUTE OF
TECHNOLOGY
Course Code with Name :CS8591/Computer
Networks
Prepared by
M.Sudha,AP/IT
1
Karpagam Institute of Technology
4/5/2022
UNIT – IV
TRANSPORT LAYER
4/5/2022 Karpagam Institute of Technology 2
Introduction – Transport Layer Protocols –
Services – Port Numbers – User Datagram
Protocol – Transmission Control Protocol –
SCTP.
INTRODUCTION
 The transport layer is the fourth layer of the
OSI model and is the core of the Internet
model.
 It responds to service requests from the
session layer and issues service requests
to the network Layer.
 The transport layer provides transparent
transfer of data between hosts.
 It provides end-to-end control and
information transfer with the quality of service
needed by the application program.
 It is the first true end-to-end layer,
implemented in all End Systems (ES).
4/5/2022 Karpagam Institute of Technology 3
4/5/2022 Karpagam Institute of Technology 4
4/5/2022 Karpagam Institute of Technology 5
TRANSPORT LAYER
FUNCTIONS / SERVICES
 The transport layer is located between
the network layer and the application
layer.
 The transport layer is responsible for
providing services to the application
layer; it receives services from the
network layer.
4/5/2022 Karpagam Institute of Technology 6
TRANSPORT LAYER
FUNCTIONS / SERVICES
 The services that can be provided by
the transport layer are
1. Process-to-Process Communication
2. Addressing : Port Numbers
3. Encapsulation and Decapsulation
4. Multiplexing and Demultiplexing
5. Flow Control
6. Error Control
7. Congestion Control
4/5/2022 Karpagam Institute of Technology 7
Process-to-Process
Communication
 The Transport Layer is responsible for
delivering data to the appropriate
application process on the host
computers.
 This involves multiplexing of data from
different application processes, i.e.
forming data packets, and adding source
and destination port numbers in the
header of each Transport Layer data
packet.
 Together with the source and destination
IP address, the port numbers constitutes
a network socket, i.e. an identification
address of the process-to-process
4/5/2022 Karpagam Institute of Technology 8
Addressing: Port Numbers
 Ports are the essential ways to address multiple
entities in the same location.
 Using port addressing it is possible to use more
than one network-based application at the same
time.
 Three types of Port numbers are used :
Well-known ports - These are permanent port
numbers. They range between 0 to 1023.These
port numbers are used by Server Process.
Registered ports - The ports ranging from 1024 to
49,151 are not assigned or controlled.
Ephemeral ports (Dynamic Ports) – These are
temporary port numbers. They range between
49152–65535.These port numbers are used by
Client Process.
4/5/2022 Karpagam Institute of Technology 9
Encapsulation and
Decapsulation
 To send a message from one process to
another, the transport-layer protocol
encapsulates and decapsulates messages.
 Encapsulation happens at the sender site.
The transport layer receives the data and
adds the transport-layer header.
 Decapsulation happens at the receiver site.
When the message arrives at the
destination transport layer, the header is
dropped and the transport layer delivers the
message to the process running at the
application layer. 4/5/2022 Karpagam Institute of Technology 10
Multiplexing and
Demultiplexing
 Whenever an entity accepts items from
more than one source, this is referred to as
multiplexing (many to one).
 Whenever an entity delivers items to more
than one source, this is referred to as
demultiplexing (one to many).
 The transport layer at the source performs
multiplexing
 The transport layer at the destination
performs demultiplexing
4/5/2022 Karpagam Institute of Technology 11
Flow Control
 Flow Control is the process of managing
the rate of data transmission between
two nodes to prevent a fast sender from
overwhelming a slow receiver.
 It provides a mechanism for the receiver to
control the transmission speed, so that
the receiving node is not overwhelmed with
data from transmitting node.
4/5/2022 Karpagam Institute of Technology 12
Flow Control
4/5/2022 Karpagam Institute of Technology 13
Error Control
 Error control at the transport layer is
responsible for
1. Detecting and discarding corrupted
packets.
2. Keeping track of lost and discarded
packets and resending them.
3. Recognizing duplicate packets and
discarding them.
4. Buffering out-of-order packets until the
missing packets arrive.
 Error Control involves Error Detection and
Error Correction 4/5/2022 Karpagam Institute of Technology 14
Error Control
4/5/2022 Karpagam Institute of Technology 15
Congestion Control
 Congestion in a network may occur if the load on the
network (the number of packets sent to the network)
is greater than the capacity of the network (the
number of packets a network can handle).
 Congestion control refers to the mechanisms and
techniques that control the congestion and keep the
load below the capacity.
 Congestion Control refers to techniques and
mechanisms that can either prevent congestion,
before it happens, or remove congestion, after it has
happened
 Congestion control mechanisms are divided into two
categories,
1. Open loop - prevent the congestion before it
happens. 4/5/2022 Karpagam Institute of Technology 16
PORT NUMBERS
 A transport-layer protocol usually has several
responsibilities.
 One is to create a process-to-process
communication.
 Processes are programs that run on hosts. It could
be either server or client.
 A process on the local host, called a client, needs
services from a process usually on the remote host,
called a server.
 Processes are assigned a unique 16-bit port number
on that host.
 Port numbers provide end-to-end addresses at the
transport layer
 They also provide multiplexing and demultiplexing at
this layer. 4/5/2022 Karpagam Institute of Technology 17
PORT NUMBERS
4/5/2022 Karpagam Institute of Technology 18
 ICANN (Internet Corporation for Assigned
Names and Numbers) has divided the port
numbers into three ranges:
◦ Well-known ports
◦ Registered
◦ Ephemeral ports (Dynamic Ports)
4/5/2022 Karpagam Institute of Technology 19
WELL-KNOWN PORTS
 These are permanent port numbers used by
the servers.
 They range between 0 to 1023.
 This port number cannot be chosen
randomly.
 These port numbers are universal port
numbers for servers.
 Every client process knows the well-known
port number of the corresponding server
process.
 For example, while the daytime client
process, a well-known client program, can
use an ephemeral (temporary) port number,
52,000, to identify itself, the daytime server
process must use the well-known
4/5/2022 Karpagam Institute of Technology 20
WELL-KNOWN PORTS
4/5/2022 Karpagam Institute of Technology 21
EPHEMERAL PORTS
(DYNAMIC PORTS)
 The client program defines itself with a port
number, called the ephemeral port number.
 The word ephemeral means “short-lived” and
is used because the life of a client is normally
short.
 An ephemeral port number is recommended
to be greater than 1023.
 These port number ranges from 49,152 to
65,535
 They are neither controlled nor registered.
They can be used as temporary or private
port numbers.
4/5/2022 Karpagam Institute of Technology 22
REGISTERED PORTS
 The ports ranging from 1024 to 49,151
are not assigned or controlled.
4/5/2022 Karpagam Institute of Technology 23
TRANSPORT LAYER
PROTOCOLS
 Three protocols are associated with the
Transport layer.
 They are
(1) UDP –User Datagram Protocol
(2) TCP – Transmission Control Protocol
(3) SCTP - Stream Control Transmission
Protocol
 Each protocol provides a different type of
service and should be used appropriately.
4/5/2022 Karpagam Institute of Technology 24
 UDP - UDP is an unreliable connectionless
transport-layer protocol used for its simplicity and
efficiency in applications where error control can be
provided by the application-layer process.
 TCP - TCP is a reliable connection-oriented
protocol that can be used in any application where
reliability is important.
 SCTP - SCTP is a new transport-layer protocol
designed to combine some features of UDP and
TCP in an effort to create a better protocol for
multimedia communication.
4/5/2022 Karpagam Institute of Technology 25
USER DATAGRAM PROTOCOL (UDP)
 User Datagram Protocol (UDP) is a connectionless,
unreliable transport protocol.
 UDP adds process-to-process communication to best-
effort service provided by IP.
 UDP is a very simple protocol using a minimum of
overhead.
 UDP is a simple demultiplexer, which allows multiple
processes on each host to communicate.
 UDP does not provide flow control , reliable or
ordered delivery.
 UDP can be used to send small message where
reliability is not expected.
 Sending a small message using UDP takes much less
interaction between the sender and receiver.
 UDP allow processes to indirectly identify each other
using an abstract locator called port or mailbox
4/5/2022 Karpagam Institute of Technology 26
UDP PORTS
 Processes (server/client) are identified by an abstract
locator known as port.
 Server accepts message at well known port.
 Some well-known UDP ports are
7–Echo, 53–DNS, 111–RPC, 161–SNMP, etc.
 < port, host > pair is used as key for demultiplexing.
 Ports are implemented as a message queue.
 When a message arrives, UDP appends it to end of the
queue.
 When queue is full, the message is discarded.
 When a message is read, it is removed from the queue.
 When an application process wants to receive a
message, one is removed from the front of the queue.
 If the queue is empty, the process blocks until a
message becomes available.
4/5/2022 Karpagam Institute of Technology 27
4/5/2022 Karpagam Institute of Technology 28
UDP DATAGRAM (PACKET) FORMAT
 UDP packets are known as user datagrams
.
 These user datagrams, have a fixed-size
header of 8 bytes made of four fields, each
of 2 bytes (16 bits).
4/5/2022 Karpagam Institute of Technology 29
Source Port Number
 Port number used by process on source host with 16
bits long.
 If the source host is client (sending request) then the
port number is an temporary one requested by the
process and chosen by UDP.
 If the source is server (sending response) then it is
well known port number.
Destination Port Number
 Port number used by process on Destination host with 16 bits
long.
 If the destination host is the server (a client sending request)
then the port number is a well known port number.
 If the destination host is client (a server sending response) then
port number is an temporary one copied by server from the
request packet.
4/5/2022 Karpagam Institute of Technology 30
Length
 This field denotes the total length of the UDP
Packet (Header plus data)
 The total length of any UDP datagram can be
from 0 to 65,535 bytes.
Checksum
 UDP computes its checksum over the UDP
header, the contents of the message body, and
something called the pseudoheader.
 The pseudoheader consists of three fields from
the IP header—protocol number, source IP
address, destination IP address plus the UDP
length field.
Data
 Data field defines tha actual payload to be
transmitted.
 Its size is variable.
4/5/2022 Karpagam Institute of Technology 31
UDP SERVICES
Process-to-Process Communication
 UDP provides process-to-process
communication using socket
addresses, a combination of IP
addresses and port numbers.
4/5/2022 Karpagam Institute of Technology 32
UDP SERVICES
Connectionless Services
 UDP provides a connectionless service.
 There is no connection establishment and no
connection termination .
 Each user datagram sent by UDP is an
independent datagram.
 There is no relationship between the different
user datagrams even if they are coming from
the same source process and going to the
same destination program.
 The user datagrams are not numbered.
 Each user datagram can travel on a different
path.
4/5/2022 Karpagam Institute of Technology 33
UDP SERVICES
Flow Control
 UDP is a very simple protocol.
 There is no flow control, and hence no
window mechanism.
 The receiver may overflow with incoming
messages.
 The lack of flow control means that the
process using UDP should provide for this
service, if needed.
4/5/2022 Karpagam Institute of Technology 34
UDP SERVICES
Error Control
 There is no error control mechanism in UDP
except for the checksum.
 This means that the sender does not know if a
message has been lost or duplicated.
 When the receiver detects an error through the
checksum, the user datagram is silently
discarded.
 The lack of error control means that the
process using UDP should provide for
this service, if needed.
4/5/2022 Karpagam Institute of Technology 35
UDP SERVICES
Checksum
 UDP checksum calculation includes three
sections: a pseudoheader, the UDP header,
and the data coming from the application
layer.
 The pseudoheader is the part of the header
in which the user datagram is to be
encapsulated with some fields filled with 0s.
4/5/2022 Karpagam Institute of Technology 36
UDP SERVICES
Optional Inclusion of Checksum
 The sender of a UDP packet can choose
not to calculate the checksum.
 In this case, the checksum field is filled with
all 0s before being sent.
 In the situation where the sender decides to
calculate the checksum, but it happens that
the result is all 0s, the checksum is
changed to all 1s before the packet is sent.
 In other words, the sender complements
the sum two times.
4/5/2022 Karpagam Institute of Technology 37
UDP SERVICES
Congestion Control
 Since UDP is a connectionless protocol, it
does not provide congestion control.
 UDP assumes that the packets sent are
small and sporadic(occasionally or at
irregular intervals) and cannot create
congestion in the network.
 This assumption may or may not be true,
when UDP is used for interactive real-time
transfer of audio and video.
4/5/2022 Karpagam Institute of Technology 38
UDP SERVICES
Encapsulation and Decapsulation
 To send a message from one process
to another, the UDP protocol
encapsulates and decapsulates
messages.
4/5/2022 Karpagam Institute of Technology 39
UDP SERVICES
Queuing
 In UDP, queues are associated with
ports.
 At the client site, when a process starts,
it requests a port number from the
operating system.
 Some implementations create both an
incoming and an outgoing queue
associated with each process.
 Other implementations create only an
incoming queue associated with each
process.
4/5/2022 Karpagam Institute of Technology 40
UDP SERVICES
Multiplexing and Demultiplexing
 In a host running a transport protocol
suite, there is only one UDP but
possibly several processes that may
want to use the services of UDP.
 To handle this situation, UDP
multiplexes and demultiplexes.
4/5/2022 Karpagam Institute of Technology 41
APPLICATIONS OF UDP
 UDP is used for management processes such as
SNMP.
 UDP is used for route updating protocols such as
RIP.
 UDP is a suitable transport protocol for
multicasting. Multicasting capability is embedded in
the UDP software
 UDP is suitable for a process with internal flow and
error control mechanisms such as Trivial File
Transfer Protocol (TFTP).
 UDP is suitable for a process that requires simple
request-response communication with little concern
for flow and error control.
 UDP is normally used for interactive real-time
applications that cannot tolerate uneven delay
4/5/2022 Karpagam Institute of Technology 42
The Transport Services
 The transport protocol should provide
to higher-level protocols.
 The transport entity that provides
services to transport service users,
which might be an application
process.
4/5/2022 Karpagam Institute of Technology 43
The Transport Services
 The following categories of service are
useful for describing the transport
service.
Type of service
Quality of service
Data transfer
User interface
Connection management
Expedited delivery
Status reporting
Security
4/5/2022 Karpagam Institute of Technology 44
4/5/2022 Karpagam Institute of Technology 45
4/5/2022 Karpagam Institute of Technology 46
4/5/2022 Karpagam Institute of Technology 47
4/5/2022 Karpagam Institute of Technology 48
4/5/2022 Karpagam Institute of Technology 49
4/5/2022 Karpagam Institute of Technology 50
4/5/2022 Karpagam Institute of Technology 51
4/5/2022 Karpagam Institute of Technology 52
4/5/2022 Karpagam Institute of Technology 53
4/5/2022 Karpagam Institute of Technology 54
4/5/2022 Karpagam Institute of Technology 55
4/5/2022 Karpagam Institute of Technology 56
4/5/2022 Karpagam Institute of Technology 57

More Related Content

PPT
Congestion control and quality of service
PPTX
Computer Network - Network Layer
PDF
HIGH SPEED NETWORKS
PPTX
POP3 Post Office Protocol
PPTX
Network Layer
PDF
Transport layer services
PPSX
Issues in Data Link Layer
PDF
Collision prevention on computer architecture
Congestion control and quality of service
Computer Network - Network Layer
HIGH SPEED NETWORKS
POP3 Post Office Protocol
Network Layer
Transport layer services
Issues in Data Link Layer
Collision prevention on computer architecture

What's hot (20)

PPTX
DeadLock in Operating-Systems
PPT
Address resolution protocol
PPTX
PPTX
Chapter 11: Data Link Control
PDF
Methods for handling deadlocks
PPTX
Computer networks unit v
PPTX
Stop-and-Wait ARQ Protocol
PPT
Forouzan-ch19-Network-Layer-Logical-Addressing.ppt
PDF
AKTU Computer Networks notes --- Unit 3.pdf
PDF
Lecture 7 8 ad hoc wireless media access protocols
DOCX
Link state routing protocol
PPT
Unit 3 Network Layer PPT
PDF
Difference between Routing & Routed Protocol
PPT
Pipelining
PPT
message passing
PPTX
Dependencies
PDF
management of distributed transactions
PPTX
Quality of Service
PPT
Wireless routing protocols
PPT
data-link layer protocols
DeadLock in Operating-Systems
Address resolution protocol
Chapter 11: Data Link Control
Methods for handling deadlocks
Computer networks unit v
Stop-and-Wait ARQ Protocol
Forouzan-ch19-Network-Layer-Logical-Addressing.ppt
AKTU Computer Networks notes --- Unit 3.pdf
Lecture 7 8 ad hoc wireless media access protocols
Link state routing protocol
Unit 3 Network Layer PPT
Difference between Routing & Routed Protocol
Pipelining
message passing
Dependencies
management of distributed transactions
Quality of Service
Wireless routing protocols
data-link layer protocols
Ad

Similar to COMPUTER NETWORKS NOTES Unit 4 (20)

PPTX
Unit 4 - Transport Layer
PPTX
CN UNIT IV ..pptx
PPTX
CN(BCS502) Module-4 _Transport Layer.pptx
PPTX
CN Unit 4 - cs8591.pptx
PPTX
Understanding the Transport Layer: MUX, DEMUX, Process-to-Process Delivery, T...
PPTX
TL services and multiplexing demultiplexing (3).pptx
PPTX
VTU V SEM CNS Module 1 PPT 2018 Batch students
PPTX
Chapter 3 final
PPTX
Chapter 3 final
PPTX
Chapter 3 final
PPTX
Chapter Five - Transport Layer.pptx
PPTX
PPTX
Transport Layer Services : Multiplexing And Demultiplexing
PPTX
07 coms 525 tcpip - udp [autosaved]
PPTX
cCN UNIT4.pptxhomijo,k,ojik,m9uhgyh9ui,polo,0im
PPTX
lecturer3.pptx
PPTX
Group 3 Presen.pptx
PPTX
Unit 4.pptxenhdgjkslkxnjhjijnbhndnernjdxcndf
PPTX
PPTX
Module 2.pptx.............sdvsdcdssdfsdf
Unit 4 - Transport Layer
CN UNIT IV ..pptx
CN(BCS502) Module-4 _Transport Layer.pptx
CN Unit 4 - cs8591.pptx
Understanding the Transport Layer: MUX, DEMUX, Process-to-Process Delivery, T...
TL services and multiplexing demultiplexing (3).pptx
VTU V SEM CNS Module 1 PPT 2018 Batch students
Chapter 3 final
Chapter 3 final
Chapter 3 final
Chapter Five - Transport Layer.pptx
Transport Layer Services : Multiplexing And Demultiplexing
07 coms 525 tcpip - udp [autosaved]
cCN UNIT4.pptxhomijo,k,ojik,m9uhgyh9ui,polo,0im
lecturer3.pptx
Group 3 Presen.pptx
Unit 4.pptxenhdgjkslkxnjhjijnbhndnernjdxcndf
Module 2.pptx.............sdvsdcdssdfsdf
Ad

Recently uploaded (20)

PPTX
Welding lecture in detail for understanding
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
Sustainable Sites - Green Building Construction
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPT
Project quality management in manufacturing
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPT
Mechanical Engineering MATERIALS Selection
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PDF
Digital Logic Computer Design lecture notes
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
additive manufacturing of ss316l using mig welding
Welding lecture in detail for understanding
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
Internet of Things (IOT) - A guide to understanding
Sustainable Sites - Green Building Construction
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Project quality management in manufacturing
Model Code of Practice - Construction Work - 21102022 .pdf
Mechanical Engineering MATERIALS Selection
CYBER-CRIMES AND SECURITY A guide to understanding
Foundation to blockchain - A guide to Blockchain Tech
Digital Logic Computer Design lecture notes
OOP with Java - Java Introduction (Basics)
additive manufacturing of ss316l using mig welding

COMPUTER NETWORKS NOTES Unit 4

  • 1. KARPAGAM INSTITUTE OF TECHNOLOGY Course Code with Name :CS8591/Computer Networks Prepared by M.Sudha,AP/IT 1 Karpagam Institute of Technology 4/5/2022
  • 2. UNIT – IV TRANSPORT LAYER 4/5/2022 Karpagam Institute of Technology 2 Introduction – Transport Layer Protocols – Services – Port Numbers – User Datagram Protocol – Transmission Control Protocol – SCTP.
  • 3. INTRODUCTION  The transport layer is the fourth layer of the OSI model and is the core of the Internet model.  It responds to service requests from the session layer and issues service requests to the network Layer.  The transport layer provides transparent transfer of data between hosts.  It provides end-to-end control and information transfer with the quality of service needed by the application program.  It is the first true end-to-end layer, implemented in all End Systems (ES). 4/5/2022 Karpagam Institute of Technology 3
  • 4. 4/5/2022 Karpagam Institute of Technology 4
  • 5. 4/5/2022 Karpagam Institute of Technology 5
  • 6. TRANSPORT LAYER FUNCTIONS / SERVICES  The transport layer is located between the network layer and the application layer.  The transport layer is responsible for providing services to the application layer; it receives services from the network layer. 4/5/2022 Karpagam Institute of Technology 6
  • 7. TRANSPORT LAYER FUNCTIONS / SERVICES  The services that can be provided by the transport layer are 1. Process-to-Process Communication 2. Addressing : Port Numbers 3. Encapsulation and Decapsulation 4. Multiplexing and Demultiplexing 5. Flow Control 6. Error Control 7. Congestion Control 4/5/2022 Karpagam Institute of Technology 7
  • 8. Process-to-Process Communication  The Transport Layer is responsible for delivering data to the appropriate application process on the host computers.  This involves multiplexing of data from different application processes, i.e. forming data packets, and adding source and destination port numbers in the header of each Transport Layer data packet.  Together with the source and destination IP address, the port numbers constitutes a network socket, i.e. an identification address of the process-to-process 4/5/2022 Karpagam Institute of Technology 8
  • 9. Addressing: Port Numbers  Ports are the essential ways to address multiple entities in the same location.  Using port addressing it is possible to use more than one network-based application at the same time.  Three types of Port numbers are used : Well-known ports - These are permanent port numbers. They range between 0 to 1023.These port numbers are used by Server Process. Registered ports - The ports ranging from 1024 to 49,151 are not assigned or controlled. Ephemeral ports (Dynamic Ports) – These are temporary port numbers. They range between 49152–65535.These port numbers are used by Client Process. 4/5/2022 Karpagam Institute of Technology 9
  • 10. Encapsulation and Decapsulation  To send a message from one process to another, the transport-layer protocol encapsulates and decapsulates messages.  Encapsulation happens at the sender site. The transport layer receives the data and adds the transport-layer header.  Decapsulation happens at the receiver site. When the message arrives at the destination transport layer, the header is dropped and the transport layer delivers the message to the process running at the application layer. 4/5/2022 Karpagam Institute of Technology 10
  • 11. Multiplexing and Demultiplexing  Whenever an entity accepts items from more than one source, this is referred to as multiplexing (many to one).  Whenever an entity delivers items to more than one source, this is referred to as demultiplexing (one to many).  The transport layer at the source performs multiplexing  The transport layer at the destination performs demultiplexing 4/5/2022 Karpagam Institute of Technology 11
  • 12. Flow Control  Flow Control is the process of managing the rate of data transmission between two nodes to prevent a fast sender from overwhelming a slow receiver.  It provides a mechanism for the receiver to control the transmission speed, so that the receiving node is not overwhelmed with data from transmitting node. 4/5/2022 Karpagam Institute of Technology 12
  • 13. Flow Control 4/5/2022 Karpagam Institute of Technology 13
  • 14. Error Control  Error control at the transport layer is responsible for 1. Detecting and discarding corrupted packets. 2. Keeping track of lost and discarded packets and resending them. 3. Recognizing duplicate packets and discarding them. 4. Buffering out-of-order packets until the missing packets arrive.  Error Control involves Error Detection and Error Correction 4/5/2022 Karpagam Institute of Technology 14
  • 15. Error Control 4/5/2022 Karpagam Institute of Technology 15
  • 16. Congestion Control  Congestion in a network may occur if the load on the network (the number of packets sent to the network) is greater than the capacity of the network (the number of packets a network can handle).  Congestion control refers to the mechanisms and techniques that control the congestion and keep the load below the capacity.  Congestion Control refers to techniques and mechanisms that can either prevent congestion, before it happens, or remove congestion, after it has happened  Congestion control mechanisms are divided into two categories, 1. Open loop - prevent the congestion before it happens. 4/5/2022 Karpagam Institute of Technology 16
  • 17. PORT NUMBERS  A transport-layer protocol usually has several responsibilities.  One is to create a process-to-process communication.  Processes are programs that run on hosts. It could be either server or client.  A process on the local host, called a client, needs services from a process usually on the remote host, called a server.  Processes are assigned a unique 16-bit port number on that host.  Port numbers provide end-to-end addresses at the transport layer  They also provide multiplexing and demultiplexing at this layer. 4/5/2022 Karpagam Institute of Technology 17
  • 18. PORT NUMBERS 4/5/2022 Karpagam Institute of Technology 18
  • 19.  ICANN (Internet Corporation for Assigned Names and Numbers) has divided the port numbers into three ranges: ◦ Well-known ports ◦ Registered ◦ Ephemeral ports (Dynamic Ports) 4/5/2022 Karpagam Institute of Technology 19
  • 20. WELL-KNOWN PORTS  These are permanent port numbers used by the servers.  They range between 0 to 1023.  This port number cannot be chosen randomly.  These port numbers are universal port numbers for servers.  Every client process knows the well-known port number of the corresponding server process.  For example, while the daytime client process, a well-known client program, can use an ephemeral (temporary) port number, 52,000, to identify itself, the daytime server process must use the well-known 4/5/2022 Karpagam Institute of Technology 20
  • 21. WELL-KNOWN PORTS 4/5/2022 Karpagam Institute of Technology 21
  • 22. EPHEMERAL PORTS (DYNAMIC PORTS)  The client program defines itself with a port number, called the ephemeral port number.  The word ephemeral means “short-lived” and is used because the life of a client is normally short.  An ephemeral port number is recommended to be greater than 1023.  These port number ranges from 49,152 to 65,535  They are neither controlled nor registered. They can be used as temporary or private port numbers. 4/5/2022 Karpagam Institute of Technology 22
  • 23. REGISTERED PORTS  The ports ranging from 1024 to 49,151 are not assigned or controlled. 4/5/2022 Karpagam Institute of Technology 23
  • 24. TRANSPORT LAYER PROTOCOLS  Three protocols are associated with the Transport layer.  They are (1) UDP –User Datagram Protocol (2) TCP – Transmission Control Protocol (3) SCTP - Stream Control Transmission Protocol  Each protocol provides a different type of service and should be used appropriately. 4/5/2022 Karpagam Institute of Technology 24
  • 25.  UDP - UDP is an unreliable connectionless transport-layer protocol used for its simplicity and efficiency in applications where error control can be provided by the application-layer process.  TCP - TCP is a reliable connection-oriented protocol that can be used in any application where reliability is important.  SCTP - SCTP is a new transport-layer protocol designed to combine some features of UDP and TCP in an effort to create a better protocol for multimedia communication. 4/5/2022 Karpagam Institute of Technology 25
  • 26. USER DATAGRAM PROTOCOL (UDP)  User Datagram Protocol (UDP) is a connectionless, unreliable transport protocol.  UDP adds process-to-process communication to best- effort service provided by IP.  UDP is a very simple protocol using a minimum of overhead.  UDP is a simple demultiplexer, which allows multiple processes on each host to communicate.  UDP does not provide flow control , reliable or ordered delivery.  UDP can be used to send small message where reliability is not expected.  Sending a small message using UDP takes much less interaction between the sender and receiver.  UDP allow processes to indirectly identify each other using an abstract locator called port or mailbox 4/5/2022 Karpagam Institute of Technology 26
  • 27. UDP PORTS  Processes (server/client) are identified by an abstract locator known as port.  Server accepts message at well known port.  Some well-known UDP ports are 7–Echo, 53–DNS, 111–RPC, 161–SNMP, etc.  < port, host > pair is used as key for demultiplexing.  Ports are implemented as a message queue.  When a message arrives, UDP appends it to end of the queue.  When queue is full, the message is discarded.  When a message is read, it is removed from the queue.  When an application process wants to receive a message, one is removed from the front of the queue.  If the queue is empty, the process blocks until a message becomes available. 4/5/2022 Karpagam Institute of Technology 27
  • 28. 4/5/2022 Karpagam Institute of Technology 28
  • 29. UDP DATAGRAM (PACKET) FORMAT  UDP packets are known as user datagrams .  These user datagrams, have a fixed-size header of 8 bytes made of four fields, each of 2 bytes (16 bits). 4/5/2022 Karpagam Institute of Technology 29
  • 30. Source Port Number  Port number used by process on source host with 16 bits long.  If the source host is client (sending request) then the port number is an temporary one requested by the process and chosen by UDP.  If the source is server (sending response) then it is well known port number. Destination Port Number  Port number used by process on Destination host with 16 bits long.  If the destination host is the server (a client sending request) then the port number is a well known port number.  If the destination host is client (a server sending response) then port number is an temporary one copied by server from the request packet. 4/5/2022 Karpagam Institute of Technology 30
  • 31. Length  This field denotes the total length of the UDP Packet (Header plus data)  The total length of any UDP datagram can be from 0 to 65,535 bytes. Checksum  UDP computes its checksum over the UDP header, the contents of the message body, and something called the pseudoheader.  The pseudoheader consists of three fields from the IP header—protocol number, source IP address, destination IP address plus the UDP length field. Data  Data field defines tha actual payload to be transmitted.  Its size is variable. 4/5/2022 Karpagam Institute of Technology 31
  • 32. UDP SERVICES Process-to-Process Communication  UDP provides process-to-process communication using socket addresses, a combination of IP addresses and port numbers. 4/5/2022 Karpagam Institute of Technology 32
  • 33. UDP SERVICES Connectionless Services  UDP provides a connectionless service.  There is no connection establishment and no connection termination .  Each user datagram sent by UDP is an independent datagram.  There is no relationship between the different user datagrams even if they are coming from the same source process and going to the same destination program.  The user datagrams are not numbered.  Each user datagram can travel on a different path. 4/5/2022 Karpagam Institute of Technology 33
  • 34. UDP SERVICES Flow Control  UDP is a very simple protocol.  There is no flow control, and hence no window mechanism.  The receiver may overflow with incoming messages.  The lack of flow control means that the process using UDP should provide for this service, if needed. 4/5/2022 Karpagam Institute of Technology 34
  • 35. UDP SERVICES Error Control  There is no error control mechanism in UDP except for the checksum.  This means that the sender does not know if a message has been lost or duplicated.  When the receiver detects an error through the checksum, the user datagram is silently discarded.  The lack of error control means that the process using UDP should provide for this service, if needed. 4/5/2022 Karpagam Institute of Technology 35
  • 36. UDP SERVICES Checksum  UDP checksum calculation includes three sections: a pseudoheader, the UDP header, and the data coming from the application layer.  The pseudoheader is the part of the header in which the user datagram is to be encapsulated with some fields filled with 0s. 4/5/2022 Karpagam Institute of Technology 36
  • 37. UDP SERVICES Optional Inclusion of Checksum  The sender of a UDP packet can choose not to calculate the checksum.  In this case, the checksum field is filled with all 0s before being sent.  In the situation where the sender decides to calculate the checksum, but it happens that the result is all 0s, the checksum is changed to all 1s before the packet is sent.  In other words, the sender complements the sum two times. 4/5/2022 Karpagam Institute of Technology 37
  • 38. UDP SERVICES Congestion Control  Since UDP is a connectionless protocol, it does not provide congestion control.  UDP assumes that the packets sent are small and sporadic(occasionally or at irregular intervals) and cannot create congestion in the network.  This assumption may or may not be true, when UDP is used for interactive real-time transfer of audio and video. 4/5/2022 Karpagam Institute of Technology 38
  • 39. UDP SERVICES Encapsulation and Decapsulation  To send a message from one process to another, the UDP protocol encapsulates and decapsulates messages. 4/5/2022 Karpagam Institute of Technology 39
  • 40. UDP SERVICES Queuing  In UDP, queues are associated with ports.  At the client site, when a process starts, it requests a port number from the operating system.  Some implementations create both an incoming and an outgoing queue associated with each process.  Other implementations create only an incoming queue associated with each process. 4/5/2022 Karpagam Institute of Technology 40
  • 41. UDP SERVICES Multiplexing and Demultiplexing  In a host running a transport protocol suite, there is only one UDP but possibly several processes that may want to use the services of UDP.  To handle this situation, UDP multiplexes and demultiplexes. 4/5/2022 Karpagam Institute of Technology 41
  • 42. APPLICATIONS OF UDP  UDP is used for management processes such as SNMP.  UDP is used for route updating protocols such as RIP.  UDP is a suitable transport protocol for multicasting. Multicasting capability is embedded in the UDP software  UDP is suitable for a process with internal flow and error control mechanisms such as Trivial File Transfer Protocol (TFTP).  UDP is suitable for a process that requires simple request-response communication with little concern for flow and error control.  UDP is normally used for interactive real-time applications that cannot tolerate uneven delay 4/5/2022 Karpagam Institute of Technology 42
  • 43. The Transport Services  The transport protocol should provide to higher-level protocols.  The transport entity that provides services to transport service users, which might be an application process. 4/5/2022 Karpagam Institute of Technology 43
  • 44. The Transport Services  The following categories of service are useful for describing the transport service. Type of service Quality of service Data transfer User interface Connection management Expedited delivery Status reporting Security 4/5/2022 Karpagam Institute of Technology 44
  • 45. 4/5/2022 Karpagam Institute of Technology 45
  • 46. 4/5/2022 Karpagam Institute of Technology 46
  • 47. 4/5/2022 Karpagam Institute of Technology 47
  • 48. 4/5/2022 Karpagam Institute of Technology 48
  • 49. 4/5/2022 Karpagam Institute of Technology 49
  • 50. 4/5/2022 Karpagam Institute of Technology 50
  • 51. 4/5/2022 Karpagam Institute of Technology 51
  • 52. 4/5/2022 Karpagam Institute of Technology 52
  • 53. 4/5/2022 Karpagam Institute of Technology 53
  • 54. 4/5/2022 Karpagam Institute of Technology 54
  • 55. 4/5/2022 Karpagam Institute of Technology 55
  • 56. 4/5/2022 Karpagam Institute of Technology 56
  • 57. 4/5/2022 Karpagam Institute of Technology 57