IEEE 802.11 Standard

Download Report

Transcript IEEE 802.11 Standard

Outline
• Wireless introduction
• Wireless cellular (GSM, CDMA, UMTS)
• Wireless LANs, MAC layer
– IEEE 802.11
– Bluetooth
– ZigBee
• Wireless Ad hoc networks
– routing: proactive routing, on-demand routing,
scalable routing, geo-routing
– wireless Ad hoc multicast
– TCP in ad hoc networks
– QoS, adaptive voice/video apps
• Sensor networks
10/11/01
CS219
1
802.11 Architecture
10/11/01
CS219
3
IEEE 802.11 Standard
Why we study this standard:
• overall architecture
• MAC layer spec.
– channel access
– mobility support
• physical layer spec.
– direct sequence
– frequency hopping
10/11/01
CS219
4
802.11 Features
• CSMA/CA based MAC protocol
- DCF (Distributed Coordination Function)
• support for both time-critical
- PCF( Point Coordination Function)
and non-critical traffic (DCF)
• support multiple priority levels
• spread spectrum technology
(no licensing)
• power management allows a node to
doze off
10/11/01
CS219
5
802.11 Protocol Entities
• MAC entity
– basic access mechanism
– fragmentation & encryption
MAC
MAC layer • MAC layer management entity
– synchronization
Sublayer Management
– power management
– roaming
• Physical layer convergence
protocol (PLCP)
PLCP
– PHY-specific, common PHY
sublayer
SAP support
PHY layer
– provides carrier sense
Management
• Physical medium dependent
sublayer (PMD)
PMD sublayer
– modulation & coding
• PHY layer management
– channel
tuning & PHY MIB
10/11/01
CS219
6
PHY spec
• Infrared PHY (No products !)
– diffuse infrared
– 1 and 2Mbps
• Radio PHY
– Frequency hopping PHY
– Direct Sequence PHY
– CCA (clear channel assessment) - how to
sense a channel is clear:
• energy level is above a threshold
• can detect a signal
• use both
10/11/01
CS219
7
Frequency Hopping
10/11/01
CS219
8
Frequency Hopping Spread Spectrum
• Pseudo-random frequency hopping
• 2.4Ghz ISM band, 1-2Mbps; 2GFSK
(2 level Gaussian frequency shift keying),
4GFSK; hop over 79 channels
• spreads the power over a wide
spectrum -> spread spectrum
• narrowband interference cannot jam
• developed initially for military
10/11/01
CS219
9
Direct Sequence Spread Spectrum
10/11/01
CS219
10
Direct Sequence Spread Spectrum
• Spreading factor = code bits/data bit,
10-100 commercial (min 10 by FCC)
• Signal bandwidth>10*data bandwidth
• code sequence synchronization
• correlation between codes ->
interference: orthogonal
• 2.4Ghz band, 1,2Mbps; DBPSK
(differential binary phase shift keying),
DQPSK (differential quadrature phase shift
keying); 11 chip barker sequence
10/11/01
CS219
11
Multiple Access Control (MAC) Protocols
• MAC protocol: coordinates transmissions from
different stations to minimize/avoid collisions
– (a) Channel Partitioning MAC protocols:
TDMA, FDMA, CDMA
– (b) Random Access MAC protocols: CSMA,
MACA
– (c) “Taking turns” MAC protocols: polling
• Goal: efficient, fair, simple, decentralized
10/11/01
CS219
12
Basic MAC Features
• DCF: Carrier sense multiple access with
collision avoidance (CSMA/CA) based
– based on carrier sense function in PHY
called Clear Channel Assessment (CCA)
– CSMA/CA+ACK for unicast frames, with
MAC level recovery
– parameterized use of RTS/CTS to protect
against hidden nodes
– frame formats to support both
infrastructure and ad-hoc networks
• PCF (option, not been widely implemented)
– centralized, polling based
– restricted to infrastructure network
10/11/01
CS219
13
CSMA/CA+ACK: 4-way handshake
• MAC headers format differs per type
– control frames: RTS, CTS, ACK
– management frames, e.g. beacon, probe/probe
response, (re)-association request/response,
– data frames
10/11/01
CS219
14
Frame Format
Frame Control Field
• Addressing:
–
–
–
–
10/11/01
Ad hoc:
From AP:
To AP:
AP to AP:
Address 1 Address 2 Address 3 Address 4
DA
SA
BSSID
DA
BSSID
SA
BSSID
SA
DA
RA
TA
DA
SA
CS219
15
802.11 frame priorities
10/11/01
CS219
16
CSMA/CA+ACK explained
•
• Reduce collision probability where mostly needed
• defer access based on carrier sense
– CCA from PHY and virtual carrier sense state
• direct access when medium is sensed free
longer than DIFS, otherwise defer and backoff
• receiver of directed frames to return ACK when
CRC correct
10/11/01
CS219
17
•Duration field in RTS and CTS frames distribute
Medium Reservation information which is stored
in a Net Allocation Vector(NAV)
•Defer on either NAV or “CCA” indicating Medium Busy
•Use of RTS/CTS is optimal but must be implemented
•Use is controlled by a RTS
-Threshold parameter per station
-To limit overhead for CS219
short frames
10/11/01
18
Time-critical service via PCF
10/11/01
CS219
19
PCF Access Procedure
• Point Coordinator (PC) senses the medium at the
beginning of each CFP
• PC in Access Point transmits a beacon containing “CF
parameter set element” when idle > PIFS
• each station presets its NAV to the CFPMaxDuration
from the CF Parameter Set Element in beacons from
the PC
10/11/01
CS219
20
PCF Access Procedure
(cont)
• after a SIFS period, PC sends one of the
following: a data frame, CF-Poll frame,
Data+CF-Poll frame, CF-end frame (when no
traffic buffered & no polls to send at the PC)
• PC maintains a polling list to select stations
that are eligible to receive CF-Polls during
contention-free periods.
• A CF-Pollable station always responds to a
CF-Poll: if no data from the station, responds
with a Null Frame or a CF-ACK (no data)
frame (when ACK is required);
• “piggyback” ACK or Poll in the data frame
whenever possible
10/11/01
CS219
21
Further details
• Alternating Contention free and contention
operations under PCF control
• NAV prevents contention traffic until reset by
the last PCF transfer -> variable length
contention free period per interval
• both PCF and DCF defer to each other causing
PCF burst start variations
• CF-burst by polling bit in CF-down frame
• immediate response by station on a CF_Poll
10/11/01
CS219
22
Synchronization in 802.11
• All stations maintain a local timer
• Timing synchronization function (TSF)
– keeps timers from all stations in synch
– AP controls timing in infrastructure networks
• timing conveyed by periodic beacons
– beacons contain timestamp for the entire BSS
– timestamp from beacons to calibrate local
clocks
– not required to hear every beacon to stay in
synch
• used for power management
– beacons sent at well known intervals
– all station timers in BSS are synchronized
10/11/01
CS219
23
Roaming in 802.11
10/11/01
CS219
24
Roaming Approach
• Station decides that link to its current AP is poor
• station uses scanning function to find another
AP
• station sends Reassociation Request to new AP
• if Reassociation Response is successful
– then station has roamed to the new AP
– else station scans for another AP
• if AP accepts Reassociation Request
– AP indicates Reassociation to the Distribution
System
– Distribution System information is updated
– normally old AP is notified thru distributation
system
10/11/01
CS219
25
Scanning
• Scanning required for many functions
– finding and joining a network
– finding a new AP while roaming
– initializing an ad hoc network
• 802.11 MAC uses a common mechanism
– Passive scanning
• by listening for Beacons
– Active Scanning
• probe + response
10/11/01
CS219
26
Active scanning
Steps to Association:
Station sends Probe
APs send Probe
Response
Station selects best AP:
Station sends
Association Request to
select AP
AP sends Association
Response
10/11/01
CS219
27
Power Management
• A station can be in one of three states:
- Transmitter on
- Receiver only on
- Dozing: Both transmitter and receivers off
• Access point (AP) buffers traffic for dozing
stations
• AP announces which stations have frames
buffered. Traffic indication map included in
each beacon. All multicasts/broadcasts are
buffered.
• Dozing stations wake up to listen to the
beacon. If there is data waiting for it, the
station sends a poll frame to get the data.
10/11/01
CS219
28
Congestion Avoidance:
IEEE 802.11 DCF
• Before transmitting a packet, randomly
choose a backoff interval in the range
[0,cw]
– cw is the contention window
• Direct access when medium is sensed free
longer than DIFS, otherwise defer and
backoff
• “Count down” the backoff interval when
medium is idle
– Count-down is suspended if medium
becomes busy
• When backoff interval reaches 0, transmit
packet (or RTS)
10/11/01
CS219
29
DCF Example (count down)
Let cw = 31
B1 = 25
B1 = 5
wait
data
data
wait
B2 = 20
B2 = 15
B2 = 10
B1 and B2 are backoff intervals
at nodes 1 and 2
10/11/01
CS219
30
Congestion Avoidance
• The time spent counting down
backoff intervals contributes to MAC
overhead
• Choosing a large cw leads to large
backoff intervals and can result in
larger overhead
• Choosing a small cw leads to a larger
number of collisions (more likely that
two nodes count down to 0
simultaneously)
10/11/01
CS219
31
Congestion Control
• Since the number of nodes attempting
to transmit simultaneously may
change with time, some mechanism
to manage congestion is needed
• IEEE 802.11 DCF: Congestion control
achieved by dynamically adjusting
the contention window cw
10/11/01
CS219
32
Binary Exponential Backoff in DCF
• When a node fails to receive CTS in
response to its RTS, it increases the
contention window
– cw is doubled (up to an upper
bound – typically 5 times)
• When a node successfully completes a
data transfer, it restores cw to CWmin
10/11/01
CS219
33
MILD Algorithm in MACAW
[Bharghavan94Sigcomm]
• When a node fails to receive CTS in response to its RTS,
it multiplies cw by 1.5
– Less aggressive than 802.11, which multiplies by 2
• When a node successfully completes a transfer, it
reduces cw by 1
– More conservative than 802.11, where cw is
restored to Cwmin
• 802.11 reduces cw much faster than it increases it
– MACAW: cw reduction slower than the increase
• Exponential Increase Linear Decrease
• MACAW can avoid wild oscillations of cw when
congestion is high
10/11/01
CS219
34
Fairness Issue
• Many definitions of fairness plausible
• Simplest definition: All nodes should
receive equal bandwidth
• Observation: unfairness occurs when one
node has backed off much more than some
other node
A
B
Two flows
C
10/11/01
D
CS219
35
Fairness Issue
• Assume that initially, A and B both choose a backoff
interval in range [0,31] but their RTSs collide
• Nodes A and B then choose from range [0,63]
– Node A chooses 4 slots and B choose 60 slots
– After A transmits a packet, it next chooses from
range [0,31]
– It is possible that A may transmit several packets
before B transmits its first packet
A
B
Two flows
C
10/11/01
D
CS219
36
MACAW Solution for Fairness
• When a node transmits a packet, it
appends its current cw value to the
packet
• All nodes hearing that cw value use it
for their future transmission attempts
• The effect is to reset all competing
nodes to the same ground rule
10/11/01
CS219
37
Distributed Fair Scheduling
(DFS) [Vaidya Mobicom00]
• A fully distributed algorithm for achieving
weighted fair queueing: Assign a weight to
each node
• Goal: bandwidth used by each node should
be proportional to the weight assigned to
the node
• Chooses backoff intervals proportional to
(packet size / weight)
• DFS attempts to mimic the centralized SelfClocked Fair Queueing algorithm
• Works well on a LAN
10/11/01
CS219
38
Distributed Fair Scheduling (DFS)
B1 = 10
B1 = 15
wait
B1 = 5
wait
Collision !
data
B2 = 5
data
B2 = 5
B1 = 15 (DFS actually
picks a random value
with mean 15)
Weight of node 1 = 1
Weight of node 2 = 3
Assume equal
packet size
10/11/01
B2 = 5
B2 = 5 (DFS picks a
value with mean 5)
CS219
39
Performance Improvement for 802.11based Wireless Networks [L. Zhang ICC06]
• Problem with WLANs
– Every packet need the AP to forward
– The AP has the same priority with
wireless stations to access the wireless
channel
• Motivation
– Make the AP with higher priority
– The AP send a frame immediately after
receiving a frame from the WS
10/11/01
CS219
40
Action for the AP
• The AP must be involved in any
communication.
– If the AP is the receiver, it will set its
backoff time counter to be zero
• the AP should obtain the channel
immediately and send the data, since its
backoff time counter is zero.
• As all wireless stations has increased their
backoff time counter by one after the
communication, there is no collision.
• As a result, the AP can send one frame,
after any wireless station sending a frame.
It will not be the bottleneck anymore.
10/11/01
CS219
41
Action for Wireless Stations
• In backoff procedure, the backoff counter is
– decremented while the medium is sensed
idle,
– frozen when a transmission is detected
on the channel.
• increased by one If the sender is one of
other wireless stations (except when
the backoff counter is already at its
maximum)
– reactivated when the channel is sensed
idle again
– The station transmits a frame when the
backoff counter reaches zero.
10/11/01
CS219
42
Model: a discrete-time Markov chain
for two-dimensional process {s (t), b (t)}
s (t) - stochastic process - backoff stage
b (t) - stochastic process - backoff-time counter
q - probability that at least one station transmits
10/11/01
CS219
43
Goodput Analysis
• Throughput
E[Payload Information in a slot time]
S
E[Length of a slot time]
Ps Ptr E[ P]

