SlideShare a Scribd company logo
1 of 54
Download to read offline
PART V: TRANSPORT LAYER
TRANSPORT-LAYER PROTOCOLS
Subject: Computer Networks
Tutor: Bilal Munir Mughal
1
Ch-24
Content Outline
 INTRODUCTION
 Services
 Port Numbers
 USER DATAGRAM PROTOCOL
 User Datagram
 UDP Services
 UDP Applications
2
Content Outline
 TRANSMISSION CONTROL PROTOCOL
 TCP Services
 TCP Features
 Segment
 A TCP Connection
 State Transition Diagram
 Windows in TCP
 Flow Control
 Error Control
 TCP Congestion Control
 TCP Timers
 Options
3
Content Outline
 SCTP
 SCTP Services
 SCTP Features
 Packet Format
 An SCTP Association
 Flow Control
 Error Control
4
INTRODUCTION
 The transport layer in the TCP/IP suite is located
between the application layer and the network layer.
 It provides services to the application layer and
receives services from the network layer.
 The transport layer acts as a liaison between a client
program and a server program, a process-to-process
connection.
 The transport layer is the heart of the TCP/IP protocol
suite; it is the end-to-end logical vehicle for
transferring data from one point to another in the
Internet.
5
INTRODUCTION
6
SERVICES
 UDP(User Datagram Protocol)
 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(Transmission Control Protocol)
 TCP is a reliable connection-oriented protocol that can be
used in any application where reliability is important.
 SCTP(Stream Control Transmission Protocol)
 SCTP is a new transport-layer protocol that combines the
features of UDP and TCP.
7
PORT NUMBERS
 Port numbers provide end-to-end addresses at the transport
layer and allow multiplexing and demultiplexing at this layer.
8
USER DATAGRAM PROTOCOL
9
USER DATAGRAM PROTOCOL
 Example 24.1
 The following is the content of a UDP header in
hexadecimal format.
CB84000D001C001C
a. What is the source port number?
b. What is the destination port number?
c. What is the total length of the user datagram?
d. What is the length of the data?
e. Is the packet directed from a client to a server or vice
versa?
f. What is the client process?
10
USER DATAGRAM PROTOCOL
 Solution
a. The source port number is the first four hexadecimal digits
(CB84)16, which means that the source port number is 52100.
b. The destination port number is the second four hexadecimal
digits (000D)16, which means that the destination port
number is 13.
c. The third four hexadecimal digits (001C)16 define the length
of the whole UDP packet as 28 bytes.
d. The length of the data is the length of the whole packet
minus the length of the header, or 28 − 8 = 20 bytes.
e. Since the destination port number is 13 (well-known port), the
packet is from the client to the server.
f. The client process is the Daytime (see Table 24.1)
11
USER DATAGRAM PROTOCOL:
UDP SERVICES
 Process-to-Process Communication
 Connectionless Services
 No Flow Control
 No Error Control except for the checksum
 Checksum
 No Congestion Control
 Encapsulation and Decapsulation
 Queuing
 Multiplexing and Demultiplexing
12
USER DATAGRAM PROTOCOL:
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 of the IP
packet (discussed in Chapter 19) in which the user
datagram is to be encapsulated with some fields filled
with 0s.
 If the checksum does not include the pseudoheader, a user
datagram may arrive safe and sound. However, if the IP
header is corrupted, it may be delivered to the wrong
host.
13
USER DATAGRAM PROTOCOL:
UDP SERVICES
 The protocol field is added to ensure that the packet
belongs to UDP, and not to TCP.
 The value of the protocol field for UDP is 17. If this value
is changed during transmission, the checksum calculation
at the receiver will detect it and UDP drops the packet. It
is not delivered to the wrong protocol.
14
USER DATAGRAM PROTOCOL:
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.
15
USER DATAGRAM PROTOCOL:
UDP APPLICATIONS
 UDP is suitable for a process that requires simple
request-response communication with little concern
for flow and error control. It is not usually used for a
process such as FTP that needs to send bulk data
(see Chapter 26).
 UDP is suitable for a process with internal flow- and
error-control mechanisms. For example, the Trivial
File Transfer Protocol (TFTP) process includes flow
and error control. It can easily use UDP.
16
USER DATAGRAM PROTOCOL:
UDP APPLICATIONS
 UDP is a suitable transport protocol for multicasting.
Multicasting capability is embedded in the UDP
software but not in the TCP software.
 UDP is used for management processes such as SNMP
(see Chapter 27).
 UDP is used for some route updating protocols such as
