0% found this document useful (0 votes)
155 views85 pages

Medium Access

Multiple access protocols allow multiple nodes to share a single communication channel. They use distributed algorithms to determine when each node can transmit to avoid interference from simultaneous transmissions. Random access protocols are decentralized and contention-based, with no centralized coordination of transmissions. They rely on mechanisms like carrier sensing and collision detection to share the channel. Carrier sense multiple access (CSMA) protocols improve on pure ALOHA by having nodes listen to check if the channel is idle before transmitting to avoid collisions. However, collisions can still occur due to signal propagation delays between nodes. Different CSMA persistence methods, like non-persistent and p-persistent, balance reducing collisions with avoiding idle channels.

Uploaded by

Sandeep Verma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
155 views85 pages

Medium Access

Multiple access protocols allow multiple nodes to share a single communication channel. They use distributed algorithms to determine when each node can transmit to avoid interference from simultaneous transmissions. Random access protocols are decentralized and contention-based, with no centralized coordination of transmissions. They rely on mechanisms like carrier sensing and collision detection to share the channel. Carrier sense multiple access (CSMA) protocols improve on pure ALOHA by having nodes listen to check if the channel is idle before transmitting to avoid collisions. However, collisions can still occur due to signal propagation delays between nodes. Different CSMA persistence methods, like non-persistent and p-persistent, balance reducing collisions with avoiding idle channels.

Uploaded by

Sandeep Verma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 85

Multiple access protocols

Multiple access protocols


 single shared communication channel
 two or more simultaneous transmissions by nodes:
interference
 only one node can send successfully at a time
 multiple access protocol:
 distributed algorithm that determines how stations share
channel, i.e., determine when station can transmit
 communication about channel sharing must use channel
itself!
 what to look for in multiple access protocols:
• synchronous or asynchronous
• information needed about other stations
• robustness (e.g., to channel errors)
• performance
Random access protocols (contention based)
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:
 no special node to coordinate transmissions
 no synchronization of clocks, slots
 two or more transmitting nodes -> “collision”,
 random access MAC protocol specifies:
 how to detect collisions
 how to recover from collisions (e.g., via delayed retransmissions)
Random access protocols (contention based)

 No STA is superior to another STA


 Decision depends on state of medium
 Random – no scheduled time for a STA to Tx
 Contention – no rules for specifying next STA Tx
 Access conflict – collision
 MA - ALOHA (direct access)
A STA may attempt to send data at the same time while
another STA is already sending – potential collision
 CSMA – senses medium before Tx
 CSMA /CD – what to do if collision detected
 CSMA/CA – tries to avoid collision
Pure ALOHA
 Each STA sends a frame whenever it has a frame to send
 STAs contend with one another
 If collision happens – frame retransmission
 Relies on ACK from Rx
 Waits for time-out period for ACK
 Time-out period (max. Possible round trip prop. delay)
Pure ALOHA
 Each STA waits a random amount of time (back off) for
retransmission – avoids more collision
 Back off time Tb – random value depends upon K
 K – no. of attempted unsuccessful transmissions
 Binary exponential back off Tb = {0 - 2K-1} X Tp or Tfr
 Tp – max. prop. time to send a frame b/w 2 STAs, so RTT =
2Tp = time-out period
 Tfr – avg. time to send a frame
 Kmax – max. possible no. of retransmission attempts
 The range of random numbers increases after each
collision
Procedure of ALOHA
 Algorithm..
Vulnerable time in Pure ALOHA
 t – tfr to t + tfr i.e. 2tfr
 For successful tx of STA i’s frame, no other STA should tx
for time duration = 2tfr

 frame sent at t0 collides with other frames sent in [t0-1,t0+1]


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 -> infinity...

= 1/(2e) = .184

At best: channel used for useful transmissions 18.4% of time!


Pure ALOHA throughput

 G- avg. no. of frames generated by the system (many


STAs) during one frame Tx time (LOAD)

 Throughput – avg. no. Of successful Txs.


S = Gxe-2G
and Smax = 0.184 for G = 1/2

 One-half a frame is generated during one frame Tx time (or


one frame during two frame Tx time) – vulnerable time

 18.4% of total frames – transmitted successfully


