TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous...
Transcript of TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous...
![Page 1: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/1.jpg)
Recap• TCPconnectionsetup/teardown• Slidingwindow,flowcontrol• Retransmissiontimeouts• Fairness,max-minfairness• AIMDachievesmax-minfairness
81
![Page 2: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/2.jpg)
FeedbackSignals• Severalpossiblesignals,withdifferentpros/cons
– We’lllookatclassicTCPthatusespacketlossasasignal
82
Signal Example Protocol Pros / ConsPacket loss TCP NewReno
Cubic TCP (Linux)Hard to get wrong
Hear about congestion latePacket delay Compound TCP
(Windows)Hear about congestion early
Need to infer congestionRouter
indicationTCPs with Explicit
Congestion NotificationHear about congestion early
Require router support
![Page 3: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/3.jpg)
TCPTahoe/Reno• Avoidcongestioncollapsewithout
changingrouters(orevenreceivers)
• Ideaistofixtimeoutsandintroduceacongestionwindow (cwnd)overtheslidingwindowtolimitqueues/loss
• TCPTahoe/RenoimplementsAIMDbyadaptingcwnd usingpacketlossasthenetworkfeedbacksignal
![Page 4: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/4.jpg)
84
TCPTahoe/Reno(2)• TCPbehaviorswewillstudy:
– ACK clocking– Adaptivetimeout(meanandvariance)– Slow-start– FastRetransmission– FastRecovery
• Together,theyimplementAIMD
![Page 5: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/5.jpg)
SlidingWindowACKClock• Eachin-orderACK advancestheslidingwindowandletsanewsegmententerthenetwork– ACKs “clock”datasegments
Ack 12345678910
20191817161514131211Data
![Page 6: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/6.jpg)
BenefitofACKClocking• Considerwhathappenswhensenderinjectsaburstofsegmentsintothenetwork
86
Fastlink FastlinkSlow(bottleneck)link
Queue
![Page 7: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/7.jpg)
BenefitofACKClocking(2)• Segmentsarebufferedandspreadoutonslowlink
87
Fastlink FastlinkSlow(bottleneck)link
Segments“spreadout”
![Page 8: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/8.jpg)
BenefitofACKClocking(3)• ACKs maintainthespreadbacktotheoriginalsender
88
SlowlinkAcks maintainspread
![Page 9: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/9.jpg)
BenefitofACKClocking(4)• Senderclocksnewsegmentswiththespread
– Nowsendingatthebottlenecklinkwithoutqueuing!
89
Slowlink
Segmentsspread Queuenolongerbuilds
![Page 10: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/10.jpg)
BenefitofACKClocking(4)• Helpsthenetworkrunwithlow
levelsoflossanddelay!
• Thenetworkhassmoothedouttheburstofdatasegments
• ACK clocktransfersthissmoothtimingbacktothesender
• Subsequentdatasegmentsarenotsentinburstssodonotqueueupinthenetwork
![Page 11: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/11.jpg)
91
TCPStartupProblem• Wewanttoquicklyneartherightrate,cwndIDEAL,butitvariesgreatly– Fixedslidingwindowdoesn’tadaptandisroughonthenetwork(loss!)
– AIwithsmallburstsadaptscwndgentlytothenetwork,butmighttakealongtimetobecomeefficient
![Page 12: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/12.jpg)
92
Slow-StartSolution• Startbydoublingcwnd everyRTT
– Exponentialgrowth(1,2,4,8,16,…)– Startslow,quicklyreachlargevalues
AI
Fixed
TimeWindo
w(cwnd
)
Slow-start
![Page 13: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/13.jpg)
93
Slow-StartSolution(2)• Eventuallypacketlosswilloccurwhenthenetworkiscongested– Losstimeouttellsuscwnd istoolarge
– Nexttime,switchtoAIbeforehand– Slowlyadaptcwnd nearrightvalue
![Page 14: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/14.jpg)
Extentofsubtitles
• Question:whatisthecwnd atwhichpacketlosswillhappenduringslowstart?
94
![Page 15: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/15.jpg)
95
Slow-StartSolution(3)• Combinedbehavior,afterfirsttime
– Mosttimespentnearrightvalue
AI
Fixed
Time
Window
ssthresh
cwndC
cwndIDEALAIphase
Slow-start
![Page 16: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/16.jpg)
Slow-Start(Doubling)Timeline
96
Incrementcwndby1packetforeachACK
![Page 17: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/17.jpg)
AdditiveIncreaseTimeline
97
Incrementcwnd by1packeteverycwndACKs(or1RTT)
![Page 18: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/18.jpg)
98
TCPTahoe(Implementation)• Initialslow-start(doubling)phase
– Startwithcwnd =1(orsmallvalue)– cwnd +=1packetperACK
• LaterAdditiveIncreasephase– cwnd +=1/cwnd packetsperACK– Roughlyadds1packetperRTT
• Switchingthreshold(initiallyinfinity)– SwitchtoAIwhencwnd >ssthresh– Setssthresh =cwnd/2afterloss– Beginwithslow-startaftertimeout
![Page 19: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/19.jpg)
Extentofsubtitles
• HowcanweimproveonTCPTahoe?
99
![Page 20: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/20.jpg)
100
TimeoutMisfortunes• Whydoaslow-startaftertimeout?
– InsteadofMDcwnd (forAIMD)
• TimeoutsaresufficientlylongthattheACK clockwillhaverundown– Slow-startrampsuptheACK clock
• WeneedtodetectlossbeforeatimeouttogettofullAIMD– DoneinTCPReno
![Page 21: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/21.jpg)
101
InferringLossfromACKs• TCPusesacumulativeACK
– Carrieshighestin-orderseq.number– Normallyasteadyadvance
• DuplicateACKsgiveushintsaboutwhatdatahasn’tarrived– Tellussomenewdatadidarrive,butitwasnotnextsegment
– Thusthenextsegmentmaybelost
![Page 22: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/22.jpg)
102
FastRetransmit• TreatthreeduplicateACKsasaloss
– Retransmitnextexpectedsegment– Somerepetitionallowsforreordering,butstilldetectslossquickly
Ack 1234555555
![Page 23: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/23.jpg)
FastRetransmit(2)
103
Ack 10Ack 11Ack 12Ack 13
...
Ack 13
Ack 13Ack 13
Data14...Ack 13
Ack 20......
Data20ThirdduplicateACK,sosend14 Retransmissionfills
intheholeat14ACKjumpsafterlossisrepaired
......
Data14waslostearlier,butgot15to20
![Page 24: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/24.jpg)
104
FastRetransmit(3)• Itcanrepairsinglesegmentloss
quickly,typicallybeforeatimeout
• However,wehavequiettimeatthesender/receiverwhilewaitingfortheACKtojump
• AndwestillneedtoMDcwnd …
![Page 25: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/25.jpg)
105
InferringNon-LossfromACKs• DuplicateACKsalsogiveushintsaboutwhatdatahasarrived– EachnewduplicateACKmeansthatsomenewsegmenthasarrived
– Itwillbethesegmentsaftertheloss– Thusadvancingtheslidingwindowwillnotincreasethenumberofsegmentsstoredinthenetwork
![Page 26: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/26.jpg)
106
FastRecovery• Firstfastretransmit,andMDcwnd• ThenpretendfurtherduplicateACKsaretheexpectedACKs– LetsnewsegmentsbesentforACKs– ReconcileviewswhentheACKjumps
Ack 1234555555
![Page 27: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/27.jpg)
FastRecovery(2)
107
Ack 12Ack 13Ack 13
Ack 13Ack 13
Data14Ack 13
Ack 20......
Data20ThirdduplicateACK,sosend14
Data14waslostearlier,butgot15to20
Retransmissionfillsintheholeat14
Setssthresh,cwnd =cwnd/2
Data21Data22
MoreACKsadvancewindow;maysend
segmentsbeforejump
Ack 13
ExitFastRecovery
![Page 28: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/28.jpg)
108
FastRecovery(3)• Withfastretransmit,itrepairsasingle
segmentlossquicklyandkeepstheACKclockrunning
• ThisallowsustorealizeAIMD– Notimeoutsorslow-startafterloss,just
continuewithasmallercwnd
• TCPRenocombinesslow-start,fastretransmitandfastrecovery– MultiplicativeDecreaseis½
![Page 29: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/29.jpg)
TCPReno
109
MDof½,noslow-start
ACKclockrunning
TCPsawtooth
![Page 30: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/30.jpg)
110
TCPReno,NewReno,andSACK• RenocanrepaironelossperRTT
– Multiplelossescauseatimeout
• NewReno furtherrefinesACKheuristics– Repairsmultiplelosseswithouttimeout
• SACKisabetteridea– ReceiversendsACKrangessosender
canretransmitwithoutguesswork
![Page 31: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/31.jpg)
Extentofsubtitles
• Checkoutsimulationat:– http://guido.appenzeller.net/anims/– Or:goo.gl/sqmGWp
111
![Page 32: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/32.jpg)
ComputerNetworks
ExplicitCongestionNotification
![Page 33: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/33.jpg)
113
CongestionAvoidancevs.Control• ClassicTCPdrivesthenetworkintocongestionandthenrecovers– Needstoseelosstoslowdown
• Wouldbebettertousethenetworkbutavoidcongestionaltogether!– Reduceslossanddelay
• Question:howcanwedothiswithroutersupport?
![Page 34: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/34.jpg)
FeedbackSignals• Delayandroutersignalscanletusavoidcongestion
114
Signal Example Protocol Pros / ConsPacket loss Classic TCP
Cubic TCP (Linux)Hard to get wrong
Hear about congestion latePacket delay Compound TCP
(Windows)Hear about congestion early
Need to infer congestionRouter
indicationTCPs with Explicit
Congestion NotificationHear about congestion early
Require router support
![Page 35: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/35.jpg)
ECN(ExplicitCongestionNotification)• Routerdetectstheonsetofcongestionviaitsqueue
– Whencongested,itmarks affectedpackets(IPheader)
115
![Page 36: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/36.jpg)
ECN(2)• Markedpacketsarriveatreceiver;treatedasloss
– TCPreceiverreliablyinformsTCPsenderofthecongestion
116
![Page 37: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/37.jpg)
117
ECN(3)• Advantages:
– Routersdeliverclearsignaltohosts– Congestionisdetectedearly,noloss– Noextrapacketsneedtobesent
• Disadvantages:– Routersandhostsmustbeupgraded
![Page 38: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/38.jpg)
TCPVariants• TherearemanydifferentstrainsofTCPincluding:– Loss-basedcongestioncontrol:Reno,BIC,Cubic– Delay-basedcongestioncontrol:Vegas,Veno,Westwood
– High-speedcongestioncontrol:Scalable,HighSpeed,HTCP
![Page 39: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/39.jpg)
DelayBasedCongestionControl
119
• Basicidea:– Before packetlossoccurs,detecttheearlystageofcongestion intheroutersbetweensourceanddestination
– Additivelydecreasethesendingratewhenincipientcongestionisdetected
![Page 40: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/40.jpg)
TCPVegas
120
• Expected =cwnd/BaseRTT• Actual = cwnd/RTT• DIFF = (Expected-Actual)
BaseRTT:theminimumofallmeasuredRTTif( DIFF*BaseRTT < α )
cwnd = cwnd + 1elseif( DIFF*BaseRTT > β )
cwnd = cwnd – 1elsecwnd = cwnd
RTT:theactualround-triptimeofataggedpacket
αandβareconstantvaluesthataresetbyexperimentation
![Page 41: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/41.jpg)
TCPVegas
121
• ModifiedSlowStart– Trytofindthecorrectwindowsizewithoutincurringaloss
– exponentiallyincreasingitswindoweveryother RTTandusetheotherRTTtocalculateDIFF
– AssoonasVegasdetectsqueuebuildupduringslowstart,ittransitionstocongestionavoidance
![Page 42: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/42.jpg)
Cubic• Twokeymodifications:
– Cubicwindowgrowthwithinflectionpointatcongestionwindowatpreviousloss
– Safeexitforslowstart(i.e.,transitionfromexponentialgrowthtolineargrowth)
![Page 43: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/43.jpg)
Multipath• Mobileuser
– WiFi andcellularatthesametime• High-endservers
– MultipleEthernetcards• Datacenters
– Richtopologieswithmanypaths
• Question:whatarethebenefitsofmultipath?
![Page 44: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/44.jpg)
MultipathTCPProtocol
124
![Page 45: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/45.jpg)
WorkingWithUnmodifiedApps• PresentthesamesocketAPIandexpectations
– Identifiedbythe“fivetuple”(IPaddress,port#,protocol)
From http://queue.acm.org/detail.cfm?id=2591369
![Page 46: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/46.jpg)
WorkingWithUnmodifiedHosts• EstablishtheTCPconnectioninthenormalway
– CreateasockettoasingleremoteIPaddress/port
• Andthenaddmoresubflows,ifpossible
A B
Each host tells its Initial Sequence Number (ISN)
to the other host.
![Page 47: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/47.jpg)
NegotiatingMPTCPCapability• HowdohostsknowtheybothspeakMPTCP?
– Duringthe3-waySYN/SYN-ACK/ACKhandshake
• IfSYN-ACKdoesn’tcontainMP_CAPABLE– Don’ttrytoaddanysubflows!
![Page 48: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/48.jpg)
AddingSubflows,Idealized• Howtoassociateanewsubflow withtheconnection?
– Useatokengeneratedfromoriginalsubflow set-up• Howtostartusingthenewsubflow?
– SimplystartsendingpacketswithnewIP/portpairs– …andassociatethemwiththeexistingconnection
• Howcouldtwoend-pointslearnaboutextraIPaddressesforestablishingnewsubflows?– Implicitly:oneend-pointestablishesanewsubflow,toalready-knownaddress(es)attheotherend-point
![Page 49: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/49.jpg)
SequenceNumbers• Challengesacrosssubflows
– Out-of-orderpacketsduetoRTTdifferences– Accessnetworksthatrewritesequencenumbers– Middleboxes upsetbydiscontinuousTCPbytestream– Needtoretransmitlostpacketsonadifferentsubflow
• Twolevelsofsequencenumbers– Sequencenumberspersubflow– Sequencenumbersfortheentireconnection
• Enables– Efficientdetectionoflossoneachsubflow– Retransmissionoflostpacketonadifferentsubflow
![Page 50: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/50.jpg)
ReceiveBufferSpace• EachTCPconnectionhasareceivebuffer
– Bufferspacetostoreincomingdata– …untilitisreadbytheapplication
• TCPflowcontrol– Receiveradvertisestheavailablebufferspace– …usingthe“receivewindow”
• Shouldeachsubflow haveitsownreceivewindow?– Starvationofsomesubflows inaconnection?– FairnessrelativetootherTCPconnections?– Fragmentationoftheavailablebufferspace?
• Instead,useacommonreceivewindow
![Page 51: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/51.jpg)
FairnessandEfficiencyinMultipathCongestionControl
SlidesfromDamonWischik
![Page 52: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/52.jpg)
Goal#1:FairnessatSharedBottlenecks
Tobefair,MultipathTCPshouldtakeasmuchcapacityasTCPatabottlenecklink,nomatterhowmanypathsitisusing.
A multipath TCP flow with two subflows
RegularTCP
![Page 53: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/53.jpg)
Goal#2:UseEfficientPaths
Eachflowhasachoiceofa1-hopanda2-hoppath.Howshouldsplititstraffic?
12Mb/s
12Mb/s12Mb/s
![Page 54: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/54.jpg)
UseEfficientPaths
Ifeachflowsplititstraffic1:1...
8Mb/s
8Mb/s
8Mb/s
12Mb/s
12Mb/s 12Mb/
s
![Page 55: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/55.jpg)
UseEfficientPaths
Ifeachflowsplititstraffic2:1...
9Mb/s
9Mb/s
9Mb/s
12Mb/s
12Mb/s
12Mb/s
![Page 56: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/56.jpg)
UseEfficientPaths
Better:Eachconnectiononaone-hoppathEachconnectionshouldsendalltrafficontheleast-congestedpaths
12Mb/s
12Mb/s
12Mb/s
12Mb/s
12Mb/s12Mb/s
![Page 57: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/57.jpg)
UseEfficientPaths
Better:Eachconnectiononaone-hoppathEachconnectionshouldsendalltrafficontheleast-congestedpathsButkeepsometrafficonthealternatepathsasaprobe
12Mb/s
12Mb/s
12Mb/s
12Mb/s
12Mb/s12Mb/s
![Page 58: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/58.jpg)
Goal#3:BeFairComparedtoTCP• Least-congestedpathsmaynotbebest!
– Duetodifferencesinround-triptime
• Twopaths– WiFi:highloss,lowRTT– Cellular:lowloss,highRTT
• Usingtheleast-congestedpath– Choosethecellularpath,duetolowloss– But,theRTTishigh– Sothroughputislow!
![Page 59: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/59.jpg)
BeFairComparedtoTCP• Tobefair,MultipathTCPshouldgiveaconnectionatleastasmuchthroughput
asitwouldgetwithasingle-pathTCPonthebestofitspaths.– EnsureincentivefordeployingMPTCP
• AMultipathTCPshouldtakenomorecapacityonanypath(orcollectionofpaths)thanifitwasasingle-pathTCPflowusingthebestofthosepaths.– Donoharm!
![Page 60: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/60.jpg)
AchievingTheseGoals• RegularTCP
– Maintainacongestionwindoww– OnanACK,increaseby1/w(increase1perwindow)– Onaloss,decreasebyw/2
• MPTCP– Maintainacongestionwindowperpathwr– OnanACKonpathr,increasewr– Onalossonpathr,decreasebywr/2
• Howmuchtoincreasewr onanACK??– Ifristheonlypathatthatbottleneck,increaseby1/wr
![Page 61: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/61.jpg)
IfMultiplePathsShareBottleneck?• Don’ttakeanymorebandwidthonalinkthanthebestoftheTCPpathswould
– But,wheremightthebottlenecksbe?– Multiplepathsmightsharethesame bottleneck
• So,considerallpossiblesubsets ofthepaths– SetRofpaths– SubsetSofRthatincludespathr
• E.g.,considerpath3– Supposepaths1,3,and4shareabottleneck– …but,path2doesnot– Then,wecareaboutS={1,3,4}
![Page 62: TCP connection setup/teardown Sliding window, flow control ...–Middleboxesupset by discontinuous TCP byte stream –Need to retransmit lost packets on a different subflow • Two](https://reader034.fdocuments.in/reader034/viewer/2022042913/5f4ba3b1dc07fa2005597b97/html5/thumbnails/62.jpg)
AchievingTheseGoals• Whatisthebest ofthesesubflowsachieving?
– Pathsisachievingthroughputofws/RTTs– Sobestpathisgettingmaxs(ws/RTTs)
• Whattotal bandwidtharethesesubflowsgetting?– Acrossall subflowssharingthatbottleneck– SumoversinSofws/RTTs
• Considertheratio ofthetwo– Increasebylessifmanysubflowsaresharing
• AndpicktheresultsforthesetSwithminratio– Toaccountforthemost pathssharingabottleneck