beyond tcp: the evolution of internet transport protocols

141
Beyond TCP: The evolu0on of Internet transport protocols Olivier Bonaventure UCL h2p://inl.info.ucl.ac.be Paris, Polytechnique, Jan, 2016

Upload: olivier-bonaventure

Post on 08-Apr-2017

477 views

Category:

Internet


2 download

TRANSCRIPT

Page 1: Beyond TCP: The evolution of Internet transport protocols

BeyondTCP:Theevolu0onofInternettransportprotocols

OlivierBonaventureUCL

h2p://inl.info.ucl.ac.be

Paris,Polytechnique,Jan,2016

Page 2: Beyond TCP: The evolution of Internet transport protocols

Agenda

•  Internettransportprotocols– TCP– SCTP

•  MulKpathTCP– Basicprinciples– Usecases

•  What'snext?– QUIC

Page 3: Beyond TCP: The evolution of Internet transport protocols

TheoriginsofTCP

Source:h2p://spectrum.ieee.org/compuKng/soRware/the-strange-birth-and-long-life-of-unix

Page 4: Beyond TCP: The evolution of Internet transport protocols

TheUnixpipemodel

echo wc1234 abbsbbbs

Page 5: Beyond TCP: The evolution of Internet transport protocols

TheTCPbytestreammodel

Client ServerABCDEF...111232

0988989 ... XYZZ

IP:1.2.3.4 IP:4.5.6.7

Page 6: Beyond TCP: The evolution of Internet transport protocols

TCP

Morethan30yearsold!

Page 7: Beyond TCP: The evolution of Internet transport protocols

CongesKoncollapse

JACOBSON,V.CongesKonavoidanceandcontrol.InProceedingsofSIGCOMM’88(Stanford,CA,Aug.1988),ACM.

Page 8: Beyond TCP: The evolution of Internet transport protocols

Performanceissues

•  TCPconsideredtobetoocomplexbymany– SoRwareimplementaKoncannotcopewithincreasingnetworkbandwidth

•  Forhighperformance,transportshouldbeimplementedinhardware– Transputers– Simplertransportprotocols

Page 9: Beyond TCP: The evolution of Internet transport protocols

MorelimitaKonsofTCP

•  IssueswiththeTCPpipemodel– Onlysupportsasinglebytestream

•  SomeapplicaKonsneedseveralstreamswithprioriKes

– Nosupportformessages– ConnecKonsarea2achedtooneIPaddressonclientandoneIPaddressonserver

•  NofailoverevenifhostshavemulKpleinterfaces•  Nosupportformobility•  NoloadbalancingformulKhomedhosts

Page 10: Beyond TCP: The evolution of Internet transport protocols

SCTP:AnalternaKvetoTCP

Page 11: Beyond TCP: The evolution of Internet transport protocols

SCTPintwoslides

•  Moderntransportprotocol–  CleanerconnecKonestablishment

•  Four-wayhandshaketocounterSYNfloodinga2acks–  Cleanerprotocol

•  FlexibleTLVpacketformatthatiseasytoextend•  SelecKveacknowledgementsfromthestart

–  RichersemanKcs•  Messages,mulKplestreams,unreliabledelivery•  AdvancedAPItoreplacesocketAPI

–  Failoversupport•  ConnecKoncanmovefromoneIPaddresstoanotherone

Page 12: Beyond TCP: The evolution of Internet transport protocols

SCTPconnecKonestablishment

INIT,Itag=1234

INIT-ACK,cookie,ITag=5678

COOKIE-Echo,Vtag=5678,cookie

COOKIE-ACK,Vtag=1234

Encryptstateincookie,Doesnotstoreit

Decryptscookie,Recoverinfotocreatestate

Page 13: Beyond TCP: The evolution of Internet transport protocols

WhatwentwrongwithSCTP?

•  Replacingatransportprotocol

PhysicalDatalinkNetwork

TCPApplication

SCTP

ApplicaKonsmustberewri<enwithnewAPI

IPprotocol=132ForSCTPpackets

Page 14: Beyond TCP: The evolution of Internet transport protocols

DeployingSCTP

•  ApplicaKonsdeveloperswillinvestinSCTPassoonasSCTPisimplementedon– Clients– Servers

Page 15: Beyond TCP: The evolution of Internet transport protocols

TheInternetarchitecturethatweexplaintoourstudents

PhysicalDatalinkNetwork

TransportApplication

O.Bonaventure,Computernetworking:Principles,ProtocolsandPracKce,openebook,h2p://inl.info.ucl.ac.be/cnp3

Physical

PhysicalDatalink

PhysicalDatalinkNetwork

Page 16: Beyond TCP: The evolution of Internet transport protocols

SCTPdeployment

PhysicalDatalinkNetwork

TransportApplication

PhysicalDatalinkNetwork

TransportApplication

PhysicalDatalinkNetwork

PhysicalDatalink

TCPSCTPSCTP SCTP

Page 17: Beyond TCP: The evolution of Internet transport protocols

Inreality

– almostasmanymiddleboxesasrouters– varioustypesofmiddleboxesaredeployed

Sherry,JusKne,etal."Makingmiddleboxessomeoneelse'sproblem:Networkprocessingasacloudservice."ProceedingsoftheACMSIGCOMM2012conference.ACM,2012.

Page 18: Beyond TCP: The evolution of Internet transport protocols

InternetdevicesaccordingtoCisco

h2p://www.cisco.com/web/about/ac50/ac47/2.html

WebSecurityAppliance

NAC Appliance

ACEXMLGateway

Streamer

VPNConcentrator

SSLTerminator

CiscoIOSFirewall

IPTelephonyRouter

PIXFirewallRightandLeR

VoiceGatewayVVVV

ContentEngine

NAT

Page 19: Beyond TCP: The evolution of Internet transport protocols

Middleboxesinthearchitecture

•  Intheofficialarchitecture,theydonotexist•  Inreality...

PhysicalDatalinkNetwork

TransportApplication

PhysicalDatalinkNetwork

TransportApplication

PhysicalDatalinkNetwork

TCP

PhysicalDatalinkNetwork

TransportApplication