Slotted ALOHA Operation

Assumptions  when node obtains fresh


frame, it transmits in next
 all frames same size
slot
 time is divided into equal
 no collision, node can send
size slots (tfr), time to
new frame in next slot
transmit 1 frame
 if collision, node retransmits
 nodes start to transmit
frame in each subsequent
frames only at beginning
slot until success
of slots
 nodes are synchronized  Vulnerable time reduced
 if 2 or more nodes
to one-half, i.e.
transmit in slot, all nodes tfr = frame transmission
detect collision time
Slotted ALOHA

Pros Cons
 single active node can  collisions, wasting slots
continuously transmit at  idle slots
full rate of channel
 nodes may be able to
 highly decentralized: detect collision in less
only slots in nodes need than time to transmit
to be in sync
packet
 simple
Slotted Aloha efficiency
Suppose N stations have frames to send
 each transmits in slot with probability p
 probability of successful transmission S is:
 by any specific single node: S= p (1-p)(N-1)

 by any of N nodes
S = Prob (only one transmits)
= N p (1-p)(N-1)
for optimum p as N -> infinity ...
= 1/e = .37
At best: channel used for useful transmissions 37% of time!
Slotted ALOHA throughput

 Throughput – avg. no. Of successful Txs.


S = Gxe-G
and Smax = 0.368 for G = 1

 If a frame is generated during one frame Tx time –


vulnerable time

 36.8% of total frames – transmitted successfully


Carrier Sense Multiple Access (CSMA)
• We could achieve better throughput if we could listen to the
channel before transmitting a packet
• This way, we would stop avoidable collisions.
• To do this, we need “Carrier Sense Multiple Access,” or
CSMA, protocols

Assumptions with CSMA Networks:


1. Constant length packets
2. No errors, except those caused by collisions
3. Each host can sense the transmissions of all other hosts
4.The propagation delay is small compared to the
transmission time
Carrier Sense Multiple Access (CSMA)
 STA listen (sense) medium before Tx
- If channel sensed idle: transmit entire frame
- If channel sensed busy: defer transmission
 Collision can still occur – propagation delay (Tp) – two
nodes may not hear each other’s Tx
CSMA collisions
Vulnerable time = Tp spatial layout of nodes

Time needed for a s/g to


propagate from one end of
medium to another
collision:
entire packet Tx time
wasted because STAs
continue to Tx even though
collision has occurred
note: with CSMA, collision
occupies medium for
duration of transmission,
stations do not listen
CSMA – Persistence methods
1-persistent CSMA
• To avoid idle channel time, 1-persistent protocol used
• continuously senses the channel and sends its frame
immediately with prob. 1 (highest chance of collision)
• Station wishing to transmit listens and obeys following:
1. If medium idle, transmit; otherwise, go to step 2
2. If medium busy, listen until idle; then transmit immediately
• 1-persistent stations selfish
• If two or more stations waiting, collision guaranteed even if
prop. delay is zero

— Gets sorted out after collision


CSMA – Persistence methods
Nonpersistent CSMA
• doesn't sense continuously, if channel is not free, waits a
random time and then senses again
1. If medium is idle, transmit; otherwise, go to 2
2. If medium is busy, wait random amount of time drawn from
probability distribution (retransmission delay) and repeat 1
• Random delays reduces probability of collisions
— Consider two stations become ready to transmit at same time
• While another transmission is in progress
— If both stations delay same time before retrying, both will attempt
to transmit at same time
• Capacity is wasted because medium will remain idle
following end of transmission
— Even if one or more stations waiting
• reduces chance of collision because of random time,
but also reduces efficiency because channel may
remain idle
Tradeoff between 1 and non-Persistence
CSMA
• If B and C become ready in the middle of A’s transmission,
– 1-Persistent: B and C collide
– Non-Persistent: B and C probably do not collide

• If only B becomes ready in the middle of A’s transmission,


