SlideShare a Scribd company logo
23.1
Process-to-Process Delivery:
UDP, TCP, and SCTP
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
UDP Applications
UDP Applications
UDP is preferable for some applications.
UDP is preferable for some applications.
UDP is suitable for a process that requires
UDP is suitable for a process that requires simple request-
simple request-
response communication with little concern for flow and error
response communication with little concern for flow and error
control
control. It is not usually used for a process such as FTP that
. It is not usually used for a process such as FTP that
needs to send bulk data
needs to send bulk data
UDP is a
UDP is a suitable transport protocol for multicasting
suitable transport protocol for multicasting.
.
Multicasting capability is embedded in the UDP software but
Multicasting capability is embedded in the UDP software but
not in the TCP software.
not in the TCP software.
UDP is
UDP is used for management processes
used for management processes such as SNMP.
such as SNMP.
UDP is used for some
UDP is used for some route updating protocols
route updating protocols such as Routing
such as Routing
Information Protocol (RIP)
Information Protocol (RIP)
UDP is normally used for
UDP is normally used for interactive real-time applications
interactive real-time applications that
that
cannot tolerate uneven delay between sections of a received
cannot tolerate uneven delay between sections of a received
message
message.
.
23.3
TCP
TCP
TCP is a connection-oriented protocol; it creates a
TCP is a connection-oriented protocol; it creates a
virtual connection between two TCPs to send data. In
virtual connection between two TCPs to send data. In
addition, TCP uses flow and error control mechanisms
addition, TCP uses flow and error control mechanisms
at the transport level.
at the transport level.
TCP Services
TCP Features
Segment
A TCP Connection
Flow Control
Error Control
Topics discussed in this section:
Topics discussed in this section:
TCP
TCP
 Transmission Control Protocol (TCP) is a
Transmission Control Protocol (TCP) is a
connection-oriented, reliable protocol
connection-oriented, reliable protocol.
.
 TCP explicitly
TCP explicitly defines connection
defines connection
establishment, data transfer, and connection
establishment, data transfer, and connection
teardown phases to provide a connection-oriented
teardown phases to provide a connection-oriented
service.
service.
 To provide reliability,
To provide reliability, TCP uses checksum (for
TCP uses checksum (for
error detection), retransmission of lost or
error detection), retransmission of lost or
corrupted packets, cumulative and selective
corrupted packets, cumulative and selective
acknowledgments, and timers.
acknowledgments, and timers.
TCP Services
TCP Services
Process –to-Process Communication
Process –to-Process Communication
 Stream Delivery Service
Stream Delivery Service
Sending and Receiving Buffers
Sending and Receiving Buffers
 TCP Segments
TCP Segments
 Full Duplex Communication
Full Duplex Communication
 Multiplexing and De multiplexing
Multiplexing and De multiplexing
 Connection oriented Services
Connection oriented Services
 Reliable Service