Page 20: Beyond TCP: The evolution of Internet transport protocols

TCPsegmentsprocessedbyarouter

Source port Destination port

Checksum Urgent pointer

THL Reserved Flags

Acknowledgment number

Sequence number

Window

Ver IHL ToS Total length

Checksum TTL ProtocolFlags Frag. Offset

Source IP address

Identification

Destination IP address

Payload

Options

Source port Destination port

Checksum Urgent pointer

THL Reserved Flags

Acknowledgment number

Sequence number

Window

Ver IHL ToS Total length

Checksum TTL ProtocolFlags Frag. Offset

Source IP address

Identification

Destination IP address

Payload

Options

IP

TCP

Page 21: Beyond TCP: The evolution of Internet transport protocols

TCPsegmentsprocessedbyaNAT

Source port Destination port

Checksum Urgent pointer

THL Reserved Flags

Acknowledgment number

Sequence number

Window

Ver IHL ToS Total length

Checksum TTL ProtocolFlags Frag. Offset

Source IP address

Identification

Destination IP address

Payload

Options

Source port Destination port

Checksum Urgent pointer

THL Reserved Flags

Acknowledgment number

Sequence number

Window

Ver IHL ToS Total length

Checksum TTL ProtocolFlags Frag. Offset

Source IP address

Identification

Destination IP address

Payload

Options

Page 22: Beyond TCP: The evolution of Internet transport protocols

TCPsegmentsprocessedbyaNAT(2)

•  acKvemodeRpbehindaNAT

220ProFTPD1.3.3dServer(BELNETFTPDServer)[193.190.67.15]Rp_login:user`<null>'pass`<null>'host`Rp.belnet.be'Name(Rp.belnet.be:obo):anonymous--->USERanonymous331Anonymousloginok,sendyourcompleteemailaddressasyourpasswordPassword:--->PASSXXXX--->PORT192,168,0,7,195,120200PORTcommandsuccessful--->LIST150OpeningASCIImodedataconnecKonforfilelistlrw-r--r--1RpRp6Jun12011pub->mirror226Transfercomplete

Page 23: Beyond TCP: The evolution of Internet transport protocols

TCPsegmentsprocessedbyanALGrunningonaNAT

Source port Destination port

Checksum Urgent pointer

THL Reserved Flags

Acknowledgment number

Sequence number

Window

Ver IHL ToS Total length

Checksum TTL ProtocolFlags Frag. Offset

Source IP address

Identification

Destination IP address

Payload

Options

Source port Destination port

Checksum Urgent pointer

THL Reserved Flags

Acknowledgment number

Sequence number

Window

Ver IHL ToS Total length

Checksum TTL ProtocolFlags Frag. Offset

Source IP address

Identification

Destination IP address

Payload

Options

Page 24: Beyond TCP: The evolution of Internet transport protocols

© O. Bonaventure, 2011

HowtransparentistheInternet?•  25thSeptember2010to30thApril2011

•  142accessnetworks•  24countries•  SentspecificTCPsegmentsfromclienttoaserverinJapan

Honda,Michio,etal."Isits=llpossibletoextendTCP?"Proceedingsofthe2011ACMSIGCOMMconferenceonInternetmeasurementconference.ACM,2011.

Page 25: Beyond TCP: The evolution of Internet transport protocols

End-to-endtransparencytoday

Source port Destination port

Checksum Urgent pointer

THL Reserved Flags

Acknowledgment number

Sequence number

Window

Ver IHL ToS Total length

Checksum TTL ProtocolFlags Frag. Offset

Source IP address

Identification

Destination IP address

Payload

Options

Source port Destination port

Checksum Urgent pointer

THL Reserved Flags

Acknowledgment number

Sequence number

Window

Ver IHL ToS Total length

Checksum TTL ProtocolFlags Frag. Offset

Source IP address

Identification

Destination IP address

Payload

Options

Middleboxesdon'tchangetheProtocolfield,but

somediscardpacketswithaProtocolfielddifferentthan

TCPorUDP

Page 26: Beyond TCP: The evolution of Internet transport protocols

Agenda

•  Internettransportprotocols– TCP– SCTP

•  MulKpathTCP– Basicprinciples– Usecases

•  What'snext?– QUIC

Page 27: Beyond TCP: The evolution of Internet transport protocols

TCPConnecKonestablishment•  Three-wayhandshake

SYN,seq=1234,OpKons

SYN+ACK,ack=1235,seq=5678,OpKons

ACK,seq=1235,ack=5679

Page 28: Beyond TCP: The evolution of Internet transport protocols

Datatransfer

seq=1234,"abcd"

ACK,ack=1238,win=4

seq=1238,"efgh"

ACK,ack=1242,win=0

Page 29: Beyond TCP: The evolution of Internet transport protocols

ConnecKonrelease

seq=1234,"abcd"

RST

Page 30: Beyond TCP: The evolution of Internet transport protocols

ConnecKonrelease

seq=1234,"abcd"

ACK,ack=1239

FIN,ack=350

seq=345,"ijkl"

FIN,seq=1238

FIN,seq=349

Page 31: Beyond TCP: The evolution of Internet transport protocols

MulKpathTCP

•  HowcanweefficientlyusethemulKpleinterfacesthatareavailableontoday'shosts?

Page 32: Beyond TCP: The evolution of Internet transport protocols

DesignobjecKves

•  MulKpathTCPisanevolu=onofTCP

•  DesignobjecKves– SupportunmodifiedapplicaKons– Workovertoday’snetworks(IPv4andIPv6)– WorksinallnetworkswhereregularTCPworks

Page 33: Beyond TCP: The evolution of Internet transport protocols

TheMul=pathTCPbytestreammodel

33

Client ServerABCDEF...111232

0988989 ... XYZZ

IP:1.2.3.4 IP:4.5.6.7

IP:2.3.4.5 IP:6.7.8.9

BCD A

Page 34: Beyond TCP: The evolution of Internet transport protocols

TheMulKpathTCPprotocol

•  Controlplane– HowtomanageaMulKpathTCPconnecKonthatusesseveralpaths?