– 1-Persistent: B succeeds as soon as A ends
– Non-Persistent: B may have to wait
CSMA – Persistence methods
p-persistent CSMA
• Reduces the chance of collision and improves efficiency
• Compromise that attempts to reduce collisions
— Like nonpersistent
• And reduce idle time
— Like1-persistent
• Rules:
1. If medium idle, transmit with probability p, and delay one
time unit with probability (1 – p)
— Time unit typically maximum propagation delay
— used if the channel has time slots (with slot duration ≥ Tp)
2. If medium busy, listen until idle and repeat step 1
3. If transmission is delayed one time unit, repeat step 1
 Effective value of P??
Value of P
• Avoid instability under heavy load
• n stations waiting to send
• End of transmission, expected number of stations attempting to
transmit is number of stations ready times probability of
transmitting
— np
• If np > 1, on average there will be a collision
• Repeated attempts to transmit almost guaranteeing more
collisions
• Retries compete with new transmissions
• Eventually, all stations trying to send
— Continuous collisions; zero throughput
• So n p < 1 for expected peaks of n
• If heavy load expected, p small
• However, as p made smaller, stations wait longer
• At low loads, this gives very long delays
CSMA – Persistence methods

Nonpersistent:
Constant or variable delay transmit if idle
if busy, wait random time and repeat process
if collision, back off

Time

Ready
1 – persistent
transmit as soon as channel goes idle
if collision, back off
P –persistent
transmit as soon as channel goes idle with probability of P.
Otherwise, delay one time slot and repeat process
If collision, back off
CSMA – Persistence methods
 Non persistent, 1-Persistent, and p-Persistent (continuously
sense)

1-P (sends the frame with prob. 1)


p-P (sends the frame with prob. p)
CSMA/CD
 augments the algorithm to detect the collision

• With CSMA, collision occupies medium for duration of


transmission, stations do not listen
• Stations listen while transmitting using CD

• Rule:
1. If idle, transmit, otherwise step 2
2. If busy, listen until idle, then transmit immediately
3. If collision detected (measure signal strengths,
compare transmitted and received signals), jam then cease
(abort) transmission
4. After jam, wait random time then start from step 1
Collision detection
B Tx for a duration t3 – t0,
and D Tx for t2 – t1

t2
t3
for a protocol to work, the
length of any frame divided
by the bit rate must be more
than these durations

Tfr ≥ 2Tp
CSMA/CD procedure

Tx & CD is a
Tx done
continuous and
or
simultaneous
collision
process (using
detected
different ports)
Binary exponential backoff
• Attempt to transmit repeatedly if repeated collisions
• First 10 attempts, mean value of random delay doubled
Tb = {0 - 2K-1} X Tp or Tfr

• Value then remains same for 6 further attempts


• After 16 unsuccessful attempts, station gives up and
reports error
• As congestion increases, stations back off by larger
amounts to reduce the probability of collision.
• 1-persistent algorithm with binary exponential backoff
efficient over wide range of loads (802.3)
— Low loads, 1-persistence guarantees station can seize channel once
idle
— High loads, at least as stable as other techniques
Collision Detection based on signal energy
level
• On baseband bus, collision produces much higher signal
voltage than signal

• Collision detected if cable signal greater than single station


signal

• Signal attenuates over distance

• Limit on propagation distance because the attenuated


signal may be so weakened that it does not exceed single
transmitter voltage.
CSMA/CD
Signal
energy level
monitoring
Energy level
Energy level = 0, channel is idle
Normal level, Tx going on
Abnormal level (twice the s/g value), contention
Specialized MAC for wireless domain
- CSMA/CD detects collision based upon s/g energy level
- OK for wired network (length of wire within standard limits) but
not for wireless
Pr = [λ/4πd]2 Gt Gr Pt

Problems in wireless networks


• signal strength decreases proportional to the square of the
distance
• the sender would apply CS and CD, but the collisions
happen at the receiver
• it might be the case that a sender cannot “hear” the
collision, i.e., CD does not work
• furthermore, CS might not work if, e.g., a terminal is
“hidden”
CSMA/CA

 Collision avoidance is needed


 Avoided using three strategies of CSMA/CA

1. Inter frame Space (IFS)

2. Contention Window (CW)