Reliable Service
Stream Delivery Service
Stream Delivery Service
TCP allows the sending process to deliver data as
TCP allows the sending process to deliver data as
a stream of bytes and allows the receiving process to
a stream of bytes and allows the receiving process to
obtain data as a stream of bytes.
obtain data as a stream of bytes.
TCP creates an environment in which the two processes
TCP creates an environment in which the two processes
seem to be
seem to be connected by an imaginary “tube” that
connected by an imaginary “tube” that
carries their bytes across the Internet
carries their bytes across the Internet
23.7
Figure 23.13 Stream delivery
Sending and Receiving Buffers
Sending and Receiving Buffers
Because the sending and the receiving processes may not
Because the sending and the receiving processes may not
necessarily write or read data at the same rate, TCP
necessarily write or read data at the same rate, TCP
needs buffers for storage.
needs buffers for storage.
There are
There are two buffers, the sending buffer and the
two buffers, the sending buffer and the
receiving buffer
receiving buffer, one for each direction.
, one for each direction.
One way to implement a buffer is to use a circular array
One way to implement a buffer is to use a circular array
of 1-byte locations.
of 1-byte locations.
23.9
Figure 23.14 Sending and receiving buffers
TCP Segments
TCP Segments
The network layer, as a service provider for TCP, needs to
The network layer, as a service provider for TCP, needs to
send data in packets, not as a stream of bytes.
send data in packets, not as a stream of bytes.
At the transport layer, TCP groups a number of bytes
At the transport layer, TCP groups a number of bytes
together into a packet called a segment.
together into a packet called a segment.
TCP adds a header to each segment (for control purposes)
TCP adds a header to each segment (for control purposes)
and delivers the segment to the network layer for
and delivers the segment to the network layer for
transmission.
transmission.
The segments are encapsulated in an IP datagram and
The segments are encapsulated in an IP datagram and
transmitted.
transmitted.
23.11
Figure 23.15 TCP segments
TCP Other Services
TCP Other Services
Full-Duplex Communication
TCP offers full-duplex service, where data can flow in both directions at the
same time. Each TCP endpoint then has its own sending and receiving buffer,
and segments move in both directions.
Multiplexing and Demultiplexing
Like UDP, TCP performs multiplexing at the sender and demultiplexing at the
receiver. However, because TCP is a connection-oriented protocol, a
connection needs to be established for each pair of processes.
TCP Other Services
TCP Other Services
Connection-Oriented Service
TCP, unlike UDP, is a connection-oriented protocol. When a process at site A wants to send to
and receive data from another process at site B, the following three phases occur:
1. The two TCP’s establish a logical connection between them.
2. Data are exchanged in both directions.
3. The connection is terminated.
Reliable Service
TCP is a reliable transport protocol. It uses an acknowledgment mechanism to check the safe
and sound arrival of data
23.14
Figure 23.16 TCP segment format
23.15
Figure 23.17 Control field
23.16
Table 23.3 Description of flags in the control field
23.17
Figure 23.18 Connection establishment using three-way handshaking
23.18
A SYN segment cannot carry data, but it
consumes one sequence number.
Note
23.19
A SYN + ACK segment cannot
carry data, but does consume one
sequence number.
Note
23.20
An ACK segment, if carrying no data,
consumes no sequence number.
Note
23.21
Figure 23.19 Data transfer
23.22
Figure 23.20 Connection termination using three-way handshaking
23.23
The FIN segment consumes one
sequence number if it does
not carry data.
Note
23.24
The FIN + ACK segment consumes
one sequence number if it
does not carry data.
Note
23.25
Figure 23.21 Half-close
23.26
Figure 23.22 Sliding window
23.27
A sliding window is used to make
transmission more efficient as well as
to control the flow of data so that the
destination does not become
overwhelmed with data.
TCP sliding windows are byte-oriented.
Note
23.28
What is the value of the receiver window (rwnd) for host
A if the receiver, host B, has a buffer size of 5000 bytes
and 1000 bytes of received and unprocessed data?
Example 23.4
Solution
The value of rwnd = 5000 − 1000 = 4000. Host B can
receive only 4000 bytes of data before overflowing its
buffer. Host B advertises this value in its next segment to
A.
23.29
What is the size of the window for host A if the value of
rwnd is 3000 bytes and the value of cwnd is 3500 bytes?
Example 23.5
Solution
The size of the window is the smaller of rwnd and cwnd,
which is 3000 bytes.
23.30
Figure 23.23 shows an unrealistic example of a sliding
window. The sender has sent bytes up to 202. We assume
that cwnd is 20 (in reality this value is thousands of
bytes). The receiver has sent an acknowledgment number
of 200 with an rwnd of 9 bytes (in reality this value is
thousands of bytes). The size of the sender window is the
minimum of rwnd and cwnd, or 9 bytes. Bytes 200 to 202
are sent, but not acknowledged. Bytes 203 to 208 can be
sent without worrying about acknowledgment. Bytes 209
and above cannot be sent.
Example 23.6
23.31
Figure 23.23 Example 23.6
23.32
Some points about TCP sliding windows:
❏ The size of the window is the lesser of rwnd and
cwnd.
❏ The source does not have to send a full window’s
worth of data.
❏ The window can be opened or closed by the
receiver, but should not be shrunk.
❏ The destination can send an acknowledgment at
any time as long as it does not result in a shrinking
window.
❏ The receiver can temporarily shut down the
window; the sender, however, can always send a
segment of 1 byte after the window is shut down.
Note
23.33
ACK segments do not consume
sequence numbers and are not
acknowledged.
Note
23.34
In modern implementations, a
retransmission occurs if the
retransmission timer expires or three
duplicate ACK segments have arrived.
Note
23.35
No retransmission timer is set for an
ACK segment.
Note
23.36
Data may arrive out of order and be
temporarily stored by the receiving TCP,
but TCP guarantees that no out-of-order
segment is delivered to the process.
Note
23.37
Figure 23.24 Normal operation
23.38
Figure 23.25 Lost segment
23.39
The receiver TCP delivers only ordered
data to the process.
Note
23.40
Figure 23.26 Fast retransmission
23.41
23-4 SCTP
23-4 SCTP
Stream Control Transmission Protocol (SCTP) is a
Stream Control Transmission Protocol (SCTP) is a
new reliable, message-oriented transport layer
new reliable, message-oriented transport layer
protocol. SCTP, however, is mostly designed for
protocol. SCTP, however, is mostly designed for
Internet applications that have recently been
Internet applications that have recently been
introduced. These new applications need a more
introduced. These new applications need a more
sophisticated service than TCP can provide.
sophisticated service than TCP can provide.
SCTP Services and Features
Packet Format
An SCTP Association
Flow Control and Error Control
Topics discussed in this section:
Topics discussed in this section:
23.42
SCTP is a message-oriented, reliable
protocol that combines the best features
of UDP and TCP.
Note
23.43
Table 23.4 Some SCTP applications
23.44
Figure 23.27 Multiple-stream concept
23.45
An association in SCTP can involve
multiple streams.
Note
23.46
Figure 23.28 Multihoming concept
23.47
SCTP association allows multiple IP
addresses for each end.
Note
23.48
In SCTP, a data chunk is numbered
using a TSN.
Note
23.49
To distinguish between different
streams, SCTP uses an SI.
Note
23.50
To distinguish between different data
chunks belonging to the same stream,
SCTP uses SSNs.
Note
23.51
TCP has segments; SCTP has packets.
Note
23.52
Figure 23.29 Comparison between a TCP segment and an SCTP packet
23.53
In SCTP, control information and data
information are carried in separate
chunks.
Note
23.54
Figure 23.30 Packet, data chunks, and streams
23.55
Data chunks are identified by three
items: TSN, SI, and SSN.
TSN is a cumulative number identifying
the association; SI defines the stream;
SSN defines the chunk in a stream.
Note
23.56
In SCTP, acknowledgment numbers are
used to acknowledge only data chunks;
control chunks are acknowledged by
other control chunks if necessary.
Note
23.57
Figure 23.31 SCTP packet format
23.58
In an SCTP packet, control chunks come
before data chunks.
Note
23.59
Figure 23.32 General header
23.60
Table 23.5 Chunks
23.61
A connection in SCTP is called an
association.
Note
23.62
No other chunk is allowed in a packet
carrying an INIT or INIT ACK chunk.
A COOKIE ECHO or a COOKIE ACK
chunk can carry data chunks.
Note
23.63
Figure 23.33 Four-way handshaking
23.64
In SCTP, only DATA chunks
consume TSNs;
DATA chunks are the only chunks
that are acknowledged.
Note
23.65
Figure 23.34 Simple data transfer
23.66
The acknowledgment in SCTP defines
the cumulative TSN, the TSN of the last
data chunk received in order.
Note
23.67
Figure 23.35 Association termination
23.68
Figure 23.36 Flow control, receiver site
23.69
Figure 23.37 Flow control, sender site
23.70
Figure 23.38 Flow control scenario
23.71
Figure 23.39 Error control, receiver site
23.72
Figure 23.40 Error control, sender site

