信道分配策略105047.pptx
《信道分配策略105047.pptx》由会员分享,可在线阅读,更多相关《信道分配策略105047.pptx(101页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、n刘联海刘联海WELCOMETOCOMPUTER NETWORKS1Information&Communication CollegeChapter 4.The Medium Access Control SublayerChapter 4.The Medium Access Control SublayerReviewSpecificFunctionsServicesFramingErrorControlFlowControlCRCElementaryDataLinkProtocolsSlidingWindowProtocolsHDLC2Chapter 4.The Medium Access
2、 Control SublayerChapter 4.The Medium Access Control SublayerSofar:WehavediscussedtheDataLinkLayersfunctionalityandsomeprotocolsrelatedtopoint-to-pointcommunication.Alargeclassofnetworksisbuiltontopofbroadcastchannels:anumberofstationssharethesame“wire.”Ifonestationsends,alltheothersgettohearit.What
3、stheproblem:ifyouresharingachannel,thentwostationsmaydecidetostartframetransmissionatthesametime=framecollisionChapter 4.The Medium Access Control Sublayer3Chapter 4.The Medium Access Control SublayerChapter 4.The Medium Access Control SublayerSolution:Allocatethechanneltooneofthecompetingstations.P
4、roblem:Youllhavetousethatsamechanneltofigureoutthecompetitionandtheallocation.TheprotocolsusedtodeterminewhogoesnextonamultiaccesschannelbelongtoasublayerofthedatalinklayercalledtheMAC(MediumAccessControl)sublayer.Chapter 4.The Medium Access Control Sublayer4Chapter 4.The Medium Access Control Subla
5、yerChapter 4.The Medium Access Control SublayerMain topics:MULTIPLE ACCESS PROTOCOLSALOHA CSMA/CD ETHERNET WIRELESS LANS DATA LINK LAYER SWITCHINGChapter 4.The Medium Access Control Sublayer5Chapter 4.The Medium Access Control SublayerChapter 4.The Medium Access Control Sublayer信道分配策略信道分配策略随机访问随机访问(
6、争用争用)-负载较轻时负载较轻时控制访问控制访问(负载较重时负载较重时)静态分配静态分配(将频带或时间片等将频带或时间片等固定分给各站点固定分给各站点)站点少且固定,数据量大时站点少且固定,数据量大时频分多路复用频分多路复用同步时分多路复用同步时分多路复用波分多路复用波分多路复用码分多路复用码分多路复用动态分配动态分配(异步时分多路复用异步时分多路复用)仅当有数据发时仅当有数据发时,才才占信道发数据占信道发数据 。轮转轮转 (每个站轮流获得发送机会每个站轮流获得发送机会)预约预约 (各站先声明有数据要发送各站先声明有数据要发送,然后按预约顺序发送然后按预约顺序发送)6Chapter 4.The
7、 Medium Access Control SublayerChapter 4.The Medium Access Control SublayerThree strategies for channel allocation:1.Exercise no control at all:simply let a station try to use the channel,and do something when a collision happens.Applied in contention(竞争)竞争)systems.2.Employ a round-robin technique:e
8、ach station in turn is allowed to use the channel.Applied in token-based systems the station that has the token may use the channel.3.Let a station place a reservation(预约)预约)for the channel.Used in slotted systems.The problem is how to make a reservation.4.1 The Channel Allocation Problem7Chapter 4.
9、The Medium Access Control SublayerChapter 4.The Medium Access Control Sublayer4.2.1 ALOHA4.2.2 Carrier Sense Multiple Access Protocols4.2.5 Wavelength Division Multiple Access Protocols4.2.6 Wireless LAN Protocols4.2 Multiple Access Protocols8Chapter 4.The Medium Access Control SublayerChapter 4.The
10、 Medium Access Control Sublayer4.2.1 ALOHA:Pure ALOHAPrinciple:ifyouwanttosendaframe,justdoit.Ifacollisionoccurs,finishyourcurrenttransmissionandretrylater.9Chapter 4.The Medium Access Control SublayerChapter 4.The Medium Access Control Sublayer纯纯ALOHA冲突重发冲突重发10Chapter 4.The Medium Access Control Su
11、blayerChapter 4.The Medium Access Control SublayerFigure4-2.Vulnerableperiodfortheshadedframe.4.2.1 ALOHA11Chapter 4.The Medium Access Control SublayerChapter 4.The Medium Access Control Sublayer1,LetS(吞吐量)吞吐量)betheaveragenumberofnewframessubmittedduringaframetimeTframe(timeneededtotransmitafullfram
12、e).Poissondistributed(泊松分布)泊松分布).2,LetG(载荷)载荷)bethenumberofoldandnewframesubmissionsduringaframetime(GS).AlsoPoissondistributed.在给定的一帧时间共生成在给定的一帧时间共生成k帧的概率如下:帧的概率如下:Pkframessubmitted=GK*e-G/k!3,LetP0(传输成功的概率传输成功的概率)betheprobabilitythatframedoesnotsufferfromcollision=S=GP0.4,生成生成0帧的概率为帧的概率为e-G,而两个帧时间
13、长的间隔所生成的帧平而两个帧时间长的间隔所生成的帧平均数是均数是2G,所以:所以:ProbabilitythataframewillnotbedamagedisP0=e-2G5,S=Ge-2G,当当G0.5时,吞吐量最大,为时,吞吐量最大,为S0.184,即信道利即信道利用率为用率为18。4.2.1 ALOHA:Pure ALOHA12Chapter 4.The Medium Access Control SublayerChapter 4.The Medium Access Control Sublayer原理:由于采用时槽技术,所以冲突危险周期被减少了一原理:由于采用时槽技术,所以冲突危险
14、周期被减少了一半,所以在同一个时槽中没有其他流量的概率是半,所以在同一个时槽中没有其他流量的概率是e-G,于是于是S=Ge-G,由此可以得出当由此可以得出当G1时,其信道利用率最高,可时,其信道利用率最高,可达到达到36。4.2.1 ALOHA:slotted ALOHA13Chapter 4.The Medium Access Control SublayerChapter 4.The Medium Access Control SublayerPure ALOHA vs.Slotted ALOHAFigure 4-3.Throughput versus offered traffic fo
15、r ALOHA systems.14Chapter 4.The Medium Access Control SublayerChapter 4.The Medium Access Control SublayerCarrier Sense Multiple Access Protocols do better than ALOHA:you monitor the channel before and/or during transmission.Persistent CSMA Nonpersistent CSMA CSMA/CD4.2.2 Carrier Sense Multiple Acce
16、ss Protocols15Chapter 4.The Medium Access Control SublayerChapter 4.The Medium Access Control Sublayer1,1-persistent(持续的持续的CSMA):Listen whether the channel is free before transmitting.If busy,wait until it becomes free and then immediately start your transmission.If a collision occurs,the station wa
17、its a random amount of time and starts all over again.2,Nonpersistent(非持续的非持续的CSMA):Less greedy(至少没有至少没有贪婪)贪婪)when the channel is busy,wait a random period of time before trying again.If you wait too long,the channel utilization drops.3,p-Persistent:Used with slotted systems.If you find the channel
18、idle during the current slot,you transmit with probability p,and defer until next slot with probability 1-p.p1is not really good,p0makes you really polite.对对ALOHA的改进之处的改进之处:1,保证了当检测到信道忙时,所有的站,保证了当检测到信道忙时,所有的站都不再传送数据;都不再传送数据;2,每个站检测到由冲突,它就放弃它当前的传,每个站检测到由冲突,它就放弃它当前的传送任务。送任务。PersistentandNonpersistentC
19、SMA16Chapter 4.The Medium Access Control SublayerChapter 4.The Medium Access Control SublayerImprovement:sense the channel,but immediately stop transmission when you detect a collision.Ethernet works like this.1.Listen to see whether the channel is free.Transmission is delayed until the channel is n
20、o longer used.2.During transmission,keep listening in order to detect a collision.If a collision occurs,transmission immediately stops.3.If a collision occured,wait a random period of time,and proceed with the first step again.CSMA with Collision Detection17Chapter 4.The Medium Access Control Sublay
21、erChapter 4.The Medium Access Control SublayerFigure 4-5.CSMA/CD can be in one of three states:contention,transmission,or idle.CSMA with Collision Detection18Chapter 4.The Medium Access Control SublayerChapter 4.The Medium Access Control SublayerBasic idea:Often,there are a number of base stations c
22、onnected through guided media.A base station can communicate with a mobile computer.The mobile computers use radio/infrared signals for communication.Problem:There can be subtle interference.Figure 4-11.A wireless LAN.(a)A transmitting.(b)B transmitting.4.2.6 Wireless LAN Protocols19Chapter 4.The Me
23、dium Access Control SublayerChapter 4.The Medium Access Control SublayerIssue(a):How can C be prevented from trying to transmit something to B?In that case it will ruin any receipt by B(hidden station problem).Issue(b):How can we tell C that it is allowed to transmit to D,because this will not inter
24、fere with the communication from B to A?(exposed station problem).(注解:(注解:B向向A传输数据,则传输数据,则C可检测到正传输可检测到正传输数据,所以它认为现在不可向数据,所以它认为现在不可向D发送数据)发送数据)MACA(Multiple Access with Collision Avoidance):The basic idea is for the sender to stimulate the receiver into outputting a short frame,so stations nearby can
25、 detect this transmission and avoid transmitting for the duration of the upcoming(large)data frame.4.2.6 Wireless LAN Protocols20Chapter 4.The Medium Access Control SublayerChapter 4.The Medium Access Control SublayerFigure 4-12.The MACA protocol.(a)A sending an RTS to B.(b)B responding with a CTS t
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 信道 分配 策略 105047
限制150内