(1  Ptr )  Ps Ptr Ts  (1  Ps ) Ptr Tc
• Goodput G – sum of the end-to-end
throughput in WLAN
Gnew
10/11/01
Ps Ptr E[ P ]

(1  Ptr )  Ps Ptr  (2Ts )  (1  Ps ) Ptr Tc
CS219
44
1.05
4.5
4.0
3.5
3.0
2.5
2.0
1.5
1.0
0.5
0.0
1.00
Fairness Index
Goodput (Mbps)
Results - UDP
standard sim
new sim
standard model
new modle
0.90
standard DCF
0.85
new protocol
0.80
5
10
15
20
25
Number of Mobile Stations
30
5
Goodput performance compare
for UCP pair scenario
10/11/01
0.95
CS219
10
15
20
25
Number of Mobile Stations
30
Fairness performance compare
45
MAC Enhancements for QoS:
IEEE 802.11e
• The major enhancement of 802.11e
– Traffic differentiation
– Concept of transmission opportunity
(TXOP)
– Enhanced DCF (contention-based)
– HCF (Hybrid Coordination Function)
controlled channel access (contention
free)
– Burst ACK (optional)
– Direct link protocol (DLP)
10/11/01
CS219
46
IEEE 802.11e MAC Architecture
•
Hybrid Coordination Function (HCF): TGe (Group E)
proposes HCF to provide CS219
QoS for real-time applications
10/11/01
47
HCF - Introduction
• HCF combines functions from the DCF and
PCF with enhanced QoS-specific
mechanisms
• HCF consists of
– Enhance DCF (EDCF) for contentionbased access: provides differentiated
access to the WM (Wireless Mobility) for
8 priorities for non-AP STAs (stations)
– Controlled Access for contention-free
access
10/11/01
CS219
48