Upload
others
View
1
Download
0
Embed Size (px)
Citation preview
Medium Access Control
(MAC)
12.2
Figure 12.1 Data link layer divided into two functionality-oriented sublayers
When nodes or stations are connected to or use a common link, called a multipoint or broadcast link, we need multiple-access protocol to coordinate access to the link for following :
# To guarantee that every node has right to use the link.
# To ensure that two or more nodes do not start transmission simultaneously.
# No node is allowed to monopolize the link.
12.4
Figure 12.2 Taxonomy of multiple-access protocols discussed in this chapter
12.5
12-1 RANDOM ACCESS
In random access or contention methods, no station is
superior to another station and none is assigned the
control over another. No station permits, or does not
permit, another station to send. At each instance, a
station that has data to send uses a procedure defined
by the protocol to make a decision on whether or not to
send.
MA/ALOHA
Carrier Sense Multiple Access (CSMA)
Carrier Sense Multiple Access with Collision Detection(CSMA/CD)
Carrier Sense Multiple Access with Collision Avoidance(CSMA/CA)
Topics discussed in this section:
Random Access
Random Access: Each station has right to send without being controlled by other stations. If more than one station tries to send, its an access conflict (collision). We need to take care of following:
# 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?
Figure below shows the random-access methods evolution.
Random Access Multiple Access (MA)
MA (ALOHA): It was designed to be used on a radio (wireless) LAN with a data rate of 9600 bps. Transmission between stations was done through base station. Uploading (station to base) used modulation with a carrier frequency of 407 MHz, while downloading used 413 MHz.
There can be collisions because medium (air) is shared between stations. Suppose two stations start sending data to the base (at frequency 407 MHz) at the same time. The data from the two stations will collide and become garbled.
12.8
Figure 12.3 Frames in a pure ALOHA network
12.9
Figure 12.4 Procedure for pure ALOHA protocol
12.10
Figure 12.5 Vulnerable time for pure ALOHA protocol
12.11
A pure ALOHA network transmits 200-bit frames on a
shared channel of 200 kbps. What is the requirement to
make this frame collision-free?
Example 12.2
Solution
Average frame transmission time Tfr is 200 bits/200 kbps or
1 ms. The vulnerable time is 2 × 1 ms = 2 ms. This means
no station should send later than 1 ms before this station
starts transmission and no station should start sending
during the one 1-ms period that this station is sending.
12.12
The throughput for pure ALOHA is
S = G × e −2G .
The maximum throughput
Smax = 0.184 when G= (1/2).
Note
G- average no of frames generated by system during
one frame transmission time.
12.13
Figure 12.6 Frames in a slotted ALOHA network
12.14
Figure 12.7 Vulnerable time for slotted ALOHA protocol
12.15
The throughput for slotted ALOHA is
S = G × e−G .
The maximum throughput
Smax = 0.368 when G = 1.
Note
Random Access Carrier Sense Multiple Access (CSMA)
The chances of collision can be reduced if a station senses the medium before trying to use it. Note that CSMA can reduce the possibility of a collision, but cannot eliminate it. Example below shows it:
At time t1: Station A senses the medium, finds idle and sends a frame.
At time t2 (t2>t1): Station Z senses, finds idle (due to propagation delay, bits from station A has not reached station Z), and sends frame.
At time t3 (t3>t2): The two frames Collide.
At time t4 and t5 (t5>t4>t3): Garbled signal reaches station Z and A respectively
12.17
Figure 12.8 Space/time model of the collision in CSMA
12.18
Figure 12.9 Vulnerable time in CSMA
Random Access Carrier Sense Multiple Access (CSMA)
Persistence Strategy: defines the procedure for a station that senses a busy medium. Two subcategories have been devised:
Non persistent
Persistent – 1 Persistent and p- Persistent
# Non persistent: If station is idle, sends the frame. If not, then wait for random amount of time and senses the medium again.
12.20
Figure 12.10 Behavior of three persistence methods
1-persistent method is simple and
straightforward. In this method, after the station
finds the line idle, it sends its frame immediately.
This method has the highest chance of collision
because two or more stations may find the line
idle and send their frames immediately.
In the non-persistent method, a station that
has a frame to send senses the line. If the line is
idle, it sends immediately. If the line is not
idle, it waits a random amount of time and
then senses the line again. The non-persistent
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.
12.21
Figure 12.10 Behavior of three persistence methods
p-persistent: If a station finds the line idle, it sends with probability p and refrains from
sending with probability 1-p.
Example: if p = 0.2, station, after sensing an idle line, sends with a probability of 0.2
(20 percent of the time).
Therefore each station generates a random number between 1 and 100. If number is
less than or equal to 20, it sends the frame. Otherwise it refrains itself from sending.
This strategy reduces the chances for collision.
12.22
Figure 12.11 Flow diagram for three persistence methods
Random Access CSMA/CD
The CSMA method does not define the procedure for a collision. Carrier Sense Multiple Access with Collision Detection (CSMA/CD) adds a procedure to handle a collision.
Working:
# After sending frame, the station monitors the medium to see if transmission was successful.
# If there is a collision, the station applies back off strategy.
Back off: The station waits a little for first time, more if a collision occurs again, much more if it happens a third time, and so on.
12.24
Figure 12.12 Collision of the first bit in CSMA/CD
12.25
Figure 12.13 Collision and abortion in CSMA/CD
12.26
Figure 12.14 Flow diagram for the CSMA/CD
12.27
Figure 12.15 Energy level during transmission, idleness, or collision
Random Access CSMA/CA
# We try to avoid collision. Station uses one of the persistent policy.
# After finding the line idle, the station waits for an IFG (inter frame gap) time. It waits for random amount of time and sends the frame.
# It waits for an ACK. If it does not receive ACK, station increments backoff parameter, waits for backoff amount of time, and resenses the line.
# It is mainly used in wireless LANS.
12.29
Figure 12.16 Timing in CSMA/CA
IFS : interframe space
In CSMA/CA, the IFS can also be used to
define the priority of a station or a frame.
12.30
In CSMA/CA, if the station finds the
channel busy, it does not restart the
timer of the contention window;
it stops the timer and restarts it when
the channel becomes idle.
Note
12.31
Figure 12.17 Flow diagram for CSMA/CA