Routing Information Protocol (RIP) (see Chapter 20).
 UDP is normally used for interactive real-time
applications that cannot tolerate uneven delay
between sections of a received message (see Chapter
28).
17
TRANSMISSION CONTROL PROTOCOL
 Transmission Control Protocol (TCP) is a connection-
oriented, reliable protocol.
 TCP explicitly defines connection establishment,
data transfer, and connection teardown phases to
provide a connection-oriented service.
 TCP uses a combination of GBN and SR protocols to
provide reliability.
 To achieve this goal, TCP uses checksum (for error
detection), retransmission of lost or corrupted
packets, cumulative and selective acknowledgments,
and timers.
18
TRANSMISSION CONTROL PROTOCOL
TCP SERVICES
 Process-to-Process Communication
 Stream Delivery Service
 Full-Duplex Communication
 Multiplexing and Demultiplexing
 Connection-Oriented Service
 Reliable Service
19
TRANSMISSION CONTROL PROTOCOL
TCP SERVICES
 Stream Delivery Service
 TCP, allows the sending process to deliver data as a
stream of bytes and allows the receiving process to
obtain data as a stream of bytes.
20
TRANSMISSION CONTROL PROTOCOL
TCP SERVICES
 Stream Delivery Service…
 Sending and Receiving Buffers
21
TRANSMISSION CONTROL PROTOCOL
TCP SERVICES
 Stream Delivery Service…
 Segments
22
TRANSMISSION CONTROL PROTOCOL
TCP FEATURES
 Numbering System
 Byte Number
 TCP numbers all data bytes (octets) that are transmitted in a
connection. Numbering is independent in each direction.
 The numbering does not necessarily start from 0. Instead, TCP
chooses an arbitrary number between 0 and 232 − 1 for the number
of the first byte.
 Sequence Number
 TCP assigns a sequence number to each segment that is being sent.
The sequence number, in each direction, is defined as follows:
1. The sequence number of the first segment is the ISN (initial
sequence number), which is a random number.
2. The sequence number of any other segment is the sequence
number of the previous segment plus the number of bytes
(real or imaginary) carried by the previous segment.
23
TRANSMISSION CONTROL PROTOCOL
TCP FEATURES
 Numbering System…
 Acknowledgment Number
 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. which means that
the party takes the number of the last byte that it has received,
safe and sound, adds 1 to it, and announces this sum as the
acknowledgment number.
24
TRANSMISSION CONTROL PROTOCOL
TCP SEGMENT
25
TRANSMISSION CONTROL PROTOCOL
TCP SEGMENT
26
TRANSMISSION CONTROL PROTOCOL
TCP CONNECTION
 In TCP, connection-oriented transmission requires three
phases:
connection establishment,
data transfer,
and connection termination.
27
TRANSMISSION CONTROL PROTOCOL
TCP CONNECTION
 Connection Establishment
28
TRANSMISSION CONTROL PROTOCOL
TCP CONNECTION
 Data Transfer
29
TRANSMISSION CONTROL PROTOCOL
TCP CONNECTION
 Connection Termination
30
TRANSMISSION CONTROL PROTOCOL
TCP CONNECTION
 Connection Termination Half-Close
31
TRANSMISSION CONTROL PROTOCOL
TCP CONNECTION
 Connection Reset
 TCP at one end may deny a connection request, may
abort an existing connection, or may terminate an
idle connection.
 All of these are done with the RST (reset) flag.
32
TRANSMISSION CONTROL PROTOCOL
TIME-LINE DIAGRAM FOR A COMMON SCENARIO
33
TRANSMISSION CONTROL PROTOCOL
FLOW CONTROL
34
TRANSMISSION CONTROL PROTOCOL
ERROR CONTROL
 Error control in TCP is achieved through the use of
three simple tools:
 Checksum
 Acknowledgment
 Cumulative Acknowledgment (ACK)
 Selective Acknowledgment (SACK)
 Retransmission
 Retransmission after RTO(Retransmission time-out)
 Retransmission after Three Duplicate ACK Segments
35
TRANSMISSION CONTROL PROTOCOL
ERROR CONTROL
 TCP implementations today do not discard out-of-
order segments.
 They store them temporarily and flag them as out-of-
order segments until the missing segments arrive.
36
TRANSMISSION CONTROL PROTOCOL
ERROR CONTROL
 Some TCP Operation Scenarios
37
TRANSMISSION CONTROL PROTOCOL
ERROR CONTROL
 Some TCP Operation Scenarios
38
TRANSMISSION CONTROL PROTOCOL
CONGESTION CONTROL
 TCP uses different policies to handle the congestion in