More Related Content

PDF
transport-layer-forouzan.pdf
PDF
20CS2007 Computer Communication Networks
PPTX
UNIT IV-Transport Layer.pptx
PPT
23 Process to_Process_Delivery_UDP_TCP_and_SCTP
PPT
PDF
PPT
Chapter 23
transport-layer-forouzan.pdf
20CS2007 Computer Communication Networks
UNIT IV-Transport Layer.pptx
23 Process to_Process_Delivery_UDP_TCP_and_SCTP
Chapter 23

Similar to Computer Network - Transport layer protocol (20)

PPTX
TCP,UDP,SCTP computer networking-Final.pptx
PPT
udp , tcp ,sctp
PDF
materi uas jarkom tahun ajaraan 2022.pdf
PPTX
yasu_CN_PPT.pptxhfjdjdjddjdn😄😅😐udjdjdjfjfjfbdbbc
PPTX
Online TCP-IP Networking Assignment Help
PPT
MK-PPT Chapter 5.ppt advanced computer networks
PPTX
Transport_Layer_Protocols.pptx
PPTX
NETWORK TRANSPORT LAYER SECURITY USES .pptx
PPT
計概
PPT
Unit_3_TCP_UDP.ppt
PPT
unit 3 ns.ppt
PPT
Transport protocols
PPT
Transport layer TCP and UDP.ppt
PPT
04 MK-PPT End-to-End Protocols.ppt
PPT
Transmission control protocol ...............................
PPTX
Transport Layer In Computer Network
PPTX
Unit V computer network notes for study.
PPT
PPT
Transmission control protocol _
PPTX
Transmission control protocol
TCP,UDP,SCTP computer networking-Final.pptx
udp , tcp ,sctp
materi uas jarkom tahun ajaraan 2022.pdf
yasu_CN_PPT.pptxhfjdjdjddjdn😄😅😐udjdjdjfjfjfbdbbc
Online TCP-IP Networking Assignment Help
MK-PPT Chapter 5.ppt advanced computer networks
Transport_Layer_Protocols.pptx
NETWORK TRANSPORT LAYER SECURITY USES .pptx
計概
Unit_3_TCP_UDP.ppt
unit 3 ns.ppt
Transport protocols
Transport layer TCP and UDP.ppt
04 MK-PPT End-to-End Protocols.ppt
Transmission control protocol ...............................
Transport Layer In Computer Network
Unit V computer network notes for study.
Transmission control protocol _
Transmission control protocol
Ad

