Presentation is loading. Please wait.

Presentation is loading. Please wait.

CPSC 601.381 Tutorial: TCP 101 r The Transmission Control Protocol (TCP) is the protocol that sends your data reliably r Used for email, Web, ftp, telnet,

Similar presentations


Presentation on theme: "CPSC 601.381 Tutorial: TCP 101 r The Transmission Control Protocol (TCP) is the protocol that sends your data reliably r Used for email, Web, ftp, telnet,"— Presentation transcript:

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

2 CPSC 601.382 TCP 101 (Cont’d) r TCP is a connection-oriented protocol SYN SYN/ACK ACK GET URL YOUR DATA HERE FIN FIN/ACK ACK

3 CPSC 601.383 TCP 101 (Cont’d) r TCP slow-start and congestion avoidance ACK

4 CPSC 601.384 TCP 101 (Cont’d) r TCP slow-start and congestion avoidance ACK

5 CPSC 601.385 TCP 101 (Cont’d) r TCP slow-start and congestion avoidance ACK

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

7 CPSC 601.387 Tutorial: TCP 201 r There is a beautiful way to plot and visualize the dynamics of TCP behaviour r Called a “TCP Sequence Number Plot” r 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

8 CPSC 601.388 Time SeqNum X + Key: X Data Packet + Ack Packet X X X X X X X X X X X X X + + + + + + + + + + + + +

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

10 CPSC 601.3810 Time SeqNum X + Key: X Data Packet + Ack Packet X X X X X X X X X X X X X + + + + + + + + + + + + +

11 CPSC 601.3811 Time SeqNum X + Key: X Data Packet + Ack Packet X X X X X X X X X X X X + + + + + + + + + + + + ?

12 CPSC 601.3812 Time SeqNum X + Key: X Data Packet + Ack Packet X X X X X X X X X X X X + + + + + + + + + + + + X +

13 CPSC 601.3813 Time SeqNum X + Key: X Data Packet + Ack Packet X X X X X X X X X X X X X + + + + + + + + + + + + +

14 CPSC 601.3814 Time SeqNum X + Key: X Data Packet + Ack Packet X X X X X X X X X X X X + + + + + + + + + + + ?

15 CPSC 601.3815 Time SeqNum X + Key: X Data Packet + Ack Packet X X X X X X X X X X X X X + + + + + + + + ++ + + +

16 CPSC 601.3816 Time SeqNum X + Key: X Data Packet + Ack Packet X X X X X X X X X X X X X + + + + + + + + + + + + +

17 CPSC 601.3817 Time SeqNum X + Key: X Data Packet + Ack Packet X X X X X X X X X X X X + + + + + + + + + ?

18 CPSC 601.3818 Time SeqNum X + Key: X Data Packet + Ack Packet X X X X X X X X X X X X + + + + + + + ++++ + X +

19 CPSC 601.3819 Time SeqNum X + Key: X Data Packet + Ack Packet X X X X X X X X X X X X X + + + + + + + + + + + + +

20 CPSC 601.3820 Time SeqNum X + Key: X Data Packet + Ack Packet X + ?

21 CPSC 601.3821 Time SeqNum X + Key: X Data Packet + Ack Packet X X X + + + X X X + + + X + X + X +

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


Download ppt "CPSC 601.381 Tutorial: TCP 101 r The Transmission Control Protocol (TCP) is the protocol that sends your data reliably r Used for email, Web, ftp, telnet,"

Similar presentations


Ads by Google