3. Acknowledgement
IFS
 STA Defers Tx even if channel is idle
 Waits for IFS time period
 IFS time allows the front of the Tx s/g by the distant STA to
reach this STA
 If after IFS time, channel is found idle, the STA still needs to
wait a time equal to contention time
 The IFS time can also be used to prioritize STAs or frames
-- a STA that is assigned shorter IFS has a higher priority
CW
 CW is an amount of time divided into slots
 STA ready to send chooses a random no. of slots as its
wait time (according to binary exp. backoff strategy)
 Set to one slot first time and then doubles each time the
STA can’t detect an idle channel after IFS time
 -- STA needs to sense the channel after each time slot
 If channel is found busy, STA stops the timer and restart it
when the channel is sensed free (doesn’t restart the
process or timer of CW)
 Thus a STA with longest waiting time gets priority over
other STAs
Time-out timer and ACK

 Even with IFS and CW, there still may be a collision


 The positive ACK and time-out timer helps guarantee
that the Rx has received frame
CSMA/CA
procedure
Hidden and exposed terminals
Hidden terminals (cause collisions)
 A sends to B, C cannot receive A
 C wants to send to B, C senses a “free” medium (CS fails)
 collision at B, A cannot receive the collision (CD fails)
 A is “hidden” for C and viceversa

A B C

Exposed terminals (cause unnecessary delay)


 B sends to A, C wants to send to another terminal (not A or B)
 C has to wait, CS signals a medium in use
 but A is outside the radio range of C, therefore waiting is not necessary
 C is “exposed” to B
Near and far terminals
Terminals A and B send, C receives
 signal strength decreases proportional to the square of the distance
 the signal of terminal B therefore drowns out A’s signal
 C cannot receive A

A B C

• If C for example was an arbiter for sending rights, terminal B would


drown out terminal A already on the physical layer
• C in return would have no chance for applying a fair scheme for it would
only hear B
MACA - collision avoidance
 (Multiple Access with Collision Avoidance) uses short signaling
packets for collision avoidance
1. RTS (request to send): a sender request the right to send from a
receiver with a short RTS packet before it sends a data packet
2. CTS (clear to send): the receiver grants the right to send as soon
as it is ready to receive

 Signaling packets contain


1. sender address
2. receiver address
3. packet size

 Variants of this method can be found in IEEE802.11 as DFWMAC


(Distributed Foundation Wireless MAC)
MACA examples
MACA avoids the problem
of hidden terminals
 A and C want to
send to B RTS
 A sends RTS first
CTS CTS
 C waits after receiving A B C
CTS from B

MACA avoids the problem


of exposed terminals RTS RTS
 B wants to send to A, C
CTS
to another terminal
A B C
 now C does not have
to wait for it cannot
receive CTS from A
Controlled Access protocols
 STAs consult each other to find which STA has the right to
send
 A STA can’t send unless authorized by other STAs
1. Reservation
2. Polling
3. Token passing
Reservation
 Reservation period followed by a transmission period
– a sender reserves a future time-slot
– sending within this reserved time-slot is possible without
collision
– collision may occur during the reservation period
– causes higher delay under light load, but allow higher
throughput

 Examples for reservation algorithms:


– Explicit Reservation (Reservation-ALOHA) or DAMA
– Implicit Reservation (PRMA)
– Reservation-TDMA
– Multiple Access with Collision Avoidance (MACA)
Demand Assigned Multiple Access (DAMA)
 Typically used for satellite systems
 two modes:
 ALOHA mode for reservation:
competition for small reservation slots, collisions possible
 reserved mode for data transmission within successful reserved
slots (no collisions possible)
 it is important for all stations to keep the reservation list consistent at
any point in time and, therefore, all stations have to synchronize from
time to time (explicit reservation)

collision

t
Aloha reserved Aloha reserved Aloha reserved Aloha
Packet Reservation Multiple Access (PRMA)
Implicit reservation of slots:
 a certain number of slots form a frame, frames are repeated
 stations compete for empty slots according to the slotted aloha
principle
 once a station reserves a slot successfully, this slot is automatically
assigned to this station in all following frames as long as the station
has data to send
 competition for this slots starts again as soon as the slot was empty