•  Dataplane– Howtotransportdata?

•  CongesKoncontrol– HowtocontrolcongesKonovermulKplepaths?

Page 35: Beyond TCP: The evolution of Internet transport protocols

AnaïveMulKpathTCP

SYN+ACK+OpKonACK

seq=123,"abc"

seq=126,"def"

SYN+OpKon

Page 36: Beyond TCP: The evolution of Internet transport protocols

AnaïveMulKpathTCPIntoday'sInternet?

SYN+OpKon

SYN+ACK+OpKonACK

seq=123,"abc"

seq=126,"def"

ThereisnocorrespondingTCPconnecKon

Page 37: Beyond TCP: The evolution of Internet transport protocols

Designdecision

– AMul=pathTCPconnec=oniscomposedofoneormoreregularTCPsubflowsthatarecombined

•  EachhostmaintainsstatethatgluestheTCPsubflowsthatcomposeaMulKpathTCPconnecKontogether

•  EachTCPsubflowissentoverasinglepathandappearslikearegularTCPconnecKonalongthispath

Page 38: Beyond TCP: The evolution of Internet transport protocols

MulKpathTCPandthearchitecture

PhysicalDatalinkNetwork

TransportApplication MulKpathTCP

TCP1

socket

TCP2 TCPn...

Application

A.Ford,C.Raiciu,M.Handley,S.Barre,andJ.Iyengar,“ArchitecturalguidelinesformulKpathTCPdevelopment",RFC61822011.

NomodificaKontoeasedeployment

MulKplesubflowstocopewithmiddleboxes

Page 39: Beyond TCP: The evolution of Internet transport protocols

AregularTCPconnecKon

•  WhatisaregularTCPconnecKon?

–  Itstartswithathree-wayhandshake•  SYNsegmentsmaycontainspecialopKons

– Alldatasegmentsaresentinsequence•  Thereisnogapinthesequencenumbers

–  ItisterminatedbyusingFINorRST

Page 40: Beyond TCP: The evolution of Internet transport protocols

MulKpathTCPSYN+OpKon

SYN+ACK+OpKonACK

SYN+OtherOpKon

SYN+ACK+OtherOpKonACK

Page 41: Beyond TCP: The evolution of Internet transport protocols

HowtocombinetwoTCPsubflows?

SYN+OpKon

SYN+ACK+OpKonACK

SYN+OtherOpKonSYN+ACK+OtherOpKon

ACK

Howtolinkwithbluesubflow?

Page 42: Beyond TCP: The evolution of Internet transport protocols

TCP101IdenKficaKonofaTCPconnecKon

Fourtuple–  IPsource–  IPdest– Portsource– PortdestAllTCPsegmentscontainthefourtuple

Source port Destination port

Checksum Urgent pointer

THL Reserved Flags

Acknowledgment number

Sequence number

Window

Ver IHL ToS Total length

Checksum TTL ProtocolFlags Frag. Offset

Source IP address

Identification

Destination IP address

Payload

Options

IP

TCP

Page 43: Beyond TCP: The evolution of Internet transport protocols

HowtolinkTCPsubflows?SYN,Portsrc=1234,Portdst=80+OpKon

SYN+ACK[...]

ACK

SYN,Portsrc=1235,Portdst=80+OpKon[linkPortsrc=1234,Portdst=80]

ANATcouldchangeaddressesandportnumbers

Page 44: Beyond TCP: The evolution of Internet transport protocols

HowtolinkTCPsubflows?SYN,Portsrc=1234,Portdst=80+OpKon[Token=5678]

SYN+ACK+OpKon[Token=6543]ACK

SYN,Portsrc=1235,Portdst=80+OpKon[Token=6543]

MyToken=5678YourToken=6543

MyToken=6543YourToken=5678

Page 45: Beyond TCP: The evolution of Internet transport protocols

TCPsubflows

•  WhichsubflowscanbeassociatedtoaMulKpathTCPconnecKon?– Atleastoneoftheelementsofthefour-tupleneedstodifferbetweentwosubflows

•  LocalIPaddress•  RemoteIPaddress•  Localport•  Remoteport

Page 46: Beyond TCP: The evolution of Internet transport protocols

TCPsubflowsinpracKce

•  MulKpathTCPsupportssubflowagility– Client/servercanaddsubflowsatanyKme– Client/servercanremovesubflowsatanyKme

Page 47: Beyond TCP: The evolution of Internet transport protocols

TheMulKpathTCPprotocol

•  Controlplane– HowtomanageaMulKpathTCPconnecKonthatusesseveralpaths?

•  Dataplane– Howtotransportdata?

•  CongesKoncontrol– HowtocontrolcongesKonovermulKplepaths?

Page 48: Beyond TCP: The evolution of Internet transport protocols

Howtotransferdata?seq=123,"a"

seq=124,"b"

seq=125,"c"

seq=126,"d"

ack=124

ack=126

ack=125

ack=127

Page 49: Beyond TCP: The evolution of Internet transport protocols

Howtotransferdataintoday'sInternet?

seq=123,"a"

seq=124,"b"

seq=125,"c"ack=124

ack=126

ack=125

GapinsequencenumberingspaceSomeDPIwillnotallowthis!

Page 50: Beyond TCP: The evolution of Internet transport protocols

MulKpathTCPDatatransfer

•  Twolevelsofsequencenumbers

MulKpathTCP

TCP1

socket

TCP2

MulKpathTCP

TCP1

socket

TCP2

ABCDEF

Datasequence#

TCP1sequence#

TCP2sequence#

Page 51: Beyond TCP: The evolution of Internet transport protocols

MulKpathTCPDatatransfer

Dseq=0,seq=123,"a"

DSeq=1,seq=456,"b"

DSeq=2,seq=124,"c"DAck=1,ack=124

DAck=3,ack=125

DAck=2,ack=457

Page 52: Beyond TCP: The evolution of Internet transport protocols

MulKpathTCPHowtodealwithlosses?

•  DatalossesoveroneTCPsubflow– FastretransmitandKmeoutasinregularTCP

Dseq=0,seq=123,"a"

DAck=1,ack=124Dseq=0,seq=123,"a"

