Computer Communication & Networking: Data Link Control - MAC Sudipta Mahapatra
Computer Communication & Networking: Data Link Control - MAC Sudipta Mahapatra
&
Networking
Sudipta Mahapatra
1
Medium Access Control Techniques
3
ALOHA Protocol
• Pure ALOHA
• A node transmits a packet whenever it has one to send.
• In case of collision the packet is retransmitted after a random time
interval.
4
Slotted ALOHA
• The time is divided into slots of fixed length (equal to the packet
duration Tp).
• All the nodes start their transmission only at the beginning of a new
time slot.
5
Throughput Analysis
6
Throughput Analysis
=e-2G
7
Throughput Analysis (Contd.)
• Throughput Analysis
– Assumptions:
• Packet duration=Tp
• Packet transmission rate = λ
• Pr[Successful transmission]=Ps
• Increase in transmission rate due to retransmissions=λr
• Total packet transmission rate observed
• λt =λ+λr.
– Definitions:
• Traffic, G=λtTp. At low load, S≈
≈G, at high load G>S.
• Throughput, S=GPs.
∞
• Pr[Success in k attempts]=P0(1-P0)k-1 = ∑ ke
k =1
−G
(1 − e −G ) k −1
9
Analytical Throughput curve
10
Carrier sense multiple access (CSMA)
11
CSMA (Contd.)
12
Non persistent CSMA
1. If the medium id idle, transmit; otherwise,
go to step 2.
2. If the channel is busy, wait for a random
amount of time and repeat step1.
13
1-persistent CSMA
1. If the medium id idle, transmit; otherwise,
go to step 2.
2. If the channel is busy, continue to sense
the channel until it is sensed to be idle;
then transmit immediately.
14
p-persistent CSMA
A compromise that attempts to reduce collisions
while ensuring less idle time.
1. If the medium id idle, transmit with a probability
of p, and delay for one time unit with probability
(1-p); typically, the time unit is set equal to the
maximum propagation delay.
2. If the channel is busy, continue to sense the
channel until it is sensed to be idle; then repeat
step 1.
3. If transmission is delayed by one time unit,
repeat step 1.
15
Throughput Curve
Analytical Throughput Results
16
MAC Protocol used in IEEE 802.3
• CSMA with Collision Detection (CSMA/CD)
• The Channel can be in one of three states:
(i) Transmission (ii) Contention (iii) Idle
17
CSMA/CD?
• Collision detection logic is embedded in the
transceiver interfacing a node to the
medium.
18
CSMA/CD Operation
• A station that detects a collision:
Abruptly stops transmission.
Puts a jamming signal into the channel.
Chooses a retransmission time using the Binary
exponential Backoff algorithm.
19
CSMA/CD Operation
21
CSMA/CA
• CSMA/CA is used in 802.11 based wireless LANs.
• In wireless LANs, CSMA/CD cannot be implemented
as here it is not possible to listen while sending.
• Thus, collision detection is not possible.
• Another reason is the hidden terminal problem,
whereby a node A, in range of the receiver R, is not
in range of the sender S, and therefore cannot know
that S is transmitting to R.
• Still another problem is the exposed terminal
problem.
22
Hidden terminal problem
R1 S1 S2 R2
24
CSMA/CA Protocol
• CSMA/CA: explicit channel reservation
– sender: send short RTS: request to
send
– receiver: reply with short CTS: clear
to send
• CTS reserves channel for sender,
notifying (possibly hidden) stations
• Avoids hidden station collisions
25
CSMA/CA: IEEE 802.11
26
CSMA/CA Operation
27