in the last frame
reservation
1 2 3 4 5 6 7 8 time-slot
ACDABA-F
frame1 A C D A B A F
ACDABA-F
frame2 A C A B A
AC-ABAF-
frame3 A B A F collision at
A---BAFD reservation
frame4 A B A F D attempts
ACEEBAFD
frame5 A C E E B A F D
t
Reservation TDMA
Reservation Time Division Multiple Access
 every frame consists of N mini-slots and x data-slots
 every station has its own mini-slot and can reserve up to k data-slots
using this mini-slot (i.e. x = N * k).
 other stations can send data in unused data-slots according to a
round-robin sending scheme (best-effort traffic)

e.g. N=6, k=2


N mini-slots N * k data-slots

reservations other stations can use free data-slots


for data-slots based on a round-robin scheme
Polling mechanism
If one terminal can be heard by all others, this “central” terminal
(a.k.a. base station) can poll all other terminals according to a
certain scheme
 now all schemes known from fixed networks can be used
(typical mainframe - terminal scenario)
Example: Randomly Addressed Polling
 base station signals readiness to all mobile terminals
 terminals ready to send can now transmit a random number
without collision with the help of CDMA or FDMA (the random
number can be seen as dynamic address)
 the base station now chooses one address for polling from
the list of all random numbers (collision if two terminals
choose the same address)
 the base station acknowledges correct packets and continues
polling the next terminal
 this cycle starts again after polling all terminals of the list
Select
• If primary wants to send data, it tells the secondary to get ready
to receive
Poll
• If primary wants to receive data, it asks the secondaries if they
have anything to send
Some Background
 CSMA/CD (carrier sense multiple access/ collision detection)
 Every node senses the carrier before transmitting
 If the carrier is not clear, the node defers transmission for a
specified period. Otherwise, transmits
 While transmitting, the sender is listening to carrier and
sender stops transmitting if collision has been detected
 CS provides information about potential collisions at the
sender, but not at the Rx
 Due to hidden & exposed terminal problem
 Contention/collision will occur at receiver side
 Carrier sense (send side) approach is inappropriate for
51
wireless networks
Hidden Terminal Problem
 Node B can communicate with A and C both
 A and C cannot hear each other
 When A transmits to B, C cannot detect the transmission using
the carrier sense mechanism
 If C transmits to D, collision will occur at B

A B C D

52
Exposed Terminal Problem
 Node C can communicate with B and D both
 Node B can communicate with A and C
 Node A cannot hear C
 Node D can not hear B
 When C transmits to D, B detect the transmission using the
carrier sense mechanism and postpone to transmit to A,
even though such transmission will not cause collision

A XB C D

53
MACA: A New Channel Access
Method for Packet Radio

Phil Karn 1990

54
Goals , New Ideas, and Main Contributions
 Goals:
 Try to overcome hidden & exposed terminal problems
 New idea:
 Reserve the channel before sending data packet
 Minimize the cost of collision (control packet is much
smaller than data packet)
 Main Contribution:
 A three-way handshake MAC protocol : MACA
 In contrast to CS, RTS-CTS exchange enables nearby
STAs to avoid collisions at the Rx, not the sender
55
Fundamental Assumptions

 Symmetry
A can hear from B  B can hear from A
 No capture
 No interference and channel fading
 Packet error only due to collision
 Data packets and control packets are transmitted in the same
channel

56
Three-Way Handshake
 A sends Ready-to-Send (RTS)
 B responds with Clear-to-Send (CTS)
 A sends DATA PACKET
 RTS and CTS announce the duration of the data transfer
 Nodes overhearing RTS keep quiet for
some time to allow A to receive CTS CTS

DATA
RTS
 Nodes overhearing CTS keep quiet
for some time to allow B D

to receive data packet


B

A
C
E

57
More Details for MACA
 A sends out RTS and set a timer and waits for CTS
 If A receives CTS before timer go to zero, OK! sends data packet
 Otherwise, A assumes there is a collision at B
 Double the backoff counter interval
 Randomly pick up a timer from [1,backoff counter]
 Send next RTS after timer go to zero

 B sends out CTS, then set a timer and waits for data packet
 If data packet arrives before timer go to zero, OK!
 Otherwise, B can do other things
 C overhears A’s RTS, set a timer which is long enough to allow A to
