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
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
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
Service provided by TCP Connection-Oriented service Point-to-point Complete Reliability Full-duplex communication Stream interface Reliable Connection Startup Graceful Connection Shutdown
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
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
Achieving Reliability The major problems in the reliable delivery are: Unreliable delivery by the underlying communication system System reboot
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.
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.
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.
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
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
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