Download as pdf or txt
Download as pdf or txt
You are on page 1of 24

Multiple Access Links and Protocols

Two types of “links”:


r point-to-point
m PPP for dial-up access
↳ channel

m point-to-point link between Ethernet switch and host


r broadcast (shared wire or medium)
m traditional Ethernet
m Bluetooth
m 802.11 wireless LAN

5: DataLink Layer 5-13


Multiple Access protocols
r single shared broadcast channel
r two or more simultaneous transmissions by nodes:
interference
m collision if node receives two or more signals at the same time

multiple access protocol


r distributed algorithm that determines how nodes
share channel, i.e., determine when node can transmit
r communication about channel sharing must use channel
itself!
m no out-of-band channel for coordination

5: DataLink Layer 5-14


Ideal Multiple Access Protocol
Broadcast channel of rate R bps
1. When one node wants to transmit, it can send at
rate R.
2. When M nodes want to transmit, each can send at
average rate R/M
3. Fully decentralized:
m no special node to coordinate transmissions
m no synchronization of clocks, slots
4. Simple

5: DataLink Layer 5-15


MAC Protocols: a taxonomy
Three broad classes:
r Channel Partitioning
m divide channel into smaller “pieces” (time slots,
frequency, code)
m allocate piece to node for exclusive use
r Random Access
m channel not divided, allow collisions
m “recover” from collisions
r “Taking turns”
m Nodes take turns, but nodes with more to send can take
longer turns

5: DataLink Layer 5-16


Channel Partitioning MAC protocols: TDMA

TDMA: time division multiple access


r access to channel in "rounds"
r each station gets fixed length slot (length = pkt
trans time) in each round
r unused slots go idle
r example: 6-station LAN, 1,3,4 have pkt, slots 2,5,6
idle

5: DataLink Layer 5-17


Channel Partitioning MAC protocols: FDMA

FDMA: frequency division multiple access


r channel spectrum divided into frequency bands
r each station assigned fixed frequency band
r unused transmission time in frequency bands go idle
r example: 6-station LAN, 1,3,4 have pkt, frequency
bands 2,5,6 idle
time
p
frequency bands

5: DataLink Layer 5-18


Random Access Protocols
r When node has packet to send
m transmit at full channel data rate R.
m no a priori coordination among nodes
r two or more transmitting nodes ➜ “collision”,
r random access MAC protocol specifies:
m how to detect collisions
m how to recover from collisions (e.g., via delayed
retransmissions)
r Examples of random access MAC protocols:
m slotted ALOHA
m ALOHA
m CSMA, CSMA/CD, CSMA/CA
5: DataLink Layer 5-19
Slotted ALOHA ☒ ☒
Broadcast channel
Assumptions Operation
r all frames same size r when node obtains fresh
r time is divided into frame, it transmits in next
equal size slots, time to slot
transmit 1 frame r no collision, node can send
r nodes start to transmit new frame in next slot
frames only at r if collision, node
beginning of slots retransmits frame in each
r nodes are synchronized subsequent slot with prob.
p until success
r if 2 or more nodes
transmit in slot, all
nodes detect collision
I 5: DataLink Layer 5-20
Slotted ALOHA
=*¥+#÷#
utilization
p ,=É or
E
T
tails µ
T
* T µ Efficiency
pz
-0-5 T T T T
Tails it µ
"
pz=o5 T T
tail T T T

t is to
O
collision Empty success
Pros Cons
r single active node can r collisions, wasting slots
continuously transmit r idle slots
at full rate of channel r nodes must be able to
r highly decentralized: detect collision in less
only slots in nodes than time to transmit
packet
need to be in sync
r clock synchronization
r simple
5: DataLink Layer 5-21
Slotted Aloha efficiency
Efficiency is the long-run rFor max efficiency
fraction of successful slots with N nodes, find p*
when there are many nodes, that maximizes
each with many frames to send Np(1-p)N-1
-
=fh
r For many nodes, take
r Suppose N nodes with
many frames to send, df¥-=0| limit of Np*(1-p*)N-1 as
N goes to infinity, -1

