2009-intro_wlan

Download Report

Transcript 2009-intro_wlan

An Introduction to Wireless LANs
Lecturer: Lei Guo, Yahoo!
Outline
 Wireless LAN architecture
 Medium access principle
 802.11 MAC control
 802.11 MAC management
Modern Networking Concepts: An Introduction to Wireless LANs
Wireless LAN Architecture
Modern Networking Concepts: An Introduction to Wireless LANs
Comparison: infrastructure vs. ad-hoc networks
infrastructure
network
AP
AP
AP: Access Point
wired network
ad-hoc network
Modern Networking Concepts: An Introduction to Wireless LANs
AP
IEEE 802.11 - Architecture of an infrastructure network
Basic Service Set (BSS)
802.11 LAN
802.x LAN

group of stations using the same
radio channel
Station (STA)
STA1

BSS1
Portal
Access
Point
Access Point
Distribution System
Access
Point
ESS

station integrated into the wireless
LAN and the distribution system
Portal

BSS2
bridge to other (wired) networks
Distribution System

STA2
terminal with access mechanisms
to the wireless medium and radio
contact to the access point
802.11 LAN
STA3
interconnection network to form
one logical network (EES:
Extended Service Set) based
on several BSS
Modern Networking Concepts: An Introduction to Wireless LANs
Wireless router in your home
www.yahoo.com
Cable modem
Wireless router
Internet
portal
AP
NAT
Router
ESS2/BSS2
Your neighbor
channel 6
ESS1/BSS1
Modern Networking Concepts: An Introduction to Wireless LANs
channel 1
802.11 - Architecture of an ad-hoc network
Direct communication within a limited
range
802.11 LAN

Station (STA):
terminal with access mechanisms to
the wireless medium
 Independent Basic Service Set
(IBSS):
group of stations using the same
radio frequency
 ad-hoc routing:
possible but not specified in IEEE
802.11
STA1
STA3
IBSS1
STA2
IBSS2
STA5
STA4
802.11 LAN
Modern Networking Concepts: An Introduction to Wireless LANs
IEEE standard 802.11: protocol stack
fixed
terminal
mobile terminal
infrastructure
network
access point
application
application
TCP
TCP
IP
LLC is same for all 802.x
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
Modern Networking Concepts: An Introduction to Wireless LANs
802.11 - Layers and functions
MAC control

PLCP Physical Layer Convergence Protocol
MAC Management


access mechanisms, fragmentation,
encryption
clear channel assessment signal
(carrier sense)
PMD Physical Medium Dependent
synchronization, roaming, MIB,
power management

modulation, coding
PHY Management

channel selection, MIB
Station Management
LLC
MAC
MAC Management
PLCP
PHY Management
PMD
Station Management
PHY
DLC

Modern Networking Concepts: An Introduction to Wireless LANs
coordination of all management
functions
See video (in reference 4) for
physical layer technologies
Medium Access Principle
Modern Networking Concepts: An Introduction to Wireless LANs
Motivation
Can we apply media access methods from fixed networks?
Ethernet: CSMA/CD



Carrier Sense Multiple Access with Collision Detection
send as soon as the medium is free, listen into the medium if a collision
occurs (original method in IEEE 802.3)
stop when collision is detected
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”
Modern Networking Concepts: An Introduction to Wireless LANs
Hidden and exposed terminals
Hidden terminals

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), neither can C
 A is “hidden” for C,
and vice versa
Exposed terminals
A

B
C
B sends to A, C wants to send to another terminal D
 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, and vice versa
Modern Networking Concepts: An Introduction to Wireless LANs
D
MACA - collision avoidance
MACA (Multiple Access with Collision Avoidance) uses short signaling
packets for collision avoidance

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
 CTS (clear to send): the receiver grants the right to send as soon as it is
ready to receive
 after RTS/CTS exchange, medium is reserved
Signaling packets contain



sender address
receiver address
packet size
RTS/CTS collision

probability is small, since RTS/CTS packets are very short
Modern Networking Concepts: An Introduction to Wireless LANs
MACA examples
MACA avoids the problem of hidden terminals

A and C want to
send to B
 A sends RTS first
 C waits after receiving
CTS from B
RTS
CTS
A
CTS
B
C
MACA avoids the problem of exposed terminals

B wants to send to A, C
to another terminal D
 B sends RTS, and A
replies CTS
 now C does not have to wait,
for it cannot receive CTS from A
RTS
RTS
CTS
A
Modern Networking Concepts: An Introduction to Wireless LANs
B
C
D
Polling mechanisms
If one terminal can be heard by all others, this “central” terminal
(e.g., AP) can poll all other terminals according to a certain
scheme, e.g., round-robin polling
Polling is contention free, no collision
802.11 Infrastructure WLAN

