您好,欢迎访问三七文档
Information&CommunicationCollege1刘联海llh@guet.edu.cnWELCOMETOCOMPUTERNETWORKSChapter4.TheMediumAccessControlSublayer2Review●SpecificFunctions●Services●Framing●ErrorControl●FlowControl●CRC●ElementaryDataLinkProtocols●SlidingWindowProtocols●HDLCChapter4.TheMediumAccessControlSublayer3●Sofar:WehavediscussedtheDataLinkLayer’sfunctionalityandsomeprotocolsrelatedtopoint-to-pointcommunication.●Alargeclassofnetworksisbuiltontopofbroadcastchannels:anumberofstationssharethesame“wire.”Ifonestationsends,alltheothersgettohearit.●What’stheproblem:ifyou’resharingachannel,thentwostationsmaydecidetostartframetransmissionatthesametime=framecollisionChapter4.TheMediumAccessControlSublayerChapter4.TheMediumAccessControlSublayer4●Solution:Allocatethechanneltooneofthecompetingstations.●Problem:You’llhavetousethatsamechanneltofigureoutthecompetitionandtheallocation.●TheprotocolsusedtodeterminewhogoesnextonamultiaccesschannelbelongtoasublayerofthedatalinklayercalledtheMAC(MediumAccessControl)sublayer.Chapter4.TheMediumAccessControlSublayerChapter4.TheMediumAccessControlSublayer5Maintopics:●MULTIPLEACCESSPROTOCOLSALOHACSMA/CD●ETHERNET●WIRELESSLANS●DATALINKLAYERSWITCHINGChapter4.TheMediumAccessControlSublayerChapter4.TheMediumAccessControlSublayer6信道分配策略随机访问(争用)---负载较轻时控制访问(负载较重时)静态分配(将频带或时间片等固定分给各站点)站点少且固定,数据量大时频分多路复用同步时分多路复用波分多路复用码分多路复用动态分配(异步时分多路复用)仅当有数据发时,才占信道发数据。轮转(每个站轮流获得发送机会)预约(各站先声明有数据要发送,然后按预约顺序发送)Chapter4.TheMediumAccessControlSublayer7Threestrategiesforchannelallocation:1.Exercisenocontrolatall:simplyletastationtrytousethechannel,anddosomethingwhenacollisionhappens.Appliedincontention(竞争)systems.2.Employaround-robintechnique:eachstationinturnisallowedtousethechannel.Appliedintoken-basedsystems–thestationthathasthetokenmayusethechannel.3.Letastationplaceareservation(预约)forthechannel.Usedinslottedsystems.Theproblemishowtomakeareservation.4.1TheChannelAllocationProblemChapter4.TheMediumAccessControlSublayer84.2.1ALOHA4.2.2CarrierSenseMultipleAccessProtocols4.2.5WavelengthDivisionMultipleAccessProtocols4.2.6WirelessLANProtocols4.2MultipleAccessProtocolsChapter4.TheMediumAccessControlSublayer94.2.1ALOHA:PureALOHAPrinciple:ifyouwanttosendaframe,justdoit.Ifacollisionoccurs,finishyourcurrenttransmissionandretrylater.Chapter4.TheMediumAccessControlSublayer10纯ALOHA冲突重发Chapter4.TheMediumAccessControlSublayer11Figure4-2.Vulnerableperiodfortheshadedframe.4.2.1ALOHAChapter4.TheMediumAccessControlSublayer121,LetS(吞吐量)betheaveragenumberofnewframessubmittedduringaframetimeTframe(timeneededtotransmitafullframe).Poissondistributed(泊松分布).2,LetG(载荷)bethenumberofoldandnewframesubmissionsduringaframetime(G≥S).AlsoPoissondistributed.在给定的一帧时间共生成k帧的概率如下:P[kframessubmitted]=GK*e-G/k!3,LetP0(传输成功的概率)betheprobabilitythatframedoesnotsufferfromcollision=S=GP0.4,生成0帧的概率为e-G,而两个帧时间长的间隔所生成的帧平均数是2G,所以:ProbabilitythataframewillnotbedamagedisP0=e-2G5,S=Ge-2G,当G=0.5时,吞吐量最大,为S=0.184,即信道利用率为18%。4.2.1ALOHA:PureALOHAChapter4.TheMediumAccessControlSublayer13原理:由于采用时槽技术,所以冲突危险周期被减少了一半,所以在同一个时槽中没有其他流量的概率是e-G,于是S=Ge-G,由此可以得出当G=1时,其信道利用率最高,可达到36%。4.2.1ALOHA:slottedALOHAChapter4.TheMediumAccessControlSublayer14PureALOHAvs.SlottedALOHAFigure4-3.ThroughputversusofferedtrafficforALOHAsystems.Chapter4.TheMediumAccessControlSublayer15CarrierSenseMultipleAccessProtocolsdobetterthanALOHA:youmonitorthechannelbeforeand/orduringtransmission.●PersistentCSMA●NonpersistentCSMA●CSMA/CD4.2.2CarrierSenseMultipleAccessProtocolsChapter4.TheMediumAccessControlSublayer161,1-persistent(持续的CSMA):Listenwhetherthechannelisfreebeforetransmitting.Ifbusy,waituntilitbecomesfreeandthenimmediatelystartyourtransmission.Ifacollisionoccurs,thestationwaitsarandomamountoftimeandstartsalloveragain.2,Nonpersistent(非持续的CSMA):Lessgreedy(至少没有贪婪)–whenthechannelisbusy,waitarandomperiodoftimebeforetryingagain.Ifyouwaittoolong,thechannelutilizationdrops.3,p-Persistent:Usedwithslottedsystems.Ifyoufindthechannelidleduringthecurrentslot,youtransmitwithprobabilityp,anddeferuntilnextslotwithprobability1-p.p=1isnotreallygood,p=0makesyoureallypolite.●对ALOHA的改进之处:1,保证了当检测到信道忙时,所有的站都不再传送数据;2,每个站检测到由冲突,它就放弃它当前的传送任务。PersistentandNonpersistentCSMAChapter4.TheMediumAccessControlSublayer17Improvement:sensethechannel,butimmediatelystoptransmissionwhenyoudetectacollision.Ethernetworkslikethis.1.Listentoseewhetherthechannelisfree.Transmissionisdelayeduntilthechannelisnolongerused.2.Duringtransmission,keeplisteninginordertodetectacollision.Ifacollisionoccurs,transmissionimmediatelystops.3.Ifacollisionoccured,waitarandomperiodoftime,andproceedwiththefirststepagain.CSMAwithCollisionDetectionChapter4.TheMediumAccessControlSublayer18Figure4-5.CSMA/CDcanbeinoneofthreestates:contention,transmission,oridle.CSMAwithCollisionDetectionChapter4.TheMediumAccessControlSublayer19Basicidea:Often,thereareanumberofbasestationsconnectedthroughguidedmedia.Abasestationcancommunicatewithamobilecomputer.Themobilecomputersuseradio/infraredsignalsforcommunication.Problem:Therecanbesubtleinterference.Figure4-11.AwirelessLAN.(a)Atransmitting.(b)Btransmit
本文标题:信道分配策略
链接地址:https://www.777doc.com/doc-813672 .html