Presentation is loading. Please wait.

Presentation is loading. Please wait.

TCP. Learning objectives Reliable Transport in TCP TCP flow and Congestion Control.

Similar presentations


Presentation on theme: "TCP. Learning objectives Reliable Transport in TCP TCP flow and Congestion Control."— Presentation transcript:

1 TCP

2 Learning objectives Reliable Transport in TCP TCP flow and Congestion Control

3 TCP

4 - TCP passed block of data to IP, consisting of the TCP header and application layer data, called segment - Stream of octets passed between sender/ receiver  Deliver in same octate sequence - Connection-oriented service - Full duplex - Reliable service byte stream Send buffer segments Receive buffer byte stream Application ACKs Transmitter Receiver TCP: Overview

5 TCP Segment Source Port Destination Port Sequence Number Acknowledgement Number Checksum Urgent Pointer Options Padding 0 4 10 16 24 31 U R G A C K P S H R S T S Y N F I N Header Length Reserved Window Size Data

6 Source, Destination port: 16 bits - identify applications at ends of the connection Client Program allocates a port (usually above 1023) Servers are known by ports number - FTP 20, TELNET 23, SMTP 25, HTTP 80 Port numbers are generally allocated by -- 0 -- not used -- 1- 255 -- Reserved ports for well- known services -- 256- 1023 -- Other reserved ports -- 1024- 65535 -- user- defined server ports Unix store general used ports in /etc/ services TCP header fields

7 Socket Connection identification by 5 tuple --- 2 IP address, 2 port, protocol number (TCP=6) -- Socket IP address is unique to a node, the port is unique on a node A connection is identified by the socket address at its to ends: - client socket: 158. 108.33. 3, 3000; 158.108.2.71,21 - server socket: 158.108.2.71,21; 158.108.33.3,3000;

8 Socket: Multiple connection Server’s unique socket address can be accessed simultaneously by clients

9 TCP: Reliable Transport Send and wait for acknowledgment with sequence number ---sender reset timer when receives ACK No ACK within a certain time, retransmit the packet ---Error Recovery

10 TCP: Reliable Transport Set the appropriate size of sliding window size adaptively Use for flow control : - Prevent sender from overloading receiver with data, e. g. high- performance server to slow PC - Congestion inside network, e. g. router performance, slow link speed How to provide flow control?

11 Receiver “ advertises” it’s windows size in acknowledgments - Window size specifies how many bytes the receiver is willing to accept - Limited by congestion window Sender will adjusts buffer pointer as receiver’s advertisement Sliding window/ Transmission window A larger window size allows more data to be transmitted with pending acknowledgment Need not to wait for acknowledgment every segment

12 Sliding/ Send window buffer

13 Connection Concept Before data could be transferred, a connection must be opened ---servers do passive open (listen) ---clients do active open (connect) When it finished, the connection is closed TCP has general 3 phases -- connection setup phase -- data phase -- connection close phase Socket is stored in „TCP control block“ TCB - with sequence number and timer values

14 3-way Handshake for connection establishment Host AHost B SYN, Seq_no = x SYN, Seq_no = y, ACK, Ack_no = x+1 Seq_no = x+1, ACK, Ack_no = y+1 Active open Closed Listen Established

15 Seq_no = 2000, Ack_no = 1, Win = 1024, Data = 2000-3023 Seq_no = 1, Ack_no = 4048, Win = 512, Data = 1-128 Seq_no = 3024, Ack_no = 1, Win = 1024, Data = 3024-4047 Seq_no = 4048, Ack_no = 129, Win = 1024, Data = 4048-4559 t1t1 t2t2 t3t3 t4t4 Seq_no = 1, Ack_no = 2000, Win = 2048, No Data t0t0 TCP Window control

16 FIN, seq = 5086 ACK = 5087 Data, seq. = 303, ACK = 5087 Deliver 150 bytes FIN, seq. =453, ACK = 5087 ACK = 454 Host B ACK = 453 Connection Termination Host A

17 Retransmission Timer

18 With RTT, Timeout increase

19 RTT Measurement and Timer Backoff

20 TCP Flow and Congestion Control

21 Principle

22 Zero Window Probing

23 Silly Window Syndrome

24 Solutions: Silly Window Syndrome

25 Delayed Acknowledgment

26 Delayed Transmission

27 TCP Congestion Control Algorithm

28 Multiplicative Decrease

29 Additive Increase

30 Congestion Avoidance

31 Congestion Control Algorithms

32

33 TCP Congestion Control figure

34 TCP Performance Measure

35 Thank You


Download ppt "TCP. Learning objectives Reliable Transport in TCP TCP flow and Congestion Control."

Similar presentations


Ads by Google