版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
AdvancedComputerNetworkLecture3:TheMediumAccessControlLayerYangQinDepartmentofComputerScienceShenzhenGraduateSchoolHarbinInstituteofTechnologyMediumAccessControlSublayerNetworkLayerLogicalLinkControlSublayerMediumAccessControlSublayerDataLinkLayerPhysicalLayer2022年4月5日星期二2MediumAccessControlSublayer(cont’d)
Mediumaccess(MAC)sublayerisnotimportantonpoint-to-pointlinks
TheMACsublayerisonlyusedinbroadcastorsharedchannelnetworks
Examples:Satellite,Ethernet,Cellular2022年4月5日星期二3Agenda
TheChannelAllocationProblem
MultipleAccessProtocols
EthernetLANTechnology
LANSwitching2022年4月5日星期二4TheChannelAllocationProblem5MediumSharingProblemsNodeNodeBusBus(a)(b)NodeCollisionBus2022年4月5日星期二6MediumSharingProblems
Problemstobesolved
Whichnodecansendthedata?
Willacollisionhappen?
Howtosuccessfullysendaframeevenacollisionmayhappens.2022年4月5日星期二7StaticAssignmentProtocols
Staticandpredeterminedallocationofchannelaccess:independentofuseractivity
Idleusersmaybeassignedtothechannel,inwhichcasechannelcapacityiswasted
Examples:TDMA,FDMA,WDMA2022年4月5日星期二8DynamicChannelAllocation
Allthedynamicchannelallocationmethodstobediscussedarebasedonfivekeyassumptions.
z
z
z
zStationModel.SingleChannelAssumption.CollisionAssumption.(a)ContinuousTime;(b)SlottedTime
z(a)CarrierSense;(b)NoCarrierSense2022年4月5日星期二9StationModel
ThemodelconsistsofNindependentstations(e.g.,computers,telephones,orpersonalcommunicators)
Eachstationhasaprogramoruserthatgeneratesframesfortransmission.
TheprobabilityofaframebeinggeneratedinanintervaloflengthΔtisλ.Δt,whereλisaconstant(thearrivalrateofnewframes).
Onceaframehasbeengenerated,thestationisblockedanddoesnothinguntiltheframehasbeensuccessfullytransmitted.2022年4月5日星期二10SingleChannelAssumption
Asinglechannelisavailableforallcommunication.
Allstationscantransmitonitandallcanreceivefromit.
Asfarasthehardwareisconcerned,allstationsareequivalent,althoughprotocolsoftwaremayassignprioritiestothem.2022年4月5日星期二11CollisionAssumption
Iftwoframesaretransmittedsimultaneously,theywillresultinacollision.
Allstationscandetectcollisions.
Acollidedframemustbetransmittedagainlater.Therearenoerrorsotherthanthosegeneratedbycollisions.2022年4月5日星期二12TimeAssumption
ContinuousTime.Frametransmissioncanbeginatanyinstant.Thereisnomasterclockdividingtimeintodiscreteintervals.
SlottedTime.Timeisdividedintodiscreteintervals(slots).Frametransmissionsalwaysbeginatthestartofaslot.Aslotmaycontain0,1,ormoreframes,correspondingtoanidleslot,asuccessfultransmission,oracollision,respectively.2022年4月5日星期二13CarrierSenseAssumption
CarrierSense.Stationscantellifthechannelisinusebeforetryingtouseit.Ifthechannelissensedasbusy,nostationwillattempttouseituntilitgoesidle.
NoCarrierSense.Stationscannotsensethechannelbeforetryingtouseit.Theyjustgoaheadandtransmit.Onlylatercantheydeterminewhetherthetransmissionwassuccessful.2022年4月5日星期二14DemandAssignmentProtocols
Allocatechannelcapacitytohostsonademandbasis(i.e.,onlytoactiveusers)
Requiresmethodsformeasuringthedemandforthechannel
Polling
Reservationschemes
TokenPassingScheme2022年4月5日星期二15DemandAssignmentProtocols--Polling
AcentralcontrollerinterrogateseachhostandallocateschannelcapacitytothosewhoneeditGoodforsystemswith:
ShortpropagationdelaySmallpollingmessagesNon-burstytraffic
TokenPassingScheme
Atokenalwayscirculatesaroundaringnet.AusergrabsatokentotransmitdataWilldiscussdetailslaterintheTokenRingLAN
2022年4月5日星期二16ContentionAccessProtocols
Singlechannelsharedbyalargenumberofhosts
Nocoordinationbetweenhosts
Controliscompletelydistributed
Examples:ALOHA,CSMA,CSMA/CD2022年4月5日星期二17ContentionAccess(cont’d)
Advantages:
Shortdelayforburstytraffic
Simple(duetodistributedcontrol)
Flexibletofluctuationsinthenumberofhosts
Fairness2022年4月5日星期二18ContentionAccess(cont’d)
Disadvantages:
Lowchannelefficiencywithalargenumberofhosts
Notgoodforcontinuoustraffic(e.g.,voice)
Cannotsupportprioritytraffic
Highvarianceintransmissiondelays2022年4月5日星期二19MultipleAccessProtocols20MultipleAccessProtocols
ALOHA
CarrierSenseMultipleAccessProtocols
Collision-FreeProtocols
Limited-ContentionProtocols
WirelessLANProtocols2022年4月5日星期二21PureALOHA2022年4月5日星期二22CollisionPeriodofPureALOHA2022年4月5日星期二23ThroughputofPureALOHA2022年4月5日星期二24ThroughputofPureALOHA2022年4月5日星期二25SlottedALOHA
Principle:dataarealwayssentatthebeginningofatimeslot.Ifacollisionoccurs,finishthecurrenttransmissionandretryafterarandomamountoftimeslots.
SlottedALOHAcutsthevulnerableperiodforpacketsfrom2ttot.
Thisdoublesthebestpossiblethroughputfrom18.4%to36.8%
How?
Timeisslotted.Packetsmustbetransmittedwithinaslot2022年4月5日星期二26TheSlottedALOHAAlgorithm1.Ifahosthasapackettotransmit,itwaitsuntilthebeginningofthenextslotbeforesending2.Listentothebroadcastandcheckifthepacketwasdestroyed3.Iftherewasacollision,waitarandomnumberofslotsandtrytosendagain2022年4月5日星期二27ThroughputofSlottedALOHA2022年4月5日星期二28CSMA
Wecouldachievebetterthroughputifwecouldlistentothechannelbeforetransmittingapacket
Thisway,wewouldstopavoidablecollisions.
Todothis,weneed“CarrierSenseMultipleAccess,”orCSMA,protocols2022年4月5日星期二29AssumptionswithCSMANetworks1.Constantlengthpackets2.Noerrors,exceptthosecausedbycollisions3.Nocaptureeffect4.Eachhostcansensethetransmissionsofallotherhosts5.Thepropagationdelayissmallcomparedtothetransmissiontime2022年4月5日星期二30CSMA(cont’d)
ThereareseveraltypesofCSMAprotocols:
1-PersistentCSMA
Non-PersistentCSMA
P-PersistentCSMA2022年4月5日星期二311-PersistentCSMA
Sensethechannel.
Ifbusy,keeplisteningtothechannelandtransmitimmediatelywhenthechannelbecomesidle.
Ifidle,transmitapacketimmediately.
Ifcollisionoccurs,
Waitarandomamountoftimeandstartoveragain.
Theprotocoliscalled1-persistentbecausethehosttransmitswithaprobabilityof1wheneveritfindsthechannelidle.2022年4月5日星期二32TheEffectofPropagationDelayonCSMApacketABcarriersense=idleTransmitapacketCollision2022年4月5日星期二33PropagationDelayandCSMA
Contention(vulnerable)periodinPureALOHA
twopackettransmissiontimes
ContentionperiodinSlottedALOHA
onepackettransmissiontime
ContentionperiodinCSMA
upto2xend-to-endpropagationdelayPerformanceofCSMA>PerformanceofSlottedALOHA>PerformanceofPureALOHA2022年4月5日星期二341-PersistentCSMA(cont’d)
Evenifprop.delayiszero,therewillbecollisions
Example:
IfstationsBandCbecomereadyinthemiddleofA’stransmission,BandCwillwaituntiltheendofA’stransmissionandthenbothwillbegintransmittedsimultaneously,resultinginacollision.
IfBandCwerenotsogreedy,therewouldbefewercollisions2022年4月5日星期二35Non-PersistentCSMA
Sensethechannel.
Ifbusy,waitarandomamountoftimeandsensethechannelagain
Ifidle,transmitapacketimmediately
Ifcollisionoccurs
waitarandomamountoftimeandstartalloveragain2022年4月5日星期二36Tradeoffbetween1-andNon-PersistentCSMA
IfBandCbecomereadyinthemiddleofA’stransmission,
1-Persistent:BandCcollide
Non-Persistent:BandCprobablydonotcollide
IfonlyBbecomesreadyinthemiddleofA’stransmission,
1-Persistent:BsucceedsassoonasAends
Non-Persistent:Bmayhavetowait2022年4月5日星期二37P-PersistentCSMA
Optimalstrategy:useP-PersistentCSMA
Assumechannelsareslotted
Oneslot=contentionperiod(i.e.,oneroundtrippropagationdelay)2022年4月5日星期二38P-PersistentCSMA(cont’d)1.Sensethechannel
Ifchannelisidle,transmitapacketwithprobabilityp
ifapacketwastransmitted,gotostep2
ifapacketwasnottransmitted,waitoneslotandgotostep1
Ifchannelisbusy,waitoneslotandgotostep1.2.Detectcollisions
Ifacollisionoccurs,waitarandomamountoftimeandgotostep12022年4月5日星期二39P-PersistentCSMA(cont’d)
Considerp-persistentCSMAwithp=0.5
Whenahostsensesanidlechannel,itwillonlysendapacketwith50%probability
Ifitdoesnotsend,ittriesagaininthenextslot.
Theaveragenumberoftriesis:8i1i=0Si(1-p)p=p2022年4月5日星期二40ComparisonofCSMAandALOHAProtocols(NumberofChannelContenders)2022年4月5日星期二41CSMA/CD
InCSMAprotocols
Iftwostationsbegintransmittingatthesametime,eachwilltransmititscompletepacket,thuswastingthechannelforanentirepackettime
InCSMA/CDprotocols
Thetransmissionisterminatedimmediatelyuponthedetectionofacollision
CD=CollisionDetect2022年4月5日星期二42CSMA/CD(cont’d)
Sensethechannel
Ifidle,transmitimmediately
Ifbusy,waituntilthechannelbecomesidle
Collisiondetection
Abortatransmissionimmediatelyifacollisionisdetected(中止傳輸)
Tryagainlaterafterwaitingarandomamountoftime2022年4月5日星期二43CSMA/CD(cont’d)CSMA/CDcanbeinoneofthreestates:contention,transmission,oridle.(競爭、傳輸、空閑)2022年4月5日星期二44CSMA/CD(cont’d)
Carriersense
reducesthenumberofcollisions
Collisiondetection
reducestheeffectofcollisions,makingthechannelreadytousesooner2022年4月5日星期二45CollisiondetectiontimeHowlongdoesittaketorealizetherehasbeenacollision?Worstcase:2xend-to-endprop.delaypacketAB2022年4月5日星期二46Collision-FreeProtocols:Thebasicbit-mapprotocol2022年4月5日星期二47Collision-FreeProtocols:Thebinarycountdownprotocol2022年4月5日星期二48Limited-ContentionProtocols2022年4月5日星期二49Limited-ContentionProtocols(cont’d)2022年4月5日星期二50Limited-ContentionProtocols(cont’d)2022年4月5日星期二51AdaptiveTreeWalkProtocol1234567StationDeepth-firstSearchStrategy2022年4月5日星期二52AdaptiveTreeWalkProtocol<cont.>
Contentionsstartatwhichlayer?
Assumethenumberofcurrentcontendersinthesystem(stationsreadytosendframes)isq(canbeestimatedbytrafficstatistics)Calculatetheoptimallayeri(i=0…m)tostartthecontention?Eachnodeinleveliincludes2-i.nstationswherenisthetotalstationsOptimalcontentionlevel:q.2-i=1i=log2q
11=20231/2=2-145671/4=2-22022年4月5日星期二53WirelessLANProtocolsAwirelessLAN.(a)Atransmitting.(b)Btransmitting.(a)Thehiddenstationproblem.(b)Theexposedstationproblem.2022年4月5日星期二54WirelessLANProtocols(2)
TheMACAprotocol.(a)AsendinganRTStoB.(b)BrespondingwithaCTStoA.2022年4月5日星期二55EthernetLANTechnology56IEEE802LANStandards2022年4月5日星期二57IEEE802LANStandards2022年4月5日星期二58Ethernet?EthernetCabling?ManchesterEncoding?TheEthernetMACSublayerProtocol?TheBinaryExponentialBackoffAlgorithm?EthernetPerformance?SwitchedEthernet?FastEthernet?GigabitEthernet?IEEE802.2:LogicalLinkControl?RetrospectiveonEthernet2022年4月5日星期二59EthernetCablingThemostcommonkindsofEthernetcabling.2022年4月5日星期二60EthernetCabling(2)ThreekindsofEthernetcabling.(a)10Base5,(b)10Base2,(c)10Base-T.2022年4月5日星期二61EthernetCabling(3)Cabletopologies.(a)Linear,(b)Spine,(c)Tree,(d)Segmented.2022年4月5日星期二62EthernetCabling(4)(a)Binaryencoding,(b)Manchesterencoding,(c)DifferentialManchesterencoding.2022年4月5日星期二63EthernetMACSublayerProtocolFrameformats.(a)DIXEthernet,(b)IEEE802.3.2022年4月5日星期二64EthernetMACSublayerProtocolCollisiondetectioncantakeaslongas2.2022年4月5日星期二65EthernetPerformanceEfficiencyofEthernetat10Mbpswith512-bitslottimes.2022年4月5日星期二66Binaryexponentialbackoff
Whenacollisionoccureachstationwaits0or1slotsbeforetryagain
Ingeneral,aftericollision,arandomnumberbetween0and2i-1ischosen.
Maximumis1023
After16collisions,thecontrollergiveupandreportsfailure.2022年4月5日星期二67EthernetImplementationHostSystemHostSystemBusSystemInterfaceEthernetControler(MAC)Encoder/DecoderManchester(PLS)AUIInterfaceTransceiver(MAU)Coax2022年4月5日星期二68SwitchedEthernetAsimpleexampleofswitchedEthernet.2022年4月5日星期二69FastEthernetTheoriginalfastEthernetcabling.2022年4月5日星期二70IEEE802.2:LogicalLinkControl(a)PositionofLLC.(b)Protocolformats.2022年4月5日星期二71AnEthernetSnifferLANSourceDestinationSnifferNodeNode2022年4月5日星期二72AFrameCapturedbySnifferDestinationSourceAddressAddressADDRHEX000002608C82242802608C0224200081F0F00010DA3A0E00FFEF1600000000006B1619010020FF534D422D000001000600000000000000300000000000000000081804009406070000402E3F00090001FFEE13000085000000EE0050CA3C0000FFAF1200060600006D1800000060EA3A0000FF000000010000086A0012FF2022年4月5日星期二73TokenBusLANNodeANodeBNodeCNodeANodeDtokenNodeBTokenBusLANTokenBusNodeCNodeENodeDNodeE2022年4月5日星期二74LANSwitching75DataLinkLayer
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2026年中國郵電器材集團有限公司招聘備考題庫有答案詳解
- 2025年“才聚齊魯成就未來”山東黃河生態(tài)發(fā)展集團有限公司招聘備考題庫及1套參考答案詳解
- 2026年中化學數智科技有限公司招聘備考題庫及一套參考答案詳解
- 2026年平湖市青少年宮勞務派遣制教師招聘備考題庫有答案詳解
- 2026年佛山市順德區(qū)莘村中學招聘臨聘俄語教師備考題庫及參考答案詳解1套
- 2026年大商所飛泰測試技術有限公司招聘備考題庫及完整答案詳解1套
- 2026年恒豐銀行濟南分行社會招聘備考題庫帶答案詳解
- 2026年南方醫(yī)科大學珠江醫(yī)院大數據中心招聘數據工程師備考題庫及一套答案詳解
- 2026年北京科技大學智能科學與技術學院招聘備考題庫參考答案詳解
- 2026年中冶建筑研究總院有限公司招聘備考題庫及答案詳解1套
- 結算審核實施方案
- 血站采血操作規(guī)范
- 2025-2030中國奶瓶消毒烘干器行業(yè)市場發(fā)展分析及競爭格局與投資前景研究報告
- 學?!?530”安全教育記錄表(2024年秋季全學期)
- DBJ50T-306-2018 建設工程檔案編制驗收標準
- 植物生物化學
- 產業(yè)研究報告-中國二手奢侈品行業(yè)發(fā)展現狀、市場規(guī)模、投資前景分析(智研咨詢)
- 《低溫技術及其應用》課件
- 2025年1月國家開放大學法律事務??啤缎谭▽W(2)》期末紙質考試試題及答案
- 2024年1月福建高中學業(yè)水平合格考物理試卷真題(含答案解析)
- 大跨度倒三角管桁架施工方案
評論
0/150
提交評論