DOC PREVIEW
CMU 15441 Computer Networking - Lecture

This preview shows page 1-2-3-19-20-39-40-41 out of 41 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

15-441 Computer NetworkingGood Ideas So Far…OutlineSequence Number SpaceEstablishing Connection: Three-Way handshakeTCP Connection Setup ExampleTCP State Diagram: Connection SetupTearing Down ConnectionTCP Connection Teardown ExampleState Diagram: Connection Tear-downSlide 11Reliability ChallengesTCP = Go-Back-N VariantRound-trip Time EstimationOriginal TCP Round-trip EstimatorRTT Sample AmbiguityJacobson’s Retransmission TimeoutTimestamp ExtensionTimer GranularityFast RetransmitSlide 21TCP (Reno variant)SACKSACKPerformance IssuesSlide 26Additive Increase/DecreaseMuliplicative Increase/DecreaseWhat is the Right Choice?TCP Congestion ControlAIMDImplementation IssuePacket ConservationTCP Packet PacingCongestion AvoidanceCongestion Avoidance Sequence PlotCongestion Avoidance BehaviorHow to Change WindowFast RecoveryFast RecoveryImportant Lessons15-441 Computer NetworkingLecture 17 – More TCP & Congestion ControlCopyright ©, 2007-10 Carnegie Mellon University2Good Ideas So Far…•Flow control•Stop & wait•Parallel stop & wait•Sliding window (e.g., advertised windows)•Loss recovery•Timeouts•Acknowledgement-driven recovery (selective repeat or cumulative acknowledgement)•Congestion control•AIMD  fairness and efficiency•How does TCP actually implement these?3Outline•TCP connection setup/data transfer•TCP reliability•TCP congestion avoidance4Sequence Number Space•Each byte in byte stream is numbered.•32 bit value•Wraps around•Initial values selected at start up time•TCP breaks up the byte stream into packets.•Packet size is limited to the Maximum Segment Size•Each packet has a sequence number.•Indicates where it fits in the byte streampacket 8 packet 9 packet 1013450 14950 16050 175505Establishing Connection:Three-Way handshake•Each side notifies other of starting sequence number it will use for sending•Why not simply chose 0?•Must avoid overlap with earlier incarnation•Security issues•Each side acknowledges other’s sequence number•SYN-ACK: Acknowledge sequence number + 1•Can combine second SYN with first ACKSYN: SeqCACK: SeqC+1SYN: SeqSACK: SeqS+1Client Server6TCP Connection Setup Example•Client SYN•SeqC: Seq. #4019802004, window 65535, max. seg. 1260•Server SYN-ACK+SYN•Receive: #4019802005 (= SeqC+1)•SeqS: Seq. #3428951569, window 5840, max. seg. 1460•Client SYN-ACK•Receive: #3428951570 (= SeqS+1)09:23:33.042318 IP 128.2.222.198.3123 > 192.216.219.96.80: S 4019802004:4019802004(0) win 65535 <mss 1260,nop,nop,sackOK> (DF)09:23:33.118329 IP 192.216.219.96.80 > 128.2.222.198.3123: S 3428951569:3428951569(0) ack 4019802005 win 5840 <mss 1460,nop,nop,sackOK> (DF)09:23:33.118405 IP 128.2.222.198.3123 > 192.216.219.96.80: . ack 3428951570 win 65535 (DF)7TCP State Diagram: Connection SetupCLOSEDSYNSENTSYNRCVDESTABLISTENactive OPENcreate TCBSnd SYN create TCBpassive OPENdelete TCBCLOSEdelete TCBCLOSEsnd SYNSENDsnd SYN ACKrcv SYNSend FINCLOSErcv ACK of SYNSnd ACKRcv SYN, ACKrcv SYNsnd ACKClientServer8Tearing Down Connection•Either side can initiate tear down•Send FIN signal•“I’m not going to send any more data”•Other side can continue sending data•Half open connection•Must continue to acknowledge•Acknowledging FIN•Acknowledge last sequence number + 1A BFIN, SeqAACK, SeqA+1ACKDataACK, SeqB+1FIN, SeqB9TCP Connection Teardown Example•Session•Echo client on 128.2.222.198, server on 128.2.210.194•Client FIN•SeqC: 1489294581•Server ACK + FIN•Ack: 1489294582 (= SeqC+1)•SeqS: 1909787689•Client ACK•Ack: 1909787690 (= SeqS+1)09:54:17.585396 IP 128.2.222.198.4474 > 128.2.210.194.6616: F 1489294581:1489294581(0) ack 1909787689 win 65434 (DF)09:54:17.585732 IP 128.2.210.194.6616 > 128.2.222.198.4474: F 1909787689:1909787689(0) ack 1489294582 win 5840 (DF)09:54:17.585764 IP 128.2.222.198.4474 > 128.2.210.194.6616: . ack 1909787690 win 65434 (DF)10State Diagram: Connection Tear-downCLOSINGCLOSEWAITFINWAIT-1ESTABTIME WAITsnd FINCLOSEsend FINCLOSErcv ACK of FINLAST-ACKCLOSEDFIN WAIT-2snd ACKrcv FINdelete TCBTimeout=2mslsend FINCLOSEsend ACKrcv FINsnd ACKrcv FINrcv ACK of FINsnd ACKrcv FIN+ACKACKActive ClosePassive Close11Outline•TCP connection setup/data transfer•TCP reliability•TCP congestion avoidance12Reliability Challenges•Congestion related losses•Variable packet delays•What should the timeout be?•Reordering of packets•How to tell the difference between a delayed packet and a lost one?13TCP = Go-Back-N Variant•Sliding window with cumulative acks•Receiver can only return a single “ack” sequence number to the sender.•Acknowledges all bytes with a lower sequence number•Starting point for retransmission•Duplicate acks sent when out-of-order packet received •But: sender only retransmits a single packet.•Reason???•Only one that it knows is lost•Network is congested  shouldn’t overload it•Error control is based on byte sequences, not packets.•Retransmitted packet can be different from the original lost packet – Why?14Round-trip Time Estimation•Wait at least one RTT before retransmitting•Importance of accurate RTT estimators:•Low RTT estimate•unneeded retransmissions•High RTT estimate•poor throughput•RTT estimator must adapt to change in RTT•But not too fast, or too slow!•Spurious timeouts•“Conservation of packets” principle – never more than a window worth of packets in flight15Original TCP Round-trip Estimator•Round trip times exponentially averaged:•New RTT =  (old RTT) + (1 - ) (new sample)•Recommended value for : 0.8 - 0.9•0.875 for most TCP’s•Retransmit timer set to (b * RTT), where b = 2•Every time timer expires, RTO exponentially backed-off•Not good at preventing spurious timeouts•Why?16RTT Sample Ambiguity•Karn’s RTT Estimator•If a segment has been retransmitted:•Don’t count RTT sample on ACKs for this segment•Keep backed off time-out for next packet•Reuse RTT estimate only after one successful transmissionA BACKSampleRTTOriginal transmissionretransmissionRTOA BOriginal transmissionretransmissionSampleRTTACKRTOX17Jacobson’s Retransmission Timeout•Key observation:•At high loads, round trip variance is high•Solution:•Base RTO on RTT and standard deviation•RTO = RTT + 4 * rttvar•new_rttvar =  * dev + (1- ) old_rttvar•Dev = linear deviation •Inappropriately named – actually smoothed linear deviation18Timestamp Extension•Used to improve timeout


