1 / 35

TCP

TCP. Reliable Transport in TCP TCP flow and Congestion Control. Learning objectives. TCP. Application. Application. byte stream. byte stream. segments. Transmitter. Receiver. Send buffer. Receive buffer. ACKs. TCP: Overview.

Télécharger la présentation

TCP

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. TCP

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

  3. TCP

  4. Application Application byte stream byte stream segments Transmitter Receiver Send buffer Receive buffer ACKs TCP: Overview - 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

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

  6. TCP header fields • 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

  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 • 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? Set the appropriate size of sliding window size adaptively

  11. Sliding window/ Transmission window • 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 • 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. Host A Host B SYN, Seq_no = x SYN, Seq_no = y, ACK, Ack_no = x+1 Seq_no = x+1, ACK, Ack_no = y+1 3-way Handshake for connection establishment Closed Active open Listen Established Established

  15. t0 Seq_no = 1, Ack_no = 2000, Win = 2048, No Data t1 Seq_no = 2000, Ack_no = 1, Win = 1024, Data = 2000-3023 t2 Seq_no = 3024, Ack_no = 1, Win = 1024, Data = 3024-4047 t3 Seq_no = 1, Ack_no = 4048, Win = 512, Data = 1-128 t4 Seq_no = 4048, Ack_no = 129, Win = 1024, Data = 4048-4559 TCP Window control

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

  17. Retransmission Timer

  18. Retransmission Timer • 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. Congestion Control Algorithms

  33. TCP Congestion Control figure

  34. TCP Performance Measure

  35. Thank You

More Related