2. TRANSPORT LAYER
Process-to-Process Delivery: UDP, TCP and SCTP
Slide 2Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
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.
3. Figure 23.1 Types of data deliveries
Slide 3Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
4. Figure 23.2 Port numbers
Slide 4Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
5. Figure 23.3 IP addresses versus port numbers
Slide 5Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
6. Figure 23.4 IANA ranges
Slide 6Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
7. Figure 23.5 Socket address
Slide 7Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
8. Figure 23.6 Multiplexing and demultiplexing
Slide 8Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
9. Figure 23.7 Error control
Slide 9Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
10. Figure 23.8 Position of UDP, TCP and SCTP in TCP/IP suite
Slide 10Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
11. UDP Connectionless & Unreliable Transport Protocol
Slide 11Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
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.
12. Table 23.1 Well-known ports used with UDP
Slide 12Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
13. Figure 23.9 User datagram format
Slide 13Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
14. Figure 20.5 IPv4 datagram format
Slide 14Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
15. Figure 23.10 Pseudoheader for checksum calculation
Slide 15Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
16. Figure 23.11 Checksum calculation of a simple UDP user datagram
Slide 16Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
17. Figure 23.12 Queues in UDP
Slide 17Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
18. TCP (Transmission Control Protocol)
Slide 18Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
TCP is a connection-oriented, reliable protocol; it creates a virtual
connection between two TCPs to send data. In addition, TCP uses flow
control and error control mechanisms at the transport level.
19. Table 23.2 Well-known ports used with TCP
Slide 19Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
20. Figure 23.13 Stream delivery
Slide 20Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
21. Figure 23.14 Sending and receiving buffers
Slide 21Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
22. Figure 23.15 TCP segments
Slide 22Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
23. TCP Features Numbering System
Slide 23Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
24. TCP Features: Numbering System Example 23.3
Slide 24Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
Suppose a TCP connection is transferring a file of 5000 bytes. The first byte
is numbered 10,001. What are the sequence numbers for each segment if
data are sent in five segments, each carrying 1000 bytes?
The following shows the sequence number for each segment:
25. TCP Features Numbering System
Slide 25Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
26. Figure 23.16 TCP segment format
Slide 26Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
27. Figure 23.17 Control field
Slide 27Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
28. Table 23.3 Description of flags in the control field
Slide 28Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
29. Figure 23.18 Connection establishment using three-way handshaking
Slide 29Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
30. TCP Connection Establishment Three-Way Handshaking
Slide 30Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
31. Figure 23.19 Data transfer
Slide 31Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
32. Figure 23.20 Connection termination using three-way handshaking
Slide 32Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
33. Figure 23.20 Connection termination using three-way handshaking
Slide 33Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
34. Figure 23.21 Half-close
Slide 34Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
35. Figure 23.22 Sliding window
Slide 35Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
36. Flow Control Sliding window
Slide 36Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
37. Flow Control Sliding window
Slide 37Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
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?
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.
38. Flow Control Sliding window
Slide 38Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
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?
The size of the window is the smaller of rwnd and cwnd, which is
3000 bytes.
39. Flow Control Sliding window
Slide 39Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
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.
40. Figure 23.23 Example 23.6
Slide 40Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
41. Flow Control Sliding window
Slide 41Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
44. Error Control Out-of-Order Segments
Slide 44Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
45. Figure 23.24 Normal operation
Slide 45Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
46. Figure 23.25 Lost segment
Slide 46Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
47. Figure 23.25 Lost segment
Slide 47Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
48. Figure 23.26 Fast retransmission
Slide 48Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
49. SCTP Stream Control Transmission Protocol
Slide 49Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
Stream Control Transmission Protocol (SCTP) is a new reliable, message-
oriented transport layer protocol. SCTP, however, is mostly designed for
Internet applications that have recently been introduced. These new
applications need a more sophisticated service than TCP can provide.
50. Table 23.4 Some SCTP applications
Slide 50Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
51. Figure 23.27 Multiple-stream concept
Slide 51Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
52. Figure 23.28 Multihoming concept
Slide 52Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
53. SCTP Features
Transmission Sequence Number, Stream Identifier, Stream Sequence Number
Slide 53Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
54. Figure 23.29
Comparison between a TCP segment and an SCTP packet
Slide 54Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
55. SCTP Features Packets
Slide 55Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
56. Figure 23.30 Packet, data chunks, and streams
Slide 56Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT
57. SCTP Features Acknowledgement Number
Slide 57Presented by Pankaj Debbarma, Asstt. Prof.
Deptt. of Computer Science & Engineering, TIT