SlideShare a Scribd company logo
PROCESS-TO-PROCESS DELIVERY
The transport layer is responsible for process-to-
process delivery—the delivery of a packet, part of a
message, from one process to another. Two processes
communicate in a client/server relationship, as we will
see later.
The transport layer is responsible for
process-to-process delivery.
Note
Figure 23.1 Types of data deliveries
 Client, server
 1. Local host
 2. Local process
 3. Remote host
 4. Remote process
 lANA Ranges
 The lANA (Internet Assigned Number Authority) has divided the port numbers into
 three ranges: well known, registered, and dynamic (or private)
 o Well-known ports.
 The ports ranging from 0 to 1023 are assigned and controlled
 by lANA. These are the well-known ports.
 Registered ports. The ports ranging from 1024 to 49,151 are not assigned or
controlled
 by lANA.
 Dynamic ports. The ports ranging from 49,152 to 65,535 are neither controlled
 nor registered. They can be used by any process. These are the ephemeral ports
Figure 23.2 Port numbers
Figure 23.3 IP addresses versus port numbers
Figure 23.4 IANA ranges
Figure 23.5 Socket address
Figure 23.6 Multiplexing and demultiplexing
Connectionless Versus
Connection-Oriented Service
Connectionless Service
 In a connectionless service, the packets are sent from one party to
another with no need for connection establishment or connection
release. The packets are not numbered; they may be delayed or lost or
may arrive out of sequence. There is no acknowledgment either. We
will see shortly that one of the transport layer protocols in the Internet
model, UDP, is connectionless.
Connection-Oriented Service
 In a connection-oriented service, a connection is first established
between the sender and the receiver. Data are transferred. At the end,
the connection is released. TCP and SCTP are connection-oriented
protocols.
Reliable Versus Unreliable
 The transport layer service can be reliable or unreliable. If the
application layer program needs reliability, we use a reliable transport
layer protocol by implementing flow and error control at the transport
layer. This means a slower and more complex service.
 On the other hand, if the application program does not need reliability
because it uses its own flow and error control mechanism or it needs
fast service or the nature of the service does not demand flow and error
control (real-time applications), then an unreliable protocol can be
used.
 UDP is connectionless and unreliable; TCP and SCTP (Stream Control
Transmission Protocol) are connection oriented and reliable.
 These three can respond to the demands of the application layer
programs.
Figure 23.7 Error control
Figure 23.8 Position of UDP, TCP, and SCTP in TCP/IP suite
USER DATAGRAM PROTOCOL (UDP)
The User Datagram Protocol (UDP) is called a
connectionless, unreliable transport protocol. It does
not add anything to the services of IP except to provide
process-to-process communication instead of host-to-
host communication.
Figure 23.9 User datagram format
UDP length
= IP length – IP header’s length
Note
Figure 23.10 Pseudoheader for checksum calculation
Figure 23.11 shows the checksum calculation for a very
small user datagram with only 7 bytes of data. Because
the number of bytes of data is odd, padding is added for
checksum calculation. The pseudoheader as well as the
padding will be dropped when the user datagram is
delivered to IP.
Example 23.2
Figure 23.11 Checksum calculation of a simple UDP user datagram
UDP Operation
 Connectionless service- no relation
between datagram, not numbered
 No Flow and error control- no flow control
so no window mechanics.
 No error control except checksum (silently
discard packet)
 Encapsulation and decapsulation – IP
Datagrams
Queuing
 Incoming and outgoing queue
 It will obtain only one port number
 Port unreachable icmp message (if queue
is not created)
Figure 23.12 Queues in UDP
Uses of UDP
 Suitable for process that require simple request response
communication with little concern for flow and error control.
 Suitable for multicasting
 Used for management process such as SNMP
 Used for routing updating protocol : RIP
23-3 TCP
TCP is a connection-oriented protocol; it creates a
virtual connection between two TCPs to send data. In
addition, TCP uses flow and error control mechanisms
at the transport level.
TCP Services
TCP Features
Segment
A TCP Connection
Flow Control
Error Control
Topics discussed in this section:
Figure 23.13 Stream delivery
Figure 23.14 Sending and receiving buffers
Figure 23.15 TCP segments
TCP
 Connection oriented phase-
 Reliable
 Features
 Numbering system
 use byte number – sequence number, ack number
 Flow control
 Error control
 Congestion control