receive CTS. After the timer goes to zero, C can do other things
 D overhears B’s CTS, set a timer which is long enough to allow B to
receive data packet.
 E overhears A’s RTS and B’s CTS, set a timer which is long enough
to allow B to receive data packet.
 RTS and CTS can also contain info to allow sender A to adjust power
to reduce interference
58
Note: no carrier sense
Hidden Terminal Problem Still Exists (1)

Data packet still might suffer collision


CTS
DATA
RTS

B
C

59
Hidden Terminal Problem Still Exists (2)

Data packet still might suffer collision


CTS
RTS
DATA
RTS

B
C

A E

60
Exposed Terminal Problem Still Exists

Node C can not receive CTS


RTS
DATA
CTS

A
C
D

61
Summary
 MACA did not solve hidden & exposed terminal problems
 MACA did not provide specifications about parameters
 What are RTS, CTS packet sizes ?
 How to decide timers?
 What is initial backoff window size?
 A lot things need to do if using MACA

62
Wireless LAN

63
Characteristics of wireless LANs
 Advantages
 very flexible within the reception area
 Ad-hoc networks without previous planning possible
 (almost) no wiring difficulties (e.g. historic buildings, firewalls)
 more robust against disasters like, e.g., earthquakes, fire

 Disadvantages
 typically very low bandwidth compared to wired networks
(1-10 Mbit/s) due to shared medium
 many proprietary solutions, especially for higher bit-rates, standards
take their time (e.g. IEEE 802.11)
Design goals for wireless LANs

 global, seamless operation


 low power for battery use
 no special permissions or licenses needed to use the
LAN
 robust transmission technology
 simplified spontaneous cooperation at meetings
 easy to use for everyone, simple management
 security (no one should be able to read my data), privacy
(no one should be able to collect user profiles), safety
(low radiation)
Comparison: infrastructure vs. ad-hoc networks
infrastructure
network

AP: Access Point


AP

AP wired network
AP

ad-hoc network
IEEE 802.11
 Standard specifies the PHY and MAC adapted to the special
requirements of wireless LANs
 Offers time-bounded and asynchronous services
 Power management, handling of hidden nodes, and ability
to operate world wide (at 2.4 GHz ISM band)
 Data rate 1 Mbps mandatory and 2 Mbps optional
System architecture – infrastructure based

Station (STA)
802.11 LAN
802.x LAN  terminal with access mechanisms
to the wireless medium and radio
contact to the access point
STA1 Basic Service Set (BSS)
BSS1
Portal  group of stations using the same
Access
radio frequency
Point
Access Point
Distribution System
 station integrated into the wireless
Access LAN and the distribution system
ESS Point Portal
 bridge to other (wired) networks
BSS2
Distribution System
 interconnection network to form
one logical network (ESS:
Extended Service Set) based
STA2 802.11 LAN STA3
on several BSS
System architecture – ad hoc based
Direct communication within a
802.11 LAN limited range

•Station
(STA): terminal with access
STA1
IBSS1 STA3 mechanisms to the wireless medium

•Independent BSS(IBSS): group of


STA2 STAs using the same radio frequency

•Several BSSs can be formed via the


IBSS2 distance between the BSSs or by
using different carrier frequencies
STA5 (then BSSs could overlap physically)

STA4 802.11 LAN


Protocol architecture –
802.11 connected to 802.3 via a bridge

fixed
terminal
mobile terminal

infrastructure
network

access point
application application
TCP TCP
IP IP
LLC LLC LLC
802.11 MAC 802.11 MAC 802.3 MAC 802.3 MAC
802.11 PHY 802.11 PHY 802.3 PHY 802.3 PHY
802.11 Layers and functions
PLCP Physical Layer Convergence
MAC Protocol

access mechanisms,  clear channel assessment
fragmentation, encryption signal (carrier sense)
MAC Management PMD Physical Medium Dependent
 synchronization, roaming, MIB,  modulation, coding
