1 / 37

TCP Plots

TCP Plots. Slides originally from Williamson at Calgary Minor modifications are made. Tutorial: TCP 101. The Transmission Control Protocol (TCP) is the protocol that sends your data reliably Used for email, Web, ftp, telnet, p2p,…

cora
Download Presentation

TCP Plots

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 Plots • Slides originally from Williamson at Calgary • Minor modifications are made CPSC 601.38

  2. Tutorial: TCP 101 • The Transmission Control Protocol (TCP) is the protocol that sends your data reliably • Used for email, Web, ftp, telnet, p2p,… • Makes sure that data is received correctly: right data, right order, exactly once • Detects and recovers from any problems that occur at the IP network layer • Mechanisms for reliable data transfer: sequence numbers, acknowledgements, timers, retransmissions, flow control... CPSC 601.38

  3. SYN SYN/ACK ACK GET URL FIN FIN/ACK ACK TCP 101 (Cont’d) • TCP is a connection-oriented protocol YOUR DATA HERE Web Client Web Server CPSC 601.38

  4. ACK TCP 101 (Cont’d) • TCP slow-start and congestion avoidance CPSC 601.38

  5. ACK TCP 101 (Cont’d) • TCP slow-start and congestion avoidance CPSC 601.38

  6. ACK TCP 101 (Cont’d) • TCP slow-start and congestion avoidance CPSC 601.38

  7. TCP 101 (Cont’d) • This (exponential growth) “slow start” process continues until either: • packet loss: after a brief recovery phase, you enter a (linear growth) “congestion avoidance” phase based on slow-start threshold found • limit reached: slow-start threshold, or maximum advertised receive window size • all done: terminate connection and go home CPSC 601.38

  8. Tutorial: TCP 201 • There is a beautiful way to plot and visualize the dynamics of TCP behaviour • Called a “TCP Sequence Number Plot” • Plot packet events (data and acks) as points in 2-D space, with time on the horizontal axis, and sequence number on the vertical axis • Example: Consider a 14-packet transfer CPSC 601.38

  9. + Key: X Data Packet + Ack Packet X + X + X + X + X SeqNum + X + X X + + X + X + X + X + X + X Time CPSC 601.38

  10. So What? • What can it tell you? • Everything!!! CPSC 601.38

  11. + Key: X Data Packet + Ack Packet X + X + X + X + X SeqNum + X + X X + + X + X + X + X + X + X Time RTT CPSC 601.38

  12. + Key: X Data Packet + Ack Packet X + X + X + X + X SeqNum + X + X X + + X + X + X TCP Seg. Size + X + X + X Time CPSC 601.38

  13. + Key: X Data Packet + Ack Packet X + X + X + X + X SeqNum + X + X X + + X + X + X + X + X + X Time TCP Connection Duration CPSC 601.38

  14. + Key: X Data Packet + Ack Packet X + X + X + X + X SeqNum + X + X X + Num Bytes Sent + X + X + X + X + X + X Time CPSC 601.38

  15. + Key: X Data Packet + Ack Packet X + X + X + X + X SeqNum + X + X Bytes Avg Throughput (Bytes/Sec) X + + X + X + X + X + X + X Sec Time CPSC 601.38

  16. + Key: X Data Packet + Ack Packet X + X + X + X + X Access Network Bandwidth (Bytes/Sec) SeqNum + X + X X + + X + X + X + X + X + X Time CPSC 601.38

  17. + Key: X Data Packet + Ack Packet X + X + X + X + X SeqNum + X + X X + + X Sender’s Flow Control Window Size + X + X + X + X + X Time CPSC 601.38

  18. + Key: X Data Packet + Ack Packet X + X + X + X + X SeqNum + X + X TCP Slow Start X + + X + X + X + X + X + X Time CPSC 601.38

  19. + Key: X Data Packet + Ack Packet X + X X + X X SeqNum + X X X + X Delayed ACK + X X + X X + X Time CPSC 601.38

  20. Key: X Data Packet + Ack Packet X + + X + Packet Loss X SeqNum + X + X X + + Duplicate ACK X + X + X + X + X + X Time CPSC 601.38

  21. Cumulative ACK Key: X Data Packet + Ack Packet + X X + + X + X SeqNum + X + Retransmit X X + + X + X + X + X + X + X Time CPSC 601.38

  22. Key: X Data Packet + Ack Packet + X X + + X + X SeqNum + X + X X + + X + X + X + X + X + X Time RTO (Retranmission Timeout) CPSC 601.38

  23. TCP 201 (Cont’d) • What happens when a packet loss occurs? • Quiz Time... • Consider a 14-packet Web document • For simplicity, consider only a single packet loss CPSC 601.38

  24. + Key: X Data Packet + Ack Packet X + X + X + X + X SeqNum + X + X X + + X + X + X + X + X + X Time CPSC 601.38

  25. ? Key: X Data Packet + Ack Packet + X + X + X + X SeqNum + X + X X + + X + X + X + X + X + X Time CPSC 601.38

  26. + X Key: X Data Packet + Ack Packet + X + X + X + X SeqNum + X + X X + + X + X + X + X + X + X Time CPSC 601.38

  27. + Key: X Data Packet + Ack Packet X + X + X + X + X SeqNum + X + X X + + X + X + X + X + X + X Time CPSC 601.38

  28. Key: X Data Packet + Ack Packet X ? + X + X + X SeqNum + X + X X + + X + X + X + X + X + X Time CPSC 601.38

  29. + Key: X Data Packet + Ack Packet X X + + X + X + X SeqNum + X + X X + + X + X + X + X + X + X Time CPSC 601.38

  30. + Key: X Data Packet + Ack Packet X + X + X + X + X SeqNum + X + X X + + X + X + X + X + X + X Time CPSC 601.38

  31. Key: X Data Packet + Ack Packet X X X ? + X SeqNum + X + X X + + X + X + X + X + X + X Time CPSC 601.38

  32. + Key: X Data Packet + Ack Packet X X X X + + + + X SeqNum + X + X X + + X + X + X + X + X + X Time CPSC 601.38

  33. + Key: X Data Packet + Ack Packet X + X + X + X + X SeqNum + X + X X + + X + X + X + X + X + X Time CPSC 601.38

  34. Key: X Data Packet + Ack Packet SeqNum ? + X + X Time CPSC 601.38

  35. X X + + X + + X Key: X Data Packet + Ack Packet SeqNum + X + X X X + + + X + X Time CPSC 601.38

  36. TCP 201 (Cont’d) • Main observation: • “Not all packet losses are created equal” • Losses early in the transfer have a huge adverse impact on the transfer latency • Losses near the end of the transfer always cost at least a retransmit timeout • Losses in the middle may or may not hurt, depending on congestion window size at the time of the loss CPSC 601.38

  37. Congratulations! • You are now a TCP expert! • Or you are so confused now that you will finally take my advice and buy the TCP book and read through some chapters CPSC 601.38

More Related