1 / 28

Process-to-Process Delivery UDP - TCP

Process-to-Process Delivery UDP - TCP. USER DATAGRAM PROTOCOL (UDP).

amandaj
Download Presentation

Process-to-Process Delivery UDP - TCP

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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. 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. ExampleContinued Solution a. The source port number is the first four hexadecimal digits (CB84)16 or 52100. 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 packetminus 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 23.11 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 B • 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 anACK to acknowledge the SYN ACK A SYN Each host tells its ISN to the other host. SYN ACK ACK Data Data 16

  17. Data TCP Header Source port Destination port Sequence number Flags: SYN FIN RST PSH URG ACK Acknowledgment Advertised window HdrLen Flags 0 Checksum Urgent pointer Options (variable) 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 Advertised window 20 Flags 0 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 Advertised window 20 Flags 0 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 Advertised window 20 Flags 0 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. Figure 23.22 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 23.23 Example 23.6 23.54

More Related