TransportLayer3-1Chapter3TransportLayerComputerNetworking:ATopDownApproach6theditionJimKurose,KeithRossAddison-WesleyMarch2012Anoteontheuseofthesepptslides:We’remakingtheseslidesfreelyavailabletoall(faculty,students,readers).They’reinPowerPointformsoyouseetheanimations;andcanadd,modify,anddeleteslides(includingthisone)andslidecontenttosuityourneeds.Theyobviouslyrepresentalotofworkonourpart.Inreturnforuse,weonlyaskthefollowing:Ifyouusetheseslides(e.g.,inaclass)thatyoumentiontheirsource(afterall,we’dlikepeopletouseourbook!)Ifyoupostanyslidesona(orperhapsidenticalto)ourslides,andnoteourcopyrightofthismaterial.Thanksandenjoy!JFK/KWRAllmaterialcopyright1996-2013J.FKuroseandK.W.Ross,AllRightsReservedTransportLayer3-2Chapter3:TransportLayerourgoals:understandprinciplesbehindtransportlayerservices:multiplexing,demultiplexingreliabledatatransferflowcontrolcongestioncontrollearnaboutInternettransportlayerprotocols:UDP:connectionlesstransportTCP:connection-orientedreliabletransportTCPcongestioncontrolTransportLayer3-3Chapter3outline3.1transport-layerservices3.2multiplexinganddemultiplexing3.3connectionlesstransport:UDP3.4principlesofreliabledatatransfer3.5connection-orientedtransport:TCPsegmentstructurereliabledatatransferflowcontrolconnectionmanagement3.6principlesofcongestioncontrol3.7TCPcongestioncontrolTransportLayer3-4Transportservicesandprotocolsprovidelogicalcommunicationbetweenappprocessesrunningondifferenthoststransportprotocolsruninendsystemssendside:breaksappmessagesintosegments,passestonetworklayerrcvside:reassemblessegmentsintomessages,passestoapplayermorethanonetransportprotocolavailabletoappsInternet:TCPandUDPapplicationtransportnetworkdatalinkphysicalapplicationtransportnetworkdatalinkphysicalTransportLayer3-5Transportvs.networklayernetworklayer:logicalcommunicationbetweenhoststransportlayer:logicalcommunicationbetweenprocessesrelieson,enhances,networklayerservices12kidsinAnn’shousesendinglettersto12kidsinBill’shouse:hosts=housesprocesses=kidsappmessages=lettersinenvelopestransportprotocol=AnnandBillwhodemuxtoin-housesiblingsnetwork-layerprotocol=postalservicehouseholdanalogy:TransportLayer3-6Internettransport-layerprotocolsreliable,in-orderdelivery(TCP)congestioncontrolflowcontrolconnectionsetupunreliable,unordereddelivery:UDPno-frillsextensionof“best-effort”IPservicesnotavailable:delayguaranteesbandwidthguaranteesapplicationtransportnetworkdatalinkphysicalapplicationtransportnetworkdatalinkphysicalnetworkdatalinkphysicalnetworkdatalinkphysicalnetworkdatalinkphysicalnetworkdatalinkphysicalnetworkdatalinkphysicalnetworkdatalinkphysicalnetworkdatalinkphysicalTransportLayer3-7Chapter3outline3.1transport-layerservices3.2multiplexinganddemultiplexing3.3connectionlesstransport:UDP3.4principlesofreliabledatatransfer3.5connection-orientedtransport:TCPsegmentstructurereliabledatatransferflowcontrolconnectionmanagement3.6principlesofcongestioncontrol3.7TCPcongestioncontrolTransportLayer3-8Multiplexing/demultiplexingprocesssocketuseheaderinfotodeliverreceivedsegmentstocorrectsocketdemultiplexingatreceiver:handledatafrommultiplesockets,addtransportheader(laterusedfordemultiplexing)multiplexingatsender:transportapplicationphysicallinknetworkP2P1transportapplicationphysicallinknetworkP4transportapplicationphysicallinknetworkP3TransportLayer3-9HowdemultiplexingworkshostreceivesIPdatagramseachdatagramhassourceIPaddress,destinationIPaddresseachdatagramcarriesonetransport-layersegmenteachsegmenthassource,destinationportnumberhostusesIPaddresses&portnumberstodirectsegmenttoappropriatesocketsourceport#destport#32bitsapplicationdata(payload)otherheaderfieldsTCP/UDPsegmentformatTransportLayer3-10Connectionlessdemultiplexingrecall:createdsockethashost-localport#:DatagramSocketmySocket1=newDatagramSocket(12534);whenhostreceivesUDPsegment:checksdestinationport#insegmentdirectsUDPsegmenttosocketwiththatport#recall:whencreatingdatagramtosendintoUDPsocket,mustspecifydestinationIPaddressdestinationport#IPdatagramswithsamedest.port#,butdifferentsourceIPaddressesand/orsourceportnumberswillbedirectedtosamesocketatdestTransportLayer3-11Connectionlessdemux:exampleDatagramSocketserverSocket=newDatagramSocket(6428);transportapplicationphysicallinknetworkP3transportapplicationphysicallinknetworkP1transportapplicationphysicallinknetworkP4DatagramSocketmySocket1=newDatagramSocket(5775);DatagramSocketmySocket2=newDatagramSocket(9157);sourceport:9157destport:6428sourceport:6428destport:9157sourceport:?destport:?sourceport:?destport:?TransportLayer3-12Connection-orienteddemuxTCPsocketidentifiedby4-tuple:sourceIPaddresssourceportnumberdestIPaddressdestportnumberdemux:receiverusesallfourvaluestodirectsegmenttoappropriatesocketserverhostmaysupportmanysimultaneousTCPsockets:eachsocketidentifiedbyitsown4-tuplewebservershavedifferentsocketsforeachconnectingclientnon-persistentHTTPwillhavedifferentsocketforeachrequestTransportLayer3-13Connection-