Presentation is loading. Please wait.

Presentation is loading. Please wait.

Process-to-Process Delivery

Similar presentations


Presentation on theme: "Process-to-Process Delivery"— Presentation transcript:

1 Process-to-Process Delivery
UDP - TCP

2 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.

3 Table 23.1 Well-known ports used with UDP
23.13

4 Figure 23.9 User datagram format

5 UDP length = Total length – UDP header’s length
Note UDP length = Total length – UDP header’s length 23.17

6 Example The following is a UDP header in hexadecimal format.
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. What is the process?

7 Example Continued Solution
a. The source port number is the first four hexadecimal digits (CB84)16 or b. The destination port number is the second four hexadecimal digits (000D)16 or 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. The client process is the Daytime.

8 Example A UDP header in hexadecimal format 06 32 00 0D 01 1C E2 17
What is the source port number? What is the destination port number? What is the total length of the user datagram? What is the length of the data? What is the process?

9 Figure 23.10 Pseudo header for checksum calculation
23.18

10 Example 23.2 Figure 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 pseudo header as well as the padding will be dropped when the user datagram is delivered to IP. 23.19

11 Figure 23.11 Checksum calculation of a simple UDP user datagram

12 TCP (Transmission control protocol)
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. 23.25

13 Table 23.2 Well-known ports used by TCP
23.26

14 Example Suppose a TCP connection is transferring a file of 5,000 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 1,000 bytes? Solution The following shows the sequence number for each segment:

15 Example 23.3 The following shows the sequence number for each segment:
23.31

16 Establishing a TCP Connection
SYN Each host tells its ISN to the other host. SYN ACK ACK Data Data Three-way handshake to establish connection Host A sends a SYN (open) to the host B Host B returns a SYN acknowledgment (SYN ACK) Host A sends an ACK to acknowledge the SYN ACK 16

17 TCP Header Data Source port Destination port Sequence number Flags:
SYN FIN RST PSH URG ACK Acknowledgment HdrLen Flags Advertised window Checksum Urgent pointer Options (variable) Data 17

18 Step 1: A’s Initial SYN Packet
A’s port B’s port A’s Initial Sequence Number Flags: SYN FIN RST PSH URG ACK Acknowledgment 20 Flags Advertised window Checksum Urgent pointer Options (variable) A tells B it wants to open a connection… 18

19 Step 2: B’s SYN-ACK Packet
B’s port A’s port B’s Initial Sequence Number Flags: SYN FIN RST PSH URG ACK A’s ISN plus 1 20 Flags Advertised window Checksum Urgent pointer Options (variable) B tells A it accepts, and is ready to hear the next byte… 19

20 Step 3: A’s ACK of the SYN-ACK
A’s port B’s port Sequence number Flags: SYN FIN RST PSH URG ACK B’s ISN plus 1 20 Flags Advertised window Checksum Urgent pointer Options (variable) A tells B it wants is okay to start sending 20

21 Figure 23.18 Connection establishment using three-way handshaking
23.39

22 Window size Amount that can be sent without acknowledgment. Receiver needs to be able to store this amount of data.

23 cwnd: congestion window
Figure Sliding window rwnd: receiver window cwnd: congestion window 23.49

24 Example 23.5 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? Solution The size of the window is the smaller of rwnd and cwnd, which is 3000 bytes. 23.52

25 Example 23.6 The sender has sent bytes up to 202.
We assume that cwnd is 20 .The receiver has sent an acknowledgment number of 200 with an rwnd of 9 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. 23.53

26 Figure Example 23.6 23.54

27

28


Download ppt "Process-to-Process Delivery"

Similar presentations


Ads by Google