DAck=1,ack=124

Page 53: Beyond TCP: The evolution of Internet transport protocols

MulKpathTCP

•  WhathappenswhenaTCPsubflowfails?Dseq=0,seq=123,"a"

DSeq=1,seq=456,"b"DAck=0,ack=457

Dseq=0,seq=457,"a"

DAck=2,ack=458

Page 54: Beyond TCP: The evolution of Internet transport protocols

RetransmissionheurisKcs

•  HeurisKcsusedbycurrentLinuximplementaKon–  Fastretransmitisperformedonthesamesubflowastheoriginaltransmission

– UponKmeoutexpiraKon,reevaluatewhetherthesegmentcouldberetransmi2edoveranothersubflow

– Uponlossofasubflow,alltheunacknowledgeddataareretransmi2edonothersubflows

Page 55: Beyond TCP: The evolution of Internet transport protocols

Flowcontrol

•  Howshouldthewindow-basedflowcontrolbeperformed?–  IndependantwindowsoneachTCPsubflow

– AsinglewindowthatissharedamongallTCPsubflows

Page 56: Beyond TCP: The evolution of Internet transport protocols

Independantwindows

Dseq=0,seq=123,"a"

DSeq=1,seq=456,"b"DAck=2,ack=457,win=100

Dseq=2,seq=457,"c"

DAck=3,ack=458,win=100

DAck=1,ack=124,win=0

Page 57: Beyond TCP: The evolution of Internet transport protocols

Independantwindowspossibleproblem

•  Impossibletoretransmit,windowisalreadyfullongreensubflow

Dseq=0,seq=123,"a"

DSeq=1,seq=456,"b"DAck=2,ack=457,win=0

Page 58: Beyond TCP: The evolution of Internet transport protocols

Asinglewindowsharedbyallsubflows

Dseq=0,seq=123,"a"

DSeq=1,seq=456,"b"DAck=2,ack=457,win=10

Dseq=2,seq=457,"c"

DAck=3,ack=458,win=10

DAck=1,ack=124,win=10

Page 59: Beyond TCP: The evolution of Internet transport protocols

AsinglewindowsharedbyallsubflowsImpactofmiddleboxes

Dseq=0,seq=123,"a"

DSeq=1,seq=456,"b"DAck=2,ack=457,win=100

DAck=1,ack=124,win=100

DAck=2,ack=457,win=5

Page 60: Beyond TCP: The evolution of Internet transport protocols

MulKpathTCPWindows

•  MulKpathTCPmaintainsonewindowperMulKpathTCPconnecKon– WindowisrelaKvetothelastackeddata(DataAck)– Windowissharedamongallsubflows

•  It'suptotheimplementaKontodecidehowthewindowisshared– Windowistransmi2edinsidethewindowfieldoftheregularTCPheader

–  Ifmiddleboxeschangewindow field,•  uselargestwindowreceivedatMPTCP-level•  usereceivedwindowovereachsubflowtocopewiththeflowcontrolimposedbythemiddlebox

Page 61: Beyond TCP: The evolution of Internet transport protocols

MulKpathTCPbuffers

MulKpathTCP

TCP1

socket

TCP2

Scheduler

Transmitqueues,processonlyregular

TCPheader

Reorderqueue,processesonlyTCPheader

MPTCP-level,resequencingpossible

send(...)recv(...)

Page 62: Beyond TCP: The evolution of Internet transport protocols

SendingMulKpathTCPinformaKon

•  HowtoexchangetheMulKpathTCPspecificinformaKonbetweentwohosts?

•  OpKon1– UseTLVstoencodedataandcontrolinformaKoninsidepayloadofsubflows

•  Op0on2– UseTCPopKonstoencodeallMulKpathTCPinformaKon

OpKon1:MichaelScharf,Thomas-RolfBanniza,MCTCP:AMul=pathTransportShimLayer,GLOBECOM2011

Page 63: Beyond TCP: The evolution of Internet transport protocols

MulKpathTCPwithonlyopKons

•  Advantages–  NormalwayofextendingTCP

–  Shouldbeabletogothroughmiddleboxesorfallback

•  Drawbacks–  limitedsizeoftheTCPopKons,notablyinsideSYN

– WhathappenswhenmiddleboxesdropTCPopKonsindatasegments

Page 64: Beyond TCP: The evolution of Internet transport protocols

MulKpathTCPusingTLV

•  Advantages– MulKpathTCPcouldstartasregularTCPandmovetoMulKpathonlywhenneeded

–  Couldbeimplementedasalibraryinuserspace

–  TLVscanbeeasilyextended

•  Drawbacks–  TCPsegmentscontainTLVsincludingthedataandnotonlythedata

•  problemformiddleboxes,DPI,..

– Middleboxesbecomemoredifficult

MichaelScharf,Thomas-RolfBanniza,MCTCP:AMul=pathTransportShimLayer,GLOBECOM2011

Page 65: Beyond TCP: The evolution of Internet transport protocols

© O. Bonaventure, 2011

IsitsafetouseTCPopKons?

•  KnownopKon(TS)inDatasegments

XD6BHM

Honda,Michio,etal."IsitsKllpossibletoextendTCP?."Proceedingsofthe2011ACMSIGCOMMconferenceonInternetmeasurementconference.ACM,2011.

Page 66: Beyond TCP: The evolution of Internet transport protocols

© O. Bonaventure, 2011

IsitsafetouseTCPopKons?

•  UnknownopKoninDatasegments

XD6BHM

Honda,Michio,etal."IsitsKllpossibletoextendTCP?."Proceedingsofthe2011ACMSIGCOMMconferenceonInternetmeasurementconference.ACM,2011.

Page 67: Beyond TCP: The evolution of Internet transport protocols

MulKpathTCPopKons

•  TCPopKonformat

•  IniKaldesign

– OneopKonkindforeachpurpose(e.g.DataSequencenumber)

•  Finaldesign– Asinglevariable-lengthMulKpathTCPopKon

Kind Length OpKon-specificdata

Page 68: Beyond TCP: The evolution of Internet transport protocols

MulKpathTCPopKon

