DataandComputerCommunicationsNinthEditionbyWilliamStallingsChapter7–DataLinkControlProtocolsDataandComputerCommunications,NinthEditionbyWilliamStallings,(c)PearsonEducation-PrenticeHall,2011DataLinkControlProtocols“Greatandenlightenedone,”saidTen-teh,assoonashisstuporwaslifted,“hasthispersondeliveredhismessagecompetently,forhismindwasstillasearedvisionofsnowandsandandperchancehistonguehasstumbled?”“Bendyourearstothewall,”repliedtheEmperor,“andbeassured.”—KaiLung'sGoldenHours,EarnestBramahDataLinkControlProtocolswhensendingdata,toachievecontrol,alayeroflogicisaddedabovethePhysicallayerdatalinkcontroloradatalinkcontrolprotocoltomanageexchangeofdataoveralink:framesynchronizationflowcontrolerrorcontroladdressingcontrolanddatalinkmanagementFlowControlensuresendingentitydoesnotoverwhelmreceivingentitypreventbufferoverflowinfluencedby:transmissiontime•timetakentoemitallbitsintomediumpropagationtime•timeforabittotraversethelinkassumptionis:allframesaresuccessfullyreceivedwithnoframeslostorarrivingwitherrorsModelofFrameTransmissionStopandWaitsimplestformofflowcontrolworkswellforamessagesentinafewlargeframesstopandwaitbecomesinadequateiflargeblockofdataissplitintosmallframesbysourceStopandWaitItalldependsonthevalueofa=B/L=(Rd)/(VL)B:lengthoflink(inbits)L:messagelength(inbits)R:datarate(inbps)d:distance(inmeters)V:velocityofpropagation(m/s)StopandWaitLinkUtilizationSlidingWindowsFlowControlallowsmultiplenumberedframestobeintransitreceiverhasbufferWlongtransmittersendsuptoWframeswithoutACKACKincludesthenumberofnextframeexpectedsequencenumberisboundedbysizeoffield(k)•framesarenumberedmodulo2k•givingmaxwindowsizeofupto2k–1receivercanACKframeswithoutpermittingfurthertransmission(RNR:ReceiveNotReady)mustsendanormalacknowledgetoresumeifhavefull-duplexlink,canpiggybackACKsSlidingWindowDiagramSlidingWindowExampleErrorControlTechniqueserrordetectionpositiveacknowledgmentretransmissionaftertimeoutnegativeacknowledgement&retransmissiondetectionandcorrectionoferrorssuchas:lostframes-aframefailstoarriveattheothersidedamagedframes-framearrivesbutsomeofthebitsareinerrorAutomaticRepeatRequest(ARQ)collectivenameforerrorcontrolmechanismseffectofARQistoturnanunreliabledatalinkintoareliableoneversionsofARQare:stop-and-waitgo-back-Nselective-rejectStopandWaitARQsourcetransmitssingleframewaitsforACK•nootherdatacanbesentuntildestination’sreplyarrivesifframereceivedisdamaged,discardittransmitterhastimeoutifnoACKwithintimeout,retransmitifACKisdamaged,transmitterwillnotrecognizetransmitterwillretransmitreceivergetstwocopiesofframeusealternatenumberingandACK0/ACK1StopandWaitARQpros•simplisticcons•inefficientGo-Back-NARQmostcommonlyusederrorcontrolbasedonsliding-windowusewindowsizetocontrolnumberofoutstandingframesifnoerror,ACKasusualiferror,replywithrejectiondestinationwilldiscardthatframeandallfutureframesuntilframeinerrorisreceivedcorrectlytransmittermustgobackandretransmitthatframeandallsubsequentframes(GoBackN-Handling)DamagedframeerrorinframeisoreceiverrejectsframeitransmitterretransmitsframesfromiLostframeframeilostandeither•transmittersendsi+1andreceivergetsframei+1outofsequenceandrejectsframei•ortransmittertimesoutandsendsACKwithPbitsetwhichreceiverrespondstowithACKitransmitterthenretransmitsframesfromi(GoBackN–Handling)DamagedAcknowledgementreceivergetsframei,sendsACK(i+1)whichislostACKsarecumulative,sonextACK(i+n)mayarrivebeforetransmittertimesoutonframeiiftransmittertimesout,itsendsACKwithPbitsetcanberepeatedanumberoftimesbeforearesetprocedureisinitiatedDamagedRejectionrejectfordamagedframeislosthandledaslostframewhentransmittertimesoutSelective-Reject(ARQ)alsocalledselectiveretransmissiononlyrejectedframesareretransmittedsubsequentframesareacceptedbythereceiverandbufferedminimizesretransmissionreceivermustmaintainlargeenoughbuffermorecomplexlogicintransmitterlesswidelyusedusefulforsatellitelinkswithlongpropagationdelaysGo-Back-Nvs.SelectiveRejectHighLevelDataLinkControl(HDLC)mostimportantdatalinkcontrolprotocol•specifiedasISO3009,ISO4335•basisforotherdatalinkcontrolprotocolsstationtypes:•Primary-controlsoperationoflink•Secondary-undercontrolofprimarystation•Combined-issuescommandsandresponseslinkconfigurations•Unbalanced-1primary,multiplesecondary•Balanced-2combinedstations(HDLCTransferModes)NormalResponseMode(NRM)•usedwithanunbalancedconfiguration•primaryinitiatestransferAsynchronousBalancedMode(ABM)•usedwithabalancedconfiguration•eitherstationinitiatestransmission•hasnopollingoverhead•mostwidelyusedAsynchronousResponseMode(ARM)•usedwithunbalancedconfiguration•secondarymaytransmitwithoutpermissionfromprimary•primarystillresponsiblefortheline(initialization,errorrecovery,…)•rarelyusedHDLCFrameStructureusessynchronoustransmissiontransmissionsareintheformofframessingleframeformatusedThecontrolfieldgivesameaningtotheframe(data,command,RR,RNR,…)CRC-16orCRC-32FlagFieldsandBitStuffingdelimitframeatbothendswith01111110receiverhuntsforflagsequencetosynchronizebitstuffi