the network.
 Congestion Window
 The TCP sender uses the occurrence of two events as signs
of congestion in the network: time-out and receiving three
duplicate ACKs.
 The lack of regular, timely receipt of ACKs, which results
in a time-out, is the sign of a strong congestion; the
receiving of three duplicate ACKs is the sign of a weak
congestion in the network.
39
TRANSMISSION CONTROL PROTOCOL
CONGESTION CONTROL
 Congestion Policies
 Slow Start: Exponential Increase algorithm
 Congestion Avoidance: Additive Increase algorithm
 Fast Recovery algorithm
40
TRANSMISSION CONTROL PROTOCOL
CONGESTION CONTROL
 Congestion Policies…
 The fast-recovery algorithm is optional in TCP.
 It starts when three duplicate ACKs arrive, which is
interpreted as light congestion in the network.
 Like congestion avoidance, this algorithm is also an
additive increase, but it increases the size of the
congestion window when a duplicate ACK arrives (after
the three duplicate ACKs that trigger the use of this
algorithm)
41
TRANSMISSION CONTROL PROTOCOL
CONGESTION CONTROL
 Three versions of TCP:
 Taho TCP uses only slow start and congestion avoidance
 Reno TCP added fast-recovery state
 New Reno TCP added three duplicate ACKs arrive
42
TRANSMISSION CONTROL PROTOCOL
TCP TIMERS
 To perform their operations smoothly, most TCP
implementations use at least four timers:
 Retransmission Timer
 Persistence Timer
 Keepalive Timer
 TIME-WAIT Timer
43
TRANSMISSION CONTROL PROTOCOL
OPTIONS
 The TCP header can have up to 40 bytes of optional
information.
 Options convey additional information to the
destination or align other options.
 These options are included on the book website for