•  AsingleopKontype–  tominimisetheriskofhavingoneopKonacceptedbymiddleboxesinSYNsegmentsandrejectedinsegmentscarryingdata

Subtype Kind Length

Subtype specific data(variable length)

Page 69: Beyond TCP: The evolution of Internet transport protocols

DatasequencenumbersandTCPsegments

•  HowtotransportDatasequencenumbers?– SamesoluKonasforTCP

•  DatasequencenumberinTCPopKonistheDatasequencenumberofthefirstbyteofthesegment

Source port Destination port

Checksum Urgent pointer

THL Reserved Flags

Acknowledgment number

Sequence number

Window

Payload

Datasequence number

Page 70: Beyond TCP: The evolution of Internet transport protocols

MulKpathTCPDatatransfer

Dseq=0,seq=123,"a"

DSeq=1,seq=456,"b"

DSeq=2,seq=124,"c"DAck=1,ack=124

DAck=3,ack=125

DAck=2,ack=457

Page 71: Beyond TCP: The evolution of Internet transport protocols

WhichmiddleboxeschangeTCPsequencenumbers?

•  SomefirewallschangeTCPsequencenumbersinSYNsegmentstoensurerandomness– fixforoldwindows95bug

•  TransparentproxiesterminateTCPconnecKons

Page 72: Beyond TCP: The evolution of Internet transport protocols

Middleboxinterference

•  Datasegments

Data,seq=12,"ab"

Data,seq=14,"cd"Data,seq=12,"abcd"

SuchamiddleboxcouldalsobethenetworkadapteroftheserverthatusesLROtoimproveperformance.

Page 73: Beyond TCP: The evolution of Internet transport protocols

© O. Bonaventure, 2011

Segmentcoalescing

Honda,Michio,etal."IsitsKllpossibletoextendTCP?."Proceedingsofthe2011ACMSIGCOMMconferenceonInternetmeasurementconference.ACM,2011.

Page 74: Beyond TCP: The evolution of Internet transport protocols

Datasequencenumbersandmiddleboxes

seq=123,Dseq=0,"a"

seq=456,DSeq=1,"b"

seq=124,DSeq=2,"c" seq=123,DSeq=2,"ac"

copiesoneopKonincoalescedsegment

bufferssmallsegments

seq=123,DSeq=0,"ac"

Page 75: Beyond TCP: The evolution of Internet transport protocols

Datasequencenumbersandmiddleboxes

seq=123,Dseq=0,"ab"

DSeq=0,seq=123,"a"

DSeq=0,seq=124,"b"MiddleboxonlyunderstandsregularTCP

Page 76: Beyond TCP: The evolution of Internet transport protocols

A"middlebox"thatbothsplitsandcoalescesTCPsegments

Page 77: Beyond TCP: The evolution of Internet transport protocols

Datasequencenumbersandmiddleboxes

•  HowtoavoiddesynchronisaKonbetweenthebytestreamanddatasequencenumbers?

•  SoluKon– MulKpathTCPopKoncarriesmappingbetweenDatasequencenumbersand(differencebetweenini=alandcurrent)subflowsequencenumbers

•  mappingcoversapartofthebytestream(length)

Page 78: Beyond TCP: The evolution of Internet transport protocols

MulKpathTCPDatatransfer

seq=123,DSS[0->123,len=1],"a"

seq=456,DSS[1->456,len=1],"b"

seq=124,DSS[2->124,len=1],"c"DAck=1,ack=124

DAck=3,ack=125

DAck=2,ack=457

Page 79: Beyond TCP: The evolution of Internet transport protocols

Datasequencenumbersandmiddleboxes

seq=123,DSS[0->123,len=1],"a"

seq=456,DSS[1->456,len=1],"b"

seq=124,DSS[2->124,len=1],"c"

seq=123,DSS[0->123,len=1],"ac"

DAck=2,ack=125

DSeq=0,ack=457

seq=125,DSS[2->125,len=1],"c"

Page 80: Beyond TCP: The evolution of Internet transport protocols

Datasequencenumbersandmiddleboxes

seq=123,DSS[0->123,len=1],"a"

seq=456,DSS[1->456,len=1],"b"

seq=124,DSS[2->124,len=1],"c"

seq=123,DSS[2->124,len=1],"ac"DAck=0,ack=125

seq=125,DSS[0->125,len=1],"a"

DAck=3,ack=126

Page 81: Beyond TCP: The evolution of Internet transport protocols

MulKpathTCPandmiddleboxes

•  WiththeDSSmapping,MulKpathTCPcancopewithmiddleboxesthat– combinesegments– splitsegments

•  AretheythemostannoyingmiddleboxesforMulKpathTCP?

– Unfortunatelynot

Page 82: Beyond TCP: The evolution of Internet transport protocols

© O. Bonaventure, 2011

TCPsequencenumberandmiddleboxes

Honda,Michio,etal."IsitsKllpossibletoextendTCP?."Proceedingsofthe2011ACMSIGCOMMconferenceonInternetmeasurementconference.ACM,2011.

Page 83: Beyond TCP: The evolution of Internet transport protocols

Theworstmiddlebox

•  Isthisanacademicexerciseorreality?

seq=123,DSS[1->123,len=2],"aXXXb"

DAck=3,ack=125

seq=125,DSS[3->125,len=2],"cd"

seq=123,DSS[1->123,len=2],"ab"

DAck=3,ack=128

seq=128,DSS[3->125,len=2],"cd"

Page 84: Beyond TCP: The evolution of Internet transport protocols

Theworstmiddlebox

•  Isunfortunatelyveryold...– AnyALGforaNAT

220ProFTPD1.3.3dServer(BELNETFTPDServer)[193.190.67.15]Rp_login:user`<null>'pass`<null>'host`Rp.belnet.be'Name(Rp.belnet.be:obo):anonymous--->USERanonymous331Anonymousloginok,sendyourcompleteemailaddressasyourpasswordPassword:--->PASSXXXX--->PORT192,168,0,7,195,120200PORTcommandsuccessful--->LIST150OpeningASCIImodedataconnecKonforfilelistlrw-r--r--1RpRp6Jun12011pub->mirror226Transfercomplete

