1 / 14

TCP Transmission Control Protocol

TCP Transmission Control Protocol. How does TCP provide reliable service over an unreliable network?. Introduction. What is TCP? What is TCP for? The Transport Layer What is required for reliable communications over unreliable media? TCP connections The TCP header Flow Control

liz
Download Presentation

TCP Transmission Control Protocol

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. TCPTransmission Control Protocol How does TCP provide reliable service over an unreliable network?

  2. Introduction • What is TCP? • What is TCP for? • The Transport Layer • What is required for reliable communications over unreliable media? • TCP connections • The TCP header • Flow Control • The “Three Way Handshake” • TCP traffic • The “Graceful close” • Summary

  3. What is TCP? • Transmission Control Protocol • RFC 973 • TCP/IP protocol suite • Connection oriented • Reliable

  4. What is TCP for? “The Transmission Control Protocol (TCP) is intended for use as a highly reliable host-to-host protocol between hosts in packet-switched computer communication networks, and in interconnected systems of such networks.” RFC 793

  5. The Transport Layer OSI ISO TCP/IP Application Application Presentation Session Transport TCP Transport Network Internet Data Link Network Access Physical

  6. Reliable Communications over Unreliable Media • Basic Data Transfer • Reliability • Flow Control • Multiplexing • Connections • Precedence and Security

  7. The TCP Header Source Port Destination Port Sequence Number Acknowledgement Number Data Offset Reserved U R G A C K P S H R S T S Y N F I N Window Checksum Urgent Pointer Options Padding Data

  8. TCP Communications Telnet Telnet TCP Module TCP Module LOGICAL CONNECTION FTP FTP

  9. TCP state diagram

  10. Three way handshake Active open client (Client) Passive open client (Server) LISTEN SYN_SENT ISN = 46 (SEQ = 46)(CTL = SYN) SYN_RECEIVED ISN = 82 AN = 46 + 1 = 47 (SEQ = 82)(ACK = 47)(CTL = SYN, ACK) ESTABLISHED (SEQ = 47)(ACK = 83)(CTL = ACK) ESTABLISHED A B

  11. TCP traffic Segmented byte stream Seg 1 Seg 2 Seg 3 Seg 4 Seg 5 Seg 6 Seg 7 0 1000 1400 2000 2400 2800 3200 4000

  12. Seg 1 1 Seg 1 Seg 3 2 Seg 1 Seg 3 Seg 4 3 Seg 1 Seg 2 Seg 3 Seg 4 4 1400 2000 2400 Flow control Received segments Acknowledgements ACK = 1000 WIN = 1600 ACK = 1000 WIN = 1600 ACK = 1000 WIN = 1600 ACK = 2400 WIN = 1600 0 1000

  13. 2MSL CLOSED Graceful close Active close (Client) Passive close (Server) Application close() (SEQ = 58)(ACK = 94)(CTL = FIN, ACK) CLOSE_WAIT FIN_WAIT_1 EOF to application (SEQ = 94)(ACK = 59)(CTL = ACK) LAST_ACK (SEQ = 94)(ACK = 59)(CTL = FIN, ACK) FIN_WAIT_2 (SEQ = 59)(ACK = 95)(CTL = ACK) TIME_WAIT CLOSED A B

  14. How does TCP provide reliable service over an unreliable network? Connection oriented Recovers from data that is: Damaged Lost Duplicated Out of order Prevents loss of data Reliable Summary

More Related