View Full Document

CMU 15441 Computer Networking - Lecture

Documents in this Course
Lecture

Lecture

14 pages

Lecture

Lecture

19 pages

Lecture

Lecture

14 pages

Lecture

Lecture

78 pages

Lecture

Lecture

35 pages

Lecture

Lecture

4 pages

Lecture

Lecture

4 pages

Lecture

Lecture

29 pages

Lecture

Lecture

52 pages

Lecture

Lecture

40 pages

Lecture

Lecture

44 pages

Lecture

Lecture

41 pages

Lecture

Lecture

38 pages

Lecture

Lecture

40 pages

Lecture

Lecture

13 pages

Lecture

Lecture

47 pages

Lecture

Lecture

49 pages

Lecture

Lecture

7 pages

Lecture

Lecture

18 pages

Lecture

Lecture

15 pages

Lecture

Lecture

74 pages

Lecture

Lecture

35 pages

Lecture

Lecture

17 pages

lecture

lecture

13 pages

Lecture

Lecture

21 pages

Lecture

Lecture

14 pages

Lecture

Lecture

53 pages

Lecture

Lecture

52 pages

Lecture

Lecture

40 pages

Lecture

Lecture

11 pages

Lecture

Lecture

20 pages

Lecture

Lecture

39 pages

Lecture

Lecture

10 pages

Lecture

Lecture

40 pages

Lecture

Lecture

25 pages