power management
PHY Management
 channel selection, MIB
Station Management
 coordination of all management
functions

LLC Station Management


DLC

MAC MAC Management


PLCP
PHY

PHY Management
PMD
802.11 PHY
3 versions: 2 radio (typ. 2.4 GHz), 1 IR
 data rates 1 or 2 Mbit/s
FHSS (Frequency Hopping Spread Spectrum)
 spreading, despreading, signal strength, typ. 1 Mbit/s
 min. 2.5 frequency hops/s (USA), two-level GFSK modulation
DSSS (Direct Sequence Spread Spectrum)
 DBPSK modulation for 1 Mbit/s (Differential Binary Phase Shift
Keying), DQPSK for 2 Mbit/s (Differential Quadrature PSK)
 preamble and header of a frame is always transmitted with 1 Mbit/s,
rest of transmission 1 or 2 Mbit/s
 chipping sequence: +1, -1, +1, +1, -1, +1, +1, +1, -1, -1, -1 (Barker
code)
 max. radiated power 1 W (USA), 100 mW (EU), min. 1mW
Infrared
 850-950 nm, diffuse light, typ. 10 m range
 carrier detection, energy detection, synchronization
FHSS PHY packet format
Synchronization
 synch with 010101... pattern
SFD (Start Frame Delimiter)
 0000110010111101 start pattern
PLW (PLCP_PDU Length Word)
 length of payload incl. 32 bit CRC of payload, PLW < 4096
PSF (PLCP Signaling Field)
 data of payload (1 or 2 Mbit/s)
HEC (Header Error Check)
 CRC with x16+x12+x5+1

80 16 12 4 16 variable bits

synchronization SFD PLW PSF HEC payload

PLCP preamble PLCP header


DSSS PHY packet format
Synchronization
 synch., gain setting, energy detection, frequency offset
compensation
SFD (Start Frame Delimiter)
 1111001110100000
Signal
 data rate of the payload (0A: 1 Mbit/s DBPSK; 14: 2 Mbit/s DQPSK)
Service Length
 future use, 00: 802.11 compliant  length of the payload
HEC (Header Error Check)
 protection of signal, service and length, x16+x12+x5+1

128 16 8 8 16 16 variable bits

synchronization SFD signal service length HEC payload

PLCP preamble PLCP header


802.11 MAC
Two Basic Traffic services
 Asynchronous Data Service (mandatory) – ad hoc mode
 exchange of data packets based on “best-effort” (no delay bounds)
 support of broadcast and multicast
 Time-Bounded Service (optional) – infrastructure mode
 implemented using PCF (Point Coordination Function)

Three Access mechanisms


 DFWMAC-DCF based on CSMA/CA (mandatory) – asynchronous services
 collision avoidance via randomized “back-off” mechanism
 minimum distance between consecutive packets
 ACK packet for unicast (not for broadcasts)
 DFWMAC-DCF w/ RTS/CTS (optional) – asynchronous services
 avoids hidden terminal problem
 DFWMAC- PCF (optional) – contention free polling service for time-bounded
 access point polls terminals according to a list
802.11 MAC - priorities
 defined through different inter frame spaces
 SIFS (Short Inter Frame Spacing)
 shortest waiting time, thus highest priority, for ACK, CTS, polling response
 PIFS (PCF IFS)
 waiting time b/w DIFS and SIFS, thus medium priority, for time-bounded
service using PCF
 DIFS (DCF IFS)
 longest waiting time, thus lowest priority, for asynchronous data service

DIFS DIFS
PIFS
SIFS
medium busy contention next frame
t
direct access if
medium is free  DIFS
DFWMAC – DCF using CSMA/CA
contention window
DIFS DIFS (randomized back-off
mechanism)
medium busy next frame
direct access if t
medium is free  DIFS slot time

 station ready to send starts sensing the medium (CS based on CCA)
 if the medium is free for the duration of an Inter-Frame Space (IFS),
the station can start sending (IFS depends on service type)
 allows for short access delay under light load
 if the medium is busy, the station has to wait for a free DIFS, then the
