5 Multiple Access
5 Multiple Access
n Pure ALOHA
Random Access Protocols (Contention Methods)
(ALOHA)
n Pure ALOHA
n The pure ALOHA relies on acknowledgments from the receiver.
n If the acknowledgment does not arrive after a time-out period, the
station assumes that the frame (or the ack.) has been destroyed and
resends the frame.
n The time-out period is equal to the maximum possible round-trip
propagation delay, which is twice the time required to send a frame
between the two most widely separated stations (2 x Tp).
n If all the collided stations try to resend their frames after the time-out,
the frames will collide again.
n Pure ALOHA dictates that after the time-out period, each station
waits a random amount of time before resending its frame.
n The randomness will help avoid more collisions. We call this time the
back-off time TB.
Random Access Protocols (Contention Methods)
(ALOHA)
n Pure ALOHA
n Back-off time TB is a random value (binary exponential back-off).
n For each retransmission, a multiplier R = 0 to 2K - 1 is randomly
chosen and multiplied by Tp (maximum propagation time) or Tfr (the
average time required to send out a frame). the range of the random
numbers increases after each collision.
TB = R x Tp or TB = R x Tfr
n After a maximum number of retransmission attempts Kmax. A station
must give up and try later.
n The value of Kmax is usually chosen as 15.
Random Access Protocols (Contention Methods)
(ALOHA)
n Pure ALOHA
Random Access Protocols (Contention Methods)
(ALOHA)
n Pure ALOHA
n Example: The stations on a wireless ALOHA network are a
maximum of 600 km apart. If we assume that signals propagate at 3 x
108 m/s. Find the value of TB for K = 2.
n Sol:
n We find Tp = (600 x 103) / (3 x 108) = 2 ms.
n For K =2, the range R is {0, 1, 2, 3}. This means that TB can be 0, 2, 4,
or 6 ms.
Random Access Protocols (Contention Methods)
(ALOHA)
n Slotted ALOHA
n Slotted ALOHA was invented to improve the efficiency of pure
ALOHA.
n In slotted ALOHA, there is a rule that defines when the station can
send.
n In slotted ALOHA we divide the time into slots of Tfr s and force the
station to send only at the beginning of the time slot.
n If a station misses this moment, it must wait until the beginning of the
next time slot.
n Of course, there is still the possibility of collision if two stations try to
send at the beginning of the same time slot.
Random Access Protocols (Contention Methods)
(ALOHA)
n Slotted ALOHA
Random Access Protocols (Contention Methods)
(CSMA)
n CSMA requires that each station first listen to the medium (or check the
state of the medium) before sending.
n CSMA can reduce the possibility of collision, but it cannot eliminate it.
Random Access Protocols (Contention Methods)
(CSMA)
n Stations are connected to a shared channel (usually a dedicated medium).
n At time tl, station B senses the medium and finds it idle, so it sends a frame.
n At time t2 (t2 > t1), station C senses the medium and finds it idle because, at this
time, the first bits from station B have not reached station C.
n Station C also sends a frame. The two signals collide and both frames are
destroyed.
Random Access Protocols (Contention Methods)
(CSMA)
n In other words, a station may sense the medium and find it idle, only
because the first bit sent by another station has not yet been received.
n Persistence Methods
n What should a station do if the channel is busy? What should a station do if
the channel is idle?
n Three methods have been devised to answer these questions:
n 1-persistent method
n nonpersistent method
n p-persistent method
Random Access Protocols (Contention Methods)
(CSMA)
n Persistence Methods
n 1-Persistent
n The 1-persistent method is simple and straightforward.
n In this method, after the station finds the line idle, it sends its frame
stations may find the line idle and send their frames immediately.
Random Access Protocols (Contention Methods)
(CSMA)
n Persistence Methods
n Nonpersistent
n In this method, a station that has a frame to send senses the line. If the line is idle, it
sends immediately.
n If the line is not idle, it waits a random amount of time and then senses the line again.
n This approach reduces the chance of collision because it is unlikely that two or more
stations will wait the same amount of time and retry to send simultaneously.
n However, this method reduces the efficiency of the network because the medium
remains idle when there may be stations with frames to send.
Random Access Protocols (Contention Methods)
(CSMA)
n Persistence Methods
n p-Persistent
n The p-persistent method is used if the channel has time slots with a slot
efficiency.
n In this method, after the station finds the line idle it follows these steps:
n Persistence Methods
n p-Persistent
Random Access Protocols (Contention Methods)
(CSMA/CD)
n The CSMA method does not specify the procedure following a collision.
n Carrier sense multiple access with collision detection (CSMA/CD)
augments the algorithm to handle the collision.
n In this method, a station monitors the medium after it sends a frame to
see if the transmission was successful. If so, the station is finished.
n If, however, there is a collision, short jamming signal is sent to make sure
that all other stations become aware of the collision, then the frame is
sent again.
Random Access Protocols (Contention Methods)
(CSMA/CD)
n At time t1, station A has executed its persistence procedure and starts
sending the bits of its frame.
n At time t2, station C has not yet sensed the first bit sent by A.
n Station C executes its persistence procedure and starts sending the bits in
its frame, which propagate both to the left and to the right.
n The collision occurs some-time after time t2.
n Station C detects a collision at time t3 when it receives the first bit of A's
frame.
n Station C immediately (or after a short time, but we assume immediately)
aborts transmission.
n Station A detects collision at time t4 when it receives the first bit of C's
frame; it also immediately aborts transmission.
n A transmits for the duration t4 - t1
n C transmits for the duration t3 - t2
Random Access Protocols (Contention Methods)
(CSMA/CD)
n
Random Access Protocols (Contention Methods)
(CSMA/CA)
n Contention window.
n Acknowledgments.
Random Access Protocols (Contention Methods)
(CSMA/CA)
n Interframe space
n Even though the channel may appear idle when it is sensed, a distant station
may have already started transmitting.
n The distant station's signal has not yet reached this station.
n The IFS time allows the front of the transmitted signal by the distant station
to reach this station.
n After waiting an IFS time, if the channel is still idle, the station can send, but
it still needs to wait a time equal to the contention window.
Random Access Protocols (Contention Methods)
(CSMA/CA)
n Contention window
n The contention window is an amount of time divided into slots.
n A station that is ready to send chooses a random number of slots as its wait
time.
n The number of slots in the window changes according to the binary
exponential backoff strategy.
n This means that it is set to one slot the first time and then doubles each time
the station cannot detect an idle channel after the IFS time.
Random Access Protocols (Contention Methods)
(CSMA/CA)
n Acknowledgment
n With all these precautions, there still may be a collision resulting in
destroyed data.
n The positive acknowledgment and the time-out timer can help guarantee that
the receiver has received the frame
Random Access Protocols (Contention Methods)
(CSMA/CA)
n
Random Access Protocols (Contention Methods)
(CSMA/CA)
b) After the station is found to be idle, the station waits for a period of time called the
distributed interframe space (DIFS); then the station sends a control frame called
the request to send (RTS)
2. After receiving the RTS and waiting a period of time called the short
interframe space (SIFS), the destination station sends a control frame, called
the clear to send (CTS), to the source station. This control frame indicates that
the destination station is ready to receive data.
Random Access Protocols (Contention Methods)
(CSMA/CA)
4. The destination station, after waiting an amount of time equal to SIFS, sends
an acknowledgment to show that the frame has been received.
Acknowledgment is needed in this protocol because the station does not have
any means to check for the successful arrival of its data at the destination.
Random Access Protocols (Contention Methods)
(CSMA/CA)
n Two or more stations may try to send RTS frames at the same time.
n The stations consult one another to find which station has the right to
send.
n Controlled-access methods:
n Reservation
n Polling
n Token Passing
Controlled Access
n Reservation
n In the reservation method, a station needs to make a reservation before
sending data.
n In each interval, a reservation frame precedes the data frames sent in that
interval.
Controlled Access
n Polling
n Polling works with topologies in which one device is designated as a
primary station and the other devices are secondary stations.
n The primary device controls the link; the secondary devices follow its
instructions.
n However, the drawback is if the primary station fails, the system goes down.
Controlled Access
n Polling
n Select
n The select function is used whenever the primary device has something to
send.
n Poll
n The poll function is used by the primary device to solicit transmissions from
n Token Passing
n In this method, the stations in a network are organized in a logical ring.
n The predecessor is the station which is logically before the station in the
ring; the successor is the station which is after the station in the ring.
n The possession of the token gives the station the right to access the channel
and send its data.
Controlled Access
n Token Passing
n When a station has some data to send, it waits until it receives the token from its
predecessor. It then holds the token and sends its data.
n When the station has no more data to send, it releases the token, passing it to the
next logical station in the ring.
n The station cannot send data until it receives the token again in the next round.
n In this process, when a station receives the token and has no data to send, it just
passes the data to the next station
n Stations must be limited in the time they can have possession of the token.
n If a station that is holding the token fails, the token will disappear from the
network.
Channelization
n Any station that wants to receive data from one of the other three,
multiplies the data on the channel by the code of the sender.
n For example, suppose stations 1 and 2 are talking to each other. Station 2
wants to hear what station 1 is saying. It multiplies the data on the
channel by c1.