each transmits in slot given gives 1/e = .37 dNp*(tp*N


/_?÷fm
a

with probability p for N .

r prob that node 1 has At best: channel


success in a slot used for useful

r
= p(1-p)N-1
prob that any node has of time!
0
transmissions 37%

a success = Np(1-p)N-1 -1

↳ (Ncuoose , / rp.li p )N-

5: DataLink Layer 5-22


Pure (unslotted) ALOHA
r unslotted Aloha: simpler, no synchronization
r when frame first arrives
m transmit immediately
r collision probability increases:
m frame sent at t0 collides with other frames sent in [t0-1,t0+1]

Transmit
time
=

Pk+pY-µ
'
'

I Transmit I
l@etime.l •
Tails Heads

5: DataLink Layer 5-23


Pure Aloha efficiency
P(success by given node) = P(node transmits) .

P(no other node transmits in [t0-1,t0] .


P(no other node transmits in [t0,t0+1]
= p . (1-p)N-1 . (1-p)N-1
= p . (1-p)2(N-1)

… choosing optimum p and then letting n -> infty ...

Even worse ! ② = 1/(2e) = .18 18%


IN -1

FIL
N
p* G- ☒
5: DataLink Layer 5-24
cavriersensemultipleh-ccesscc.sn/t)-
listen before
talk
you .

In:#ear ☒

ear


time
is what I hear > usual @iin my
hardware
£
.


A B- Both A and C need to
to idle
-

I
-
to run the following
⇐ idle
constantly
¥É
check
E- idle

¥→ busy
during pkt transmission :

is my transmitted signal
carrier
= =
my
A sensed signal ?
B

ɵÉ{ | |
s
condition to detect
collision :
max

Transmit time
> 2.
n
Prop Delay
.
?⃝
÷
.

|¥:÷:÷
| | |
I ←
Backoff
279¥ ""
rÉ{
new }r☐=s
dpkt

y÷÷÷
name,
from
network
.

riff freeze
backoff

down .

once
Random channel idle again

-_µp.☐
,
Backoff is chosen
resume
from a
range countdown
from the frozen
[ 0 , an ] value .

↳ contention
window ~~ 15

if collision New CW = 2x old cw .

if successful new CW =
15 again .
IEEE 802.3
Ethernet

Starting CW =
cwmin = 15 Pick 13/0^-10 , cwmin]

KF collision 2k @W
1¥ collision
24
v[0,31 ]
collision
. ~
[ 0,63]

↳ Exponential Back
off .

Upon success → cw cwmin 15


=
=

If failure after 1<=3 retransmit →


Drop packet .

CSMA
/ CD → collision Detection .

¥×detcts the collision .


Afterdass I 1
Ñ SNR
Ñ② -
- -

collision collision Does not


is
detection detection know
inadequate , that
hence collision
collision
happened .

If E wants ,

E can
sample the
signal , get obits . &

then check error detection


code .
?⃝
CSMA (Carrier Sense Multiple Access)

CSMA: listen before transmit:


If channel sensed idle: transmit entire frame
r If channel sensed busy, defer transmission

r Human analogy: don’t interrupt others!

5: DataLink Layer 5-25


CSMA collisions spatial layout of nodes

collisions can still occur:


propagation delay means
two nodes may not hear
each other’s transmission

collision:
entire packet transmission
time wasted
note:
role of distance & propagation
delay in determining collision
probability

5: DataLink Layer 5-26


CSMA/CD (Collision Detection)
CSMA/CD: carrier sensing, deferral as in CSMA
m collisions detected within short time
m colliding transmissions aborted, reducing channel
wastage
r collision detection:
m easy in wired LANs: measure signal strengths,
compare transmitted, received signals
m difficult in wireless LANs: receiver shut off while
transmitting
r human analogy: the polite conversationalist

5: DataLink Layer 5-27


CSMA/CD collision detection

5: DataLink Layer 5-28


“Taking Turns” MAC protocols
channel partitioning MAC protocols:
m share channel efficiently and fairly at high load
m inefficient at low load: delay in channel access,
1/N bandwidth allocated even if only 1 active
node!
Random access MAC protocols
m efficient at low load: single node can fully
utilize channel
m high load: collision overhead
“taking turns” protocols
look for best of both worlds!
5: DataLink Layer 5-29
“Taking Turns” MAC protocols
Polling: Token passing:
r master node r control token passed from
“invites” slave nodes one node to next
to transmit in turn sequentially.
r concerns: r token message
m polling overhead r concerns:
m latency m token overhead
m single point of m latency
failure (master) m single point of failure (token)

5: DataLink Layer 5-30


Summary of MAC protocols
r What do you do with a shared media?
m Channel Partitioning, by time, frequency or code
• Time Division, Frequency Division
m Random partitioning (dynamic),
• ALOHA, S-ALOHA, CSMA, CSMA/CD
• carrier sensing: easy in some technologies (wire), hard
in others (wireless)
• CSMA/CD used in Ethernet
• CSMA/CA used in 802.11
m Taking Turns
• polling from a central site, token passing

5: DataLink Layer 5-31


Link Layer
r 5.1 Introduction and r 5.6 Hubs and switches
services r 5.7 PPP
r 5.2 Error detection r 5.8 Link Virtualization:
and correction ATM
r 5.3Multiple access
protocols
r 5.4 Link-Layer
Addressing
r 5.5 Ethernet

5: DataLink Layer 5-32

You might also like