lecture

lecture

11 pages

lecture

lecture

7 pages

Lecture

Lecture

10 pages

lecture

lecture

46 pages

lecture

lecture

7 pages

Lecture

Lecture

8 pages

lecture

lecture

55 pages

lecture

lecture

45 pages

lecture

lecture

47 pages

lecture

lecture

39 pages

lecture

lecture

33 pages

lecture

lecture

38 pages

lecture

lecture

9 pages

midterm

midterm

16 pages

Lecture

Lecture

39 pages

Lecture

Lecture

14 pages

Lecture

Lecture

46 pages

Lecture

Lecture

8 pages

Lecture

Lecture

40 pages

Lecture

Lecture

11 pages

Lecture

Lecture

41 pages

Lecture

Lecture

38 pages

Lecture

Lecture

9 pages

Lab

Lab

3 pages

Lecture

Lecture

53 pages

Lecture

Lecture

51 pages

Lecture

Lecture

38 pages

Lecture

Lecture

42 pages

Lecture

Lecture

49 pages

Lecture

Lecture

63 pages

Lecture

Lecture

7 pages

Lecture

Lecture

51 pages

Lecture

Lecture

35 pages

Lecture

Lecture

29 pages

Lecture

Lecture

65 pages

Lecture

Lecture

47 pages

Lecture

Lecture

41 pages

Lecture

Lecture

32 pages

Lecture

Lecture

35 pages

Lecture

Lecture

15 pages

Lecture

Lecture

52 pages

Lecture

Lecture

16 pages

Lecture

Lecture

4 pages

lecture

lecture

27 pages

lecture04

lecture04

46 pages

Lecture

Lecture

46 pages

Lecture

Lecture

13 pages

lecture

lecture

41 pages

lecture

lecture

38 pages

Lecture

Lecture

40 pages

Lecture

Lecture

25 pages

Lecture

Lecture

38 pages

lecture

lecture

11 pages

Lecture

Lecture

42 pages

Lecture

Lecture

12 pages

Lecture

Lecture

36 pages

Lecture

Lecture

46 pages

Lecture

Lecture

35 pages

Lecture

Lecture

34 pages

Lecture

Lecture

9 pages

lecture

lecture

49 pages

class03

class03

39 pages

Lecture

Lecture

8 pages

Lecture 8

Lecture 8

42 pages

Lecture

Lecture

20 pages

lecture

lecture

29 pages

Lecture

Lecture

9 pages

lecture

lecture

46 pages

Lecture

Lecture

12 pages

Lecture

Lecture

24 pages

Lecture

Lecture

41 pages

Lecture

Lecture

37 pages

lecture

lecture

59 pages

Lecture

Lecture

47 pages

Lecture

Lecture

34 pages

Lecture

Lecture

38 pages

Lecture

Lecture

28 pages

Exam

Exam

17 pages

Lecture

Lecture

21 pages

Lecture

Lecture

15 pages

Lecture

Lecture

9 pages

Project

Project

20 pages

Lecture

Lecture

40 pages

L13b_Exam

L13b_Exam

17 pages

Lecture

Lecture

48 pages

Lecture

Lecture

10 pages

Lecture

Lecture

52 pages

21-p2p

21-p2p

16 pages

lecture

lecture

77 pages

Lecture

Lecture

18 pages

Lecture

Lecture

62 pages

Lecture

Lecture

25 pages

Lecture

Lecture

24 pages

Project

Project

20 pages

Lecture

Lecture

47 pages

Lecture

Lecture

38 pages

Lecture

Lecture

35 pages

Roundup

Roundup

45 pages

Lecture

Lecture

47 pages

Lecture

Lecture

39 pages

Lecture

Lecture

13 pages

Midterm

Midterm

22 pages

Project

Project

26 pages

Lecture

Lecture

11 pages

Project

Project

27 pages

Lecture

Lecture

10 pages

Lecture

Lecture

50 pages

Lab

Lab

9 pages

Lecture

Lecture

30 pages

Lecture

Lecture

6 pages

r05-ruby

r05-ruby

27 pages

Lecture

Lecture

8 pages

Lecture

Lecture

28 pages

Lecture

Lecture

30 pages

Project

Project

13 pages

Lecture

Lecture

11 pages

Lecture

Lecture

12 pages

Lecture

Lecture

48 pages

Lecture

Lecture

55 pages

Lecture

Lecture

36 pages

Lecture

Lecture

17 pages

Load more
Download Lecture
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?