The bytes of data being transferred in
each connection are numbered by TCP.
The numbering starts with a randomly
generated number.
Note
The following shows the sequence number for each
segment:
Example 23.3
The value in the sequence number field
of a segment defines the
number of the first data byte
contained in that segment.
Note
The value of the acknowledgment field
in a segment defines
the number of the next byte a party
expects to receive.
The acknowledgment number is
cumulative.
Note
Figure 23.16 TCP segment format
Figure 23.17 Control field
Table 23.3 Description of flags in the control field
3-Way Handshake Connection Establishment Process
It will support communication between a web browser on the client and
server sides whenever a user navigates the Internet.
Synchronization Sequence Number (SYN) − The client sends
the SYN to the server
• When the client wants to connect to the server, then it sends
the message to the server by setting the SYN flag as 1.
• The message carries some additional information like the
sequence number (32-bit random number).
• The ACK is set to 0. The maximum segment size and the window
size are also set. For example, if the window size is 1000 bits and
the maximum segment size is 100 bits, then a maximum of 10
data segments can be transmitted in the connection by dividing
(1000/100=10).
Synchronization and Acknowledgement (SYN-ACK) to the client
• The server acknowledges the client request by setting the ACK flag to 1.
• The ACK indicates the response of the segment it received and SYN
indicates with what sequence number it will start the segments.
• For example, if the client has sent the SYN with sequence number = 500,
then the server will send the ACK using acknowledgment number = 5001.
• The server will set the SYN flag to '1' and send it to the client if the server
also wants to establish the connection.
• The sequence number used for SYN will be different from the client's
SYN.
• The server also advertises its window size and maximum segment size to
the client. And, the connection is established from the client-side to the
server-side.
Acknowledgment (ACK) to the server
• The client sends the acknowledgment (ACK) to the server
after receiving the synchronization (SYN) from the server.
• After getting the (ACK) from the client, the connection is
established between the client and the server.
• Now the data can be transmitted between the client and
server sides.
3 -Way Handshake Closing Connection Process
To close a 3-way handshake connection:
• First, the client requests the server to terminate the
established connection by sending FIN.
• After receiving the client request, the server sends back the
FIN and ACK request to the client.
• After receiving the FIN + ACK from the server, the client
confirms by sending an ACK to the server.
Figure 23.18 Connection establishment using three-way handshaking
A SYN segment cannot carry data, but it
consumes one sequence number.
Note
A SYN + ACK segment cannot
carry data, but does consume one
sequence number.
Note
An ACK segment, if carrying no data,
consumes no sequence number.
Note
 Syn flooding attack
 Simultaneous open
Figure 23.19 Data transfer
Figure 23.20 Connection termination using three-way handshaking
The FIN segment consumes one
sequence number if it does
not carry data.
Note
The FIN + ACK segment consumes
one sequence number if it
does not carry data.
Note
Figure 23.21 Half-close

More Related Content

PPTX
UNIT IV-Transport Layer.pptx
PPT
Computer Network - Transport layer protocol
PPT
Transport_layer.ppt
PDF
20CS2007 Computer Communication Networks
PPT
Chapter 23
PDF
PPTX
Online TCP-IP Networking Assignment Help
UNIT IV-Transport Layer.pptx
Computer Network - Transport layer protocol
Transport_layer.ppt
20CS2007 Computer Communication Networks
Chapter 23
Online TCP-IP Networking Assignment Help

Similar to Transport layer TCP and UDP.ppt (20)

PPTX
NETWORK TRANSPORT LAYER SECURITY USES .pptx
PDF
Transport layer
PPTX
Tcp udp
PDF
transport-layer-forouzan.pdf
PPT
23 Process to_Process_Delivery_UDP_TCP_and_SCTP
PPT
PPTX
What Are TCP and UDP protocols and how they work
PPT
Computer Network - Transport Layer Services
PPTX
Transmission control protocol
PPTX
PPTX
TCP,UDP,SCTP computer networking-Final.pptx
PPTX
cCN UNIT4.pptxhomijo,k,ojik,m9uhgyh9ui,polo,0im
PPTX
Transport_Layer_Protocols.pptx
PPTX
Networking essentials lect3
PDF
DCN 5th ed. slides ch24 Transport-Layer Protocols.pdf
PPTX
Unit 5.Transport Layer.pptx
PPT
unit 3 ns.ppt
PPTX
Chapter Five - Transport Layer.pptx
PPTX
module 4 cn as per the vtu syllabus .pptx
NETWORK TRANSPORT LAYER SECURITY USES .pptx
Transport layer
Tcp udp
transport-layer-forouzan.pdf
23 Process to_Process_Delivery_UDP_TCP_and_SCTP
What Are TCP and UDP protocols and how they work
Computer Network - Transport Layer Services
Transmission control protocol
TCP,UDP,SCTP computer networking-Final.pptx
cCN UNIT4.pptxhomijo,k,ojik,m9uhgyh9ui,polo,0im
Transport_Layer_Protocols.pptx
Networking essentials lect3
DCN 5th ed. slides ch24 Transport-Layer Protocols.pdf
Unit 5.Transport Layer.pptx
unit 3 ns.ppt
Chapter Five - Transport Layer.pptx
module 4 cn as per the vtu syllabus .pptx
Ad

