Introduction
ThetransportlayeristhefourthlayerintheOpenSystemsInterconnection(OSI)referencemodelproposedbytheInternationalOrganizationforStandardization.Thislayerofprotocolprovidesreliableandeffectivemessagetransferservicesbetweenprocessesonnetworkendpointhosts.Itsfunctioncloselydependsonthevirtualcircuitordatagramserviceofthenetworklayer.Thetransportlayerdefinestheend-to-endconnectivitybetweenhostapplications.Thetransportlayerisalsocalledthetransportlayer.Thetransportlayeronlyexistsintheopenendsystem.Itisalayerbetweenthelower3-layercommunicationsubnetsystemandthehigher3-layer,butitisaveryimportantlayerbecauseitisthesourceend.Thelastlayerthatcontrolsthedatatransmissionfromlowtohightothedestination.
Theserviceofthetransportlayergenerallyhastogothroughthreestages:thetransmissionconnectionestablishmentphase,thedatatransmissionphase,andthetransmissionconnectionreleasephasetocompleteacompleteserviceprocess.Inthedatatransmissionstage,itisdividedintotwoforms:generaldatatransmissionandaccelerateddatatransmission.ThetwomostcommonprotocolsinthetransportlayeraretheTransmissionControlProtocol(TCP)andtheUserDatagramProtocol(UDP).Thetransportlayerprovidesservicessuchaslogicalconnectionestablishment,transportlayeraddressing,datatransmission,transportconnectionrelease,flowcontrol,congestioncontrol,multiplexinganddemultiplexing,andcrashrecovery.
Portconcept
Thetaskofthetransportlayeristomakethebestuseofnetworkresourcesaccordingtothecharacteristicsofthecommunicationsubnettoprovideestablishmentandmaintenancebetweenthesessionlayersofthetwoendsystems.Andcancelthefunctionoftransmissionconnection,responsibleforend-to-endreliabledatatransmission.Atthislayer,theprotocoldataunitofinformationtransmissioniscalledsegmentormessage.
Thenetworklayeronlytransmitsthedatapacketssentbythesourcenodetothedestinationnodeaccordingtothenetworkaddress,whilethetransportlayerisresponsibleforreliablytransmittingthedatatothecorrespondingport.Theresourcesubnetinthecomputernetworkistheinitiatorandreceiverofcommunication,andeachdeviceinitiscalledanendpoint;thecommunicationsubnetprovidescommunicationservicesinthenetwork,andthedevicesinitarecallednodes.IntheOSIreferencemodel,thefollowingfourlayersareusedforcommunicationcontrol,buttheircontrolobjectsaredifferent.
Basicfunctions
Thetransportlayerprovidesend-to-endservicesbetweenhostapplicationprocesses.Thebasicfunctionsareasfollows:
(1)Splitandreorganizedata
(2)Addressingbyportnumber
(3)Connectionmanagement
(4)Errorcontrolandflowcontrol,errorcorrectionfunction
Thetransportlayershouldprovidethereliabilityofthecommunicationservicetothesessionlayertoavoiderrors,loss,delaytimedisorder,repetition,disorderandothererrorsofthemessage.
Typeofservice
ThetransportlayerisnotonlythehighestlayerresponsiblefordatacommunicationintheOSIlayermodel,butalsothemiddlelayerbetweenthelowerthreelayersfornetworkcommunicationandthehigherthreelayersforinformationprocessingFloor.Thislayerfillsupthegapbetweentheservicesrequiredbythehigh-levelandtheservicesprovidedbythenetworklayer,andshieldsthedetailsofthecommunicationsubnetfromthehigh-levelusers,sothatthehigh-levelusersonlyseeanend-to-end,end-to-endconnectionbetweenthetwotransmissionentities.Areliabledatapaththatcanbecontrolledandsetbytheuser.ServiceTypes
Theservicesprovidedbythetransportlayercanbedividedintotransmissionconnectionservicesanddatatransmissionservices.
☆Transmissionconnectionservice:Generally,foreachtransmissionconnectionrequiredbythesessionlayer,thetransmissionlayermustestablishacorrespondingconnectiononthenetworklayer.
☆Datatransmissionservice:Emphasizestheprovisionofconnection-orientedreliableservices(OSIonlybegantodeveloprelevantstandardsforconnectionlessservicesverylate),andprovidesflowcontrol,errorcontrolandsequencecontroltoachievetwoterminalsThereisnoerror,noloss,norepetition,andnodisorderinthemessagestransmittedbetweensystems.
Protocollevelandtransportlayerprotocol
Servicequality
Thetransportlayerserviceisreflectedbytheagreement,sothetransportlayerprotocolleveliscloselyrelatedtothenetworkservicequality.Accordingtothenatureoferrors,networkservicescanbedividedintothefollowingthreetypesaccordingtotheirquality:
☆Aservice:lowerrorrateconnection,thatis,withacceptableresidualerrorrateandfailurenotificationrate;
☆TypeBservice:higherrorrateconnection,thatis,withunacceptableresidualerrorrateandfailurenotificationrate;
☆TypeCservice:betweenTypeAserviceandTypeBservice.
Agreementlevel
Theacceptanceorunacceptabilityoftheerrorratedependsontheuser.Therefore,theclassificationofnetworkservicequalityisbasedonuserrequirements.Accordingtothefunctionalcharacteristicsofthetransportlayer,OSIdefinesthefollowingfiveprotocollevels:
☆Level0:Simpleconnection.Onlyasimpleend-to-endtransmissionconnectionisestablished,andlongmessagescanbetransmittedinsegments.
☆Level1:Basicerrorrecoverylevel.Ithasarecoveryfunctionwhenthenetworkconnectionisdisconnected,thenetworkconnectionfails,oranunrecognizedtransmissionconnectiondataunitisreceived.
☆Level2:Multiplexing.Allowmultipletransmissionstosharethesamenetworkconnectionandhavecorrespondingflowcontrolfunctions.
☆Level3:Errorrecoveryandmultiplexing.Itisasynthesisoflevel1andlevel2protocols.
☆Level4:Errordetection,recoveryandmultiplexing.Anerrordetectionfunctionisaddedonthebasisofthelevel3protocol.
Transportlayerprotocol
Connection-orientedtransmissionprotocol(TCP):Theconnectionmustbeestablishedbeforedatatransmission,andtheconnectionmustbereleasedafterthedatatransmissioniscompleted.Onlysupportunicasttransmission:eachtransmissionconnectioncanonlyhavetwoendpoints,andonlypoint-to-pointconnectionscanbemade.Multicastandbroadcasttransmissionmethodsarenotsupported.UDPissupported.
Providereliabledeliveryservices:thetransmitteddataiserror-free.Noloss,norepetition,andthesequenceisconsistentwiththesourcedata.
Thetransmissionunitisthedatasegment:thedatasegmentsenteachtimeisnotfixed,andisaffectedbythesizeoftheapplicationlayertransmissionmessageandtheMTU(MaximumTransmissionUnit)valueinthenetwork.Thesmallestdatasegmentmayonlyhave21bytes(ofwhich20bytesbelongtotheTCPheader,andthedatapartisonly1byte).
Supportfull-duplextransmission:bothpartiescansendandreceivedataatthesametime.
TCPconnectionisbasedonbytestream:UDPisbasedonpacketstream.
TCPisatransportlayerprotocolthatcanguaranteereliabledatatransmission.Itmainlyadoptsthefollowingfourmechanismstoachievereliabledatatransmission.
Bytenumberingmechanism:TCPdatasegmentnumbersthe"data"partofthedatasegmentonebyoneinbytestoensurethateachbyteofdatacanbetransmittedandreceivedinanorderlymanner.
Datasegmentconfirmationmechanism:everytimeadatasegmentisreceived,thereceivingendmustreturnaconfirmationdatasegmenttothesendingend,andtheconfirmationnumberindicatesthesequencenumberofthedatasegmentthathasbeencorrectlyreceived.
Timeoutretransmissionmechanism:Thereisaretransmissiontimer(RTT)inTCP.Whensendingadatasegment,thistimerisalsoturnedon.Ifthetimerexpiresandnoconfirmationisreturned,thetimerStopandretransmitthedata.
Selectiveacknowledgmentmechanism:(SelectiveACK,SACK)/Onlythemissingpartofthedataisretransmitted,andthedatathathasbeenreceivedcorrectlywillnotberetransmitted.
UDPistheabbreviationofUserDatagramProtocol.TheChinesenameisUserDatagramProtocol.ItisaconnectionlesstransportlayerprotocolintheOSI(OpenSystemInterconnection)referencemodel.Itprovidestransaction-orientedIETFRFC768istheofficialspecificationofUDP.TheprotocolnumberofUDPintheIPmessageis17.
ThefullnameoftheUDPprotocolistheUserDatagramProtocol.ItisusedtoprocessdatapacketsinthesamenetworkastheTCPprotocol,andisaconnectionlessprotocol.IntheOSImodel,thefourthlayer-thetransportlayer,isintheupperlayeroftheIPprotocol.UDPhasthedisadvantagesofnotprovidingdatapacketgrouping,assemblyandinabilitytosortdatapackets.Thatistosay,afterthemessageissent,itisimpossibletoknowwhetherithasarrivedsafelyandcompletely.UDPisusedtosupportnetworkapplicationsthatneedtotransferdatabetweencomputers.Numerousclient/servernetworkapplicationsincludingnetworkvideoconferencingsystemsneedtousetheUDPprotocol.UDPmessageisdividedintotwoparts:UDPmessageheaderandUDPdataarea.Theheaderiscomposedofsourceport,destinationport,messagelength,andchecksum.UDPissuitableforreal-timedatatransmission,suchasvoiceandvideocommunications.ComparedwithTCP,UDPhashighertransmissionefficiencyandloweroverhead,butitcannotguaranteethereliabilityofdatatransmission.TheUDPheaderisidentifiedasfollows:
1)16-bitsourceportnumber:theportnumberusedbythesourcehost'sapplicationprogram.
2)16-bitdestinationportnumber:theportnumberusedbytheapplicationprogramofthedestinationhost.
3)16-bitUDPlength:referstothebytelengthoftheUDPheaderandUDPdata.BecausethelengthoftheUDPheaderis8bytes,theminimumvalueofthefieldis8.
4)16-bitUDPchecksum:ThisfieldprovidesthesamefunctionastheTCPcheckfield;thisfieldisoptional.
Importance
Thetransportlayeristhecoreoftheentireprotocolhierarchyandistheonlylayerresponsibleforoveralldatatransmissionandcontrol.IntheOSIseven-layermodel,thetransportlayeristhehighestlayerresponsiblefordatacommunication,anditisthemiddlelayerbetweenthelowerthreelayersfornetworkcommunicationandtheupperthreelayersforinformationprocessing.Becausethenetworklayerdoesnotnecessarilyguaranteethereliabilityoftheservice,anduserscannotdirectlycontrolthecommunicationsubnet,atransmissionlayerisaddedabovethenetworklayertoimprovetransmissionquality.
Thetransportlayerusestheservicesprovidedbythenetworklayerandprovidescommunicationportsforhigh-leveluserstotransmitdatathroughthetransportlayeraddress,sothatthesharingofhigh-levelresourcesbetweensystemsdoesnothavetoconsiderdatacommunicationandunreliabledatatransmissionTheproblem.Itsmainfunctionsare:toprovidereliabletransmissionservicesforanongoingconversationorconnection,torealizethemultiplexingoftheconnectiononasinglephysicalconnectiontothenetwork,andtoprovideend-to-endserialnumberandflowcontrolanderrorcontrolonasingleconnectionAndrecoveryservices.