Page 85: Beyond TCP: The evolution of Internet transport protocols

Copingwiththeworstmiddlebox

•  WhatshouldMulKpathTCPdointhepresenceofsuchaworstmiddlebox?– Donothingandignorethemiddlebox

•  butthenthebytestreamandtheapplicaKonwouldbebrokenandthisproblemwillbedifficulttodebugbynetworkadministrators

– Detectthepresenceofthemiddlebox•  andfallbacktoregularTCP(i.e.useasinglepathandnothingfancy)

MulKpathTCPMUSTworkinallnetworkswhereregularTCPworks.

Page 86: Beyond TCP: The evolution of Internet transport protocols

DetecKngtheworstmiddlebox?

•  HowcanMulKpathTCPdetectamiddleboxthatmodifiesthebytestreamandinserts/removesbytes?– VarioussoluKonswereexplored

–  Intheend,MulKpathTCPchosetoincludeitsownchecksumtodetectinserKon/deleKonofbytes

Page 87: Beyond TCP: The evolution of Internet transport protocols

Theworstmiddleboxseq=123,DSS[1->123,len=2,Inv],"aXXXb"

seq=123,DSS[1->123,len=2,V],"ab"

RST,lastDSeq=0RST,lastDSeq=0

seq=456,DSS[1->456,len=2,V],"ab"DAck=3,ack=458

Page 88: Beyond TCP: The evolution of Internet transport protocols

MulKpathTCPDatasequencenumbers

•  Whatshouldbethelengthofthedatasequencenumbers?– 32bits

•  compactandcompaKblewithTCP•  wraparoundproblemathighspeedrequiresPAWS

– 64bits•  wraparoundisnotanissueformosttransferstoday•  takesmorespaceinsideeachsegment

Page 89: Beyond TCP: The evolution of Internet transport protocols

MulKpathTCPDatasequencenumbers

•  DatasequencenumbersandDataacknowledgements– MaintainedinsideimplementaKonas64bitsfield

–  ImplementaKonscan,asanopKmisaKon,onlytransmitthelower32bitsofthedatasequenceandacknowledgements

Page 90: Beyond TCP: The evolution of Internet transport protocols

DataSequenceSignalopKon

CumulaKveDataack

A=DataACKpresenta=DataACKis8octetsM=mappingpresentm=DSNis8

Lengthofmapping,canextendbeyondthissegment

ComputedoverdatacoveredbyenKremapping+pseudoheader

Page 91: Beyond TCP: The evolution of Internet transport protocols

TheMulKpathTCPprotocol

•  Controlplane– HowtomanageaMulKpathTCPconnecKonthatusesseveralpaths?

•  Dataplane– Howtotransportdata?

•  CongesKoncontrol– HowtocontrolcongesKonovermulKplepaths?–  CongesKonwindowsonsubflowsMUSTbecoupledtoensurethatTCPremainsfairwithregularTCP

Page 92: Beyond TCP: The evolution of Internet transport protocols

AIMDinTCP

•  CongesKoncontrolmechanism–  Eachhostmaintainsaconges=onwindow(cwnd)– NocongesKon

•  CongesKonavoidance(addi0veincrease)–  increasecwndbyonesegmenteveryround-trip-Kme

–  CongesKon•  TCPdetectscongesKonbydetecKnglosses•  MildcongesKon(fastretransmit–mul0plica0vedecrease)

–  cwnd=cwnd/2andrestartcongesKonavoidance•  SeverecongesKon(Kmeout)

–  cwnd=1,setslow-start-thresholdandrestartslow-start

Page 93: Beyond TCP: The evolution of Internet transport protocols

EvoluKonofthecongesKonwindow

Cwnd Fast retransmit

ThresholdThreshold

Slow-startexponential increase of cwnd

Congestion avoidance linear increase of cwnd

Fast retransmit

Time

Page 94: Beyond TCP: The evolution of Internet transport protocols

CongesKoncontrolforMulKpathTCP

•  Simpleapproach–  independantcongesKonwindows

ThresholdThreshold

Threshold

Page 95: Beyond TCP: The evolution of Internet transport protocols

IndependantcongesKonwindows

•  Problem

12Mbps

Page 96: Beyond TCP: The evolution of Internet transport protocols

CoupledcongesKoncontrol

•  CongesKonwindowsarecoupled– congesKonwindowgrowthcannotbefasterthanTCPwithasingleflow

– CoupledcongesKoncontrolaimsatmovingtrafficawayfromcongestedpath

Page 97: Beyond TCP: The evolution of Internet transport protocols

Agenda

•  Internettransportprotocols– TCP– SCTP

•  MulKpathTCP– Basicprinciples– Usecases

•  What'snext?– QUIC

Page 98: Beyond TCP: The evolution of Internet transport protocols

MulKpathTCPusecasesThebeast

Page 99: Beyond TCP: The evolution of Internet transport protocols

TCPonservers

•  Howtoincreaseserverbandwidth?

•  Loadbalancingtechniques– packetperpacket– perflowloadbalancing

•  eachTCPconnecKonismappedontooneinterface

Page 100: Beyond TCP: The evolution of Internet transport protocols

IncreasingserverbandwidthwithMulKpathTCP

•  LoadbalancingwithMulKpathTCP–  CongesKoncontrolefficientlyusesthetwolinksforeachMPTCPconnecKon

– AutomaKcfailoverincaseoffailures

Page 101: Beyond TCP: The evolution of Internet transport protocols

HowfastcanMulKpathTCPgo?

h2p://linux.slashdot.org/story/13/03/23/0054252/a-50-gbps-connecKon-with-mulKpath-tcp

Page 102: Beyond TCP: The evolution of Internet transport protocols

HowfastcanMulKpathTCPgo?

Page 103: Beyond TCP: The evolution of Internet transport protocols

Datacenters evolve

•  Traditional Topologies are tree-based–  Poor performance– Not fault tolerant

•  Shift towards multipath topologies: FatTree, BCube, VL2, Cisco, EC2