Recently uploaded (20)

PPTX
Internet of Things (IOT) - A guide to understanding
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PDF
Digital Logic Computer Design lecture notes
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
DOCX
573137875-Attendance-Management-System-original
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
Sustainable Sites - Green Building Construction
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PPTX
OOP with Java - Java Introduction (Basics)
PDF
PPT on Performance Review to get promotions
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
additive manufacturing of ss316l using mig welding
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Internet of Things (IOT) - A guide to understanding
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
Digital Logic Computer Design lecture notes
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Automation-in-Manufacturing-Chapter-Introduction.pdf
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
573137875-Attendance-Management-System-original
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Sustainable Sites - Green Building Construction
Embodied AI: Ushering in the Next Era of Intelligent Systems
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
OOP with Java - Java Introduction (Basics)
PPT on Performance Review to get promotions
Foundation to blockchain - A guide to Blockchain Tech
additive manufacturing of ss316l using mig welding
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Ad

Transport layer TCP and UDP.ppt

  • 1. PROCESS-TO-PROCESS DELIVERY The transport layer is responsible for process-to- process delivery—the delivery of a packet, part of a message, from one process to another. Two processes communicate in a client/server relationship, as we will see later.
  • 2. The transport layer is responsible for process-to-process delivery. Note
  • 3. Figure 23.1 Types of data deliveries
  • 4.  Client, server  1. Local host  2. Local process  3. Remote host  4. Remote process
  • 5.  lANA Ranges  The lANA (Internet Assigned Number Authority) has divided the port numbers into  three ranges: well known, registered, and dynamic (or private)  o Well-known ports.  The ports ranging from 0 to 1023 are assigned and controlled  by lANA. These are the well-known ports.  Registered ports. The ports ranging from 1024 to 49,151 are not assigned or controlled  by lANA.  Dynamic ports. The ports ranging from 49,152 to 65,535 are neither controlled  nor registered. They can be used by any process. These are the ephemeral ports
  • 7. Figure 23.3 IP addresses versus port numbers
  • 10. Figure 23.6 Multiplexing and demultiplexing
  • 11. Connectionless Versus Connection-Oriented Service Connectionless Service  In a connectionless service, the packets are sent from one party to another with no need for connection establishment or connection release. The packets are not numbered; they may be delayed or lost or may arrive out of sequence. There is no acknowledgment either. We will see shortly that one of the transport layer protocols in the Internet model, UDP, is connectionless. Connection-Oriented Service  In a connection-oriented service, a connection is first established between the sender and the receiver. Data are transferred. At the end, the connection is released. TCP and SCTP are connection-oriented protocols.
  • 12. Reliable Versus Unreliable  The transport layer service can be reliable or unreliable. If the application layer program needs reliability, we use a reliable transport layer protocol by implementing flow and error control at the transport layer. This means a slower and more complex service.  On the other hand, if the application program does not need reliability because it uses its own flow and error control mechanism or it needs fast service or the nature of the service does not demand flow and error control (real-time applications), then an unreliable protocol can be used.  UDP is connectionless and unreliable; TCP and SCTP (Stream Control Transmission Protocol) are connection oriented and reliable.  These three can respond to the demands of the application layer programs.
  • 13. Figure 23.7 Error control
  • 14. Figure 23.8 Position of UDP, TCP, and SCTP in TCP/IP suite
  • 15. USER DATAGRAM PROTOCOL (UDP) The User Datagram Protocol (UDP) is called a connectionless, unreliable transport protocol. It does not add anything to the services of IP except to provide process-to-process communication instead of host-to- host communication.
  • 16. Figure 23.9 User datagram format
  • 17. UDP length = IP length – IP header’s length Note
  • 18. Figure 23.10 Pseudoheader for checksum calculation
  • 19. Figure 23.11 shows the checksum calculation for a very small user datagram with only 7 bytes of data. Because the number of bytes of data is odd, padding is added for checksum calculation. The pseudoheader as well as the padding will be dropped when the user datagram is delivered to IP. Example 23.2
  • 20. Figure 23.11 Checksum calculation of a simple UDP user datagram
  • 21. UDP Operation  Connectionless service- no relation between datagram, not numbered  No Flow and error control- no flow control so no window mechanics.  No error control except checksum (silently discard packet)  Encapsulation and decapsulation – IP Datagrams
  • 22. Queuing  Incoming and outgoing queue  It will obtain only one port number  Port unreachable icmp message (if queue is not created)
  • 24. Uses of UDP  Suitable for process that require simple request response communication with little concern for flow and error control.  Suitable for multicasting  Used for management process such as SNMP  Used for routing updating protocol : RIP
  • 25. 23-3 TCP TCP is a connection-oriented protocol; it creates a virtual connection between two TCPs to send data. In addition, TCP uses flow and error control mechanisms at the transport level. TCP Services TCP Features Segment A TCP Connection Flow Control Error Control Topics discussed in this section:
  • 27. Figure 23.14 Sending and receiving buffers
  • 28. Figure 23.15 TCP segments
  • 29. TCP  Connection oriented phase-  Reliable  Features  Numbering system  use byte number – sequence number, ack number  Flow control  Error control  Congestion control
  • 30. The bytes of data being transferred in each connection are numbered by TCP. The numbering starts with a randomly generated number. Note
  • 31. The following shows the sequence number for each segment: Example 23.3
  • 32. The value in the sequence number field of a segment defines the number of the first data byte contained in that segment. Note
  • 33. The value of the acknowledgment field in a segment defines the number of the next byte a party expects to receive. The acknowledgment number is cumulative. Note
  • 34. Figure 23.16 TCP segment format
  • 36. Table 23.3 Description of flags in the control field
  • 37. 3-Way Handshake Connection Establishment Process It will support communication between a web browser on the client and server sides whenever a user navigates the Internet.
  • 38. Synchronization Sequence Number (SYN) − The client sends the SYN to the server • When the client wants to connect to the server, then it sends the message to the server by setting the SYN flag as 1. • The message carries some additional information like the sequence number (32-bit random number). • The ACK is set to 0. The maximum segment size and the window size are also set. For example, if the window size is 1000 bits and the maximum segment size is 100 bits, then a maximum of 10 data segments can be transmitted in the connection by dividing (1000/100=10).
  • 39. Synchronization and Acknowledgement (SYN-ACK) to the client • The server acknowledges the client request by setting the ACK flag to 1. • The ACK indicates the response of the segment it received and SYN indicates with what sequence number it will start the segments. • For example, if the client has sent the SYN with sequence number = 500, then the server will send the ACK using acknowledgment number = 5001. • The server will set the SYN flag to '1' and send it to the client if the server also wants to establish the connection. • The sequence number used for SYN will be different from the client's SYN. • The server also advertises its window size and maximum segment size to the client. And, the connection is established from the client-side to the server-side.
  • 40. Acknowledgment (ACK) to the server • The client sends the acknowledgment (ACK) to the server after receiving the synchronization (SYN) from the server. • After getting the (ACK) from the client, the connection is established between the client and the server. • Now the data can be transmitted between the client and server sides.
  • 41. 3 -Way Handshake Closing Connection Process
  • 42. To close a 3-way handshake connection: • First, the client requests the server to terminate the established connection by sending FIN. • After receiving the client request, the server sends back the FIN and ACK request to the client. • After receiving the FIN + ACK from the server, the client confirms by sending an ACK to the server.
  • 43. Figure 23.18 Connection establishment using three-way handshaking
  • 44. A SYN segment cannot carry data, but it consumes one sequence number. Note
  • 45. A SYN + ACK segment cannot carry data, but does consume one sequence number. Note
  • 46. An ACK segment, if carrying no data, consumes no sequence number. Note
  • 47.  Syn flooding attack  Simultaneous open
  • 48. Figure 23.19 Data transfer
  • 49. Figure 23.20 Connection termination using three-way handshaking
  • 50. The FIN segment consumes one sequence number if it does not carry data. Note
  • 51. The FIN + ACK segment consumes one sequence number if it does not carry data. Note