Unit 4 TCP, UDP, SCTP
Unit 4 TCP, UDP, SCTP
Process-to-Process Delivery:
UDP, TCP, and SCTP
23.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
23.2
Note
23.3
Figure 23.1 Types of data deliveries
23.4
Figure 23.2 Port numbers
23.5
Figure 23.3 IP addresses versus port numbers
23.6
Figure 23.4 IANA ranges
23.7
Figure 23.5 Socket address
23.8
Figure 23.6 Multiplexing and demultiplexing
23.9
Figure 23.7 Error control
23.10
Figure 23.8 Position of UDP, TCP, and SCTP in TCP/IP suite
23.11
23.12
Table 23.1 Well-known ports used with UDP
23.13
Example 23.1
23.14
Example 23.1 (continued)
SNMP uses two port numbers (161 and 162), each for a
different purpose, as we will see in Chapter 28.
23.15
Figure 23.9 User datagram format
UDP length
= IP length – IP header’s length
23.16
Figure 23.10 Pseudoheader for checksum calculation
23.17
Example 23.2
23.18
Figure 23.11 Checksum calculation of a simple UDP user datagram
23.19
UDP Operation
• Connectionless Service:UDP is a
connectionless service. Each user datgram
sent by UDP is an independent datagram, can
travel on a different path.
• Flow & Error Control:No Error Control
mechanism in UDP except Checksum .Means
that sender does not know if a msg has been
lost or duplicated.No Flow Control,so the
receiver overflow with incoming messages.
• Encapsulation & Decapsulation:Udp
protocol encapsulates & decpasulates
messages in an IP Datagram.
23.20
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 23.12 Queues in UDP
23.21
23.22
TCP Services
23.23
Table 23.2 Well-known ports used by TCP
23.24
Figure 23.13 Stream delivery
23.25
Figure 23.14 Sending and receiving buffers
23.26
Figure 23.15 TCP segments
23.27
TCP Features
1. Numbering System
a. Byte Number
b. Sequence Number
c. Aknowledgement Number
2. Flow Control
3. Error Control
4. Congestion Control
23.28
Note
23.29
Example 23.3
23.30
Note
23.31
Note
23.32
Figure 23.16 TCP segment format
23.33
Figure 23.17 Control field
23.34
Table 23.3 Description of flags in the control field
23.35
TCP Connection
1. Connection Establishment
a. Three-way Handshaking
b. SYN Flooding attack(problem in connection establishment)
2. Data Transfer
a. Pushing Data
b. Urgent Data
3. Connection Termination
a. Three-way Handshaking (Full-close):: Asymmetric Release)
b. Half - close :: Symmetric Release
23.36
Figure 23.18 Connection establishment using three-way handshaking
POSTPONE RESOURCE
ALLOCATION UNTIL THE ENTIRE
SETUP::: USING COOKIE
23.37
Note
23.38
Note
23.39
Note
23.40
Figure 23.19 Data transfer
23.41
Figure 23.20 Connection termination using three-way handshaking
23.42
Note
23.43
Note
23.44
Figure 23.21 Half-close
23.45
TCP FLOW CONTROL
23.47
Note
23.48
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.49
Example 23.5
Solution
The size of the window is the smaller of rwnd and cwnd,
which is 3000 bytes.
23.50
Example 23.6
23.51
Figure 23.23 Example 23.6
23.52
Note
23.53
Error Control
23.54
Error detection and correction in TCP is achieved through the
use of three simple tools:
checksum,
acknowledgment,
time-out.
23.55
Note
23.56
Note
In modern implementations, a
retransmission occurs if the
retransmission timer expires or three
duplicate ACK segments have arrived.
23.57
Note
23.58
Note
23.59
Figure 23.24 Normal operation
23.60
Figure 23.25 Lost segment
23.61
Note
23.62
Figure 23.26 Fast retransmission
23.63
23.64
Note
23.65
Table 23.4 Some SCTP applications
23.66
Figure 23.27 Multiple-stream concept
23.67
Note
23.68
Figure 23.28 Multihoming concept
23.69
Note
23.70
Note
23.71
Note
23.72
Note
23.73
Note
23.74
Figure 23.29 Comparison between a TCP segment and an SCTP packet
23.75
Note
23.76
Figure 23.30 Packet, data chunks, and streams
23.77
Note
23.78
Note
23.79
Figure 23.31 SCTP packet format
23.80
Note
23.81
Figure 23.32 General header
23.82
Table 23.5 Chunks
23.83
Note
23.84
Note
23.85
Figure 23.33 Four-way handshaking
23.86
Note
23.87
Figure 23.34 Simple data transfer
23.88
Note
23.89
Figure 23.35 Association termination
23.90
Figure 23.36 Flow control, receiver site
23.91
Figure 23.37 Flow control, sender site
23.92
Figure 23.38 Flow control scenario
23.93
Figure 23.39 Error control, receiver site
23.94
Figure 23.40 Error control, sender site
23.95