further reference.
44
STREAM CONTROL TRANSMISSION
PROTOCOL
 Stream Control Transmission Protocol (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.
45
STREAM CONTROL TRANSMISSION PROTOCOL:
SERVICES
 Process-to-Process Communication
 Multiple Streams
 Multihoming
 Full-Duplex Communication
 Connection-Oriented Service
 Reliable Service
46
STREAM CONTROL TRANSMISSION PROTOCOL:
SERVICES
 Multiple Streams
 SCTP allows multistream service in each connection,
which is called association in SCTP terminology.
 If one of the streams is blocked, the other streams can still
deliver their data.
47
STREAM CONTROL TRANSMISSION PROTOCOL:
SERVICES
 Multihoming
 In TCP connection a multihomed host (connected to more
than one physical address with multiple IP addresses),
only one of these IP addresses per end can be utilized
during the connection.
 An SCTP association, supports multihoming service. The
sending and receiving host can define multiple IP
addresses in each end for an association.
48
STREAM CONTROL TRANSMISSION PROTOCOL:
FEATURES
 Acknowledgment Number
 SCTP acknowledgment numbers are chunk-oriented. They refer
to the TSN.
 Packets
49
STREAM CONTROL TRANSMISSION PROTOCOL:
PACKET FORMAT
 General Header
50
STREAM CONTROL TRANSMISSION PROTOCOL:
PACKET FORMAT
 Chunks
 Types of Chunks
51
STREAM CONTROL TRANSMISSION PROTOCOL:
ERROR CONTROL
 SCTP, like TCP, is a reliable transport-layer protocol.
 It uses a SACK chunk to report the state of the
receiver buffer to the sender.
 Each implementation uses a different set of entities
and timers for the receiver and sender sites.
52
STREAM CONTROL TRANSMISSION PROTOCOL:
ERROR CONTROL
 Congestion Control
 SCTP, like TCP, is a transport-layer protocol with packets
subject to congestion in the network. The SCTP designers
have used the same strategies for congestion control as
those used in TCP.
53
54
Questions?

More Related Content

Similar to DCN 5th ed. slides ch24 Transport-Layer Protocols.pdf

UNIT IV-Transport Layer.pptx
UNIT IV-Transport Layer.pptxUNIT IV-Transport Layer.pptx
UNIT IV-Transport Layer.pptxLAVANYAsrietacin
 
Transport layer services
Transport layer servicesTransport layer services
Transport layer servicesMelvin Cabatuan
 
Chapter Five - Transport Layer.pptx
Chapter Five - Transport Layer.pptxChapter Five - Transport Layer.pptx
Chapter Five - Transport Layer.pptxGirT2
 
IMPACT OF CONTENTION WINDOW ON CONGESTION CONTROL ALGORITHMS FOR WIRELESS ADH...
IMPACT OF CONTENTION WINDOW ON CONGESTION CONTROL ALGORITHMS FOR WIRELESS ADH...IMPACT OF CONTENTION WINDOW ON CONGESTION CONTROL ALGORITHMS FOR WIRELESS ADH...
IMPACT OF CONTENTION WINDOW ON CONGESTION CONTROL ALGORITHMS FOR WIRELESS ADH...cscpconf
 
04 MK-PPT End-to-End Protocols.ppt
04 MK-PPT End-to-End Protocols.ppt04 MK-PPT End-to-End Protocols.ppt
04 MK-PPT End-to-End Protocols.pptdhivyak49
 
TransportLayerServices.ppt
TransportLayerServices.pptTransportLayerServices.ppt
TransportLayerServices.pptSwatiRani13
 
Packet Guide SONET/SDH
Packet Guide SONET/SDHPacket Guide SONET/SDH
Packet Guide SONET/SDHscribd1
 
Studying_the_TCP_Flow_and_Congestion_Con.pdf
Studying_the_TCP_Flow_and_Congestion_Con.pdfStudying_the_TCP_Flow_and_Congestion_Con.pdf
Studying_the_TCP_Flow_and_Congestion_Con.pdfIUA
 
Transport Layer [Autosaved]
Transport Layer [Autosaved]Transport Layer [Autosaved]
Transport Layer [Autosaved]Ram Dutt Shukla
 
UDP and TCP Protocol & Encrytion and its algorithm
UDP and TCP Protocol & Encrytion and its algorithmUDP and TCP Protocol & Encrytion and its algorithm
UDP and TCP Protocol & Encrytion and its algorithmAyesha Tahir
 
#KPC #CST #Protocols
#KPC #CST #Protocols #KPC #CST #Protocols
#KPC #CST #Protocols KEIKolkata
 

Similar to DCN 5th ed. slides ch24 Transport-Layer Protocols.pdf (20)

Transport_layer.ppt
Transport_layer.pptTransport_layer.ppt
Transport_layer.ppt
 
tcp.pptx
tcp.pptxtcp.pptx
tcp.pptx
 
COMPUTER NETWORKS UNIT 4
COMPUTER NETWORKS UNIT 4COMPUTER NETWORKS UNIT 4
COMPUTER NETWORKS UNIT 4
 
UNIT IV-Transport Layer.pptx
UNIT IV-Transport Layer.pptxUNIT IV-Transport Layer.pptx
UNIT IV-Transport Layer.pptx
 
Transport layer services
Transport layer servicesTransport layer services
Transport layer services
 
Chapter Five - Transport Layer.pptx
Chapter Five - Transport Layer.pptxChapter Five - Transport Layer.pptx
Chapter Five - Transport Layer.pptx
 
IMPACT OF CONTENTION WINDOW ON CONGESTION CONTROL ALGORITHMS FOR WIRELESS ADH...
IMPACT OF CONTENTION WINDOW ON CONGESTION CONTROL ALGORITHMS FOR WIRELESS ADH...IMPACT OF CONTENTION WINDOW ON CONGESTION CONTROL ALGORITHMS FOR WIRELESS ADH...
IMPACT OF CONTENTION WINDOW ON CONGESTION CONTROL ALGORITHMS FOR WIRELESS ADH...
 
Cs8591 u4
Cs8591 u4Cs8591 u4
Cs8591 u4
 
04 MK-PPT End-to-End Protocols.ppt
04 MK-PPT End-to-End Protocols.ppt04 MK-PPT End-to-End Protocols.ppt
04 MK-PPT End-to-End Protocols.ppt
 
Transportlayer.ppt
Transportlayer.pptTransportlayer.ppt
Transportlayer.ppt
 
Chap-13.ppt
Chap-13.pptChap-13.ppt
Chap-13.ppt
 
TransportLayerServices.ppt
TransportLayerServices.pptTransportLayerServices.ppt
TransportLayerServices.ppt
 
Packet Guide SONET/SDH
Packet Guide SONET/SDHPacket Guide SONET/SDH
Packet Guide SONET/SDH
 
Ch 22
Ch 22Ch 22
Ch 22
 
TCP Vs UDP
TCP Vs UDP TCP Vs UDP
TCP Vs UDP
 
Studying_the_TCP_Flow_and_Congestion_Con.pdf
Studying_the_TCP_Flow_and_Congestion_Con.pdfStudying_the_TCP_Flow_and_Congestion_Con.pdf
Studying_the_TCP_Flow_and_Congestion_Con.pdf
 
Transport Layer
Transport LayerTransport Layer
Transport Layer
 
Transport Layer [Autosaved]
Transport Layer [Autosaved]Transport Layer [Autosaved]
Transport Layer [Autosaved]
 
UDP and TCP Protocol & Encrytion and its algorithm
UDP and TCP Protocol & Encrytion and its algorithmUDP and TCP Protocol & Encrytion and its algorithm
UDP and TCP Protocol & Encrytion and its algorithm
 
#KPC #CST #Protocols
#KPC #CST #Protocols #KPC #CST #Protocols
#KPC #CST #Protocols
 

More from Bilal Munir Mughal

DCN Slides ch10 Error Detection and Correction.ppt
DCN Slides ch10 Error Detection and Correction.pptDCN Slides ch10 Error Detection and Correction.ppt
DCN Slides ch10 Error Detection and Correction.pptBilal Munir Mughal
 
DCN 5th ed. slides ch23 Introduction to Transport Layer.pdf
DCN 5th ed. slides ch23 Introduction to Transport Layer.pdfDCN 5th ed. slides ch23 Introduction to Transport Layer.pdf
DCN 5th ed. slides ch23 Introduction to Transport Layer.pdfBilal Munir Mughal
 
DCN 5th ed. slides ch22 Next Generation IP.pdf
DCN 5th ed. slides ch22 Next Generation IP.pdfDCN 5th ed. slides ch22 Next Generation IP.pdf
DCN 5th ed. slides ch22 Next Generation IP.pdfBilal Munir Mughal
 
DCN 5th ed. slides ch07 Transmission Media.pdf
DCN 5th ed. slides ch07 Transmission Media.pdfDCN 5th ed. slides ch07 Transmission Media.pdf
DCN 5th ed. slides ch07 Transmission Media.pdfBilal Munir Mughal
 
DCN 5th ed. slides ch05 Analog Transmission.pdf
DCN 5th ed. slides ch05 Analog Transmission.pdfDCN 5th ed. slides ch05 Analog Transmission.pdf
DCN 5th ed. slides ch05 Analog Transmission.pdfBilal Munir Mughal
 
DCN 5th ed. slides ch04 Digital Transmission.pdf
DCN 5th ed. slides ch04 Digital Transmission.pdfDCN 5th ed. slides ch04 Digital Transmission.pdf
DCN 5th ed. slides ch04 Digital Transmission.pdfBilal Munir Mughal
 
DCN 5th ed. slides ch03 Introduction to Physical Layer.pdf
DCN 5th ed. slides ch03 Introduction to Physical Layer.pdfDCN 5th ed. slides ch03 Introduction to Physical Layer.pdf
DCN 5th ed. slides ch03 Introduction to Physical Layer.pdfBilal Munir Mughal
 
DCN 5th ed. slides ch02-Network Models.pptx
DCN 5th ed. slides ch02-Network Models.pptxDCN 5th ed. slides ch02-Network Models.pptx
DCN 5th ed. slides ch02-Network Models.pptxBilal Munir Mughal
 
DCN 5th ed. slides ch01-Introduction.pdf
DCN 5th ed. slides ch01-Introduction.pdfDCN 5th ed. slides ch01-Introduction.pdf
DCN 5th ed. slides ch01-Introduction.pdfBilal Munir Mughal
 

More from Bilal Munir Mughal (9)

DCN Slides ch10 Error Detection and Correction.ppt
DCN Slides ch10 Error Detection and Correction.pptDCN Slides ch10 Error Detection and Correction.ppt
DCN Slides ch10 Error Detection and Correction.ppt
 
DCN 5th ed. slides ch23 Introduction to Transport Layer.pdf
DCN 5th ed. slides ch23 Introduction to Transport Layer.pdfDCN 5th ed. slides ch23 Introduction to Transport Layer.pdf
DCN 5th ed. slides ch23 Introduction to Transport Layer.pdf
 
DCN 5th ed. slides ch22 Next Generation IP.pdf
DCN 5th ed. slides ch22 Next Generation IP.pdfDCN 5th ed. slides ch22 Next Generation IP.pdf
DCN 5th ed. slides ch22 Next Generation IP.pdf
 
DCN 5th ed. slides ch07 Transmission Media.pdf
DCN 5th ed. slides ch07 Transmission Media.pdfDCN 5th ed. slides ch07 Transmission Media.pdf
DCN 5th ed. slides ch07 Transmission Media.pdf
 
DCN 5th ed. slides ch05 Analog Transmission.pdf
DCN 5th ed. slides ch05 Analog Transmission.pdfDCN 5th ed. slides ch05 Analog Transmission.pdf
DCN 5th ed. slides ch05 Analog Transmission.pdf
 
DCN 5th ed. slides ch04 Digital Transmission.pdf
DCN 5th ed. slides ch04 Digital Transmission.pdfDCN 5th ed. slides ch04 Digital Transmission.pdf
DCN 5th ed. slides ch04 Digital Transmission.pdf
 
DCN 5th ed. slides ch03 Introduction to Physical Layer.pdf
DCN 5th ed. slides ch03 Introduction to Physical Layer.pdfDCN 5th ed. slides ch03 Introduction to Physical Layer.pdf
DCN 5th ed. slides ch03 Introduction to Physical Layer.pdf
 
DCN 5th ed. slides ch02-Network Models.pptx
DCN 5th ed. slides ch02-Network Models.pptxDCN 5th ed. slides ch02-Network Models.pptx
DCN 5th ed. slides ch02-Network Models.pptx
 
DCN 5th ed. slides ch01-Introduction.pdf
DCN 5th ed. slides ch01-Introduction.pdfDCN 5th ed. slides ch01-Introduction.pdf
DCN 5th ed. slides ch01-Introduction.pdf
 

Recently uploaded

#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 

Recently uploaded (20)

#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 

DCN 5th ed. slides ch24 Transport-Layer Protocols.pdf

  • 1. PART V: TRANSPORT LAYER TRANSPORT-LAYER PROTOCOLS Subject: Computer Networks Tutor: Bilal Munir Mughal 1 Ch-24
  • 2. Content Outline  INTRODUCTION  Services  Port Numbers  USER DATAGRAM PROTOCOL  User Datagram  UDP Services  UDP Applications 2
  • 3. Content Outline  TRANSMISSION CONTROL PROTOCOL  TCP Services  TCP Features  Segment  A TCP Connection  State Transition Diagram  Windows in TCP  Flow Control  Error Control  TCP Congestion Control  TCP Timers  Options 3
  • 4. Content Outline  SCTP  SCTP Services  SCTP Features  Packet Format  An SCTP Association  Flow Control  Error Control 4
  • 5. INTRODUCTION  The transport layer in the TCP/IP suite is located between the application layer and the network layer.  It provides services to the application layer and receives services from the network layer.  The transport layer acts as a liaison between a client program and a server program, a process-to-process connection.  The transport layer is the heart of the TCP/IP protocol suite; it is the end-to-end logical vehicle for transferring data from one point to another in the Internet. 5
  • 7. SERVICES  UDP(User Datagram Protocol)  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(Transmission Control Protocol)  TCP is a reliable connection-oriented protocol that can be used in any application where reliability is important.  SCTP(Stream Control Transmission Protocol)  SCTP is a new transport-layer protocol that combines the features of UDP and TCP. 7
  • 8. PORT NUMBERS  Port numbers provide end-to-end addresses at the transport layer and allow multiplexing and demultiplexing at this layer. 8
  • 10. USER DATAGRAM PROTOCOL  Example 24.1  The following is the content of a UDP header in hexadecimal format. CB84000D001C001C a. What is the source port number? b. What is the destination port number? c. What is the total length of the user datagram? d. What is the length of the data? e. Is the packet directed from a client to a server or vice versa? f. What is the client process? 10
  • 11. USER DATAGRAM PROTOCOL  Solution a. The source port number is the first four hexadecimal digits (CB84)16, which means that the source port number is 52100. b. The destination port number is the second four hexadecimal digits (000D)16, which means that the destination port number is 13. c. The third four hexadecimal digits (001C)16 define the length of the whole UDP packet as 28 bytes. d. The length of the data is the length of the whole packet minus the length of the header, or 28 − 8 = 20 bytes. e. Since the destination port number is 13 (well-known port), the packet is from the client to the server. f. The client process is the Daytime (see Table 24.1) 11
  • 12. USER DATAGRAM PROTOCOL: UDP SERVICES  Process-to-Process Communication  Connectionless Services  No Flow Control  No Error Control except for the checksum  Checksum  No Congestion Control  Encapsulation and Decapsulation  Queuing  Multiplexing and Demultiplexing 12
  • 13. USER DATAGRAM PROTOCOL: 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 of the IP packet (discussed in Chapter 19) in which the user datagram is to be encapsulated with some fields filled with 0s.  If the checksum does not include the pseudoheader, a user datagram may arrive safe and sound. However, if the IP header is corrupted, it may be delivered to the wrong host. 13
  • 14. USER DATAGRAM PROTOCOL: UDP SERVICES  The protocol field is added to ensure that the packet belongs to UDP, and not to TCP.  The value of the protocol field for UDP is 17. If this value is changed during transmission, the checksum calculation at the receiver will detect it and UDP drops the packet. It is not delivered to the wrong protocol. 14
  • 15. USER DATAGRAM PROTOCOL: 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. 15
  • 16. USER DATAGRAM PROTOCOL: UDP APPLICATIONS  UDP is suitable for a process that requires simple request-response communication with little concern for flow and error control. It is not usually used for a process such as FTP that needs to send bulk data (see Chapter 26).  UDP is suitable for a process with internal flow- and error-control mechanisms. For example, the Trivial File Transfer Protocol (TFTP) process includes flow and error control. It can easily use UDP. 16
  • 17. USER DATAGRAM PROTOCOL: UDP APPLICATIONS  UDP is a suitable transport protocol for multicasting. Multicasting capability is embedded in the UDP software but not in the TCP software.  UDP is used for management processes such as SNMP (see Chapter 27).  UDP is used for some route updating protocols such as Routing Information Protocol (RIP) (see Chapter 20).  UDP is normally used for interactive real-time applications that cannot tolerate uneven delay between sections of a received message (see Chapter 28). 17
  • 18. TRANSMISSION CONTROL PROTOCOL  Transmission Control Protocol (TCP) is a connection- oriented, reliable protocol.  TCP explicitly defines connection establishment, data transfer, and connection teardown phases to provide a connection-oriented service.  TCP uses a combination of GBN and SR protocols to provide reliability.  To achieve this goal, TCP uses checksum (for error detection), retransmission of lost or corrupted packets, cumulative and selective acknowledgments, and timers. 18
  • 19. TRANSMISSION CONTROL PROTOCOL TCP SERVICES  Process-to-Process Communication  Stream Delivery Service  Full-Duplex Communication  Multiplexing and Demultiplexing  Connection-Oriented Service  Reliable Service 19
  • 20. TRANSMISSION CONTROL PROTOCOL TCP SERVICES  Stream Delivery Service  TCP, allows the sending process to deliver data as a stream of bytes and allows the receiving process to obtain data as a stream of bytes. 20
  • 21. TRANSMISSION CONTROL PROTOCOL TCP SERVICES  Stream Delivery Service…  Sending and Receiving Buffers 21
  • 22. TRANSMISSION CONTROL PROTOCOL TCP SERVICES  Stream Delivery Service…  Segments 22
  • 23. TRANSMISSION CONTROL PROTOCOL TCP FEATURES  Numbering System  Byte Number  TCP numbers all data bytes (octets) that are transmitted in a connection. Numbering is independent in each direction.  The numbering does not necessarily start from 0. Instead, TCP chooses an arbitrary number between 0 and 232 − 1 for the number of the first byte.  Sequence Number  TCP assigns a sequence number to each segment that is being sent. The sequence number, in each direction, is defined as follows: 1. The sequence number of the first segment is the ISN (initial sequence number), which is a random number. 2. The sequence number of any other segment is the sequence number of the previous segment plus the number of bytes (real or imaginary) carried by the previous segment. 23
  • 24. TRANSMISSION CONTROL PROTOCOL TCP FEATURES  Numbering System…  Acknowledgment Number  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. which means that the party takes the number of the last byte that it has received, safe and sound, adds 1 to it, and announces this sum as the acknowledgment number. 24
  • 27. TRANSMISSION CONTROL PROTOCOL TCP CONNECTION  In TCP, connection-oriented transmission requires three phases: connection establishment, data transfer, and connection termination. 27
  • 28. TRANSMISSION CONTROL PROTOCOL TCP CONNECTION  Connection Establishment 28
  • 29. TRANSMISSION CONTROL PROTOCOL TCP CONNECTION  Data Transfer 29
  • 30. TRANSMISSION CONTROL PROTOCOL TCP CONNECTION  Connection Termination 30
  • 31. TRANSMISSION CONTROL PROTOCOL TCP CONNECTION  Connection Termination Half-Close 31
  • 32. TRANSMISSION CONTROL PROTOCOL TCP CONNECTION  Connection Reset  TCP at one end may deny a connection request, may abort an existing connection, or may terminate an idle connection.  All of these are done with the RST (reset) flag. 32
  • 33. TRANSMISSION CONTROL PROTOCOL TIME-LINE DIAGRAM FOR A COMMON SCENARIO 33
  • 35. TRANSMISSION CONTROL PROTOCOL ERROR CONTROL  Error control in TCP is achieved through the use of three simple tools:  Checksum  Acknowledgment  Cumulative Acknowledgment (ACK)  Selective Acknowledgment (SACK)  Retransmission  Retransmission after RTO(Retransmission time-out)  Retransmission after Three Duplicate ACK Segments 35
  • 36. TRANSMISSION CONTROL PROTOCOL ERROR CONTROL  TCP implementations today do not discard out-of- order segments.  They store them temporarily and flag them as out-of- order segments until the missing segments arrive. 36
  • 37. TRANSMISSION CONTROL PROTOCOL ERROR CONTROL  Some TCP Operation Scenarios 37
  • 38. TRANSMISSION CONTROL PROTOCOL ERROR CONTROL  Some TCP Operation Scenarios 38
  • 39. TRANSMISSION CONTROL PROTOCOL CONGESTION CONTROL  TCP uses different policies to handle the congestion in the network.  Congestion Window  The TCP sender uses the occurrence of two events as signs of congestion in the network: time-out and receiving three duplicate ACKs.  The lack of regular, timely receipt of ACKs, which results in a time-out, is the sign of a strong congestion; the receiving of three duplicate ACKs is the sign of a weak congestion in the network. 39
  • 40. TRANSMISSION CONTROL PROTOCOL CONGESTION CONTROL  Congestion Policies  Slow Start: Exponential Increase algorithm  Congestion Avoidance: Additive Increase algorithm  Fast Recovery algorithm 40
  • 41. TRANSMISSION CONTROL PROTOCOL CONGESTION CONTROL  Congestion Policies…  The fast-recovery algorithm is optional in TCP.  It starts when three duplicate ACKs arrive, which is interpreted as light congestion in the network.  Like congestion avoidance, this algorithm is also an additive increase, but it increases the size of the congestion window when a duplicate ACK arrives (after the three duplicate ACKs that trigger the use of this algorithm) 41
  • 42. TRANSMISSION CONTROL PROTOCOL CONGESTION CONTROL  Three versions of TCP:  Taho TCP uses only slow start and congestion avoidance  Reno TCP added fast-recovery state  New Reno TCP added three duplicate ACKs arrive 42
  • 43. TRANSMISSION CONTROL PROTOCOL TCP TIMERS  To perform their operations smoothly, most TCP implementations use at least four timers:  Retransmission Timer  Persistence Timer  Keepalive Timer  TIME-WAIT Timer 43
  • 44. TRANSMISSION CONTROL PROTOCOL OPTIONS  The TCP header can have up to 40 bytes of optional information.  Options convey additional information to the destination or align other options.  These options are included on the book website for further reference. 44
  • 45. STREAM CONTROL TRANSMISSION PROTOCOL  Stream Control Transmission Protocol (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. 45
  • 46. STREAM CONTROL TRANSMISSION PROTOCOL: SERVICES  Process-to-Process Communication  Multiple Streams  Multihoming  Full-Duplex Communication  Connection-Oriented Service  Reliable Service 46
  • 47. STREAM CONTROL TRANSMISSION PROTOCOL: SERVICES  Multiple Streams  SCTP allows multistream service in each connection, which is called association in SCTP terminology.  If one of the streams is blocked, the other streams can still deliver their data. 47
  • 48. STREAM CONTROL TRANSMISSION PROTOCOL: SERVICES  Multihoming  In TCP connection a multihomed host (connected to more than one physical address with multiple IP addresses), only one of these IP addresses per end can be utilized during the connection.  An SCTP association, supports multihoming service. The sending and receiving host can define multiple IP addresses in each end for an association. 48
  • 49. STREAM CONTROL TRANSMISSION PROTOCOL: FEATURES  Acknowledgment Number  SCTP acknowledgment numbers are chunk-oriented. They refer to the TSN.  Packets 49
  • 50. STREAM CONTROL TRANSMISSION PROTOCOL: PACKET FORMAT  General Header 50
  • 51. STREAM CONTROL TRANSMISSION PROTOCOL: PACKET FORMAT  Chunks  Types of Chunks 51
  • 52. STREAM CONTROL TRANSMISSION PROTOCOL: ERROR CONTROL  SCTP, like TCP, is a reliable transport-layer protocol.  It uses a SACK chunk to report the state of the receiver buffer to the sender.  Each implementation uses a different set of entities and timers for the receiver and sender sites. 52
  • 53. STREAM CONTROL TRANSMISSION PROTOCOL: ERROR CONTROL  Congestion Control  SCTP, like TCP, is a transport-layer protocol with packets subject to congestion in the network. The SCTP designers have used the same strategies for congestion control as those used in TCP. 53