station must additionally wait a random back-off time (CA, multiple of
slot-time)
 if another station occupies the medium during the back-off time of the
station, the back-off timer stops (fairness)
DCF using CSMA/CA – competing stations
DIFS DIFS DIFS DIFS
boe bor boe bor boe busy
station1

boe busy
station2

busy
station3

boe busy boe bor


station4

boe bor boe busy boe bor


station5
t

busy medium not idle (frame, ack etc.) boe elapsed backoff time

packet arrival at MAC bor residual backoff time


DCF - Additional feature for unicast transfer
DIFS
data
sender
SIFS
ACK
receiver
DIFS
other data
stations t
waiting time contention

Sending unicast packets


 station has to wait for DIFS before sending data
 receivers acknowledge at once (after waiting for SIFS) if the packet was
received correctly (CRC)
 automatic retransmission of data packets in case of transmission errors
DCF with RTS/CTS extension

DIFS
RTS data
sender
SIFS SIFS
CTS SIFS ACK
receiver

NAV (RTS) DIFS


other NAV (CTS) data
stations t
defer access contention

Addressing hidden terminal problem


Sending unicast packets
 station can send RTS with reservation parameter after waiting for DIFS
(reservation determines amount of time the data packet needs the medium)
 acknowledgement via CTS after SIFS by receiver (if ready to receive)
 sender can now send data at once, acknowledgement via ACK
 other stations store medium reservations distributed via RTS and CTS
DCF with RTS/CTS – fragmentation mode
DIFS
RTS frag1 frag2
sender
SIFS SIFS SIFS
CTS SIFS ACK1SIFS ACK2
receiver

NAV (RTS)
NAV (CTS)
NAV (frag1) DIFS
other NAV (ACK1) data
stations t
contention
 RTS packet includes the duration for the TX of the first fragment and the
corresponding ACK (a certain set of STAs receiving RTS, set their NAV)
 a possibly different set of STAs receiving CTS, sets their NAV
 another duration value is included in frame ‘frag1’, that reserves the
medium for the duration of the transmission following (i.e. ‘frag2’ and its ACK)
 another set of STAs (receiving this reservation), adjust their NAV
 ACK1 also includes the reservation for the next transmission, a fourth set of
STAs may receive this adjust their NAV
 If frag2 is not the last frame then same will be continued
DFWMAC – PCF with polling
t0 t1
SuperFrame

medium busy PIFS SIFS SIFS


D1 D2
point
coordinator SIFS SIFS
U1 U2
wireless
stations
stations‘ NAV
NAV
t2 t3 t4

PIFS SIFS
D3 D4 CFend
point
coordinator SIFS
U4
wireless
stations
stations‘ NAV
NAV contention free period contention t
period
MAC frames

bytes 2 2 6 6 6 2 6 0-2312 4
Frame Duration/ Address Address Address Sequence Address
Data CRC
Control ID 1 2 3 Control 4

bits 2 2 4 1 1 1 1 1 1 1 1
Protocol To From More Power More
Type Subtype Retry WEP Order
version DS DS Frag Mgmt Data

•Types
control frames, management frames, data frames
•Sequence numbers
important against duplicated frames due to lost ACKs
•Addresses
receiver, transmitter (physical), BSS identifier, sender (logical)
•Miscellaneous
sending time, checksum, frame control, data
MAC address format
scenario to DS from address 1 address 2 address 3 address 4
DS
ad-hoc network 0 0 DA SA BSSID -
infrastructure 0 1 DA BSSID SA -
network, from AP
infrastructure 1 0 BSSID SA DA -
network, to AP
infrastructure 1 1 RA TA DA SA
network, within DS

DS: Distribution System


AP: Access Point
DA: Destination Address
SA: Source Address
BSSID: Basic Service Set Identifier
RA: Receiver Address
TA: Transmitter Address
Special frames – ACK/RTS/CTS
bytes 2 2 6 4
ACK Frame Receiver
Duration CRC
Control Address

bytes 2 2 6 6 4
Frame Receiver Transmitter
RTS Duration CRC
Control Address Address

bytes 2 2 6 4
Frame Receiver
CTS Duration CRC
Control Address

You might also like