MEDIUM-ACCESS CONTROL SUB LAYER.ppt

DrTThendralCompSci 369 views 33 slides Sep 15, 2023
Slide 1
Slide 1 of 33
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33

About This Presentation

Many algorithms for allocating a multiple access channel are known


Slide Content

MEDIUM-ACCESS CONTROL
SUB LAYER

•Networkscanbedividedintotwocategories:
•Thoseusingpoint-to-pointconnectionsandthoseusing
broadcastchannels
•Inaface-to-facemeeting,chaosisavoidedbyexternalmeans,
forexample,atameeting,peopleraisetheirhandstorequest
permissiontospeak
•Whenonlyasinglechannelisavailable,determiningwho
shouldgonextismuchharder
•Manyprotocolsforsolvingtheproblemareknownandform
thecontentsofthischapter.
•Intheliterature,broadcastchannelsaresometimesreferred
toasmultiaccesschannelsorrandomaccesschannels

•Theprotocolsusedtodeterminewhogoesnextonamultiaccesschannel
belongtoasublayerofthedatalinklayercalledtheMAC(MediumAccess
Control)sublayer.
•Manyalgorithmsforallocatingamultipleaccesschannelareknown
•ALOHA
–PureALOHA
–SlottedALOHA
•CarrierSenseMultipleAccessProtocols
–PersistentandNonpersistentCSMA
–CSMAwithCollisionDetection
–Collision-FreeProtocols
•ABit-MapProtocol
•BinaryCountdown
•Limited-ContentionProtocols
•TheAdaptiveTreeWalkProtocol
•WavelengthDivisionMultipleAccessProtocols
•WirelessLANProtocols
•MACAandMACAW

ALOHA
•Inthe1970s,NormanAbramsonandhiscolleagues-
UniversityofHawaii-newandelegantmethodtosolvethe
channelallocationproblem
•AlthoughAbramson'swork,calledtheALOHAsystem,ground-
basedradiobroadcasting,thebasicideaisapplicabletoany
systeminwhichuncoordinatedusersarecompetingforthe
useofasinglesharedchannel.
•ALOHA-pureandslotted-Theydifferwithrespecttowhether
timeisdividedintodiscreteslotsintowhichallframesmust
fit
•PureALOHA-PureALOHAdoesnotrequireglobaltime
synchronization
•SlottedALOHA-slottedALOHAdoes

•ALOHAsystemissimple:transmitdatatobesent-collisions-
collidingframeswillbedamaged
•WithaLAN,thefeedbackisimmediate
•Systemsinwhichmultipleusersshareacommonchannelina
waythatcanleadtoconflictsarewidelyknownascontention
systems

Slotted ALOHA
•In1972,Robertspublishedamethodfor
doublingthecapacityofanALOHAsystem
•IncontrasttoAbramson'spureALOHA,a
computerisnotpermittedtosendwhenever
acarriagereturnistyped
•Instead,itisrequiredtowaitforthebeginning
ofthenextslot

Carrier Sense Multiple Access
Protocols
•WithslottedALOHAthebestchannelutilizationthatcanbe
achievedis1/e
•(estandsforcollisions)
•Thesenetworkscanachieveamuchbetterutilizationthan1/e
•Inthissectionwewilldiscusssomeprotocolsforimproving
performance
•Protocolsinwhichstationslistenforacarrier(i.e.,a
transmission)andactaccordinglyarecalledcarriersense
protocols

Persistent and Nonpersistent CSMA
•Thefirstcarriersenseprotocol-1-persistentCSMA
•Whenastationhasdatatosend,listenstothechannel,if
anyoneelseistransmittingatthatmoment
•Ifthechannelisbusy,thestationwaitsuntilitbecomesidle
•Whenthestationdetectsanidlechannel,ittransmitsaframe
•Ifacollisionoccurs,thestationwaitsarandomamountof
timeandstartsalloveragain
•Theprotocoliscalled1-persistentbecausethestation
transmitswithaprobabilityof1whenitfindsthechannelidle
•AsecondcarriersenseprotocolisnonpersistentCSMA