PCF (Point Coordination Function)


DCF (Distributed Coordination Function)


polling to avoid collision
CSMA/CA with RTS/CTS to resolve hidden terminal problem
no exposed terminal problem in infrastructure WLAN (why?)
Modern Networking Concepts: An Introduction to Wireless LANs
802.11 Wireless LANs:
MAC Control
Modern Networking Concepts: An Introduction to Wireless LANs
802.11 - MAC layer I - DFWMAC
Traffic services

Asynchronous Data Service (infrastructure/ad-hoc, mandatory)
station sends packets with “best-effort”, no upper bound for delay
 support of broadcast and multicast
 implemented using DCF (Distributed Coordination Function)


Time-Bounded Service (infrastructure only, optional)

implemented using PCF (Point Coordination Function) with polling
DFWMAC (Distributed Foundation Wireless MAC)

DFWMAC-DCF CSMA/CA (mandatory)
collision avoidance via randomized “back-off” mechanism
 reliable delivery with packet ACK (for unicast only)


DFWMAC-DCF w/ RTS/CTS (optional)

based on CSMA/CA, avoids hidden terminal problem
 optional, but supported by most commodity products

DFWMAC-PCF (optional)

AP polls terminals according to a list, contention free
 optional, not supported by most commodity products
Modern Networking Concepts: An Introduction to Wireless LANs
802.11 - MAC layer II
Frame types

data frame: normal data packets
 control frame: ACK, RTS, CTS
 management frame: beacon, probe, association, authentication, …
Priorities for different frames





defined through different IFS (Inter Frame Spacing) duration
SIFS (Short IFS): highest priority, for ACK, CTS, polling response, …
PIFS (PCF IFS): medium priority, for time-bounded service (PCF)
DIFS (DCF IFS): lowest priority, for asynchronous data service (DCF)
no guaranteed, hard priorities
DIFS
DIFS
medium busy
PIFS
SIFS
contention
direct access if
medium is free  DIFS
Modern Networking Concepts: An Introduction to Wireless LANs
next frame
t
random
802.11 - CSMA/CA: sending unicast data frame
DIFS
contention window
(randomized back-off
mechanism)
DIFS
medium busy
direct access if
medium is free  DIFS





next frame
total waiting time
t
when has data to send: starts sensing the medium (Carrier Sense)
if the medium is free for the duration of DIFS, starts sending
if the medium is busy, wait for a free DIFS, then do back-off:
wait a random back-off time (contention window) to avoid collision
if the medium is busy again during the back-off time: stop back-off,
wait for a free DIFS, then continue back-off (the contention
window is set to the residual back-off time)
if collision: stop back-off, wait for a free DIFS, then redo back-off
by doubling contention window size (until maximum), re-send data
Modern Networking Concepts: An Introduction to Wireless LANs
802.11 - competing stations - simple version
DIFS
DIFS
station1
station2
DIFS
boe
bor
boe
busy
DIFS
boe bor
boe
busy
boe busy
boe bor
boe
boe
busy
station3
station4
boe bor
station5
busy
bor
t
busy
medium not idle (frame, ack etc.)
boe elapsed backoff time
packet arrival at MAC
bor residual backoff time
Modern Networking Concepts: An Introduction to Wireless LANs
802.11 - CSMA/CA: data frame acknowledgment
Sending a unicast packet: complete procedure

station has to wait for DIFS before sending data
 receiver send ACK at once if the packet was received correctly



ACK cannot be delayed since it just wait a SIFS
automatic retransmission of data packets in case of transmission errors
Compared with CSMA/CD (Ethernet)

no collision detection (Ethernet has CD)
 use ACK to confirm delivery except multicast/broadcast (Ethernet no ACK)
atomic operation
DIFS
sender
data
SIFS
receiver
ACK
DIFS
other
stations
waiting time
Modern Networking Concepts: An Introduction to Wireless LANs
data
t
contention
802.11 – DFWMAC with RTS/CTS
Sending unicast packets

A sends RTS with net allocation vector (NAV, amount of time to use the
medium) after waiting for DIFS, to reserve medium
 B replies CTS after SIFS (if ready to receive)
 A sends data to B, B replies ACK
 other stations know medium reservation through NAV in RTS and CTS
atomic operation
DIFS
A
sender
RTS
data
SIFS
B
C
receiver
other
stations
CTS SIFS
SIFS
NAV (RTS)
NAV (CTS)
defer access
Modern Networking Concepts: An Introduction to Wireless LANs
ACK
DIFS
data
t
contention
802.11 Wireless LANs:
MAC Management
Modern Networking Concepts: An Introduction to Wireless LANs
802.11 - MAC management
Synchronization

