an overview of 802.11 mac entity-月會報告 - gicl...
TRANSCRIPT
An Overview of 802.11 MAC Entity
Hsung-Pin ChangDepart. Of Computer & Information Science
National Chiao-Tung University
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
Standardsn IEEE 802.11
n Finalized in June of 1997 and revised in 1999n (1997 version) one MAC (DFW CSMA/CA) supports
multiple PHYs (DSSS, FHSS, Direct-modulated Infrared, Carrier-modulated Infrared and Multi-subcarrier-modulated Infrared)n 1&2 Mbps using either DSSS or FHSSn 1&2 Mbps using Direct-modulated Infraredn 4 Mbps using Carrier-modulated Infraredn 10 Mbps using Multi-subcarrier-modulated Infrared
n (In-building) Operation Range = 50~150 mn Quality of Service
n (optional) Point Coordination Function
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
Standards (Cont.)n IEEE 802.11
n IEEE Std 802.11an Orthogonal frequency domain multiplexing
(OFDM) radio in the UNII bands, delivering up to 54 Mbps data rates
n IEEE Std 802.11bn Extension to the DSSS PHY in the 2.4 GHz band,
delivering up to 11 Mbps data rates
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
802.11 Architecturen Basic Service Set (BSS): A group of
stations that can directly communicate with each othern Independent BSS (IBSS)n Infrastructure BSS
n Extended Service Set (ESS)
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
802.11 Architecture (Cont.)
Fixed-wirereplacement
Servercomputer
Portable-to-fixednetwork
Infrastructure
Portable-to-portablenetworkAd hoc
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
Independent BSS
n One and only one Basic Service Setn Ad hoc networkn Direct Communicationn Limited coverage area
Portable-to-portablenetworkAd hoc
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
Infrastructure BSS
n Infrastructuren Access Point
n Analogous the base station in a cellular communication network
n Provide specific services and range extension
Fixed-wirereplacement
Servercomputer
Portable-to-fixednetwork
Infrastructure
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
Extended Service Set
n Distribution Systemn Interconnect multiple BSSs to form an ESS, Extended Service
Setn Not part of 802.11 standard
n Could be IEEE 802.3 LANs, wireless, other networksn Only distributed System Services are defined
Distribution System
AP
AP
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
IEEE 802.11 Servicesn Station Services
n Authentication/Deauthenticationn Prove identityn Similar to the physically connecting to the
network cablen Privacy
n Provide an equivalent level of protection as that provided by a wired network
n WEP: wired equipment privacyn Data delivery
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
IEEE 802.11 Services (Cont.)n Distribution Services
n Association/Reassociation/Disassocationn Association service is usually invoked once, when the
mobile station enters the WLAN for the first time,n While reassociation service shall include the information
about the AP with which a mobile station has been previously associated.
n Distributionn An AP determines how to deliver the frames it receives
uses the distribution servicesn Integration
n Connect the IEEE 802.11 WLAN to other LANs
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
802.11 Specificationsn One MAC specification
n CSMA/CA
n Three physical specificationn Radio
n Frequency hopping spread spectrum (FHSS)n Direct sequence spread spectrum (DSSS)
n IR
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
States for BSS
n Authentication should be used in an Infrastructure BSS, but is option in an IBSS
n Association is never used in an IBSS
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
IEEE 802 System View
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
802.11 MAC Entity
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
802.11 Protocol Entities
MAC Sublayer
PLCP Sublayer
PMD Sublayer
MAC LayerManagement
PHY LayerManagement
LLC
MAC
PHY
StationManagement
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
MAC Functional Descriptionn 802.11 MAC
n Regulate the usage of the median Provide the same interface with other
802.x families to the upper LLC layer
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
MAC Functional Servicesn Data Service: carrier sense multiple
access with collision avoidance (CSMA/CA)n Distribution coordination function (DCF)
n Asynchronous data delivery services
n Point coordination function (PCF): optionaln Time bounded data delivery services
n Fragmentation/Defragmentation
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
DCF: CSMA/CAn CSMA: carrier sense multiple access
n Physical carrier sense: physical layern Virtual carrier sense: MAC layer
n Network Allocation Vector (NAV)
n CA: collision avoidancen Random backoff procedure
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
CSMA/CA: Without RTS/CTS
n NAVn Indicate the amount of time that must elapse until
the current transmission is completen Update the duration field of packets
n (Send, ACK) is an atomic operation
Ack
Data
NAV
Src
Dest
Other
Defer Access
CW
Backoff after Defer
DIFS
SIFS
DIFS
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
CSMA/CA: Without RTS/CTS (Cont.)n NAV setting
n RTS/CTS framen All frames sent during the CP other than
PS-Poll Control frames
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
"Hidden Node" Problem
• Transmitters contending for the medium may not "Hear "Hear each other" each other" as shown below.
• Separate Control frame exchange (RTS / CTS) between transmitter and receiver will Reserve the MediumReserve the Medium for subsequent data access.
AP
STA
STA
CTS-RangeRTS-Range
STA APRTS
CTS
Data
Ack
Stations do not hear each otherBut they hear the AP.
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
CSMA/CA with RTS/CTS
•• DurationDuration (=NAV)(=NAV) information is distributed by both transmitter and receiver through separate RTS and CTS Control Frames.
• Duration field in RTS and CTS frames distribute Medium Reservation information which is stored in a Network Network Allocation Vector (NAV)Allocation Vector (NAV).
• NAV information is maintained in each station.
RTS
CTS Ack
Data
NAV Next MPDU
Src
Dest
Other
CW
Defer Access Backoff after Defer
NAV
(RTS)
(CTS)
DIFS
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
CSMA/CA with RTS/CTSn RTS/CST
n Resolve hidden node n Fast collision inference
n Cannot used for broadcast/multicast immediate address
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
"Hidden Node" Provisionsn NAV(Network Allocation Vector)
n All STAs receiving a valid frame shall update their NAV in the Duration Field.
n All of the RTS/CTS/DATA frames contains NAV field.
n Use of RTS/CTS is optional but must be implemented
n Use of RTS/CTS is controlled by a RTS_Threshold parameter per stationn To limit overhead for short frames
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
RTS/CTS Overhead Impactn RTS/CTS can be automatically disabled
by thresholding on frame length through dot11RTSThreshold.n IEEE 802.11 Std 1999 Edition Annex D
n The default value is 2347.
n IEEE 802.11 Handbookn A typical value for the threshold is 128.
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
Backoff Proceduren Random backoff procedure
n Decrement its backoff time by aSlotTime when free .n Stop the backoff procedure when busy .
Backoff Time = INT ( CW * Random( )) * aSlotTime
Node A
Node B
Node C(typical)
A completes the transmission ofits frame
B resenses the medium and, since it is quiet, starts to transmit its frame
C resense the medium but, since it now occupied, defers to B
B and C sense medium isnow free and both generatea random time interval
C resenses the medium and, since it is quiet, starts to transmitits frame
Node C(IEEE 802.11)
Virtual Carrier SenseVirtual Carrier Sense
SIFS/PIFS/DIFS
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
Backoff Procedure (Cont.)n When the medium becomes idle, resume the
backoff timer only after DIFS idle time.n Suspend the backoff timers if a transfer is
going on.
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
Backoff Procedure (Cont.)
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
Optional Point Coordination Function (PCF)
• Contention Free Service uses Point Coordination Function (PCF) on a DCF Foundation.– PCF can provide lower transfer delay variations to
support Time Bounded ServicesTime Bounded Services. – Point Coordinator resides in AP.
(CSMA/CA )
ContentionService
Service
PHY
MACPCF
Optional
DCF
Contention FreeAsync
Time Bounded / Async
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
Optional Point Coordination Function (PCF) (Cont.)n Access method
n Virtual carrier-sense mechanism with access priority mechanism
n Virtual carrier-sensen PCF should distribute information within Beacon
frames to gain control of the medium by setting the network allocation vector in STAs
n Access priorityn Contention-free access
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
Contention Free operation
• Alternating Contention FreeContention Free and ContentionContention operation under PCF control.• CFP repetition interval• Contention Free Period
Contention Free Period Contention Period
CFP repetition interval
Variable Length
PCF Defers for Busy Medium
CF-BurstBusy mediumPCF DCF
(Optional)
Defer
NAV
Async traffic DeferPCF
"Reset NAV"
CFP repetition interval
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
Polling
n In a CPF, the PC sends poll frames to stations asking whether they have frames to send.
n If a polled station has a frame to send to the AP, it can send it to the AP now.
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
Priority Access
n SIFS/PIFS/DIFS to give priority to more urgent frames, such as the ACK frame following a DATA frame or the CTS frame followed an RTS frame.n SIFS = Short inter-frame spacen PIFS = Point-coordination function interframe spacen DIFS = Distributed coordination function interframe space
DIFS Contention Window
Slot time
Defer Access
Backoff-Window Next Frame
Select Slot and Decrement Backoff as long as medium is idle.
SIFS
PIFSDIFS
Free access when mediumis free longer than DIFS
Busy Medium
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
IEEE 802.11 Distributed Coordination Functionn To summarize,
n CSMA/CA (RTS/CTS) to prevent “ hidden node”
n ACK to DATA frame to provide reliable transmission
n Virtual Carrier Sense to avoid collisionsn duration information provided by RTS frame
and CTS frame
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
IEEE 802.11 Distributed Coordination Function (Cont.)n To summarize (Cont.)
n SIFS/PIFS/DIFS to give priority to more urgent frames, such as the ACK frame following a DATA frame or the CTS frame followed an RTS frame.n SIFS = Short inter-frame spacen PIFS = Point-coordination function interframe spacen DIFS = Distributed coordination function interframe
space
n Exponential Back-off Windows to prevent heavy load congestion.
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
Fragmentation
n Fragment Bursts which are individually acknowledgedn Random backoff and retransmission of failing fragment
when no ACK is returned.n Retransmission is applied to each fragment
Fragment 0
ACK 0
Src
Dest CTS
SIFSRTS
NAV (RTS)
NAV (CTS)
Other
PIFS
DIFS
Backoff-Window
ACK 1
Fragment 1
NAV (Fragment 0)
NAV (ACK 0)
SIFS
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
Fragmentation (Cont.)n Fragmentation is used to increase
reliabilityn Channel characteristics limit reception
reliability for longer frames
n Broadcast/multicast frames should not be fragmented even if their length exceed aFragmentationThreshold
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
802.11 Protocol Entities
MAC Sublayer
PLCP Sublayer
PMD Sublayer
MAC LayerManagement
PHY LayerManagement
StationManagement
LLC
MAC
PHY
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
MAC Management Layer
n Synchronizationn Timing Synchronization Function (TSF)
n Power Managementn sleeping without missing any messagesn Power Management functions
n periodic sleep, frame buffering, Traffic Indication Map
n Association and Reassociationn Joining a networkn Roaming, moving from one AP to another
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
Synchronization in 802.11
n All stations maintain a local timer.n Timing Synchronization Function
n keeps timers from all stations in synch.
n Timing conveyed by periodic Beacon transmissionsn Beacons contain Timestamp for the entire BSSn Timestamp from Beacons used to calibrate local
clocks
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
Synchronization in 802.11 (Cont.)
• APs send Beacons in infrastructure networks. • Beacons scheduled at Beacon Interval.• Transmission may be delayed by CSMA deferral.
– subsequent transmissions at expected Beacon Interval– not relative to last Beacon transmission– next Beacon sent at Target Beacon Transmission Time
• Timestamp contains timer value at transmit time.
Time Axis
Beacon Interval
X X X X
"Actual time" stamp in Beacon
Beacon Busy Medium
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
Synchronization in 802.11 (Cont.)n In infrastructure
n AP generates the beacon
n In ah-hocn Beacon generation is distributed among all
stations
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
Power Management
n Mobile devices are battery powered.n Power Management is important for mobility.
n Current LAN protocols assume stations are always ready to receive.n Idle receive state dominates LAN adapter
power consumption over time.n 802.11 Power Management Protocol:
n allows transceiver to be off as much as possible
n is transparent to existing protocols
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
Power Management-Infrastructure Network
n Allow idle stations to go to sleepn station's power save mode stored in AP
n APs buffer packets for sleeping stations.n AP announces which stations have frames bufferedn Traffic Indication Map (TIM) sent with every Beacon
n Power Saving stations wake up periodicallyn listen for Beacons
n If it has packets buffered, it then sends a power-save poll request frame to the AP.
n AP will send the buffered frame to the station. n The station can sleep again.
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
Power Management-Ah-hocn Similar to the infrastructure networkn However, the buffering scheme is achieved
by the sending stationn Sleeping station also wake up periodically to
listen beacon and ATIMn If it has data buffered
n Send an Ack and wake upn Sending station send the data to the sleeping
station
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
Wireless LAN Infrastructure Network
Access Point A
Access Point B
Station 4
Access Point C
Station 1 Station 2
Station 3
Station 5Station 6
Station 7
• Each Station is Associated with a particular AP– Stations 1, 2, and 3 are associated with Access Point A– Stations 4 and 5 are associated with Access Point B– Stations 6 and 7 are associated with Access Point C
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
Roaming
Access Point A
Access Point B
Station 4
Access Point C
Station 1 Station 2
Station 3
Station 5Station 6
Station 7
• Mobile stations may move*
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
Roaming
Access Point A
Access Point B
Station 4
Access Point C
Station 1
Station 2
Station 3
Station 5Station 6
Station 7
• Mobile stations may move*– beyond the coverage area of their Access Point
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
Roaming
Access Point A
Access Point B
Station 4
Access Point C
Station 1
Station 2
Station 3
Station 5Station 6
Station 7
• Mobile stations may move*– beyond the coverage area of their Access Point– but within range of another Access Point
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
Roaming
Access Point A
Access Point B
Station 4
Access Point C
Station 1
Station 2
Station 3
Station 5Station 6
Station 7
• Mobile stations may move*– beyond the coverage area of their Access Point– but within range of another Access Point
• Reassociation allows station to continue operation
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
Roaming Approachn Station decides that link to its current AP is poor using
the information ofn Carrier Sense and Energy Detectionn RSSI (Receiver Signal Strength Indicator)
n Station uses scanning function to find another APn Station sends Reassociation Request to new APn If Reassociation Response is successful
n then station has roamed to the new APn else station scans for another AP
n If AP accepts Reassociation Requestn AP indicates Reassociation to the Distribution Systemn Distribution System information is updatedn normally old AP is notified through Distribution System
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
Scanningn Scanning required for many functions.
n finding and joining a networkn finding a new AP while roamingn initializing an Independent BSS (ad hoc)
network
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
Scanning (Cont.)n 802.11 MAC uses a common mechanism for all
PHYn passive or active scanning
n Passive Scanningn Find networks simply by listening for Beacons
n Active Scanningn On each channel
n Send a Probe, Wait for a Probe Response
n Beacon or Probe Response contains information necessary to join new network.
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
Active Scanning Example
Steps to Association:
Station sends Probe.
Initial connection to an Access Point
Access Point CAccess Point A
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
Active Scanning Example
Steps to Association:
Station sends Probe.APs send Probe Response.
Initial connection to an Access Point
Access Point CAccess Point A
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
Active Scanning Example
Steps to Association:
Station sends Probe.APs send Probe Response.
Station selects best AP.
Initial connection to an Access Point
Access Point CAccess Point A
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
Active Scanning Example
Steps to Association:
Station sends Probe.APs send Probe Response.
Station selects best AP.
Station sends AssociationRequest to selected AP.
Initial connection to an Access Point
Access Point CAccess Point A
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
Active Scanning Example
Steps to Association:
Station sends Probe.APs send Probe Response.
Station selects best AP.
Station sends AssociationRequest to selected AP.
AP sends AssociationResponse.
Initial connection to an Access Point
Access Point CAccess Point A
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
Active Scanning Example
Steps to Association:
Station sends Probe.APs send Probe Response.
Station selects best AP.
Station sends AssociationRequest to selected AP.
AP sends AssociationResponse.
Initial connection to an Access Point- ReAssociation follows a similar process
Access Point CAccess Point A
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
Summaryn 802.11 Architecturen 802.11 Servicesn MAC function description: CSMA/CA
n DCFn PCFn Fragmentation/defragmentation
n MAC management descriptionn Synchronizationn Power Managementn Roaming
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com
802.11 MAC
the end …
PDF created with FinePrint pdfFactory Pro trial version http://www.fineprint.com