1 / 89

Chapter 12

Chapter 12. Transmission Control Protocol. TCP/IP protocol suite. 12.1 TCP SERVICES. It is connection –oriented protocol. It creates a connection between two TCPs to send data. Services provided by TCP/IP:. Process-to-Process Communication Stream Delivery Service

kineta
Download Presentation

Chapter 12

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. Chapter 12 TransmissionControl Protocol TCP/IP Protocol Suite

  2. TCP/IP protocol suite TCP/IP Protocol Suite

  3. 12.1 TCP SERVICES • It is connection –oriented protocol. • It creates a connection between two TCPs to send data. Services provided by TCP/IP: Process-to-Process Communication Stream Delivery Service Full-Duplex Communication Connection-Oriented Service Reliable Service TCP/IP Protocol Suite

  4. Like UDP, TCP provides process-to-process communication using port numbers. Well-known ports used by TCP TCP/IP Protocol Suite

  5. Stream delivery • TCP allows the sending process to deliver data as a stream of bytes & allows the receiving process to obtain data as a stream of bytes. • TCP creates an environment in which two process seem to be connected by an imaginary tube that carries their data across the Internet. TCP/IP Protocol Suite

  6. Sending and receiving buffers • Circular array of 1-byte location. • Sending & receiving buffer. TCP/IP Protocol Suite

  7. TCP segments • Buffer handles disparity between speed of producing & consuming process. • Service provider for TCP send data in packets not in stream of bytes. • Segments are not of same size. TCP/IP Protocol Suite

  8. Full Duplex Communication • As data can flow in both direction at the same time. • Connection Oriented Service • Like UDP, TCP first establish connection between sender & receiver, exchanged data in both direction, connection is terminated. • Reliable Service • It is reliable protocol, uses acknowledgement mechanism to check the safe 7 sound arrival of data. TCP/IP Protocol Suite

  9. 12.2 TCP FEATURES The features of TCP include: Numbering System: Sequence & acknwoledgment number Flow Control: The receiver of the data controls how much data are to be sent by the sender. Error Control: Implements an error control mechanism. Congestion Control: TCP takes into account congestion in the network. TCP/IP Protocol Suite

  10. Note: The bytes of data being transferred in each connection are numbered by TCP. The numbering starts with a randomly generated number. TCP/IP Protocol Suite

  11. Note: The value in the sequence number field of a segment defines the number of the first data byte containedin that segment. TCP/IP Protocol Suite

  12. Note: 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. TCP/IP Protocol Suite

  13. 12.3 SEGMENT • A packet in TCP is called a segment TCP/IP Protocol Suite

  14. TCP segment format 20-60 Bytes TCP/IP Protocol Suite

  15. Control field TCP/IP Protocol Suite

  16. Description of flags in the control field I TCP/IP Protocol Suite

  17. Pseudoheader added to the TCP datagram TCP/IP Protocol Suite

  18. Note: The calculation of the checksum in TCP is mandatory. TCP/IP Protocol Suite

  19. Encapsulation and decapsulation • A TCP segment is encapsulated in an IP datagram , which in turn is encapsulated in a frame at the data link layer. TCP/IP Protocol Suite

  20. 12.4 A TCP CONNECTION • TCP is connection-oriented. • A connection-oriented transport protocol establishes a virtual path between the source and destination. • A connection-oriented transmission requires three phases: connection establishment, data transfer, and connection termination. Three phases include: Connection Establishment Data Transfer Connection Termination Connection Reset TCP/IP Protocol Suite

  21. Connection establishment using three-way handshaking TCP TCP/IP Protocol Suite

  22. Note: A SYN segment cannot carry data, but it consumes one sequence number. TCP/IP Protocol Suite

  23. Note: A SYN + ACK segment cannot carry data, but does consume onesequence number. TCP/IP Protocol Suite

  24. Note: An ACK segment, if carrying no data, consumes no sequence number. TCP/IP Protocol Suite

  25. Data transfer TCP/IP Protocol Suite

  26. Connection termination using three-way handshaking TCP/IP Protocol Suite

  27. Half-close In TCP one end can stop sending data while still receiving data, is called a half close. TCP/IP Protocol Suite

  28. 12.5 STATE TRANSITION DIAGRAM To keep track of all the different events happening during connection establishment, connection termination, and data transfer, the TCP software is implemented as a finite state machine. . TCP/IP Protocol Suite

  29. States for TCP TCP/IP Protocol Suite

  30. State transition diagram TCP/IP Protocol Suite

  31. Common scenario(Connection Establishment & Termination) Maximum segment lifetime TCP/IP Protocol Suite

  32. Note: The common value for MSL is between 30 seconds and 1 minute. TCP/IP Protocol Suite

  33. Three-way handshake • FIN-WAIT-2 Eliminate. • The rest is same as four-way shaking. TCP/IP Protocol Suite

  34. Simultaneous open • Both application (there is no client or server) issues active open. • Both ends need to send SYN segments to each other. • Both TCP goes through SYN-SENT & SYN-RCVD state before established state. TCP/IP Protocol Suite

  35. Simultaneous close • Both end issue an active close. • Both TCP goes to the FIN-WAIT-1 state. • Eliminate the connection establishment & data transfer phase. TCP/IP Protocol Suite

  36. Denying a connection • After resetting the connection, it goes to the LISTEN state to wait for another connection. • Client goes to CLOSED state. TCP/IP Protocol Suite

  37. Aborting a connection • Process can abort a connection instead of closing it. • TCP sends RST+ACK segment • Both TCPs go to the CLOSED state. TCP/IP Protocol Suite

  38. 12.6 FLOW CONTROL • Flow control regulates the amount of data a source can send before receiving an acknowledgment from the destination. • TCP defines a window that is imposed on the buffer of data delivered from the application program. Sliding Window Protocol TCP/IP Protocol Suite

  39. Sliding window • Host uses a window for sending a data. • The bytes inside the window are the bytes that can be in transmit. • The size of the window at one end, is determined by lesser of two values: receiver window(rwnd) or congestion window(cwnd). • Receiver window is no. of bytes the other end can accept before its buffer overflows & data is discarded. • Congestion window is a value determined by the network to avoid congestion. TCP/IP Protocol Suite

  40. Note: 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. TCP/IP Protocol Suite

  41. Note: Some points about TCP’s sliding windows: ❏ The size of the window is the lesser of rwnd and cwnd.❏The source does not have to send a full window’s worth of data.❏ The window can be opened or closed by the receiver, but should not be shrunk.❏ The destination can send an acknowledgment at any time as long as it does not result in a shrinking window.❏ The receiver can temporarily shut down the window; the sender, however, can always send a segment of one byte after the window is shut down. TCP/IP Protocol Suite

  42. 12.7 ERROR CONTROL • TCP provides reliability using error control, which detects corrupted, lost, out-of-order, and duplicated segments. • Error control in TCP is achieved through the use of the checksum, acknowledgment, and time-out. The topics include: Checksum Acknowledgment Acknowledgment Type Retransmission Out-of-Order Segments Some Scenarios TCP/IP Protocol Suite

  43. 12.8 CONGESTION CONTROL • Congestion occurs if the no of packets sent to the network is greater than the capacity of the network. • Congestion control refers to the mechanisms and techniques to keep the load below the capacity. • Congestion happens in any system that involves waiting. TCP/IP Protocol Suite

  44. Router queues TCP/IP Protocol Suite

  45. Packet delay and network load TCP/IP Protocol Suite

  46. Throughput versus network load TCP/IP Protocol Suite

  47. Slow start, exponential increase TCP/IP Protocol Suite

  48. Note: In the slow start algorithm, the size of the congestion window increases exponentially until it reaches a threshold. TCP/IP Protocol Suite

  49. Figure 12.34Congestion avoidance, additive increase TCP/IP Protocol Suite

  50. Note: In the congestion avoidance algorithm the size of the congestion window increases additively until congestion is detected. TCP/IP Protocol Suite

More Related