synchronize internal clocks
 functions to support finding a WLAN
Power management

sleep-mode without missing a message
 periodic sleep, frame buffering, traffic measurements
Roaming



scanning
changing access points
joining a network
MIB - Management Information Base

managing, read, write
Modern Networking Concepts: An Introduction to Wireless LANs
Synchronization using a Beacon (infrastructure)
each station maintains an internal clock
synchronized clocks are needed for

power management
 PCF coordination
 hopping sequence of radio frequency in physical layer (see video)
how to synchronize: AP broadcasts quasi periodic beacon frames (100 ms)
beacon interval
access
point
medium
B
B
busy
busy
B
busy
B
busy
t
value of the timestamp
B
beacon frame
synchronization in ad-hoc WLAN: more complex
Modern Networking Concepts: An Introduction to Wireless LANs
Power management: motivation
Mobile devices are usually driven by battery powers
Wireless card consumes a great amount of energy in mobile devices

over 50% total energy for PDA
 up to 10% total energy for laptop
Power modes of wireless card
Transmit mode


data transmission (sending)
power consumption: high
Receive mode

data receiving and listening
 power consumption: medium
Sleep mode

power consumption: low
power consumption of a wireless card
Modern Networking Concepts: An Introduction to Wireless LANs
802.11 power management mechanism
Idea: switch the transceiver off if not needed

power saving mode: a station sleep and awake
 sender knows when to wake up for transmission
 receiver needs to know when to wake up for receiving
unicast in infrastructure WLAN

AP buffers data for a station working in power saving mode
 AP periodically broadcasts with beacon a Traffic Indication Map (TIM),
indicating which station has data to receive
 station periodically wakes up to receive TIM
 station polls AP to receive data
broadcast/multicast in infrastructure WLAN

similar but no buffer and no poll (broadcast/multicast has no ACK)
 needs another Traffic Indication Map (called Delivery TIM, DTIM)
 period of DTIM is multiple of TIM
ad-hoc WLAN

more complex
Modern Networking Concepts: An Introduction to Wireless LANs
Power saving with wake-up patterns (infrastructure)
before sleep: station notifies AP to have data buffered
TIM interval
access
point
DTIM interval
D B
T
busy
medium
busy
T
d
busy
busy
p
station
t0
t1
D
d
t2
T
TIM
B
broadcast/multicast
DTIM
D B
t3
awake
p PS poll
Modern Networking Concepts: An Introduction to Wireless LANs
d data transmission
to/from the station
t
802.11 – Roaming
Scan

passive scan: listen into the medium for beacon signals
 active scan: send probes into the medium and wait for an answer
Reassociation

station sends a Reassociation Request to new AP(s)
 new AP replies Reassociation Response

success: join the new AP
 failure: continue scanning
Handover

new AP: signals the new station to the distribution system (DS)
 DS: updates data base (i.e., location information)
 old AP: sends buffered data to new AP through DS, release resources
Advantage

seamless to end users, IP layer not affected
 TCP/IP socket not broken (roaming in an ESS)
Modern Networking Concepts: An Introduction to Wireless LANs
IEEE 802.11 family
802.11: legacy (1997)

2.4 GHz
 1, 2 Mbps
802.11a: not widely used (2001)

5-6 GHz range
 6, 9, 12, 18, 24, 36, 48, and 54 Mbps
802.11b: widely used before (1999)

2.4 GHz
 1, 2, 5.5, 11 Mbps
802.11g: most popular now (2003)

2.4 GHz
 6, 9, 12, 18, 24, 36, 48, and 54 Mbps
 backwards compatible with b
802.11n: MIMO antenna (2010)

up to 300 Mbps, 600 Mbps in the future
 backwards compatible with a, b, g
 product for 802.11n draft already on market
And others: 802.11 d, e, f, h, i, …
Modern Networking Concepts: An Introduction to Wireless LANs
Summary: Key points
Architecture

802.11 protocol stack
Access principle of radio medium

hidden terminal problem
 RTS/CTS, polling
802.11 MAC control

DCF CSMA/CA
 DCF with RTS/CTS
802.11 MAC management

synchronization (infrastructure)
 power saving mechanism (infrastructure)
References

Basic: J. F. Kurose, K. W. Ross, Computer Networking: A Top-Down Approach
(4 ed.), Chapter 6
 Advanced: J. Schiller, Mobile Communications (2 ed.), Chapter 7
 Lab book: M. Gast, 802.11® Wireless Networks: The Definitive Guide, O'Reilly
 Physical layer video: http://public.yahoo.com/~lguo/download/cisco-aironet.zip,
click radio frequency technology to watch (optional)
Modern Networking Concepts: An Introduction to Wireless LANs