Nonpersistent CSMA
•Beforesending,astationsensesthechannel
•Ifnooneelseissending,thestationbeginsdoingsoitself
•However,ifthechannelisalreadyinuse,thestationdoesnot
continuallysenseitforthepurposeofseizingitimmediately
upondetectingtheendoftheprevioustransmission
•Instead,itwaitsarandomperiodoftimeandthenrepeatsthe
algorithm
•Consequently,thisalgorithmleadstobetterchannel
utilizationbutlongerdelaysthan1-persistentCSMA
•Thelastprotocolisp-persistent-Whenastationbecomes
readytosend,itsensesthechannel
•Ifitisidle,ittransmitswithaprobabilityp
•If that slot is also idle, it either transmits or defers again, with
probabilities p and q. This process is repeated until either the
frame has been transmitted

Comparison of the channel utilization versus load for
various random access protocols

CSMA with Collision Detection
•PersistentandnonpersistentCSMAprotocolsare
clearlyanimprovementoverALOHA
•Quicklyterminatingdamagedframessavestimeand
bandwidth.Thisprotocol,knownasCSMA/CD(CSMA
withCollisionDetection)
•CSMA/CDcanbeinoneofthreestates:contention,
transmission,oridle

Collision-Free Protocols
•AlthoughcollisionsdonotoccurwithCSMA/CDonceastationhas
unambiguouslycapturedthechannel,theycanstilloccurduringthe
contentionperiod
•CSMA/CDisnotuniversallyapplicable
•Inthissection,wewillexaminesomeprotocolsthatresolvethe
contentionforthechannelwithoutanycollisionsatall,notevenduring
thecontentionperiod

A Bit-Map Protocol
•Inourfirstcollision-freeprotocol,thebasicbit-map
method,eachcontentionperiodconsistsofexactlyN
slots
•Ifstation0hasaframetosend,ittransmitsa1bit
duringthezerothslot
•Nootherstationisallowedtotransmitduringthis
slot

•Nslotshavepassedby,eachstationhascompleteknowledgeofwhich
stationswishtotransmit
•Protocolslikethisinwhichthedesiretotransmitisbroadcastbeforethe
actualtransmissionarecalledreservationprotocols

Binary Countdown
•A problem with the basic bit-map protocol is that the
overhead is 1 bit per station, so it does not scale well
to networks with thousands of stations
•All addresses are assumed to be the same length
•The bits in each address position from different
stations are BOOLEAN ORed together
•We will call this protocol binary countdown

•Example:stationsC,H,D,A,G,B,E,Fhavepriorities7,6,5,4,
3,2,1,and0,respectively,thenasuccessfultransmissionbyD
putsitattheendofthelist,givingapriorityorderofC,H,A,
G,B,E,F,D
•Thus,Cremainsvirtualstation7,butAmovesupfrom4to5
andDdropsfrom5to0
•StationDwillnowonlybeabletoacquirethechannelifno
otherstationwantsit
•Binarycountdownisanexampleofasimple,elegant,and
efficientprotocolthatiswaitingtoberediscovered

Limited-Contention Protocols
•Twobasicstrategiesforchannelacquisitioninacable
network:
•contention,asinCSMA,andcollision-freemethods
•Eachstrategycanberatedastohowwellitdoeswithrespect
tothetwoimportantperformancemeasures
•delayatlowloadandchannelefficiencyathighload
•Itwouldbeniceifwecouldcombinethebestpropertiesofthe
contentionandcollision-freeprotocols
•Arrivingatanewprotocolthatusedcontentionatlowloadto
providelowdelay,butusedacollision-freetechniqueathigh
loadtoprovidegoodchannelefficiency
•Suchprotocols,whichwewillcalllimited-contentionprotocols

