150 likes | 167 Views
Transport Control Protocol (TCP). Features of TCP, packet loss and retransmission, adaptive retransmission, flow control, three way handshake, congestion control. Reliable transport. IP is unreliable Application programmers typically require reliability (although not always)
E N D
Transport Control Protocol (TCP) Features of TCP, packet loss and retransmission, adaptive retransmission, flow control, three way handshake, congestion control
Reliable transport • IP is unreliable • Application programmers typically require reliability (although not always) • The Transmission Control Protocol (TCP) establishes a reliable end-to-end communication service on top of IP
Seven major features of TCP 1. Connection oriented 2. Point to point 3. Complete reliability - delivered as sent 4. Full duplex communication 5. Stream interface 6. Reliable connection startup 7. Graceful connection shutdown
End to end communication • TCP has no knowledge of the underlying Internet structure
Fundamental reliability problems • Unreliable delivery by the communication system (IP) • Unreliable end hosts (e.g., crashes and reboots • TCP handles these through a variety of techniques
Packet loss and retransmission • Sender sets a timer • Receiver sends a acknowledgement • Timeout results in retransmission
Adaptive retransmission • Sensible timer values vary greatly on an Internet • TCP monitors the delay on a connection and adapts the timer • notes time taken to receive acknowledgements • computes weighted average and variance over many transmissions and uses these to set the timer
Flow control • TCP uses a window mechanism • Each end of the connection allocates a buffer and notifies the other end of its size • Receiver sends available window size in each acknowledgement (window advertisement) • Receiver sends window advertisement when the application consumes some data • Zero window advertisement tells the sender to stop transmitting until further notice
Three way handshake • Uses special synchronisation (SYN) and finish (FIN) messages to open and close connections • Also confirms that all data has been received at both sides • Each end of each new connection randomly generates a 32 bit connection identifier
Congestion control • TCP monitors congestion through message loss • first lost message, TCP backs right off and sends just one small message • if this is not lost, doubles data size and sends two • continues exponential growth until half receiver’s window size is reached then slows down rate of increase
TCP segment format • TCP messages are called segments
Example exam question: http://www.cs.nott.ac.uk/~mvr/3-ccn.doc