Multiple AccessMultiple Access
Komunikasi DataKomunikasi Data
Anhar, ST., MTAnhar, ST., [email protected]@gmail.com
http://http://anhar.staff.unri.ac.idanhar.staff.unri.ac.idJurusan Teknik ElektroJurusan Teknik Elektro
Univ. RiauUniv. RiauAdapted from lecture slides by Behrouz A. Forouzan© The McGraw-Hill Companies, Inc. All rights reserved
22
OutlineOutline Multiple access mechanismsMultiple access mechanisms Random accessRandom access Controlled accessControlled access ChannelizationChannelization
Data Link LayerData Link Layer
44
Sublayers of Data Link Sublayers of Data Link LayerLayer
Multiple Access Links and Multiple Access Links and ProtocolsProtocolsThree types of “links”:Three types of “links”: Point-to-point (single wire, e.g. PPP, SLIP)Point-to-point (single wire, e.g. PPP, SLIP) BroadcastBroadcast (shared wire or medium; e.g, (shared wire or medium; e.g,
Ethernet, WiFi/WaveLAN, etc.)Ethernet, WiFi/WaveLAN, etc.)
Switched (e.g., switched Ethernet, ATM etc)Switched (e.g., switched Ethernet, ATM etc)
Multiple access problemMultiple access problem Example:Example: Classroom– many people gather together Classroom– many people gather together
in a large roomin a large room Broadcast medium – airBroadcast medium – air Human protocols:Human protocols:
““Give everyone a chance to speak”Give everyone a chance to speak” ““Don’t speak until you are spoken to”Don’t speak until you are spoken to” ““Don’t monopolize the conversation”Don’t monopolize the conversation” ““Raise your hand if you have a question”Raise your hand if you have a question” ““Don’t interrupt when someone is speaking”Don’t interrupt when someone is speaking” ““Don’t fall asleep when someone else is Don’t fall asleep when someone else is
talking”talking”
Multiple access protocolsMultiple access protocols In LANs, WiFi, satellite networksIn LANs, WiFi, satellite networks If more than 2 users send @ the same time - If more than 2 users send @ the same time -
collision collision All collided packets are lost -> waste of All collided packets are lost -> waste of
bandwidthbandwidth
Ideally, the MAC protocol for a broadcast Ideally, the MAC protocol for a broadcast channel with the bit-rate channel with the bit-rate RR bps should satisfy: bps should satisfy: if only 1 node is sending than the if only 1 node is sending than the throughputthroughput is is RR when when MM nodes have data to send than the nodes have data to send than the
throughputthroughput is is R/MR/M decentralized protocol – no masterdecentralized protocol – no master simple & inexpensive to implementsimple & inexpensive to implement
MAC Protocols: MAC Protocols: TaxonomyTaxonomyThree broad classes:Three broad classes: Channel PartitioningChannel Partitioning
divide channel into smaller “pieces” (time divide channel into smaller “pieces” (time slots, frequency)slots, frequency)
allocate piece to node for exclusive useallocate piece to node for exclusive use Random AccessRandom Access
allow collisionsallow collisions ““recover” from collisionsrecover” from collisions
““Taking turns”Taking turns” tightly coordinate shared access to avoid tightly coordinate shared access to avoid
collisionscollisions
Goal: efficient, fair, simple, decentralized
99
Multiple Access Multiple Access MechanismsMechanisms
Random AccessRandom Access
1111
Random AccessRandom Access Also called Also called contention-basedcontention-based access access No station is assigned to control No station is assigned to control
anotheranother
Random Access Random Access ProtocolsProtocols In In random accessrandom access or or contentioncontention
methods, no station is superior to methods, no station is superior to another station and none is assigned another station and none is assigned the control over another. No station the control over another. No station permits, or does not permit, another permits, or does not permit, another station to send. At each instance, a station to send. At each instance, a station that has data to send uses a station that has data to send uses a procedure defined by the protocol to procedure defined by the protocol to make a decision on whether or not to make a decision on whether or not to send.send.
Random AccessRandom Access If more than one station wants to If more than one station wants to
send, there is an access conflict send, there is an access conflict -- -- Collision—Collision—
To avoid access conflict each station To avoid access conflict each station has to follow procedure that will has to follow procedure that will answers the following questions:answers the following questions:
1.1. When can the station access the medium?When can the station access the medium?
2.2. What can the station do if the medium is busy?What can the station do if the medium is busy?
3.3. How can the station determine the success or failure How can the station determine the success or failure of the transmissionof the transmission
4.4. What can the station do if there is an access conflict?What can the station do if there is an access conflict?
ALOHA NetworkALOHA Network
Developed by Norm Abramson at the Univ. of Developed by Norm Abramson at the Univ. of Hawaii Hawaii the guy had interest in surfing and packet switchingthe guy had interest in surfing and packet switching mountainous islands → land-based network difficult to mountainous islands → land-based network difficult to
install install fully decentralized protocolfully decentralized protocol
ACK
ACK ACK
ACK
1515
Frames in Pure ALOHAFrames in Pure ALOHA
1616
ALOHA ProtocolALOHA Protocol
1717
ExampleExample Calculate possible values of Calculate possible values of TTBB, when , when
stations on an ALOHA network are a stations on an ALOHA network are a maximum of 600 km apartmaximum of 600 km apart
TTpp = (600 × 10 = (600 × 1033) / (3 × 10) / (3 × 1088) = 2 ms) = 2 ms
When When KK=1, =1, TTBB {0ms,2ms} {0ms,2ms} When When KK=2, =2, TTBB {0ms,2ms,4ms,6ms} {0ms,2ms,4ms,6ms} ::
1818
ALOHA: Vulnerable TimeALOHA: Vulnerable Time
1919
ALOHA: ThroughputALOHA: Throughput Assume number of stations trying to Assume number of stations trying to
transmit follow Poisson Distributiontransmit follow Poisson Distribution The throughput for pure ALOHA isThe throughput for pure ALOHA is
S = G × eS = G × e−2G−2G
where G is the average number of where G is the average number of frames requested per frame-timeframes requested per frame-time
The maximum throughputThe maximum throughput SSmaxmax = 0.184 when G= 1/2 = 0.184 when G= 1/2
2020
ExampleExample A pure ALOHA network transmits A pure ALOHA network transmits
200-bit frames on a shared channel 200-bit frames on a shared channel of 200 kbps. What is the throughput of 200 kbps. What is the throughput if the system (all stations together) if the system (all stations together) producesproduces 1000 frames per second1000 frames per second 500 frames per second500 frames per second 250 frames per second250 frames per second
2121
Slotted ALOHASlotted ALOHA
2222
Slotted ALOHA: Vulnerable Slotted ALOHA: Vulnerable TimeTime
2323
Slotted ALOHA: Slotted ALOHA: ThroughputThroughput The throughput for Slotted ALOHA isThe throughput for Slotted ALOHA is
S = G × eS = G × e−G−G
where G is the average number of where G is the average number of frames requested per frame-timeframes requested per frame-time
The maximum throughputThe maximum throughput SSmaxmax = 0.368 when G= 1 = 0.368 when G= 1
2424
ExampleExample A Slotted ALOHA network transmits A Slotted ALOHA network transmits
200-bit frames on a shared channel 200-bit frames on a shared channel of 200 kbps. What is the throughput of 200 kbps. What is the throughput if the system (all stations together) if the system (all stations together) producesproduces 1000 frames per second1000 frames per second 500 frames per second500 frames per second 250 frames per second250 frames per second
Multiple Access Multiple Access ProtocolsProtocols
ALOHA
2626
CSMACSMA CCarrier arrier SSense ense MMultiple ultiple AAccessccess
"Listen before talk""Listen before talk" Reduce the possibility of collisionReduce the possibility of collision
But cannot completely eliminate itBut cannot completely eliminate it
2727
Collision in CSMACollision in CSMA
2828
CSMA: Vulnerable TimeCSMA: Vulnerable Time
2929
Persistence MethodsPersistence Methods What a station does when channel is idle or What a station does when channel is idle or
busybusy
3030
Persistence MethodsPersistence Methods
3131
CSMA/CDCSMA/CD CCarrier arrier SSense ense MMultiple ultiple AAccess with ccess with
CCollision ollision DDetectionetection Station monitors channel when Station monitors channel when
sending a framesending a frame
Carrier Sensing Multiple Access with Carrier Sensing Multiple Access with Collision detection (CSMA-CD)Collision detection (CSMA-CD)
Jika station dp mengetahui apakah collision Jika station dp mengetahui apakah collision terjadi, maka bandwith yang terbuang dpt terjadi, maka bandwith yang terbuang dpt dikurangi dengan menghentikan transmisidikurangi dengan menghentikan transmisi
Carrier Sensing Multiple Access with Carrier Sensing Multiple Access with Collision detection (CSMA-CD)Collision detection (CSMA-CD)
Carrier Sensing Multiple Access with Carrier Sensing Multiple Access with Collision detection (CSMA-CD)Collision detection (CSMA-CD) Station yang mempunyai paket mendeteksi kanal Station yang mempunyai paket mendeteksi kanal
dan transmit jika kanaldan transmit jika kanal idle idle
Jika kanal sibuk, gunakan strategi dari CSMA Jika kanal sibuk, gunakan strategi dari CSMA ((persistpersist, , backoffbackoff segera atau segera atau persist persist dengan prob. dengan prob. p)p)
Jika Jika collision collision terdeteksi saat transmisi, sinyal terdeteksi saat transmisi, sinyal short jammingshort jamming ditransmisikan untuk meyakinkan ditransmisikan untuk meyakinkan semua station mengetahui terjadi semua station mengetahui terjadi collision collision sebelum menghentikan transmisi, selanjutnya sebelum menghentikan transmisi, selanjutnya algoritma algoritma backoff backoff digunakan untuk rescheduling digunakan untuk rescheduling waktu resensingwaktu resensing
Carrier Sensing Multiple Access with Carrier Sensing Multiple Access with Collision detection (CSMA-CD)Collision detection (CSMA-CD) Kanal mempunyai 3 kondisi (state):Kanal mempunyai 3 kondisi (state):
sibuk mentransmisikan framesibuk mentransmisikan frame idleidle perioda contention (dimana station berusaha menduduki perioda contention (dimana station berusaha menduduki
kanal)kanal) Throughput Throughput 1-Persistent1-Persistent CSMA-CD dapat dianalisa CSMA-CD dapat dianalisa
dg asumsi waktu dibagi dalam minislot sebesar dg asumsi waktu dibagi dalam minislot sebesar 2t2tpropprop det (untuk menjamin station selalu dapat det (untuk menjamin station selalu dapat mendeteksi collision)mendeteksi collision)
Setiap kanal menjadi idle, station Setiap kanal menjadi idle, station memperebutkan (memperebutkan (contendcontend) kanal dengan transmit ) kanal dengan transmit dan mendengar untuk mengetahui apakah sukses dan mendengar untuk mengetahui apakah sukses menduduki kanalmenduduki kanal
3636
CSMA/CD: Minimum Frame CSMA/CD: Minimum Frame SizeSize Each frame must be large enough for a Each frame must be large enough for a
sender to detect a collisionsender to detect a collision Worst case scenario:Worst case scenario:
"A" is transmitting"A" is transmitting "D" starts transmitting just before A's signal "D" starts transmitting just before A's signal
arrivesarrivesA B C D
Long enough tohear colliding signalfrom D
3737
ExampleExample A CSMA/CD network has a bandwidth A CSMA/CD network has a bandwidth
of 10 Mbps. If the maximum of 10 Mbps. If the maximum propagation time is 25.6 μs, what is propagation time is 25.6 μs, what is the minimum size of the frame?the minimum size of the frame?
3838
CSMA/CD: Flow DiagramCSMA/CD: Flow Diagram
Multiple Access Multiple Access ProtocolsProtocols
ALOHA
4040
CSMA/CACSMA/CA CCarrier arrier SSense ense MMultiple ultiple AAccess with ccess with
CCollision ollision AAvoidancevoidance Used in a network where collision Used in a network where collision
cannot be detectedcannot be detected E.g., wireless LANE.g., wireless LAN
IFS – Interframe Space
CSMA/ CACSMA/ CA In wireless networks collision is In wireless networks collision is
avoided.avoided. Collisions are avoided through Collisions are avoided through
following strategies:following strategies:
1.1. Interframe SpaceInterframe Space
2.2. Contention WindowContention Window
3.3. AcknowledgmentAcknowledgment
4242
CSMA/CA: Flow DiagramCSMA/CA: Flow Diagram
contention window size is 2K-
1
After each slot:- If idle, continue counting- If busy, stop counting
Controlled AccessControlled Access
4444
Control AccessControl Access A station must be authorized by A station must be authorized by
someone (e.g., other stations) before someone (e.g., other stations) before transmittingtransmitting
Three common methods:Three common methods: ReservationReservation PollingPolling Token passingToken passing
ReservationReservation A station must make a reservation before A station must make a reservation before
sending datasending data Time is divided into intervalsTime is divided into intervals
A reservation frame proceeds each time intervalA reservation frame proceeds each time interval Number of stations and number of time slots in Number of stations and number of time slots in
the reservation frame are equalthe reservation frame are equal Each time slot belongs to a particular stationEach time slot belongs to a particular station
PollingPolling Devises are categorized into:Devises are categorized into:
Primary station (PS)Primary station (PS) Secondary station (SS)Secondary station (SS)
All data exchange must go through the primary All data exchange must go through the primary stationstation
Primary station controls the link and initiates the Primary station controls the link and initiates the sessionsession
Secondary station obey the instructions of PS.Secondary station obey the instructions of PS. PS polls stationsPS polls stations
Asking SS if they have something to sendAsking SS if they have something to send PS select a SSPS select a SS
Telling it to get ready to receive dataTelling it to get ready to receive data
Poll procedurePoll procedure
Select procedureSelect procedure
Token passingToken passing
the stations in a network are organized in a logical ringthe stations in a network are organized in a logical ring for each station, there is a predecessor and a successorfor each station, there is a predecessor and a successor for a station to access the channel, it must posses a token for a station to access the channel, it must posses a token
(special packet) that gives the station the right to access the (special packet) that gives the station the right to access the channel and send its datachannel and send its data
once the station has finished its task, the token will then be once the station has finished its task, the token will then be passed to the successor (next station)passed to the successor (next station)
the station cannot send data until it receives the token again in the station cannot send data until it receives the token again in the next roundthe next round
token management is necessary token management is necessary Every station is limited in the time of token possessionEvery station is limited in the time of token possession Token must be monitored to ensure no lose or destroyedToken must be monitored to ensure no lose or destroyed Assign priorities to the stations and to the types of data transmittedAssign priorities to the stations and to the types of data transmitted To make low-priority stations release the token to high priority stationsTo make low-priority stations release the token to high priority stations
Token Passing procedureToken Passing procedure
Token passingToken passing Logical RingLogical Ring
in a token passing network, stations do not have to be physically connected in a token passing network, stations do not have to be physically connected in a ring; the ring can be a logical one.in a ring; the ring can be a logical one.
ChannelizationChannelization
5353
ChannelizationChannelization Similar to Similar to multiplexingmultiplexing Three schemesThree schemes
Frequency-Division Multiple Access Frequency-Division Multiple Access (FDMA)(FDMA)
Time-Division Multiple Access (TDMA)Time-Division Multiple Access (TDMA) Code-Division Multiple Access (CDMA)Code-Division Multiple Access (CDMA)