The Adaptive Tree Walk Protocol
•Simplewayofperformingthenecessaryassignmentistousethe
algorithmdevisedbytheU.S.Armyfortestingsoldiersforsyphilisduring
WorldWarII(Dorfman,1943)
•thestationsastheleavesofabinarytree,asillustratedinFig
•Inthefirstcontentionslotfollowingasuccessfulframetransmission,slot
0,allstationsarepermittedtotrytoacquirethechannel
•Ifoneofthemdoesso,fine.Ifthereisacollision,thenduringslot1only
thosestationsfallingundernode2inthetreemaycompete
•Ifoneofthemacquiresthechannel,theslotfollowingtheframeis
reservedforthosestationsundernode3
•If,ontheotherhand,twoormorestationsundernode2wanttotransmit,
therewillbeacollisionduringslot1,inwhichcaseitisnode4'sturn
duringslot2

•Ifacollisionoccursduringslot0,theentire
treeissearched,depthfirst,tolocateallready
stations
•Eachbitslotisassociatedwithsomeparticular
nodeinthetree
•Ifacollisionoccurs,thesearchcontinues
recursivelywiththenode'sleftandright
children
•Ifabitslotisidleorifonlyonestation
transmitsinit,thesearchingofitsnodecan
stopbecauseallreadystationshavebeen
located

Wavelength Division Multiple
Access Protocols
•A different approach to channel allocation is
to divide the channel into subchannels using
FDM, TDM, or both, and dynamically allocate
them as needed
•Schemes like this are commonly used on fiber
optic LANs to permit different conversations
to use different wavelengths (i.e., frequencies)
at the same time.

•Toallowmultipletransmissionsatthesame
time,thespectrumisdividedintochannels
(wavelengthbands)
•Eachstationisassignedtwochannels
•Anarrowchannelisprovidedasacontrol
channeltosignalthestation,andawide
channelisprovidedsothestationcanoutput
dataframes.

Wavelength division multiple
access.

Wireless LAN Protocols
•Toachievetruemobility,notebookcomputersneedtouse
radio(orinfrared)signalsforcommunication
•Asystemofnotebookcomputersthatcommunicatebyradio
canberegardedasawirelessLAN
•TheseLANshavesomewhatdifferentpropertiesthan
conventionalLANsandrequirespecialMACsublayer
protocols.
•AcommonconfigurationforawirelessLANisanoffice
buildingwithbasestations(alsocalledaccesspoints)
strategicallyplacedaroundthebuilding
•Allthebasestationsarewiredtogetherusingcopperorfiber

•Forourpurposes,itdoesnotmatterwhicharebasestations
andwhicharenotebooks
•TheradiorangeissuchthatAandBarewithineachother's
rangeandcanpotentiallyinterferewithoneanother
•CcanalsopotentiallyinterferewithbothBandD,butnot
withA

•IfCdoesstarttransmitting,itwillinterfereatB,wipingout
theframefromA
•Theproblemofastationnotbeingabletodetectapotential
competitorforthemediumbecausethecompetitoristoofar
awayiscalledthehiddenstationproblem.

MACA and MACAW
•AnearlyprotocoldesignedforwirelessLANsis
MACA(MultipleAccesswithCollision
Avoidance)(Karn,1990)
•Thebasicideabehinditisforthesenderto
stimulatethereceiverintooutputtingashort
frame,sostationsnearbycandetectthis
transmissionandavoidtransmittingforthe
durationoftheupcoming(large)dataframe

•LetusnowconsiderhowAsendsaframetoB.Astartsby
sendinganRTS(RequestToSend)frametoB,asshowninFig.
4-12(a).
•Thisshortframe(30bytes)containsthelengthofthedata
framethatwilleventuallyfollow.
•ThenBreplieswithaCTS(CleartoSend)frame,asshownin
Fig.4-12(b).
•TheCTSframecontainsthedatalength(copiedfromtheRTS
frame).
•UponreceiptoftheCTSframe,Abeginstransmission.

•Bharghavanetal.(1994)finetunedMACAto
improveitsperformanceandrenamedtheir
newprotocolMACAW(MACAforWireless)
•Lostframeswerenotretransmitteduntilthe
transportlayernoticedtheirabsence,much
later
•Theysolvedthisproblembyintroducingan
ACKframeaftereachsuccessfuldataframe
•Thischangeimprovesthefairnessofthe
protocol

Ethernet