Part 3 : Medium
Access Control (MAC)
Medium Access Control (MAC)
• Medium Access Control (MAC) :
mechanism to share the access to a common medium
MAC used in LAN and packet radio networks
• Assumptions
N independent stations sharing common channel
collision when frames are sent simultaneous
slotted or unslotted access system
with or without carrier sensing
centralized or distributed control
ALOHA Protocol : definition
• ALOHA
packet radio network (Univ. Hawaii, 1970)
used in many systems (e.g. GSM)
• Operation of ALOHA
station transmits when frame is available
station is able to check if a collision occurs
If a collision occurs, the station waits for a random
time before sending again the frame
(this waiting time is non-deterministic)
ALOHA Protocol : efficiency (1)
• Asumptions
frame has fixed length
time needed to transmit a frame is time unit
S : new frame rate generated by the stations
(=number of new frames per frame time) : S < 1
G : total frame rate generated by the stations
(=number of new frames and retransmission
generated per frame time)
Total number of generated frames in T is
Poisson: (GT ) k −GT
P( X = k ) = e
k!
ALOHA Protocol : efficiency (2)
• Efficiency of ALOHA:
α : the probability that individual frame collides
G = S + αG
S = (1 − α )G
Probability that at least 1 frame is transmitted in
interval of length 2 : α = 1 − e −2G
S = Ge − 2G
Maximum for S= 1/(2e) = 0.184, hence G=0.5
18 %: new frames, 32 %: retransmissions, 50%
waste
Slotted ALOHA
−G
S = Ge
Maximum for S= 1/e = 0.368, hence G=1
36 %: new frames (twice ALOHA throughput)
Slotted ALOHA: Access time
Probability that k transmissions are needed to
send a frame : Pk = e −G (1 − e −G ) k −1
Mean number of transmissions needed :
∞ ∞
E= ∑
k =1
k Pk = ∑
k =1
ke −G (1 − e −G ) k −1 = e G
0.36 −G
S = Ge
SLOTTED
ALOHA
0.18
S = Ge − 2G UNSLOTTED
ALOHA
0.50 1 G
Carrier Sensing Multiple Access
• CSMA protocols
to increase efficiency of ALOHA
each station verifies channel before transmitting
If occupied : station waits, otherwise : send
• Persistent and non-Persistent CSMA
1-persistent CSMA :
• station senses the channel if it has data to send
• if channel is free, frame is sent immediately
• in case of collision, wait random time before
retransmission
Carrier Sensing Multiple Access
Non-Persistent CSMA :
• If channel is idle : the station starts sending
• If channel is used : station waits random time before sensing
• in case of collision, wait random time before retransmission
p-Persistent CSMA (slotted system)
• If channel is idle : send with probability p, wait till next slot with
probability 1-p; proceed in this way till success
• If channel is not idle anymore : station waits random time and
starts the process again
• If channel is occupied at the start : wait till next slot
CSMA : Comparison (1)
Non-Persistent CSMA :
• number of collisions mininized
• waste of channel capacity
1-Persistent CSMA :
• channel capacity is fully used
• probability of collision is high
p-Persistent CSMA
• trade-off between usage of channel capacity and
mininizing collisions.
• If p decreases, S increases
CSMA : Comparison (1)
0.01-persistent
1
Non-persistent
0.1-persistent
0.5
0.5-persistent
Slotted
1-persistent
Pure ALOHA
ALOHA
1 2 3
CSMA / CD
Data-
802.2 Link
layer
with mean ∑j =0
j A(1 − A) j −1 = 1 / A
IEEE 802.3 : Efficiency (2)
Mean contention period w=2τ/A
For optimal p (=1/k) : w= 2τe = 5.4τ
Let P be the time needed to transmit a frame
P 1
E= =
P + 2τ / A 1 + 2 BLe / cF
• F : frame length
• B : bandwidth
• L : cable length
• c : speed of the signal
Efficiency low for large BL (long cable, high bandwidth;
e.g. in MAN)
Ethernet Technologies
• 4 major technologies:
10Base2: coaxial cable, bus topology, 10Mbit/s
10BaseT: twisted pair copper, star topology,
10Mbit/s
100BaseT: twisted pair copper, star topology,
100Mbit/s
Gigabit Ethernet: optical fiber, 1 Gbit/s
10BaseT and 100BaseT Ethernet
• To decrease collisions
IEEE 802.11 frame contains duration field
Other stations can determine the time they should
defer their access to the channel
This time is called the Network Allocation Vector
(NAV)
IEEE 801.11: TRS and CTS (1)