




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Chapter3TheDataLinkLayerDatalinkLayerDataLinkLayerDesignIssuesServicesProvidedtotheNetworkLayerFramingErrorControl&FlowControlErrorDetectionandCorrectionErrorCorrectingCode(ECC)ErrorDetectingCodeElementaryDataLinkProtocolsSlidingWindowProtocolsOne-BitSlidingWindowProtocolProtocolUsingGoBackNUsingSelectiveRepeatPerformanceofSlidingWindowProtocolsExampleDataLinkProtocolsHDLCSLIPPPP3.1DataLinkLayerDesignIssuesDataLinkLayerDesignIssuesGoalsStudythealgorithmsforachievingreliable,efficientcommunicationbetweentwoadjacentmachinesAdjacent:twomachinesareconnectedbyacommunicationchannelthatactslikeawire,bitsaredeliveredinexactlythesameorderinwhichtheyaresentDataLinkLayerDesignIssuesServicesProvidedtotheNetworkLayerFramingErrorControlFlowControlServicesProvidedtotheNetworkLayerFunctionsoftheDataLinkLayerProvideserviceinterfacetothenetworklayerDealingwithtransmissionerrorsRegulatingdataflowSlowreceiversnotswampedbyfastsendersFunctionsoftheDataLinkLayer(2)Relationshipbetweenpacketsandframes.ServicesProvidedtoNetworkLayer(a)Virtualcommunication.(b)Actualcommunication.ServicesProvidedtoNetworkLayerUnacknowledgedconnectionlessservice.
MostLANsuseunacknowledgedconnectionlessservice
Acknowledgedconnectionlessservice.
Thisserviceisusefuloverunreliablechannels,suchaswirelesssystemsAcknowledgedconnection-orientedserviceTimerSequencenumberConnectionestablishmentPlacementofthedatalinkprotocolFramingFramingAsequenceofbitsissentfromnodeAtonodeBoverapoint-to-pointlink,NodeBmustrecognizeexactlywhatsetofbitsconstitutesaframeCharacterCountAcharacterstream.(a)Withouterrors.(b)Withoneerror.Charactercount(字符记数):Usesafieldintheheadertospecifythenumberofcharactersintheframe(DEC:DDCMP)ByteStuffing
(a)Aframedelimitedbyflagbytes.(b)Fourexamplesofbytesequencesbeforeandafterstuffing.Flagbyteswithbytestuffing(字符添充):Havingeachframestartandendwithspecialbytes(BISYNC,PPP)BitStuffing
(a)Theoriginaldata.(b)Thedataastheyappearontheline.(c)Thedataastheyarestoredinreceiver’smemoryafterdestuffing.Startingandendingflags,withbitstuffing(比特添充):Eachframebeginsandendswithaspecialbitpattern,01111110.Wheneverthesender'sdatalinklayerencountersfiveconsecutive1sinthedata,itautomaticallystuffsa0bitintotheoutgoingbitstream(Example:HDLC)ExamplewithPossibleErrors(BitStuffing)
PhysicalLayerCodingViolationsPhysicallayercodingviolations:物理层编码违例法(IEEE:802.3)
例如:编码方案:时钟周期内电压高变低表示1,低变高表示0,时钟周期内电压恒高或恒低,不表示数据,可用做定界符Manchester差分ManchesterHomework1,2,3,4,5ErrorControl&FlowControlErrorControlMakesureallframesaredeliveredtothedestinationandintheproperorderProvidethesenderwithsomefeedbackaboutwhatishappeningattheotherendofthelineHardwaretroublesmaycauseaframetovanishcompletelyframeorACKislost,thetimerwillgooff,...Managingtimersandsequencenumberssoastoensurethateachframeispassedtothedestinationexactlyonce,nomoreandnolessFlowControlTwoapproachesarecommonlyused
Feedback-basedflowcontrol,thereceiversendsbackinformationtothesender,givingitpermissionortellingthesenderhowthereceiverisdoingRate-basedflowcontrol,limitstherateatwhichsendersmaytransmitdata3.2ErrorDetectionandCorrectionErrorCorrectingCode(ECC)Single-bitError&BurstErrorSingle-biterror,onlyonebithaschangedAbursterrormeansthat2ormorebitshavechanged.HammingDistanceHammingdistance:Thenumberofbitpositionsinwhichtwocodewordsdiffer(10001001and10110001,Hammingdistance=3)Todetectterrors,needadistancet+1codeTocorrectterrors,needadistance2t+1codeECC:error-correctingcodesFEC:forwarderrorcorrectionExampleofanError-CorrectingCodeConsideracodewithonlyfourvalidcodewords:,1111100000,1111111111Thiscodehasadistance5,whichmeansthatitcancorrect2errors.Ifthecodewordarrives,thereceiverknowsthattheoriginalmusthavebeenIfatripleerrorchangesinto,theerrorwillnotbecorrectedproperlyTheNumberofCheckBitsFindoutthenumberofcheckbitsneededtocorrectsingleerrorCodingm:messagebitsr:checkbitsn:codewordlength(n=m+r)2mlegalmessagesEachlegalmessagehasnillegalcodewordsatadistance1fromit,need(n+1)2mcodewords(n+1)2m
≤2n
(m+r+1)≤2r Example:m=7,r≥4Thebitsofthecodewordarenumbered,startwith1atleftend,bit2toitsimmediateright,andsoon.CheckbitsThebitsthatarepowersof2(1,2,4,8,16...)arecheckbitsEachcheckbitforcestheparityofsomecollectionofbits,includingitself,tobeeven(orodd).DatabitsTherest(3,5,6,...)arefilledupwiththemdatabitsHammingCodeMessage:‘H’(7-bitASCII100,1000)DataBits:3,5,6,7,9,10,114Checkbits,Bit1,2,4,8(evenparity)BitNumber:1
234567891011Codeword:00110010000发送前编码:
3=1+2,5=1+4,6=2+4,7=1+2+49=1+8,10=2+8,11=1+2+8接收者纠错:
b1⊕b3⊕b5⊕b6⊕b7⊕b9⊕b10⊕b11=0(k=1)
b2⊕b3⊕b5⊕b6⊕b7⊕b9⊕b10⊕b11=0(k=2)
b4⊕b3⊕b5⊕b6⊕b7⊕b9⊕b10⊕b11=0(k=4)
b8⊕b3⊕b5⊕b6⊕b7⊕b9⊕b10⊕b11=0(k=8)ExampleofHammingCodeHammingcode:CorrectbursterrorsUseofaHammingcodetocorrectbursterrors.其他前向纠错码(FEC)广泛用于无线链路,提高信道信噪比BCH码Bose,Ray-Chaudhuri,Hocquenhem里德-所罗门码(里所码)Reed-solomoncodes,RScodes戈帕码Goppacodes卷积码与块编码不同,卷积码可以连续地生成冗余位擦除码(ErasureCorrection)原始数据分成k块,编码后的编码数据n片从n片中的任意k片都可以恢复原先的k块数据k<n≤2k,常见n=2k例如:k=3,n=6a00x0+a01x1+a02x2=y0a10x0+a11x1+a12x2=y1a20x0+a21x1+a22x2=y2a30x0+a31x1+a32x2=y3a40x0+a41x1+a42x2=y4a50x0+a51x1+a52x2=y5(x0,x1,x2)为原始数据,(y0,y1,y2,y3,y4,y5)为编码后数据只需得到y0-y5的任三个(包括它们的行号)就可还原x0-x2精心设计系数矩阵A(非齐次线性方程问题,矩阵的秩)Homework9,11ErrorDetectingCodeErrorCorrecting&DetectingOnchannelsthatarereliable,suchasfiber,itischeapertouseanerrordetectingcodeandjustretransmittheoccasionalblockfoundtobefaultyOnchannelssuchaswirelesslinksthatmakemanyerrors,itisbettertoaddenoughredundancytoeachblockforthereceivertobeabletofigureoutwhattheoriginalblockwasExample(single-biterror)BitErrorRateBER=10-6,1Block=1000bits,Data=1MbitsTheoverheadErrordetection+retransmission:2001bitsHammingcode:10,000bitsErrorDetectingCodes
Odd&EvenParityOdd&Evenparity单个奇偶校验位性能可检出奇数个位翻转错误不能检出偶数个位翻转错误OddParityEvenParityEvenParityCheckOdd&EvenParityCoding(rcheckbits)Eachblockisregardedasak×rmatrixAparitybiteverycolumn,affixedtothematrixasthelastrowThematrixisthentransmittedonerowatatimePerformanceCandetectasingleburstoflength≤rCatchallerrorsconsistingofanoddnumberofinvertedbitsAburstoflength>rIfblockisgarbledbyalongburst,theprobabilityofbeingacceptedis2-r
1001000101010011101000010101011011001100111011011000100010011110PolynomialCodeAlsoknownasCRC(CyclicRedundancyCheck)FCS(FrameCheckSequence)M(x):Treatingbitstringsasrepresentationsofpolynomialswithcoefficientsof0and1Ak-bitframeisregardedasthecoefficientlistforapolynomialwithkterms,rangingfromxk-1tox0:110001=>x5+x4+x0Polynomialarithmeticisdonemodulo2,additionandsubtractionareidenticaltoXORG(x):GeneratorpolynomialSender:ComputingtheChecksumThealgorithmforcomputingthechecksum:Appendrzerobitstothelow-orderendoftheframeDividethebitstringcorrespondingtoG(x)T(x):SubtracttheremainderfromthebitstringExampleofCRCCalculationCalculationofthepolynomialcodechecksum.Receiver:VerifytheChecksumIfatransmissionerroroccurs,sothatinsteadofthebitstringforT(x)arriving,T(x)+E(x)arrives.Thereceivercomputes[T(x)+E(x)]/G(x).T(x)/G(x)is0,sotheresultisE(x)/G(x)ThoseerrorsthathappentocorrespondtopolynomialscontainingG(x)asafactorwillslipby;allothererrorswillbecaught.ThePowerofCRCrcheckbitswilldetectallbursterrorsoflength≤rTwoisolatedsingle-biterrorsaredetectedE(x)=xi+xj,=xj(xi-j+1).wherei>jChooseG(x):G(x)doesnotdividexk+1foranykuptomaximumframelengthForexample,x15+x14+1willnotdividexk+1foranyvalueofkbelow32,768(4096bytes)Catchallerrorsconsistingofanoddnumberofinvertedbits:bymakingx+1afactorofG(x)IfE(x)hasanoddnumberoftermsandisdivisiblebyx+1.E(x)=(x+1)Q(x),E(1)=(1+1)Q(1)=0.E(x)hasanoddnumberofterms,E(1)=1Otherbursterrors(length>r)Theprobabilityofabadframebeenacceptedis2-rGeneratorPolynomialCertainpolynomialshaveeinternationalstandardsCRC-16x16+x15+x2+1CRC-CCITT(HDLC)x16+x12+x5+1CRC-32(IEEE802)x32+x26+x23+x22+x16+x12+x11+x10+x8+x7+x5+x4+x2+x1+1CRC-64TheCalculationofCRC5(Hardware)TheCalculationofCRC5(Hardware)HardwareAsimpleshiftregistercircuitcanbeconstructedtocomputeandverifythechecksums生成多项式G(x)=x5+x4+x2+1(110101)初始时移位寄存器C0~C4清0信息位10比特发送之后,断开A接通B,发送5比特校验和,并顺便清0寄存器C0~C4为下次发送做好准备C4C3C2C1C0I(Input)Initial000001111Step1101011110Step2111111101Step3111100010Step4010011000Step5100101010Step6100010001Step7000101011Step8100011110Step9101110101Step1001110TheCalculationofCRC5(Hardware)手工计算CRC4:速算表生成多项式x4+x+1手工计算CRC4:利用速算表TheCalculationofCRC(Software)
staticunsignedshortcrctab[256]={0x0000,0x1189,0x2312,0x329b,0x4624,0x57ad,0x6536,0x74bf,0x8c48,0x9dc1,0xaf5a,0xbed3,0xca6c,0xdbe5,……0xd49d,0xc514,0xb1ab,0xa022,0x92b9,0x8330,0x7bc7,0x6a4e,0x58d5,0x495c,0x3de3,0x2c6a,0x1ef1,0x0f78};unsignedshortcrc16(unsigned
shortcrc,unsignedchar*p,intlen){
while(len--)crc=(crc>>8)^crctab[(crc^*p++)&0xff];
returncrc;}其他哈希函数及应用哈希函数CRC算法为一个数据段计算出一个长度固定的哈希值。哈希算法的哈希值位数越多,校验能力越强,64位以上的哈希函数常用于安全领域,实现电子签名的功能,防止数据被恶意修改在计算性能上的特点:便于32位计算机高效率的软件实现MessageDigest5(MD5):128bitsSecureHashAlgorithm1(SHA-1):160bits哈希函数的其他应用(用来比较两段数据是否相同)哈希值不同,数据必不同;哈希值相同,数据不同的概率很低(弱哈希函数和强哈希函数)用CRC32比较两台计算机上的数据是否相同,例如:Cisco的OSPF链路状态数据库Bittorent,eMulemd5sum增量拷贝rsync(同时利用弱哈希函数和强哈希函数)Homework14,15,163.3ElementaryDataLinkProtocolsElementaryDataLinkProtocolsAnUnrestrictedSimplexProtocolASimplexStop-and-WaitProtocolASimplexProtocolforaNoisyChannelProtocolDefinitionsElementaryDataLinkProtocolsSomeoftheassumptionsPhysicallayer,datalinklayer,andnetworklayerareindependentprocessesMachineAwantstosendalongstreamofdatatomachineB,usingareliable,connection-orientedserviceMachinesdonotcrashLibraryprocedureswait_for_eventsfrom_network_layer/to_network_layerto_physical_layer/from_physical_layertimeroperationsenable_network_layer/disable_network_layersequencenumberoperationProtocolDefinitionsSomedefinitionsneededintheprotocolstofollow.Thesearelocatedinthefileprotocol.h.Protocol1:UtopiaUnrestricted
Simplex
ProtocolProtocol2:Stop-and-WaitProtocolforaError-freeChannelSimplexStop-and-WaitProtocolProtocol3:ASimplexProtocolforaNoisyChannelProblemsSendDATAandthenwaitforACK……Case1:ProtocolfailedonreceiverThenetworklayeronAgivespacket1toitsdatalinklayer.ThepacketiscorrectlyreceivedatBandpassedtothenetworklayer.BsendsanACKtoATheACKgetslostcompletelyThedatalinklayeronAeventuallytimesout.NothavingreceivedACK,resendstheframeTheduplicateframealsoarrivesB,...Case2:ProtocolfailedonSenderAdelayedACKSequenceNumberDistinguishanewframefromaretransmissionPutasequencenumberintheheaderofeachframeWhatistheminimumnumberofbitsneededforthesequencenumber?(停等协议)链路层:1比特,编号空间大小为2传输层:1比特编号空间太小,需要较大的编号空间。如:TFTP(16比特编号)seq_nr=0从网络层获取一个分组放入buffer发送buffer中的数据(seq_nr),新启动定时器label1:wait_for_event()switch(event){case收到了坏帧(校验和错):
重发缓冲在buffer里的数据(seq_nr),重新启动定时器case定时器超时:重发缓冲在buffer里的数据(seq_nr),新启动定时器case收到校验和正确的帧:
if(ack序号正确){
关闭旧定时器
inc(seq_nr)从网络层获取下一个分组放入buffer
发送buffer中的数据(seq_nr),新启动定时器
}else
重发缓冲在buffer里的数据(seq_nr),重新启动定时器}gotolabel1Senderseq_nr=0从网络层获取一个分组放入bufferlabel1:发送buffer中的数据(seq_nr),新启动定时器wait_for_event()switch(event){case收到了坏帧(校验和错)://重发缓冲在buffer里的数据(seq_nr),重新启动定时器case定时器超时:
//重发缓冲在buffer里的数据(seq_nr),新启动定时器case收到校验和正确的帧:
if(ack序号正确){
关闭旧定时器
inc(seq_nr)从网络层获取下一个分组放入buffer//发送buffer中的数据(seq_nr),新启动定时器
}else//重发缓冲在buffer里的数据(seq_nr),重新启动定时器}gotolabel1SenderSenderframe_expected=0while(true){wait_for_event()switch(event){case坏帧:
do_nothingcase收到校验和正确的数据帧:if(序号==frame_expected){向网络层上交分组
回送ACK(序号为frame_expected)inc(frame_expected)}else{回送ACK(序号为dec(frame_expected))}}}Receiverframe_expected=0while(true){wait_for_event()switch(event){case坏帧:
do_nothingcase收到校验和正确的数据帧:if(序号==frame_expected){向网络层上交分组inc(frame_expected)
}回送ACK(序号为dec(frame_expected))}}ReceiverReceiverApositiveacknowledgementwithretransmissionprotocol.(PAR)TimerTimeoutIfthetimeoutintervalissettooshort,thesenderwilltransmitunnecessaryframes.Whiletheseextraframeswillnotaffectthecorrectnessoftheprotocol,theywillhurtperformance3.4SlidingWindowProtocolsPiggybackingForfull-duplexdatatransmissionUsetwoseparatecommunicationchannelsanduseeachoneforsimplexdatatrafficUsethesamecircuitfordatainbothdirectionsPiggybackingWhenadataframearrives,insteadofimmediatelysendingaseparatecontrolframe,thereceiverrestrainsitselfandwaitsuntilthenetworklayerpassesitthenextpacketACKisattachedtotheoutgoingdataframe(usingtheackfieldintheframeheader)Sendingwindow&ReceivingwindowSendingwindowUsewindowtocontrolnumberofoutstandingframesAtanyinstantoftime,thesendermaintainsasetofsequencenumberscorrespondingtooutstandingframes.TheseframesaresaidtofallwithinthesendingwindowMaximumofSendingWindowSizeReceivingwindowReceiveralsomaintainsareceivingwindowcorrespondingtothesetofframesitispermittedtoacceptSlidingWindowProtocolsAOne-BitSlidingWindowProtocolAProtocolUsingGoBackNAProtocolUsingSelectiveRepeatOne-BitSlidingWindowProtocolSlidingWindowofSize1Aslidingwindowofsize1,witha3-bitsequencenumber.(a)Initially.(b)Afterthefirstframehasbeensent.(c)Afterthefirstframehasbeenreceived.(d)Afterthefirstacknowledgementhasbeenreceived.Protocol4:One-BitSlidingWindow发送窗口最大值1One-BitSlidingWindowProtocol(1)/*两端都执行相同的程序protocol4()*//*双向均有无穷尽数据发向对方*/One-BitSlidingWindowProtocol(2)TwoScenariosforProtocol4Twoscenariosforprotocol4.Thenotationis(seq,ack,packet)Anasteriskindicateswhereanetworklayeracceptsapacket(a)Normalcase.(b)Abnormalcase.ProblemConsidera50-kbpssatellitechannelwitha520-msecround-trippropagationdelay,send1000-bitframest=0:senderstartssendingt=20msec:theframehasbeencompletelysentt=270msec:framefullyarrivedatthereceivert=520msec:ACKarrivedbackatthesender,underthebestofcircumstances(nowaitinginthereceiverandashortacknowledgementframe).ConclusionSenderwasblockedduring500/520or96%ofthetime.only4%oftheavailablebandwidthwasusedLineUtilization
ProtocolUsingGoBackNPipelining&ErrorRecoveryPipelininganderrorrecovery.Effectonanerrorwhen(a)Receiver’swindowsizeis1.(b)Receiver’swindowsizeislarge.AboutACKBA012ACK0ACK2ACK1BA012ACK2GoBackNBasedonslidingwindowUsewindowtocontrolnumberofoutstandingframesIfReceiverdetectserror,discardthatframeandallfutureframesuntilerrorframereceivedcorrectly(silent)Transmittermust
gobackandretransmitthatframeandallsubsequentframesDamagedFrameIfDataFrameisDamagedReceiverdetectserrorinframeiReceiverdiscardthatframei
andallsubsequentWhentimeout,transmitterretransmitsframeiandallsubsequentIfACKFrameisDamagedReceivergetsframei
andsendacknowledgementACK(i)whichislostAcknowledgementsarecumulative,sonextACK(i+n)mayarrivebeforetransmittertimesoutonframeiIftransmittertimesout,retransmitsframeiandallsubsequentMaximumofSendingWindowSizeProblemThesendersendsframes0through7.ACKforframe7comesbacktothesender.Thesendersendsanothereightframes,againwithsequencenumbers0through7.Didalleightframesbelongingtothesecondbatcharrivesuccessfully,ordidalleightgetlost?
原则发送方发完窗口内所有帧,接收方正确接收到所有发送来的帧,接收窗口向前推移。此时(未回送ACK),必须保证发送窗口与接收窗口在序号上不重叠(考虑所有ACK丢失的情况:发送窗口不滑动,接收窗口最大滑动)。Protocol5:Go-Back-NProtocol发送窗口最大值7函数between
判断序号b是否落在窗口(a,b)内判断:a到c不回绕c>a(b位于a~c之间)判断:a到c回绕a>c(b位于a~7,或者0~c-1)-Protocol5改进和效率设置ACK帧和ACK定时器发送数据量并非一个源源不断的分组流无法及时搭载ACK时,发送短的ACK帧(不含数据信息)用于回送ACK的定时器操作start_ack_timer和stop_ack_timer,数据重传所用定时器操作(与上述两个操作有区别)start_timer与stop_timerACK定时器时限的设计NAK帧:激发重传不需等到超时协议参数与线路利用率超时定时器时限的设计(考虑线路往返时间延迟,ACK定时器时限,对方物理层发送排队时延)滑动窗口即MAX_SEQ大小TimerQueueinSoftwareSimulationofmultipletimersinsoftware.UsingSelectiveRepeatSelectiveRepeatAlsocalledselectiveRejectOnlyrejectedframesareretransmittedSubsequentframesareacceptedbythereceiverandbufferedMinimizesretransmissionReceivermustmaintainlargeenoughbufferMorecomplexWindowSizeofSelectiveRepeat
(a)Initialsituationwithawindowsizeseven.(b)Aftersevenframessentandreceived,butnotacknowledged.(c)Initialsituationwithawindowsizeoffour.(d)Afterfourframessentandreceived,butnotacknowledgedSequenceNumber,BuffersThemaximumwindowsizeshouldbeatmosthalftherangeofthesequencenumbersHowmanybuffersmustthereceiverhave?Thenumberofbuffersneededisequaltothewindowsize,nottotherangeofsequencenumbersSendWindow&ReceiveWindows
Ws+Wr<=2n Ws>=Wr
ACKTimerACKtimerAfteranin-sequencedataframearrives,anauxiliarytimerisstartedbystart_ack_timer.Ifnoreversetraffichaspresentedbeforethistimerexpires,aseparateACKframeissentNAKWheneverthereceiverhasreasontosuspectthatanerrorhasoccurred,itsendsNAKframebacktothesenderNAKframeisarequestforretransmissionTherearetwocaseswhenthereceivershouldbesuspiciousAdamagedframehasarrivedAframeotherthantheexpectedonearrivedAvoidmakingmultiplerequestsforretransmissionofthesameframeReceiverkeepstrackofwhetheraNAKhasalreadybeensentforagivenframeProtocol6:SelectiveRepeat发送窗口最大4,接收窗口最大4ContinuedContinuedContinued-3.5PerformanceofSlidingWindowProtocolsPerformanceStop-and-waitwithouterrorPerformanceStop-and-waitwithouterrorPerformanceStop-and-waitwitherrorPerformanceSlidewindowwithouterrorHomework172026,27,28,29,30,31,323.6ExampleDataLinkProtocolsExampleDataLinkProtocolsHDLC–High-LevelDataLinkControlTheDataLinkLayerintheInternetSLIP(SerialLineIP)PPP(Point-to-PointProtocol)HDLC(High-LevelDataLinkControl)HistoryIBMSDLCSynchronousDataLinkControlANSIADCCPAdvancedDataCommunicationControlProcedureISOHDLCHigh-levelDataLinkControlCCITT(ITU-T)LAPBLAP(LinkAccessProcedure)LAPB(LinkAccessProcedure–Balancedmode)LAPD(IDSND-Channel)HDLCStationTypesPrimarystationControlsoperationoflinkFramesissuedarecalledcommandsMaintainsseparatelogicallinktoeachsecondarystationSecondarystationUndercontrolofprimarystationFramesissuedcalledresponsesCombinedstationMayissuecommandsandresponsesHDLCLinkConfigurationsUnbalancedOneprimaryandoneormoresecondarystationsSupportsfull-duplexandhalf-duplexBalancedTwocombinedstationsSupportsfull-duplexandhalf-duplexHDLCFrameformatFrameformatforbit-orientedprotocols.HDLCFramesControlfieldof(a)Aninformationframe.(I)(b)Asupervisoryframe.(RR/RNR/REJ/SREJ)(c)Anunnumberedframe.(SABM,UA,DISC,FRMR)FirstoneortwobitsofcontrolfiledidentifyframetypeI-frameIfthefirstbitofthecontrolfieldis0,thismeanstheframeisanI-frame.3-bitN(S)1-bitP/F3-bitN(R)S-frameControlFieldIfthefirst2bitsofthecontrolfieldare10,thismeanstheframeisanS-frame.CodeRR,RNR,REJ,SREJ(3-bitN(R))将ACK帧分两类(RR/RNR),将NAK帧分两类(REJ/SREJ),why?U-frameCodingU-frame建立连接SABM/SABME/SNRM/SNRME(应答UA)断开连接DISC(应答UA)FRMR帧(FrameReject)indicatethataframewithacorrectchecksumbutimpossiblesemanticsarrivedUI帧(UnnumberedInformation)无编号数据帧,可以含有较长的数据域可用UI帧在链路层两端提供“无连接-不可靠”数据传输P/FBitUsedependsoncontext
UnbalancedconfigurationPoll:InvitetheterminaltosenddataFinal:Alltheframessentbytheterminal,exceptthefinalone,havetheP/Fbitsetto0.Thefinaloneis1BalancedconfigurationCommand(Pbit):P=1tosolicit(poll)responsefrompeerResponse(Fbit):F=1indicatesresponsetosolicitingcommand
ForcetheothermachinetosendaSupervisoryframeimmediatelyratherthanwaitingforreversetrafficontowhichtopiggybackthewindowinformationACKFrame:RR&RNRRR:ReceiverReadyACKframeusedtoindicatetheN(R)frameexpectedThisframeisusedwhenthereisnoreversetraffictouseforpiggybackingRNR:ReceiverNotReadyItacknowledgesallframesuptobutnotincludingN(R),justasRRdoes,butittellsthesendertostopsending(Flowcontrol)NAKFrame:REJ&SREJREJ:RejectIndicatethatatransmissionerrorhasbeendetectedTheN(R)
fieldindicatesthefirstframeinsequencenotreceivedcorrectly(i.e.,theframetoberetransmitted)Thesenderisrequiredtoretransmitalloutstandingframesstartingat
N(R)
SREJ:SelectiveRejectCallsforretransmissionofonlytheframespecifiedbyN(R)Ifareceiverwishestobufferout-of-sequenceframesforpotentialfutureuse,itcanforcetheretransmissionofanyspecificframeusingSREJHDLCOperationExchangeofinformation,supervisoryandunnumberedframesInformation-datatobetransmittedtouserFlowanderrorcontrolpiggybackedoninformationframesSupervisory-ARQwhenpiggybacknotusedUnnumbered-supplementarylinkcontrolThreephrasesInitializationDatatransferDisconnectExampleofHDLCOperationExampleofHDLCOperationSLIP(SerialLineIP)SLIP–SerialLineInternetProtocolRFC1055Framing:Ch
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年特许金融分析师考试深入思考试题及答案
- 网络编辑师证书考试必考知识点与试题及答案
- 蹲点管理在养殖中的具体应用试题及答案
- 网络编辑师证书考试2024年心理准备试题及答案
- 特许金融分析师考试常用题型及答案
- 多角度分析2025年银行从业资格证试题答案
- 2024年畜牧师职称考试对照表及试题答案整合
- 银行从业资格证考试学员互动心得及试题答案
- CFA考试投资策略题及答案
- 2025年国际金融理财师考试思维模式试题及答案
- 高三数学复习备考策略
- 六、七年级走进文言文译文
- 幼儿园中班美术《疯狂的头发》课件
- 半月板损伤的护理查房
- 沪教版初中数学初二数学上册《二次根式的运算》教学设计
- 粮库出租合同书本
- 皮肤科治疗知情同意书
- 2022年桂林临桂区教师招聘考试真题
- 【基于STM32智能门锁系统的设计10000字(论文)】
- 液压支架外文翻译
- 我的家乡烟台课件
评论
0/150
提交评论