110/11/01cs219 outline wireless introduction wireless cellular (gsm, cdma, umts) wireless lans, mac...
TRANSCRIPT
110/11/01 CS219
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
310/11/01 CS219
802.11 Architecture
410/11/01 CS219
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
510/11/01 CS219
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
610/11/01 CS219
802.11 Protocol Entities• MAC entity
– basic access mechanism– fragmentation & encryption
• MAC layer management entity– synchronization– power management– roaming
• Physical layer convergence protocol (PLCP)– PHY-specific, common PHY
SAP support– provides carrier sense
• Physical medium dependent sublayer (PMD)– modulation & coding
• PHY layer management– channel tuning & PHY MIB
MAC Sublayer
MAC layerManagement
PLCP sublayer
PMD sublayer
PHY layerManagement
710/11/01 CS219
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
810/11/01 CS219
Frequency Hopping
910/11/01 CS219
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
1010/11/01 CS219
Direct Sequence Spread Spectrum
1110/11/01 CS219
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
1210/11/01 CS219
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
1310/11/01 CS219
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
1410/11/01 CS219
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
1510/11/01 CS219
Frame Format
Frame Control Field
• Addressing: Address 1 Address 2 Address 3 Address 4– Ad hoc: DA SA BSSID -– From AP: DA BSSID SA -– To AP: BSSID SA DA - – AP to AP: RA TA DA SA
1610/11/01 CS219
802.11 frame priorities
1710/11/01 CS219
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
1810/11/01 CS219
•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 short frames
1910/11/01 CS219
Time-critical service via PCF
2010/11/01 CS219
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
2110/11/01 CS219
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
2210/11/01 CS219
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
2310/11/01 CS219
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
2410/11/01 CS219
Roaming in 802.11
2510/11/01 CS219
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
2610/11/01 CS219
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
2710/11/01 CS219
Active scanning
Steps to Association:
Station sends ProbeAPs send Probe
ResponseStation selects best
AP:Station sends
Association Request to select AP
AP sends Association Response
2810/11/01 CS219
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.
2910/11/01 CS219
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)
3010/11/01 CS219
DCF Example (count down)
data
waitB1 = 5
B2 = 15
B1 = 25
B2 = 20
data
wait
B1 and B2 are backoff intervalsat nodes 1 and 2
Let cw = 31
B2 = 10
3110/11/01 CS219
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)
3210/11/01 CS219
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
3310/11/01 CS219
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
3410/11/01 CS219
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
3510/11/01 CS219
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
C D
Two flows
3610/11/01 CS219
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 packetA B
C D
Two flows
3710/11/01 CS219
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
3810/11/01 CS219
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 Self-Clocked Fair Queueing algorithm
• Works well on a LAN
3910/11/01 CS219
Distributed Fair Scheduling (DFS)
B1 = 15 (DFS actually picks a random value with mean 15)
B2 = 5 (DFS picks a value with mean 5)
Weight of node 1 = 1Weight of node 2 = 3
Assume equalpacket size
data
wait
B1 = 15
B2 = 5
B1 = 10
B2 = 5
data
wait
B1 = 5
B2 = 5
Collision !
4010/11/01 CS219
Performance Improvement for 802.11-based 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
4110/11/01 CS219
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.
4210/11/01 CS219
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.
4310/11/01 CS219
Model: a discrete-time Markov chainfor 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
4410/11/01 CS219
Goodput Analysis
• Throughput
• Goodput G – sum of the end-to-end throughput in WLAN
[ ]
(1 ) (2 ) (1 )s tr
newtr s tr s s tr c
P P E PG
P P P T P P T
[Payload Information in a slot time]
[Length of a slot time][ ]
(1 ) (1 )s tr
tr s tr s s tr c
ES
EP P E P
P P P T P P T
4510/11/01 CS219
Results - UDP
0.00.5
1.01.5
2.02.5
3.03.5
4.04.5
5 10 15 20 25 30Number of Mobile Stations
Good
put (M
bps)
s tandard simnew simstandard modelnew modle
Goodput performance compare for UCP pair scenario
0.80
0.85
0.90
0.95
1.00
1.05
5 10 15 20 25 30Number of Mobile Stations
Fairn
ess In
dex
s tandard DCF
new protocol
Fairness performance compare
4610/11/01 CS219
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)
4710/11/01 CS219
IEEE 802.11e MAC Architecture
• Hybrid Coordination Function (HCF): TGe (Group E) proposes HCF to provide QoS for real-time applications
4810/11/01 CS219
HCF - Introduction
• HCF combines functions from the DCF and PCF with enhanced QoS-specific mechanisms
• HCF consists of – Enhance DCF (EDCF) for contention-
based access: provides differentiated access to the WM (Wireless Mobility) for 8 priorities for non-AP STAs (stations)
– Controlled Access for contention-free access