Beruflich Dokumente
Kultur Dokumente
Multiple Access
Traditional
Ethernet
Recent
trend
to
non-multi-access
LANs
Satellite channels
Satellite channels
Wireless
Wireless
radioradio
Multi-drop telephone
NET
DLC
PHY
MAC
LLC
Medium
Access
Control
Medium Access
Control
(MAC) (MAC)
Regulates access
to channel
Regulates
access
to
channel
All L
other
functions (LLC)
Logical
ink
DLC
Control
All
other
functionalities
an Modiano
Slide 3
Contention
systems
Polling
Random Access
Aloha
Receiver
...
.
Transmitters
Slotted Aloha
Random
Access:
Slotted
Aloha
Time
is
divided
into
slots
of
one
packet
duration
Time
is divided
into slots
of one packet duration
E.g.,
fixed
size
packets
E.g.,
packets
When
a
nfixed
ode
size
has
a
packet
to
send,
it
waits
until
the
start
of
the
next
When a node has a packet to send, it waits until the start of the next slot to
slot
to
send
it
send it
Requires
synchronization
Requires synchronization
If
o
oother
ther
nodes
nodes
attempt
transmission
uring
slot,
the
Ifnno
attempt
transmission
during dthat
slot,that
the transmission
is successful is
successful
transmission
Otherwise collision
Otherwise
collision
Collided packet are retransmitted after a random delay
Collided
packet
are
retransmitted
after
a
random
delay
Eytan Modiano
Slide 6
Slotted
Aloha
Assumptions
Slotted Aloha
Markov
Chain
P03
P10
P13
2
P34
3
State
systemis
isnnumber
backlogged
nodes.
State
(n)
(n)
of
of
system
umber
ofof
backlogged
nodes
P
pi,i-1
probability
of
one
backlogged
ttempt
and
no
new
arrival
i,i-1==
prob.
of one backlogged
attempt andano
new arrival
Pi,i =
probability
of
one
new
arrival
and
no
backlogged
attempts
p
prob.
of one new
arrival
and no backlogged attempts or no new
i,i n=
or
o
n
ew
arrival
a
nd
n
o
s
uccess
arrival and no success
pi,i+1 =
probability
of
new
arrival
and
one
or
more
backlogged
p
attempts
i,i+1 = prob of one new arrival and one or more backlogged attempts
pi,i+j =
probability
of
j
new
arrivals
and
one
or
more
backlogged
pi,i+j = Prob. Of j new arrivals and one or more backlogged attempts or j+1
attempts
r
j+1
arrivals
attempts
and
no
backlogged
attempts
new
arrivalsoand
nonew
backlogged
Steady
state
probabilities
do
not
exists
Steady
state probabilities
do not
Backlog
tends
to
infinity
exists
system
unstable
Eytan Modiano
Slotted Aloha
Slotted
A
loha
Throughput of Slotted Aloha
Throughput
When system
stable throughput
also equal
the external arrival
rate
() equal
the
external
is When
system
must
is
stable,
throughput
must
also
arrival rate ()
d
g(n)
g(n)
g(n)
d
!g( g(n)e
n)
!g( n)
!g( n)
=
e
g(n)e
=0
g(n)e
=
e
!
g(n)e
=
0
What
value
of
g(n)
maximizes
dg(n) dg(n)
Whatthroughput?
value of g(n)
" g(n)
= 1g(n) = 1
maximizes throughput?
P(success)
= g(n)e
<If
1g=>
(n)
>
1
idle
too
many
collisions
g(n)
too many
slots
g(n) > 1 => too many collisions
g(n)
can
be
ktoept
lose
to
arrival
1,
an
rate
external
arrival
rate
f
1/e
packets
per
Ifg(n)If
can
be kept close
1, ancexternal
of 1/e packets
per slot
canobe
10
sustained
slots
can
be
sustained
Slotted Aloha
Ifbbacklog
beyond
unstable
point (bad
luck)
then
it tends
to it
If
acklog
increases
increases
beyond
unstable
point
(bad
luck),
then
increase
limit
and the ldeparture
drops tor0ate
drops
to
0
tends
to
without
increase
without
imit
and
rate
departure
Drift
in
state
n,
D(n)
is
the
expected
change
in
backlog
over
one
Drift in state n, D(n) is the expected change in backlog over one time slot
time
lots= - P(success) = - g(n)e-g(n)
s
D(n)
D(n)
=
- g(n)
e-g(n)
Eytan Modiano
Slide 11
11
Slotted Aloha
When
the
estimate
is
too
large,
too
many
idle
slots
occur
When
the
estimate
is
too
small,
too
many
collisions
occur
Nodes
can
use
feedback
information
to
make
estimates
A
good
rule
is
increase
the
estimate
of
n
on
each
collision,
and
to
decrease
it
on
each
idle
slot
or
successful
slot
12
Slotted Aloha
"max{, nk + 1}
nk+1 = #
$nk + +1 / (e 2)
0.2
0.4
0.6
0.8
ARRIVAL RATE
Eytan Modiano
Slide 14
14
New arrivalsare
arettransmitted
immediately
(no slots)
New
arrivals
ransmitted
immediately
(no
slots)
n
No
needfor
for ssynchronization
No
eed
ynchronization
No need for fixed length packets
No
need
for
fixed
length
packets
A
retried
after
n
exponentially
distributed
bAacklogged
packet
backlogged packet iiss
retried
after
an aexponentially
distributed
random
random
delay
with
some
delay with
some
mean
1/x mean
1/x
The
total
arrival
rocess
isis
aatime
time
varying
Poisson
process
f
rate
The
total
arrivalpprocess
varying
Poisson process
of rateog(n)
=+
nx=(n
= ave. time
between
retransmissions)
g(n)
=+
backlog,
nx (n
=
1/x
backlog,
1/x
=
average
time
between
retransmissions)
Note that an attempt suffers a collision if the previous attempt is not yet
Note
that
a(tn
attempt
suffers
a
collision
if
the
previous
attempt
finished
i-ti-1<1) or the next attempt starts too soon (ti+1-ti<1)
is
not
yet
finished
(ti-ti-1 <
1)
or
the
next
attempt
starts
too
soon
New Arrivals
(ti+1-ti <
1)
!
t1
t4
Collision
Eytan Modiano
Slide 15
Retransmission
15
16
17
CSMA
When a node starts/stops transmitting, it will take this long for all nodes to
For
initial
understanding,
view
the
system
as
slotted
mini-
detect channel busy/idle
slots
of
duration
equal
to
the
maximum
propagation
For
initial understanding, view the system as slotted with "mini-slots" of
delay
duration equal to the maximum propagation delay
Normalize
the
mini-slot
duration
=/Dtp and
packet
Normalize the mini-slot duration to = /Dtp and packet duration
=1
duration
=
1
"> ! <"
<----------- 1 ---------------->
packet
minislots
18
Slotted
CSMA
Rules
Slotted
CSMA
Analysis
Slotted
CSMA
Analysis
21
Maximum
Throughput
Slotted
CSMAfor CSMA
Maximum Throughput
!<
g(n) ! 2 "
1+ 2"
<
g(n)
between
idle
lots
and
time
wasted
on
collisions
Tradeoff
High throughput
when
isssmall
High
throughput
when
is
small
Stability
Stability issues similar to Aloha (less critical)
issues
similar
to
Aloha
(less
critical)
1-!2!
Departure rate
Arrival rate
Eytan Modiano
Slide 7
!2 !
g(n) = "! + nq
r
22
Unslotted CSMA
Random
Access:
SMA/CD
CSMA/CDC
and
Ethernet and
Ethernet
Two way cable
WS
WS
WS
WS
WS
CSMA
with
Detection
capability
CSMA
withCollision
Collision Detection
(CD)(CD)
capability
Nodes
ableto
to d
detect
collisions
Nodes
able
etect
collisions
Upon detection of a collision nodes stop transmission
Upon
dReduce
etection
of
a
collision
nodes
stop
transmission
the amount of time wasted on collisions
WS
Protocol:
Protocol:
Eytan Modiano
Slide 9
Channel
idle
a Transmit
When a node
has
packet to send:
Channelbidle
Channel
usy
Transmit
Wait
a
random
delay
(binary
exponential
Channel busy wait a random delay (binary exponential back-off)
back-off)
If
a
tIfransmitting
ode
detects
a
collision
it
stops
a transmitting n
node
detects
a collision
it stops transmission
Waits a random delay and tries again
transmission
24
CSMA/CD
nd
Ecollisions
thernet
Time toadetect
Time
to
detect
collision
WS
WS
delay
= prop
It would take an additional propagation delay for both users to detect the collision
and stop transmitting
Eytan Modiano
Slide 10
Approximateamodel
for CSMA/CD
CSMA/CD
nd
Ethernet
<----------- 1 ---------------->
packet
Mini-slots
IfIf
aanode
starts
transmission
at the beginning
ofbaeginning
mini-slot, byothe
of the mini
node
starts
transmission
at
the
f
a
end
mini-
slot either
slot,
bcollision
y
the
eoccurred
nd
of
and
the
ini-
lot
either
will be uninterrupted
No
them
rest
of sthe
transmission
No
A collision
occurred,
but by the end
of the
mini-slot
would be idle again
collision
occurred
and
the
rest
othef
tchannel
he
transmission
be
uninterrupted
Hencewill
a collision at most affects one mini-slot
A
collision
occurred,
but
by
the
end
of
the
mini-slot
the
channel
would
be
idle
again
26
To
maximize
P[success];
d
[NP(1 P) N1 ] = N(1 P) N1 N(N 1)P(1 P) N2 = 0
dP
Popt =
1
N
" 1%
P[success] = NP(1 P) N1 = $1 '
# N&
1
Ps = lim N P[success] =
e
N1
E[X] =
1
=e
Ps
28
S = (e 1)2 + DTp +
Idle/collision
mini-slots
Packet
transmission
time
Average
time
until
start
of
next
mini-slot
1
1+ 2
29
Example:
Ethernet
Transmission
rate
=
10
Mbps
Packet
length
=
1000
bits,
DTp =
10-4 sec
Cable
distance
=
1
mile,
=
510-4
=
510-2 and
E
=
80%
31
Migration
t
o
S
witched
L
ANs
Traditional Ethernet
o f
Nodes
connected
with coax
Long
wire
protocol
everywhere
runs
CSMA/CD
Long runs of wire everywhere
Hub
Ethernet
CSMA/CD
protocol
CSMA/CD protocol
Nodes
connected to hub
Hub
Hub
Ethernet
Ethernet
WS
WS
WS
CSMA/CD
connected
toprotocol
hub for 100 Mbps
cable runs,
Useful
Hub
acts
a s
a
Shorted
bNodes
roadcast
repeater
Hub
actstoasadd/remove
a broadcast repeater
Easy
users
CSMA/CD
protocol
Shorted
cable
runs,
Useful
for
100Mbps
Shorted cable runs, Useful for 100 Mbps
WS
WS
WS
WS
WS
WS
WS
WS
WS
WS
WS
WS
WS
WS
WS
WS
WS
WS
WS
WS
WS
Easy to localize
Easy toadd/remove
users faults
WS
CSMA/CD
protocol
WS
CSMA/CD
protocol
localize
Cheap
cabling (twisted pair, 10baseT)
Easy
to
faults
t o
aEasy
to add/remove
users
dd/remove
sers
WS
WS
Easy
Cheap
cabling
(twistedupair,
10baseT)
Easy
to
localize
faults
WS
WS
Easy
localize
fEthernet
aults
to
Switched
Cheap cabling (twisted pair, 10baseT)
WS
Cheap
Ethernet
cabling
Switched
No(twisted
CSMA/CDp air,
10baseT)
WS
WS
WS
Easy to increase data rate (e.g., Gbit Ethernet)
No
CSMA/CD
Switched
Ethernet
Switched
Ethernet
Nodes transmit
when
they
want
Easy
to increase
data rate (e.g.,
Gbit
Ethernet)
WS WS
WS
SMA/CD
No
CSMA/CD
Switch
queues
the packets and transmits to
No
C
Nodes
transmit
when
they want
WS
WS
destination
Easy
to increase
rate
(e.g., Gbit to
Ethernet)
WS
Easy
to
increase
d ata
rthe
ate
(e.g.,
data
Gand
bit
Ethernet)
Switch queues
packets
transmits
WS
Con
Nodes
transmit
when they
wantof 20-40 ports
WS
Typical switch
capacity
destination
Packet
To
Connect
Nodes
transmit
when
tof
hey
want
WS
Switch
queues
thecan
packets
transmits
Typical
capacity
20-40
ports
switch
Each
node
now and
transmit
at thetofull rate of
Switch
WS Packet
To other Swi
Switch
ueues
tnow
he
ptransmit
ackets
atand
ransmits
10/100/Gbps
Eachqdestination
node
can
the tfull
rate of t o
d estination
Switch
Connect
Switchs
WS
WS
switch
Typical
switch
capacity
of
20-40
ports
10/100/Gbps
Modularity:
Switches
can
be connected to each
Packet
Typical
c
apacity
o
f
2
0-40
p
orts
To other
WS
other
using
high
ports
Each node
can
now
transmit
at the to
full
rate of
Modularity:
Switches
can
berate
connected
each
Switch WS
Switchs
Each
other
node
can
now
ransmit
at
the
full
rate
of
10/100
WS
using
high
ratetports
10/100/Gbps
WS
WS
WS
Gbps Modularity: Switches can be connected to each
other using high rate ports
Eytan Modiano
Slide 17
Slide 17
Eytan Modiano
32
33