Upload
deepak-salian
View
216
Download
0
Embed Size (px)
Citation preview
8/14/2019 ch12-G.pdf
1/28
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr.Gihan NAGUIB 1
Multiple Access
Chapter 12
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr.Gihan NAGUIB 2
Multiple-access protocols
When more than two nodes send at the same time , thetransmitted frames collide.
All collide frames are lost and the bandwidth of the broadcastchannel will be wasted.
We need multiple access protocol to coordinate access tomultipoint or broadcast link (Nodes or stations are connected to oruse a common link)
Multiple access protocols are needed in wire and wireless LANsand satellite networks
8/14/2019 ch12-G.pdf
2/28
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr.Gihan NAGUIB 3
Multiple-access protocols
Problem of controlling the access to the medium is similar to
the rules of speaking in an assembly :
Given everyone a chance to speak Dont speak until you are spoken to Dont monopolize the conversation Raise your hand if you have a question Dont interrupt when someone speaking
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr.Gihan NAGUIB 4
Multiple-access protocols
8/14/2019 ch12-G.pdf
3/28
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 5
11-- RANDOM ACCESSRANDOM ACCESS
In In random random access access or or contention contention methods,methods, no no station station is is
superior superior to to another another station station and and none none is is assigned assigned the the control control over over another another. . No No station station permits, permits, or or does does not not
permit, permit, another another station station to to send send.. At At each each instance,instance, a a station station that that has has data data to to send send uses uses a a procedure procedure defined defined by by the the protocol protocol to to make make a a decision decision on on whether whether or or not not to to send send.. This This decision decision depends depends on on the the state state of of the the medium( medium( idle idle or or busy) busy)
ALOHACarrier Sense Multiple Access ; CSMACarrier Sense Multiple Access with Collision Detection (CSMA/CD)
Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA)
Random Access Methods: Random Access Methods:
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 6
11--RANDOM ACCESSRANDOM ACCESS
Each station has the right to the medium without beingcontrolled by any other station.Two features gives the method its name:
There is no schedule time for a station to transmit:transmission is random among stationsStations compete with one another to access the medium
Contention method.Collision : an access conflict occurs when more than one
station tries to send, as a result the frame will be eitherdestroyed or modified.
8/14/2019 ch12-G.pdf
4/28
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 7
RANDOM ACCESSRANDOM ACCESS
Each station follows a procedure that answer thefollowing questions to avoid collision:
When can the station access the medium?
What can the station do if the medium is busy?
How can the station determine the success or failure of
the transmission?
What can the station do if there is an access conflict (collision)?
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 8
Evolution of random-access methods
ALOHA : uses MA ( Multiple Access ) No carrier sense
CS MA : Carrier Sense Multiple Access
CS MA /CD : Collision Detection
CS MA /CA Collision Avoidance
8/14/2019 ch12-G.pdf
5/28
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 9
Pure ALOHA
ACK
ACK ACK
ACK
The earliest random access method developed at the Univ. of Hawaiiin the early 1970s
Designed for a radio (wireless) LAN
Simple method. Each station sends a frame whenever it has a frameto send.
Since there is only one channel to share, there is the possibility ofcollision between frames from different stations.
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 10
Frames in a pure ALOHA network
8/14/2019 ch12-G.pdf
6/28
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 11
Each station sends a frame whenever it has a frame to send.
It relies on acknowledgments from the receiver.
If the ACK dose not arrive after a time-out period, the station resend the frame.
time-out is equal the max possible round trip time = 2 x Tp
Tp(max propagation time) time required to send a frame between the most
widely separated station
To minimize collisions, each station waits a random amount of time (back-off
time T B ) before resending its frame.
T B is a random value that depend on K ( the number of attempted un successful
transmission) .
The formula of T B is the binary exponential back-off.After a max number of retransmission attempts K max , a station must give up and
try later to prevent congestion.
Pure ALOHA
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr.Gihan NAGUIB 12
Procedure for pure ALOHA protocol
Note: R range from 0 to 2 k -1
8/14/2019 ch12-G.pdf
7/28
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 13
The stations on a wireless ALOHA network are a
maximum of 600 km apart. If we assume that signals propagate at 3 10 8 m/s, we find
T p = (600 10 3 ) / (3 10 8 ) = 2 ms.Now we can find the value of T B for different values of K .
a . For K = 1, the range R is {0, 1}. The station needs to| generate a random number with a value of 0 or 1.
This means that T B is either 0 ms (0 2) or 2 ms (1 2),based on the outcome of the random variable.
Example 1
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 14
b. For K = 2, the range is {0, 1, 2, 3}. This means that T B can be 0, 2, 4, or 6 ms, based on the outcome of the random variable.
c. For K = 3, the range is {0, 1, 2, 3, 4, 5, 6, 7}. This means that T B can be 0, 2, 4, . . . , 14 ms, based on the outcome of the random variable.
d. We need to mention that if K > 10, it is normally set to 10.
Example 1 (continued)
8/14/2019 ch12-G.pdf
8/28
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr.Gihan NAGUIB 15
Carrier Sense Multiple Access (CSMA)
Sense the carrier before transmit : listen before you talk
CSMA can reduce the possibility of collision, but it can noteliminate it because of the propagation delay ( a station may sense themedium and find it idle, only because the first bit of a frame sent by anotherstation has not been received )
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr.Gihan NAGUIB 16
Vulnerable time in CSMAVulnerable time : time in which there is a possibility of collision
Vulnerable time for CSMA is the max propagation time Tpneeded for a signal to propagate from one end of the medium to theother
8/14/2019 ch12-G.pdf
9/28
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 17
persistence methods
What should a station do if the channel isbusy?
What should a station do if the channel isidle?
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 18
1-persistence methods
When the sender (station) is ready to transmit
data, it checks if the medium is busy. If so, itsenses the medium continually until it becomesidle
If line is idle, sends the frame immediately (withprobability of 1).
Chances of collision is high.
8/14/2019 ch12-G.pdf
10/28
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 19
non -persistence methods
If a station has a frame to send, it senses the line.If line is idle, the station sends the frame immediately.
If line is not idle, the station waits a random period of timeand then senses the line again.
Chances of collision is reducedReduces efficiency of the network ( because the medium
remain idle when there may be stations with frames tosend
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 20
P - PersistenceIt used if the channel has time slots
with a slot duration equal to or graterthan the maximum propagation time.
When the sender (station) is readyto transmit data, it checks if themedium is busy. If so, it senses themedium continually until it becomesidle.
If line is idle it may or may notsend. It sends with probability p.
Reduces the chance ofcollision and improves the
efficiency by combining theother two strategies
8/14/2019 ch12-G.pdf
11/28
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 21
Carrier Sense Multiple Access collision detectionCSMA/CD
Listen-while-talk protocol. A host listens even while it istransmitting, and if a collision is detected, stopstransmitting
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 22
Flow diagram for the CSMA/CD
8/14/2019 ch12-G.pdf
12/28
8/14/2019 ch12-G.pdf
13/28
8/14/2019 ch12-G.pdf
14/28
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 27
Reservation access methodA station needs to make a reservation before sending data.Time is divided into intervals
A reservation frame proceeds each time intervalNumber of stations and number of mini-slots in the reservation
frame are equalEach time slot belongs to a particular stationIf there are N stations in the system, there are exactly N
reservation mini-slots in the reservation frame
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 28
Polling access methodDevices are designated as a Primary station and
secondary station.
All data exchange must go through the primary station
Primary station controls the link and initiates thesession; the secondary station follow its instructions.
Two functions: polls and select
Poll : If the primary wants to receive data , it asksthe secondary if they have anything to send.
Select: if the primary wants to send data , it tellsthe secondary to get ready to receive data
8/14/2019 ch12-G.pdf
15/28
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 29
Select function
The select function is used whenthe primary has frames to send.
The primary creates andtransmits a select (SEL) frame.
SEL alerts the secondary to theupcoming transmission
The primary waits for ACK tosend the data
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 30
Poll function
When the primary is ready to receivedata, it must ask ( Poll) each device in turnif it has anything to send.
When the first secondary is approached,it responds either with a NAK frame if ithas nothing to send or with data if it does.
If the response is NAK, the primarypolls the next secondary.
If it receives data, it sends ACK frame.
8/14/2019 ch12-G.pdf
16/28
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 31
Token Passing
In the token-passing, the stations are organized in alogical ring.For each station there is a predecessor and a successorpredecessor is the station which is logically before the
station in the ring
The successor is the station which is logically after thestation in the ringThe current station is the one that accessing the channelnow.
How is The right to access channel passed from one stationto another?
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 32
Token PassingStation is authorized to send data when it receives a specialframe called a tokenStations are arranged around a ring.When no data are being sent, a token circulates the ring.
If a station needs to send data, it waits for the token.The station captures the token and sends one or more frames
(as long as it has frames to send or the allocated time has notexpired), and finally it releases the token to be used by nextstation ( successor) .The maximum time any station can hold the token is limited.
Since there is only one token, only one station transmits at a
time, and collisions never occur .
8/14/2019 ch12-G.pdf
17/28
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 33
Token Passing
Token management is needed for this access
method :Stations must be limited in the time they can have
possession of the tokenthe token must be monitored to ensure it has not
been lost or destroyed( if the station that is holdingthe token fails, the token will disappear from thenetwork)Assign priorities to the stations , to make low-
priority stations release the token to high prioritystations.
Stations do not have to be physically connected in a ring ;the ring can be logical one
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 34
Logical ring and physical topology in token-passing access method
Token bus
8/14/2019 ch12-G.pdf
18/28
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 35
33. CHANNELIZATION. CHANNELIZATION
Channelization Channelization is is a a multiple multiple- -access access method method in in which which the the available available bandwidth bandwidth of of a a link link is is shared shared in in time,time,frequency,frequency, or or through through code,code, between between different different stations stations. . In In this this section,section, we we discuss discuss three three channelization channelization protocols protocols. .
Frequency-Division Multiple Access (FDMA)Time-Division Multiple Access (TDMA)Code-Division Multiple Access (CDMA)
Channelization methods: Channelization methods:
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 36
Frequency-division multiple access (FDMA)
Available bandwidth of the common channel is dividedinto bands that are separated by guard bands
8/14/2019 ch12-G.pdf
19/28
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 37
In FDMA, the available bandwidthof the common channel is divided into
bands that are separated by guardbands.
Note
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 38
Time-division multiple access (TDMA)The bandwidth is just one channel that is timeshared
between different stations
8/14/2019 ch12-G.pdf
20/28
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 39
In TDMA, the bandwidth is just onechannel that is timeshared between
different stations.
Note
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 40
In CDMA, one channel carries alltransmissions simultaneously.
Note
Code Division Multiple Access: CDMA
8/14/2019 ch12-G.pdf
21/28
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 41
Simple idea of communication with CDMA
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 42
Simple idea of communication with CDMA
One channel carries all transmissions simultaneously
Two properties that the assigned cods have:
If we multiply each code by another, we get 0 .If we multiply each code by itself, we get number of
channelEach station wants to receive data from one of other
stations multiplies the common data on the channel by thecode of the sender
8/14/2019 ch12-G.pdf
22/28
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 43
Prove that a receiving station can get the data sent by a
specific sender if it multiplies the entire data on the channel by the senders chip code and then divides it by the number of stations.
Example 3
Solution Let us prove this for the first station, using our previous four-station example. We can say that the data on the
channel
D = (d 1
c 1 + d 2
c 2 + d 3
c 3 + d 4
c 4 ).The receiver which wants to get the data sent by station 1 multiplies these data by c 1 .
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 44
Example 3 (continued)
When we divide the result by N, we get d 1 .
8/14/2019 ch12-G.pdf
23/28
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 45
Chip sequences
Orthogonal sequences have the following properties:Each sequence is made of N elements, where N is the number of
stations
If we multiply a sequence by a number, every element in the sequenceis multiplied by that element (scalar multiplication)
If we multiply two equal sequence, element by element, and add theresults, we get inner product = N
If we multiply two different sequence, element by element, and add
the results, we get inner product = 0Adding two sequence means adding the corresponding elements. Theresult is another sequence
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 46
General rule and examples of creating Walsh tables
8/14/2019 ch12-G.pdf
24/28
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 47
The number of sequences in a Walshtable needs to be N = 2 m .
Note
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 48
Find the chips for a network with a. Two stations b. Four stations
Example 4
Solution We can use the rows of W 2 and W 4 in Figure slide 46a. For a two-station network, we have
[+1 +1] and [+1 1].
b . For a four-station network we have[+1 +1 +1 +1], [+1 1 +1 1],
[+1 +1 1 1], and [+1 1 1 +1].
8/14/2019 ch12-G.pdf
25/28
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 49
What is the number of sequences if we have 90 stations in our network?
Example 5
Solution The number of sequences needs to be 2 m . We need to choose m = 7 and Number of sequences = 2 7 or 128.We can then use 90 of the sequences as the chips.
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 50
Data representation in CDMA
8/14/2019 ch12-G.pdf
26/28
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 51
Show how four stations share the link during a 1-bit interval?
Example 6
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 52
CDMA Multiplexer
8/14/2019 ch12-G.pdf
27/28
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 53
Digital signal created by four stations in CDMA
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 54
Decoding of the composite signal for one in CDMA
Any station can detect the data sent for example bystation 2 by using the code of station 2 as follow:[-1 -1 -3 +1] x [ +1 -1 +1 -1] = [ -1 +1 -3 -1]
= - 4 /4(no of stations)= -1
-1 means bit 0
8/14/2019 ch12-G.pdf
28/28
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 55
Decoding of the composite signal for one in CDMA
Behrouz A. Forouzan Data communication and Ne tworking 4th edition Dr. Gihan NAGUIB 56
CDMA demultiplexer