C.Raiciu,etal.“ImprovingdatacenterperformanceandrobustnesswithmulKpathTCP,”ACMSIGCOMM2011.

Page 104: Beyond TCP: The evolution of Internet transport protocols

Fat Tree Topology [Fares et al., 2008; Clos, 1953]

K=4

1Gbps

1Gbps

AggregaKonSwitches

KPodswithKSwitches

each

Racksofservers

Page 105: Beyond TCP: The evolution of Internet transport protocols

Fat Tree Topology [Fares et al., 2008; Clos, 1953]K=4

AggregaKonSwitches

KPodswithKSwitches

each

Racksofservers

C.Raiciu,etal.“ImprovingdatacenterperformanceandrobustnesswithmulKpathTCP,”ACMSIGCOMM2011.

Page 106: Beyond TCP: The evolution of Internet transport protocols

Collisions

Page 107: Beyond TCP: The evolution of Internet transport protocols

TCPindatacenters

Page 108: Beyond TCP: The evolution of Internet transport protocols

TCPinFATtreenetworksCostofcollissions

C.Raiciu,etal.“ImprovingdatacenterperformanceandrobustnesswithmulKpathTCP,”ACMSIGCOMM2011.

0

200

400

600

800

1000

0 1000 2000 3000 4000 5000 6000 7000 8000 9000

Thro

ughp

ut (M

b/s)

Rank of Flow

MPTCPOptimal Throughput

TCP Flow Throughput

Page 109: Beyond TCP: The evolution of Internet transport protocols

Howtogetridofthesecollisions?

•  ConsiderTCPperformanceasanopKmisaKonproblem

Page 110: Beyond TCP: The evolution of Internet transport protocols

C.Raiciu,etal.“ImprovingdatacenterperformanceandrobustnesswithmulKpathTCP,”ACMSIGCOMM2011.

TheMulKpathTCPway

Twosubflowsdifferbytheirsourceport

ECMPbalancesthesubflowsoverdifferentpaths

Page 111: Beyond TCP: The evolution of Internet transport protocols

MPTCPbe2eruKlizestheFatTreenetwork

0

200

400

600

800

1000

0 1000 2000 3000 4000 5000 6000 7000 8000 9000

Thro

ughp

ut (M

b/s)

Rank of Flow

MPTCPOptimal Throughput

TCP Flow Throughput

C.Raiciu,etal.“ImprovingdatacenterperformanceandrobustnesswithmulKpathTCP,”ACMSIGCOMM2011.

SeealsoG.Detal,etal.,Revisi=ngFlow-BasedLoadBalancing:StatelessPathSelec=oninDataCenterNetworks,ComputerNetworks,April2013forextensionstoECMPforMPTCP

Page 112: Beyond TCP: The evolution of Internet transport protocols

HowmanysubflowsdoesMulKpathTCPneed?TotalThroughput

0 10 20 30 40 50 60 70 80 90

100

RLB 2 3 4 5 6 7 8

Thro

ughp

ut (%

of o

ptim

al)

Multipath TCPTCP

C.Raiciu,etal.“ImprovingdatacenterperformanceandrobustnesswithmulKpathTCP,”ACMSIGCOMM2011.

Page 113: Beyond TCP: The evolution of Internet transport protocols

CanweimproveMulKpathTCP?•  Twosubflowsmayfollowsimilarpaths

Page 114: Beyond TCP: The evolution of Internet transport protocols

ImprovingECMP•  ECMP'shash

–  goodloadbalancing–  impossibletopredictresult

•  CFLB–  replaceshashwithblockcipher

–  hostscanselectpathsforMulKpathTCPsubflowsprovidedtheyknowdatacentertopology

G.Detal,Ch.Paasch,S.vanderLinden,P.Mérindol,G.Avoine,O.Bonaventure,Revisi=ngFlow-BasedLoadBalancing:StatelessPathSelec=oninDataCenterNetworks,toappearinComputerNetworks

Page 115: Beyond TCP: The evolution of Internet transport protocols

MulKpathTCPwithCFLBinFat-Tree

G.Detal,Ch.Paasch,S.vanderLinden,P.Mérindol,G.Avoine,O.Bonaventure,Revisi=ngFlow-BasedLoadBalancing:StatelessPathSelec=oninDataCenterNetworks,toappearinComputerNetworks

Page 116: Beyond TCP: The evolution of Internet transport protocols

MulKpathTCPonEC2

•  AmazonEC2:infrastructureasaservice– Wecanborrowvirtualmachinesbythehour–  TheseruninAmazondatacentersworldwide– Wecanbootourownkernel

•  AfewavailabilityzoneshavemulKpathtopologies–  2-8pathsavailablebetweenhostsnotonthesamemachineorinthesamerack

–  AvailableviaECMP

Page 117: Beyond TCP: The evolution of Internet transport protocols

AmazonEC2Experiment

•  40mediumCPUinstancesrunningMPTCP•  During12hours,wesequenKallyranall-to-alliperfcyclingthrough:– TCP– MPTCP(2and4subflows)

Page 118: Beyond TCP: The evolution of Internet transport protocols

MPTCPimprovesperformanceonEC2

SameRack

0 100 200 300 400 500 600 700 800 900

1000

0 500 1000 1500 2000 2500 3000

Thro

ughp

ut (M

b/s)

Flow Rank

TCPMPTCP, 4 subflowsMPTCP, 2 subflows

C.Raiciu,etal.“ImprovingdatacenterperformanceandrobustnesswithmulKpathTCP,”ACMSIGCOMM2011.

Page 119: Beyond TCP: The evolution of Internet transport protocols

MoKvaKon

•  Onedevice,manyIP-enabledinterfaces

Page 120: Beyond TCP: The evolution of Internet transport protocols

sshwithMulKpathTCP

Page 121: Beyond TCP: The evolution of Internet transport protocols

MPTCPoverWiFi/3G

8Mbps,20ms

2Mbps,150ms

Page 122: Beyond TCP: The evolution of Internet transport protocols

TCPoverWiFi/3G

C.Raiciu,etal.“Howhardcanitbe?designingandimplemenKngadeployablemulKpathTCP,”NSDI'12:Proceedingsofthe9thUSENIXconferenceonNetworkedSystemsDesignandImplementaKon,2012.