More from RAJASEKARAN G (20)

PPT
Multiple Access mechanism in Computer Network.ppt
PPTX
Data Link layer in computer netwroks.pptx
PPTX
PREDICTION BRAIN STROKE using Machine LEarning.pptx
PPTX
A Novel Network Intrusion Detection Sysy.pptx
PPT
Frequent Item Set Mining by Rajasekaran.ppt
PPTX
_Introduction, comparison, and application of deep learning - Dr. Gopalakrish...
PPT
engineergradprojectpiotrowskiword03-1232494818285266-3.ppt
PPT
About Computer Science Engineering Course.ppt
PPTX
session faculty development programme.pptx
PPTX
Power point Presentation FOR 1ST REVIEW.pptx
PPT
quantumComputers in Application of Qunatum Physics.ppt
PPTX
Quantum Computing in Application of Qunatum Physics.pptx
PPTX
Software Project Management UNIT 2.pptx
PPTX
Software Project Management UNIT 4.pptx
PPT
bellman-ford dynamic algorithm in data structures.ppt
PPT
graph in Data Structures and Algorithm.ppt
PPT
Dijkstra Shortest Path Algorithm in Network.ppt
PPT
Single Source Shortest Path Algorithm.ppt
PPT
Warshalls Floyds Algorithm in Data Structure.ppt
PPT
Switching Technology_in_Computer_Networks.ppt
Multiple Access mechanism in Computer Network.ppt
Data Link layer in computer netwroks.pptx
PREDICTION BRAIN STROKE using Machine LEarning.pptx
A Novel Network Intrusion Detection Sysy.pptx
Frequent Item Set Mining by Rajasekaran.ppt
_Introduction, comparison, and application of deep learning - Dr. Gopalakrish...
engineergradprojectpiotrowskiword03-1232494818285266-3.ppt
About Computer Science Engineering Course.ppt
session faculty development programme.pptx
Power point Presentation FOR 1ST REVIEW.pptx
quantumComputers in Application of Qunatum Physics.ppt
Quantum Computing in Application of Qunatum Physics.pptx
Software Project Management UNIT 2.pptx
Software Project Management UNIT 4.pptx
bellman-ford dynamic algorithm in data structures.ppt
graph in Data Structures and Algorithm.ppt
Dijkstra Shortest Path Algorithm in Network.ppt
Single Source Shortest Path Algorithm.ppt
Warshalls Floyds Algorithm in Data Structure.ppt
Switching Technology_in_Computer_Networks.ppt
Ad

