TCP/IP

1,789 views
1,745 views

Published on

introduction to TCP/IP

Published in: Education
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,789
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
135
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

TCP/IP

  1. 1. Introduction TCP: Major Transport Protocol in the TCP/IP suite Uses unreliable datagram service offered by IP when sending data to another computer Provides reliable data delivery service to applications
  2. 2. The Need for Reliable Transport Reliability is fundamental in a computer system Software in the internet must provide the same level of reliability as a computer system Software must guarantee prompt and reliable communication without any loss, duplication, and change in the order
  3. 3. Transmission Control Protocol Reliability is the responsibility of the Transport Layer In TCP/IP, TCP provides reliable transport service Most internet applications use TCP as no other protocol has proved to work better
  4. 4. Service provided by TCP Connection-Oriented service Point-to-point Complete Reliability Full-duplex communication Stream interface Reliable Connection Startup Graceful Connection Shutdown
  5. 5. End-to-End Service and Datagrams  Applications can request a connection  TCP connections are called Virtual Connections  Created by Software only  Internet does not provide software or hardware support for the connections  TCP software modules on two computers create an illusion of a connection
  6. 6. End-to-End Service and Datagrams  TCP uses IP to carry messages  TCP message encapsulated in IP datagram and sent to the destination  On the destination host, IP passes the contents to TCP
  7. 7. End-to-End Service and Datagrams
  8. 8. Achieving Reliability  The major problems in the reliable delivery are:  Unreliable delivery by the underlying communication system  System reboot
  9. 9. Packet Loss and Retransmission  How does TCP achieve Reliability?  Retransmission  An Acknowledgement is used to verify that data has arrived successfully.  If Acknowledgement does not arrive, the previous data is retransmitted.
  10. 10. Packet Loss and Retransmission
  11. 11. How Long Should TCP Wait Before Retransmitting?  Time for acknowledgement to arrive depends on  Distance to destination  Current traffic conditions  Multiple connections can be opened simultaneously.  Traffic conditions change rapidly.
  12. 12. Adaptive Retransmission  Set a timer. It sounds so easy, but …What time interval?  Too long? – You are spending time waiting for something that is just not going to happen.  Too short? – You will resend needlessly.
  13. 13. Adaptive Retransmission  Keep estimate of round trip time on each connection  Use current estimate to set transmission timer  Know as Adaptive Retransmission  Key to TCP’s success
  14. 14. Comparison of Retransmission Times
  15. 15. Buffers, Flow Control & Windows
  16. 16. Three-Way Handshake to Close a Connection
  17. 17. Three-way Handshake to Begin aConnection  This will not mean much until you look at the packets, but  SYN – Randomly chosen sequence number, S1:0  SYN + ACK – S2:S1+1  ACK – S1+1:S2+1
  18. 18. Congestion Control  The goal is to avoid adding retransmissions to an already congested network  Reduce window size quickly in response to lost messages  Assumption: loss is due to congestion  Resume carefully. Otherwise the network will swing wildly between congestion and under utilization
  19. 19. TCP Segment Format

×