1 / 41

Computer Communication & Networks

Learn about the User Datagram Protocol (UDP) and Transmission Control Protocol (TCP) in the transport layer, including process-to-process delivery, port numbers, error control, and connection establishment and termination.

hargrove
Download Presentation

Computer Communication & Networks

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. Computer Communication & Networks Lecture 23 & 24 Transport Layer: UDP and TCP http://web.uettaxila.edu.pk/CMS/coeCCNbsSp09/index.asp Waleed Ejaz waleed.ejaz@uettaxila.edu.pk

  2. Transport Layer

  3. Transport Layer Topics to Cover UDP, TCP

  4. Process-to-Process Delivery • 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.

  5. Types of Data Deliveries

  6. Port Numbers

  7. IP addresses versus port numbers

  8. Internet Assigned Number Authority (IANA) Ranges

  9. Socket address

  10. Multiplexing and demultiplexing

  11. Error control

  12. Position of UDP, TCP, and SCTP in TCP/IP suite

  13. User Datagram Protocol (UDP)

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

  15. Well-known ports used with UDP

  16. User Datagram Format

  17. UDP Operation • Connectionless Services • Flow and Error Control • No flow control • No Error Control except Checksum • Encapsulation & Decapsulation

  18. Queues in UDP

  19. TCP

  20. TCP • 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.

  21. Well-known ports used by TCP

  22. Stream delivery

  23. Sending and receiving buffers

  24. TCP segments

  25. Example • The bytes of data being transferred in each connection are numbered by TCP. The numbering starts with a randomly generated number. • The value in the sequence number field of a segment defines the number of the first data byte contained in that segment. • The value of the acknowledgment field in a segment defines the number of the next byte a party expects to receive. The acknowledgment number is cumulative.

  26. TCP segment format 20 to 60 Byte header

  27. Connection establishment using three-way handshaking • A SYN segment cannot carry data, but it consumes one sequence number. • A SYN + ACK segment cannot carry data, but does consume one sequence number. • An ACK segment, if carrying no data, consumes no sequence number.

  28. Data transfer

  29. Connection termination using three-way handshaking • The FIN segment consumes one sequence number if it does not carry data. • The FIN + ACK segment consumes one sequence number if it does not carry data.

  30. Half Close

  31. Sliding Window Protocol • 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.

  32. Example Figure on next slide 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.

  33. Example

  34. Note ACK segments do not consume sequence numbers and are not acknowledged.

  35. Note In modern implementations, a retransmission occurs if the retransmission timer expires or three duplicate ACK segments have arrived.

  36. Note No retransmission timer is set for an ACK segment.

  37. Note 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.

  38. Normal operation

  39. Lost Segment

  40. Note The receiver TCP delivers only ordered data to the process.

  41. Fast Retransmission

More Related