Page 123: Beyond TCP: The evolution of Internet transport protocols

MPTCPoverWiFi/3G

C.Raiciu,etal.“Howhardcanitbe?designingandimplemenKngadeployablemulKpathTCP,”NSDI'12:Proceedingsofthe9thUSENIXconferenceonNetworkedSystemsDesignandImplementaKon,2012.

Page 124: Beyond TCP: The evolution of Internet transport protocols

MPTCPoverWiFi/3G

MulKpathTCPincreasesthroughput

Page 125: Beyond TCP: The evolution of Internet transport protocols

MPTCPoverWiFi/3G

Whathappenedhere?

Page 126: Beyond TCP: The evolution of Internet transport protocols

Understandingtheperformanceissue

8Mbps,20ms

2Mbps,150ms Window

B

A

CD

Windowfull!NonewdatacanbesentonWiFipath

A

Reinjectsegmentonfastpath

Halveconges0onwindowonslowsubflow

Page 127: Beyond TCP: The evolution of Internet transport protocols

MPTCPoverWiFi/3G

Page 128: Beyond TCP: The evolution of Internet transport protocols

MulKpathTCPusecasesLowlatencyforSiri

•  Long-livedTLSconnecKons

WiFi

3G/LTE

Voicesamples

Voicesamples

Page 129: Beyond TCP: The evolution of Internet transport protocols

MulKpathTCPusecasesHighbandwidthonsmartphones

•  Koreanswant800+Mbpsonsmartphones

WiFi

4G/LTE

Multipath TCP Regular TCP

SOCKS

Page 130: Beyond TCP: The evolution of Internet transport protocols

Fasterbroadbandnetworks?

Page 131: Beyond TCP: The evolution of Internet transport protocols

MulKpathTCPusecasesHybridAccessNetworks

DSL

4G/LTE

Multipath TCP Regular TCP

Hybrid AccessGateway

TCP

TCP

Page 132: Beyond TCP: The evolution of Internet transport protocols

Agenda

•  Internettransportprotocols– TCP– SCTP

•  MulKpathTCP– Basicprinciples– Usecases

•  What'snext?– QUIC

Page 133: Beyond TCP: The evolution of Internet transport protocols

Issueswiththecurrentstack

PhysicalDatalink

IPv4/IPv6TCP

HTTP1.1

ASCIIdifficulttoparse,nopriority

UnsecureWaitforthreewayhandshakebefore

datatransfer

PhysicalDatalink

IPv4/IPv6TCP

HTTP/2TLS

Secure,Butaddsmoredelay

PhysicalDatalink

IPv4/IPv6UDPQUICFirstbytes

A_er2RTTs

FirstbytesA_er3-4RTTs Firstbytes

A_er0RTT

Page 134: Beyond TCP: The evolution of Internet transport protocols

QUICinanutshell

•  FirstconnecKona2empt

CHLO[SNI,VER]

CHLO[Token,Cryptoinfo]

ServerNameandVersion

Rejected

REJ[Config,Token,CerKficate]

DATA[Encrypted]

SHLO[Config,Token,CerKficate]

DATA[Encrypted]

Page 135: Beyond TCP: The evolution of Internet transport protocols

QUICfeatures

•  CongesKoncontrol– LeveragesTCP'slonghistory(CUBIC)

•  Retransmissions– Be2erthanwithregularTCP– Eachsegmenthasadifferentseqnum

•  AvoidsretransmissionambiguiKes

•  SelecKveacknowledgements– CleanerthaninTCP

Page 136: Beyond TCP: The evolution of Internet transport protocols

QUICusageatgoogle

QUIChandshakesfailwhenRTTsaregreaterthan2.5secondsorwhenUDPisblocked

Source:J.Iyengar,QUICOverview,IETF93,July2015,Prague

Page 137: Beyond TCP: The evolution of Internet transport protocols

QUICReducingdelays

TCP TCP + TLS QUIC (equivalent to TCP + TLS)

Source:J.Iyengar,QUICOverview,IETF93,July2015,Prague

Page 138: Beyond TCP: The evolution of Internet transport protocols

WhyrunningQUICoverUDP?

•  Simplesttransportprotocol–  SupportedcorrectlybyalloperaKngsystems–  Supportedcorrectlybyallmiddleboxes

•  ApplicaKoncanenKrelycontroleverything–  SameversionofQUICrunsonallpla�orms– QUICcanbeupgradedasfrequentlyastheapplicaKon– ApplicaKondeveloperdoesnotneedtocoordinatewithIETForanyone

Page 139: Beyond TCP: The evolution of Internet transport protocols

Howtocopewithmiddleboxes?

•  VeryfewmiddleboxesinterferewithUDP– SomemiddleboxesdropUDPsegments

•  ApplicaKonswilldetectandfallbacktoTCP– SomemiddleboxesratelimitUDP

•  ApplicaKonswilldetectandfallbacktoTCP

•  WhataboutmiddleboxesopKmisingQUIC/UDP– Nightmareforgoogle– EverythinginQUIC(payloadandheaders)isencrypted

Page 140: Beyond TCP: The evolution of Internet transport protocols

TFO:AFasterTCP

•  Simpleidea:senddatainSYNsegments– ModernversionofT/TCP

SYN(Src=C,seq=x, HTTP GET)‏HTTP GET

SYN+ACK(Dest=C,ack=x+1,seq=y, HTTP Resp)‏

ACK(Src=A,seq=x)‏

Page 141: Beyond TCP: The evolution of Internet transport protocols

Internettransportlayer•  SKlllotsofinnovaKonforanoldlayer…

–  TCPextensions•  IniKalwindow,TCPFastOpen,…

– MulKpathTCPisge�ngdeployed•  RFC6824waspublishedinJanuary2013

–  ButMiddleboxeshaveossifiedtheInternet

•  Otherprotocols–  QUIC

•  PushedbygoogleforwebapplicaKons–  TCPINC

•  SupportencrypKoninsidetransportlayer–  TLS1.3

•  Fasterhandshakeandlowerdelays