1 / 36

PART V. Transport Layer

PART V. Transport Layer. Position of transport layer. Transport layer duties. Packetizing: Dividing large messages and adding a header Connection control: Connection-oriented or connectionless delivery Addressing Providing reliability: Flow control and error control

Download Presentation

PART V. Transport Layer

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. PART V.Transport Layer Computer Networks

  2. Position of transport layer Computer Networks

  3. Transport layer duties • Packetizing: Dividing large messages and adding a header • Connection control: Connection-oriented or connectionless delivery • Addressing • Providing reliability: Flow control and error control • Congestion control and QoS Computer Networks

  4. Chapter 22. Process-to-Process DeliveryUDP and TCP 22.1 Process-to-Process Delivery 22.2 UDP 22.3 TCP Computer Networks

  5. Types of data deliveries • The transport layer is responsible for process-to-process delivery. • Process (application program ??) Computer Networks

  6. Client-Server Paradigm • Address required for delivery • Transport layer address: port number • Most common process-to-process communication is the client-server paradigm • Operating systems support multiuser and multiprogramming environments. • Local host, local process, remote host, remote process must be defined Addressing Computer Networks

  7. Port numbers • 16 bits between 0 and 65553: ephemeral port number • IANA (Internet Assigned Number Authority) range: well-known ports, registered ports, dynamic ports Computer Networks

  8. IP addresses versus port numbers Computer Networks

  9. Socket address • Process-to-process delivery needs two identifiers, IP address and the port number • Socket address is the combination of an IP address and a port number • A transport-layer protocol needs a pair of socket addresses; the client and server socket address Computer Networks

  10. Multiplexing and demultiplexing • Multiplexing required because of several processes with only one transport-layer protocol Computer Networks

  11. Connection establishment • In the case of connection-oriented service Computer Networks

  12. Connection termination • In the case of connection-oriented service Computer Networks

  13. UDP • UDP is a connectionless, unreliable protocol that has no flow and error control. It uses port numbers to multiplex data from the application layer. • UDP is a convenient transport-layer protocol for applications that provide flow and error control. It is also used by multimedia applications. • The calculation of checksum and its inclusion in the user datagram are optional Computer Networks

  14. Well-known ports used by UDP Computer Networks

  15. Error control • Error control at the data link layer does not guarantee error control at the transport layer. • UDP: connectionless and unreliable • TCP: connection-oriented and reliable Computer Networks

  16. TCP • Transmission Control Protocol • Stream connection-oriented and reliable transport protocol • It adds connection-oriented and reliability features to the services of IP • Like UDP, TCP uses port numbers as transport-layer addresses • Unlike UDP, TCP is a stream-oriented protocol Computer Networks

  17. Well-known ports used by TCP Computer Networks

  18. Sending and receiving buffers • Buffering handles the disparity between the speed of the producing and consuming processes • One example: to use a circular array of 1-byte locations Computer Networks

  19. TCP segments • IP layer needs to send data in packets not as a stream of byte Computer Networks

  20. Sequence number • The bytes of data being transferred in each connection are numbered by TCP. The numbering starts with a randomly generated number. • The value of the sequence number field in 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 • Example: Imagine a TCP connection is transferring a file of 6000 bytes. The first byte is numbered 10010. What are the sequence numbers for each segment if data are sent in five segments with the first four segments carrying 1000 bytes and the last segment carrying 2000 bytes? • Solution: Segment 1==> sequence number: 10,010 (range: 10,010 to 11,009) Segment 2 ==> sequence number: 11,010 (range: 11,010 to 12,009) Segment 3==> sequence number: 12,010 (range: 12,010 to 13,009) Computer Networks

  21. TCP segment format Computer Networks

  22. TCP control field Computer Networks

  23. Three-step connection establishment Computer Networks

  24. Four-step connection termination Computer Networks

  25. States for TCP Computer Networks

  26. State transition diagram • TCP software is implemented as a finite state machine Computer Networks

  27. Sliding windows 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’s sliding windows are byte-oriented. • In TCP, the sender window size is totally controlled by the receiver window value (the number of empty locations in the receiver buffer). However, the actual window size can be smaller if there is congestion in the network. • The source does not have to send a full window’s worth of data. • The size of the window can be increased or decreased by the destination. • The destination can send an acknowledgment at any time. Computer Networks

  28. Sender buffer Receive window Sender buffer and receive window Computer Networks

  29. Sender buffer and sender window Sliding the sender window Computer Networks

  30. Sliding the sender window Computer Networks

  31. Expanding the sender window Shrinking the sender window Computer Networks

  32. Silly window syndrome • When either the sending application creates data slowly or the receiving application consumes data slowly, or both in the sliding window operation • Syndrome created by the sender: • Nagle’s algorithm: accumulate data in the output buffer (simplicity) • Syndrome created by the receiver • Clark’s solution: announce a window size of zero • Delayed acknowledgement Error control • TCP uses three tools: checksum, acknowledgement, and time-out • TCP is no negative acknowledgement in TCP • Lost or corrupted segment, out-of-order segment, lost ACK Computer Networks

  33. Lost segment Computer Networks

  34. Lost acknowledgment Computer Networks

  35. TCP timers • To perform its operation smoothly, TCP uses four timers • Retransmission timer • Retransmission time = 2 X RTT (round-trip time) • RTT = ALPHA(previous RTT) + (1-ALPHA)(current RTT), usually 90% • Karn’s algorithm: when retransmission occurs, RTT ? no update RTT • Persistence timer: To correct the deadlock, for instance, zero window-size announcement case with ACK loss. The sending TCP sends a special segment called a probe Computer Networks

  36. Pushing Data and Urgent Data • The application program on the sending site can request a push operation. This means that the sending TCP should not wait for the window to be filled and must create a segment and send it immediately • The sending TCP can also set the push bit (PSH) to tell the receiving TCP that it must be delivered to the receiving application ASAP. • The sending application wants a piece of data to be read out of order by the receiving application by sending urgent bytes • If URG bit is set, the receiving TCP extracts the urgent data from the segment, using the value of the urgent pointer, and delivers it, out of order, to the receiving application Computer Networks

More Related