Recently uploaded (20)

PPTX
web development for engineering and engineering
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
DOCX
573137875-Attendance-Management-System-original
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
Construction Project Organization Group 2.pptx
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PDF
Well-logging-methods_new................
PDF
Arduino robotics embedded978-1-4302-3184-4.pdf
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PPT
Mechanical Engineering MATERIALS Selection
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
Welding lecture in detail for understanding
PDF
Digital Logic Computer Design lecture notes
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
web development for engineering and engineering
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
573137875-Attendance-Management-System-original
Foundation to blockchain - A guide to Blockchain Tech
Construction Project Organization Group 2.pptx
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Well-logging-methods_new................
Arduino robotics embedded978-1-4302-3184-4.pdf
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Mechanical Engineering MATERIALS Selection
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
Operating System & Kernel Study Guide-1 - converted.pdf
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
CH1 Production IntroductoryConcepts.pptx
Welding lecture in detail for understanding
Digital Logic Computer Design lecture notes
CYBER-CRIMES AND SECURITY A guide to understanding
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...

Computer Network - Transport layer protocol

  • 1. 23.1 Process-to-Process Delivery: UDP, TCP, and SCTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
  • 2. UDP Applications UDP Applications UDP is preferable for some applications. UDP is preferable for some applications. UDP is suitable for a process that requires UDP is suitable for a process that requires simple request- simple request- response communication with little concern for flow and error response communication with little concern for flow and error control control. It is not usually used for a process such as FTP that . It is not usually used for a process such as FTP that needs to send bulk data needs to send bulk data UDP is a UDP is a suitable transport protocol for multicasting suitable transport protocol for multicasting. . Multicasting capability is embedded in the UDP software but Multicasting capability is embedded in the UDP software but not in the TCP software. not in the TCP software. UDP is UDP is used for management processes used for management processes such as SNMP. such as SNMP. UDP is used for some UDP is used for some route updating protocols route updating protocols such as Routing such as Routing Information Protocol (RIP) Information Protocol (RIP) UDP is normally used for UDP is normally used for interactive real-time applications interactive real-time applications that that cannot tolerate uneven delay between sections of a received cannot tolerate uneven delay between sections of a received message message. .
  • 3. 23.3 TCP TCP TCP is a connection-oriented protocol; it creates a TCP is a connection-oriented protocol; it creates a virtual connection between two TCPs to send data. In virtual connection between two TCPs to send data. In addition, TCP uses flow and error control mechanisms addition, TCP uses flow and error control mechanisms at the transport level. at the transport level. TCP Services TCP Features Segment A TCP Connection Flow Control Error Control Topics discussed in this section: Topics discussed in this section:
  • 4. TCP TCP  Transmission Control Protocol (TCP) is a Transmission Control Protocol (TCP) is a connection-oriented, reliable protocol connection-oriented, reliable protocol. .  TCP explicitly TCP explicitly defines connection defines connection establishment, data transfer, and connection establishment, data transfer, and connection teardown phases to provide a connection-oriented teardown phases to provide a connection-oriented service. service.  To provide reliability, To provide reliability, TCP uses checksum (for TCP uses checksum (for error detection), retransmission of lost or error detection), retransmission of lost or corrupted packets, cumulative and selective corrupted packets, cumulative and selective acknowledgments, and timers. acknowledgments, and timers.
  • 5. TCP Services TCP Services Process –to-Process Communication Process –to-Process Communication  Stream Delivery Service Stream Delivery Service Sending and Receiving Buffers Sending and Receiving Buffers  TCP Segments TCP Segments  Full Duplex Communication Full Duplex Communication  Multiplexing and De multiplexing Multiplexing and De multiplexing  Connection oriented Services Connection oriented Services  Reliable Service Reliable Service
  • 6. Stream Delivery Service Stream Delivery Service TCP allows the sending process to deliver data as TCP allows the sending process to deliver data as a stream of bytes and allows the receiving process to a stream of bytes and allows the receiving process to obtain data as a stream of bytes. obtain data as a stream of bytes. TCP creates an environment in which the two processes TCP creates an environment in which the two processes seem to be seem to be connected by an imaginary “tube” that connected by an imaginary “tube” that carries their bytes across the Internet carries their bytes across the Internet
  • 8. Sending and Receiving Buffers Sending and Receiving Buffers Because the sending and the receiving processes may not Because the sending and the receiving processes may not necessarily write or read data at the same rate, TCP necessarily write or read data at the same rate, TCP needs buffers for storage. needs buffers for storage. There are There are two buffers, the sending buffer and the two buffers, the sending buffer and the receiving buffer receiving buffer, one for each direction. , one for each direction. One way to implement a buffer is to use a circular array One way to implement a buffer is to use a circular array of 1-byte locations. of 1-byte locations.
  • 9. 23.9 Figure 23.14 Sending and receiving buffers
  • 10. TCP Segments TCP Segments The network layer, as a service provider for TCP, needs to The network layer, as a service provider for TCP, needs to send data in packets, not as a stream of bytes. send data in packets, not as a stream of bytes. At the transport layer, TCP groups a number of bytes At the transport layer, TCP groups a number of bytes together into a packet called a segment. together into a packet called a segment. TCP adds a header to each segment (for control purposes) TCP adds a header to each segment (for control purposes) and delivers the segment to the network layer for and delivers the segment to the network layer for transmission. transmission. The segments are encapsulated in an IP datagram and The segments are encapsulated in an IP datagram and transmitted. transmitted.
  • 12. TCP Other Services TCP Other Services Full-Duplex Communication TCP offers full-duplex service, where data can flow in both directions at the same time. Each TCP endpoint then has its own sending and receiving buffer, and segments move in both directions. Multiplexing and Demultiplexing Like UDP, TCP performs multiplexing at the sender and demultiplexing at the receiver. However, because TCP is a connection-oriented protocol, a connection needs to be established for each pair of processes.
  • 13. TCP Other Services TCP Other Services Connection-Oriented Service TCP, unlike UDP, is a connection-oriented protocol. When a process at site A wants to send to and receive data from another process at site B, the following three phases occur: 1. The two TCP’s establish a logical connection between them. 2. Data are exchanged in both directions. 3. The connection is terminated. Reliable Service TCP is a reliable transport protocol. It uses an acknowledgment mechanism to check the safe and sound arrival of data
  • 14. 23.14 Figure 23.16 TCP segment format
  • 16. 23.16 Table 23.3 Description of flags in the control field
  • 17. 23.17 Figure 23.18 Connection establishment using three-way handshaking
  • 18. 23.18 A SYN segment cannot carry data, but it consumes one sequence number. Note
  • 19. 23.19 A SYN + ACK segment cannot carry data, but does consume one sequence number. Note
  • 20. 23.20 An ACK segment, if carrying no data, consumes no sequence number. Note
  • 22. 23.22 Figure 23.20 Connection termination using three-way handshaking
  • 23. 23.23 The FIN segment consumes one sequence number if it does not carry data. Note
  • 24. 23.24 The FIN + ACK segment consumes one sequence number if it does not carry data. Note
  • 27. 23.27 A sliding window is used to make transmission more efficient as well as to control the flow of data so that the destination does not become overwhelmed with data. TCP sliding windows are byte-oriented. Note
  • 28. 23.28 What is the value of the receiver window (rwnd) for host A if the receiver, host B, has a buffer size of 5000 bytes and 1000 bytes of received and unprocessed data? Example 23.4 Solution The value of rwnd = 5000 − 1000 = 4000. Host B can receive only 4000 bytes of data before overflowing its buffer. Host B advertises this value in its next segment to A.
  • 29. 23.29 What is the size of the window for host A if the value of rwnd is 3000 bytes and the value of cwnd is 3500 bytes? Example 23.5 Solution The size of the window is the smaller of rwnd and cwnd, which is 3000 bytes.
  • 30. 23.30 Figure 23.23 shows an unrealistic example of a sliding window. The sender has sent bytes up to 202. We assume that cwnd is 20 (in reality this value is thousands of bytes). The receiver has sent an acknowledgment number of 200 with an rwnd of 9 bytes (in reality this value is thousands of bytes). The size of the sender window is the minimum of rwnd and cwnd, or 9 bytes. Bytes 200 to 202 are sent, but not acknowledged. Bytes 203 to 208 can be sent without worrying about acknowledgment. Bytes 209 and above cannot be sent. Example 23.6
  • 32. 23.32 Some points about TCP sliding windows: ❏ The size of the window is the lesser of rwnd and cwnd. ❏ The source does not have to send a full window’s worth of data. ❏ The window can be opened or closed by the receiver, but should not be shrunk. ❏ The destination can send an acknowledgment at any time as long as it does not result in a shrinking window. ❏ The receiver can temporarily shut down the window; the sender, however, can always send a segment of 1 byte after the window is shut down. Note
  • 33. 23.33 ACK segments do not consume sequence numbers and are not acknowledged. Note
  • 34. 23.34 In modern implementations, a retransmission occurs if the retransmission timer expires or three duplicate ACK segments have arrived. Note
  • 35. 23.35 No retransmission timer is set for an ACK segment. Note
  • 36. 23.36 Data may arrive out of order and be temporarily stored by the receiving TCP, but TCP guarantees that no out-of-order segment is delivered to the process. Note
  • 39. 23.39 The receiver TCP delivers only ordered data to the process. Note
  • 40. 23.40 Figure 23.26 Fast retransmission
  • 41. 23.41 23-4 SCTP 23-4 SCTP Stream Control Transmission Protocol (SCTP) is a Stream Control Transmission Protocol (SCTP) is a new reliable, message-oriented transport layer new reliable, message-oriented transport layer protocol. SCTP, however, is mostly designed for protocol. SCTP, however, is mostly designed for Internet applications that have recently been Internet applications that have recently been introduced. These new applications need a more introduced. These new applications need a more sophisticated service than TCP can provide. sophisticated service than TCP can provide. SCTP Services and Features Packet Format An SCTP Association Flow Control and Error Control Topics discussed in this section: Topics discussed in this section:
  • 42. 23.42 SCTP is a message-oriented, reliable protocol that combines the best features of UDP and TCP. Note
  • 43. 23.43 Table 23.4 Some SCTP applications
  • 45. 23.45 An association in SCTP can involve multiple streams. Note
  • 47. 23.47 SCTP association allows multiple IP addresses for each end. Note
  • 48. 23.48 In SCTP, a data chunk is numbered using a TSN. Note
  • 49. 23.49 To distinguish between different streams, SCTP uses an SI. Note
  • 50. 23.50 To distinguish between different data chunks belonging to the same stream, SCTP uses SSNs. Note
  • 51. 23.51 TCP has segments; SCTP has packets. Note
  • 52. 23.52 Figure 23.29 Comparison between a TCP segment and an SCTP packet
  • 53. 23.53 In SCTP, control information and data information are carried in separate chunks. Note
  • 54. 23.54 Figure 23.30 Packet, data chunks, and streams
  • 55. 23.55 Data chunks are identified by three items: TSN, SI, and SSN. TSN is a cumulative number identifying the association; SI defines the stream; SSN defines the chunk in a stream. Note
  • 56. 23.56 In SCTP, acknowledgment numbers are used to acknowledge only data chunks; control chunks are acknowledged by other control chunks if necessary. Note
  • 57. 23.57 Figure 23.31 SCTP packet format
  • 58. 23.58 In an SCTP packet, control chunks come before data chunks. Note
  • 61. 23.61 A connection in SCTP is called an association. Note
  • 62. 23.62 No other chunk is allowed in a packet carrying an INIT or INIT ACK chunk. A COOKIE ECHO or a COOKIE ACK chunk can carry data chunks. Note
  • 64. 23.64 In SCTP, only DATA chunks consume TSNs; DATA chunks are the only chunks that are acknowledged. Note
  • 65. 23.65 Figure 23.34 Simple data transfer
  • 66. 23.66 The acknowledgment in SCTP defines the cumulative TSN, the TSN of the last data chunk received in order. Note
  • 68. 23.68 Figure 23.36 Flow control, receiver site
  • 69. 23.69 Figure 23.37 Flow control, sender site
  • 70. 23.70 Figure 23.38 Flow control scenario
  • 71. 23.71 Figure 23.39 Error control, receiver site
  • 72. 23.72 Figure 23.40 Error control, sender site