Wireless LAN

Download Report

Transcript Wireless LAN

IEEE 802.11 Wireless LAN
 All rights reserved. No part of this publication and file may be
reproduced, stored in a retrieval system, or transmitted in any form
or by any means, electronic, mechanical, photocopying, recording or
otherwise, without prior written permission of Professor Nen-Fu
Huang (E-mail: [email protected]).
Wireless LAN - 1/59
Wireless LAN Architecture
Four major differences between
Wireless LAN and Wired LANs:
Destination Address Does not Equal
Destination Location.
In wired LANs an address is equivalent to a
physical address. In 802.11 the addressable
unit is a station (STA). The STA is a message
destination, but not a fixed location.
Wireless LAN - 2/59
Wireless LAN Architecture
The Media Impacts the Design
The PHY layers used in 802.11are different
from wired media. 802.11 PHYs:
Have limited physical point to point connection
ranges.
 Use a shared medium.
 Are unprotected from outside signals.
 Are significantly less reliable than wired PHYs.
 Have dynamic topologies.

Wireless LAN - 3/59
Wireless LAN Architecture
Impact of Handling Mobile Stations
A portable station is one that is moved from
location to location, but is only used while
at a fixed location.
Mobile stations actually access the LAN
while in motion.
Propagation effects blur the distinction
between portable and mobile stations.
Wireless LAN - 4/59
802.11Wireless LAN Characteristics

1-108 Mbps



IEEE 802.11b is for 11 Mbps
IEEE 802.11g is for 54 Mbps
IEEE 802.11n is for 108 Mbps
IEEE 802.11 CSMA/CA Frame
 Transmission Medium: Radio
 CSMA/CA (Carrier Sense Multiple Access with
Collision Avoidance) Protocol
 Provides priority scheme
 Provides delay guaranteed transmission service. (PCF
reservation-based)
 Bandwidth Fairness is not guaranteed. By employing
the CSMA/CA protocol, the bandwidth employed by
each station may be different.

Wireless LAN - 5/59
Frame Types
 Class 1 frames
Source
 Control Frames
(1) RTS
(2) CTS
(3) ACK
(4) Poll
 Management Frames
(1) Probe Request/Response
(2) Beacon
(3) Authentication
Destination
Optional
RTS
CTS
Data
ACK
Wireless LAN - 6/59
Frame Types
Class 2 Frames
Data Frames

Asynchronous data. Direct data frames only (FC
control bits “To DS and from DS” both false)
Management Frames
(1) Privacy Request/Response
(2) ATIM (Ad-Hoc Traffic Indication Map, ATIM)
(3) Association Request/Response
Wireless LAN - 7/59
Frame Types
Class 3 Frames
Data Frames

Asynchronous data. Indirect data frames allowed (FC
control bits "To DS and from DS" may be set to utilize DS
Services)
Management Frames
(1) Reassociation Request/Response
(2) Disassociation
CF Data Frames (Coordination Function)
(1) CF DATA
(2) CF DATA + ACK
CF Control Frames
(1) CF END
Wireless LAN - 8/59
Frame and MPDU Formats
Each frame should consist of three basic
components:
A MAC Header, which includes control
information, addressing, sequencing
fragmentation identification and duration.
A variable length Frame Body
An IEEE 32-bit CRC frame check sequence
Wireless LAN - 9/59
Frame and MPDU Formats
MAC Header
2
2
6
6
6
Frame Duration/
Addr 1 Addr 2
Control Conn ID
Protocol
Version
2
To
Type Subtype DS
2
4
1
2
6
Sequence Addr 4
Control
Addr 3
From Last Retry Power
DS Flag
Mang.
1
0-2304 4 bytes
1
1
2
data FCS
EP Rsvd
1
1 bit
Wireless LAN - 10/59
Frame Fields
Frame Control Field :
 Protocol Version, Type, Subtype, ToDS, From DS,
Last Fragment, Retry, Power Management and
Element Present.
 Retry : Indicates that the frame is a retransmission of
an earlier frame. A station may use this indication to
eliminate duplicate frames.
 Power Management : Indicates power management
state and buffered traffic state of the station




00 = Active Mode (CAM or TAM), with more buffered frames
01 = PSP - Power Save, Polling
10 = PSNP - Power Save, No Polling
11 = Active Mode (CAM or TAM), without more buffered frames
Wireless LAN - 11/59
Frame Fields
Duration or Connection ID :
Used to distribute a value (us) that shall update the
Network Allocation Vector (NAV) in stations
receiving the frame.
During the contention free period, this field
may be replaced with a connection ID field.
 Only contention free time-bounded data
used a connection ID; contention based data
and contention free asynchronous data do
not use connection IDs.

Wireless LAN - 12/59
Frame Fields
Address Fields : Indicate the BSSID, SA, DA, TA
(Transmitter address), RA (Receiver address),
each of 48-bit address.
Sequence Control
Dialog Token (12-bit) : An incrementing value.
The same value shall be used for all fragments of
the same MSDU.
Fragment Number (4-bit) : Indicates the number of
each individual fragment.
Frame Body: 0 - 2304 bytes.
CRC (4 octets)
Wireless LAN - 13/59
Frame Fields
MSDU
MAC Frame
HDR Body CRC
Fragment 1
MAC Frame
CRC
HDR Body
Fragment 2
MAC Frame
HDR Body CRC
Fragment 3
MAC Frame
HDR Body CRC
Fragment 4
Wireless LAN - 14/59
Format of Individual Frame Types
 RTS Frame Format
 In an infrastructure LAN, the DA shall be the address
of the AP with which the station is associated.
 In an ad hoc LAN, the DA shall be the destination of
the subsequent data or management frame.
CTS Frame Format
 The DA shall be taken from the source address field of
the RTS frame to which the CTS is a response.
Wireless LAN - 15/59
Format of Individual Frame Types
ACK Frame Format
 The DA shall be the address contained in the Address 2
field of the immediately previous Data or Management
frame.
Poll Frame Format
 The BSS ID shall be the address of the AP. The SID shall
be the value assigned by the AP in the Associate Response
frame.
Wireless LAN - 16/59
Format of Individual Frame Types
MAC Header
Frame
Control
Duration
DA
SA
FCS
RTS Frame
MAC Header
Frame
Control
Duration
DA
FCS
DA
FCS
CTS Frame
MAC Header
Frame
Control
Duration
ACK Frame
MAC Header
Frame
Control
Duration
BSS ID
SA
FCS
Poll Frame
Wireless LAN - 17/59
Format of Individual Frame Types
Data Frames
 The contents of the Address fields shall be dependent
upon the values of the To DS and From DS bits.
 A station shall use the contents of Address 1 to
perform address matching for receive decisions.
 The DA shall be the destination of the frame (MSDU).
 The RA shall be the address of the AP in the wireless
DS that is the next immediate intended recipient of
the frame.
 The TA shall be the address of the AP in the wireless
DS that is transmitting the frame.
Wireless LAN - 18/59
802.11 Architecture
Components
STA 2
AP
STA 1
BSS 1
Distribution System (DS)
STA 3
AP
STA 7
AP
STA 6
STA 5
STA 4
BSS 2
BSS 3
AP: Access Point
Wireless LAN - 19/59
Format of Individual Frame Types
The BSSID
The AP address, if the station is an AP or associated
with an AP.
 The BSS ID of the ad hoc LAN, if the station is a
member of an ad hoc LAN.

Data Subtype
During the contention period: 0000
 During the contention free period

– 0000, 0011, 0110, and 0111 shall only be sent by a PCF.
– 0000, 0001, 0100, and 0101 may be sent by any CF-aware
station.
Wireless LAN - 20/59
Data Frames
MAC Header
Frame Duration/
Sequence Fragment
Addr 4 Data
Addr
1
Addr
2
Addr
3
Control Conn ID
Number Number
To DS From DS
FCS
Addr 1 Addr 2 Addr 3 Addr 4
0
0
DA
SA
BSSID
N/A
0
1
DA
BSSID
SA
N/A
1
0
BSSID
SA
DA
N/A
1
1
RA
TA
DA
SA
Wireless LAN - 21/59
MAC Architecture
Contention Free
Service
Contention Based
Service
Point Coordination
Function (PCF)
MAC
Extent
Distributed Coordination
Function (DCF)
Wireless LAN - 22/59
MAC Architecture
Distributed Coordination Function (DCF)
The fundamental access method for the 802.11
MAC, known as Carrier Sense Multiple
Access with Collision Avoidance (CSMA/CA).
Shall be implemented in all stations and APs.
Used within both ad hoc and infrastructure
configurations.
Wireless LAN - 23/59
MAC Architecture
Point Coordination Function (PCF)
An alternative access method
Shall be implemented on top of the DCF
A point coordinator (polling master) is used to
determine which station currently has the right to
transmit.
Shall be built up from the DCF through the use of
an access priority mechanism.
Different accesses of traffic can be defined
through the use of different values of IFS.
Wireless LAN - 24/59
MAC Architecture
Shall use a Point IFS (PIFS) < Distributed IFS
(DIFS)
Point coordinated traffic shall have higher
priority to access the medium, which may be
used to provide a contention-free access
method.
The priority access of the PIFS allows the
point coordinator to seize control of the
medium away from the other stations.
Wireless LAN - 25/59
MAC Architecture
Coexistence of DCF and PCF
Both the DCF and PCF shall coexist without
interference.
They are integrated in a superframe in which
a contention-free burst occurs at the
beginning, followed by a contention period.
Wireless LAN - 26/59
MAC Architecture
Super Frame
Contention
Free
Period
Contention
Period
Wireless LAN - 27/59
Distributed Coordination Function
Allows for automatic medium sharing
between PHYs through the use of CSMA/CA
and a random backoff time following a busy
medium condition.
All directed traffic uses immediate positive
ack (ACK frame) where retransmission is
scheduled by the sender if no ACK is
received.
Carrier Sense shall be performed both
through physical and virtual mechanisms.
Wireless LAN - 28/59
Distributed Coordination Function
 The virtual Carrier Sense mechanism is achieved by
distributing medium busy reservation information
through an exchange of special small RTS and CTS
frames (contain a during field) prior to the actual data
frame. Unicast only, not used in multicast/broadcast.
 The use of RTS/CTS is under control of
RTS_Threshold (payload length, under which
without any RTS/CTS prefix).
 All stations are required to be able to receive any
frame transmitted on a given set of rates, and must be
able to transmit at (at least) one of these rates. This
assures that the Virtual Carrier Sense mechanism still
works on multiple rates environments. Wireless LAN - 29/59
Distributed Coordination Function
Physical Carrier Sense Mechanism
A physical carrier sense mechanism shall be
provided by the PHY.
Virtual Carrier Sense Mechanism
Provided by the MAC, named Net Allocation
Vector (NAV), which maintains a prediction of
future traffic based on duration information
announced in RTS/CTS frames.
Wireless LAN - 30/59
Distributed Coordination Function
MAC-Level Acknowledgments (Positive
Acknowledgment)
 To allow detection of a lost or errored frame an ACK
frame shall be returned immediately following a
successfully received frame. The gap between the
received frame and ACK frame shall be SIFS.
 The frame types should be acknowledged with an
ACK frame:




Data
Poll
Request
Response
 The lack of an ACK frame means that an error has
occurred.
Wireless LAN - 31/59
Distributed Coordination Function -Inter-Frame Space (IFS)
 A station shall determine that the medium is free
through the use of carrier sense function for the
interval specified.
 Three different IFS's are defined to provide priority
levels.
 Short-IFS (SIFS)
 Shall be used for an ACK frame, a CTS frame, by a
station responding to any polling, and between frames in
the sequences described in Page 41.
 Any STA intending to send only these frame types shall
be allowed to transmit after the SIFS time has elapsed
following a busy medium.
Wireless LAN - 32/59
Distributed Coordination Function -Inter-Frame Space (IFS)
PCF-IFS (PIFS)
 Shall be used only by the PCF to send any of the
Contention Free Period frames.
 The PCF shall be allowed to transmit after it detects
the medium free for the period PIFS, at the start of
and during a CF-Burst.
DCF-IFS (DIFS)
 Shall be used by the DCF to transmit asynchronous
MPDUs.
 A STA using the DCF is allowed to transmit after it
detects the medium free for the period DIFS, as long
as it is not in a backoff period.
Wireless LAN - 33/59
Distributed Coordination Function -Random Backoff Time
Before transmitting asynchronous MPDUs, a
STA shall use the carrier sense function to
determine the medium state.
If busy, the STA shall defer until after a DIFS
gap is detected, and then generate a random
backoff period for an additional deferral time
(resolve contention).
Backoff time = INT(CW * Random()) * Slot time
Wireless LAN - 34/59
Distributed Coordination Function -Random Backoff Time
Where CW = An integer between CWmin and CWmax
Random() =
Slot Time = Transmitter turn-on delay +
medium propagation delay +
medium busy detect response time
CWmax
CWmin
7
15
31
63
127
255
255
3rd Retransmission
Initial
2nd Retransmission
1st Retransmission
Wireless LAN - 35/59
Distributed Coordination Function -DCF Access Procedure
 CSMA/CA Protocol
 Used when there is no PCF detected and when in the
Contention Period of a Superframe when using a
PCF.
 Basic Access
 A STA with a pending MPDU may transmit when it
detects a free medium for greater than or equal to a
DIFS time.
 If the medium is busy when a STA desires to initiate a
Data, Poll, Request, or Response MPDU transfer, and
only a DCF is being used (or a Contention Period
portion of a Superframe is active), the Random
Backoff Time algorithm shall be followed.
Wireless LAN - 36/59
Distributed Coordination Function -DCF Access Procedure
Immediate access when
medium is free >= DIFS
DIFS
PIFS
DIFS
Contention
Window
SIFS
Busy Medium
Back offWindow
Next Frame
Slot time
Defer Access
Wireless LAN - 37/59
Distributed Coordination Function -DCF Access Procedure
Backoff Procedure
 A backoff time is selected first. The Backoff Timer
shall be frozen while the medium is sensed busy
and shall decrement only when the medium is free
(resume whenever free period > DIFS).
 Transmission shall commence whenever the
Backoff Timer reaches zero.
 A STA that has just transmitted a frame and has
another frame ready to transmit (queued), shall
perform the backoff procedure (fairness concern).
 Tends toward fair access on a FCFS basis.
Wireless LAN - 38/59
Distributed Coordination Function -DCF Access Procedure
DIFS
A
B
Frame
Backoff
9 us
19 us
2 us
Frame
C
Frame
4 us
10 us
D
Frame
15 us
5 us
E
Frame
7 us
2 us
CWindow = Contention Window
= Backoff(後退)
= Remaining Backoff(持續後退)
Wireless LAN - 39/59
Distributed Coordination Function -DCF Access Procedure
RTS/CTS Recovery Procedure and Retransmit
Limits
 After an RTS is transmitted, if the CTS fails in any manner
within a predetermined CTS_Timeout (T1), then a new RTS
shall be generated (the CW shall be doubled).
 This procedure shall continue until the RTS_ReTransmit_Counter reaches an RTS_Re-Transmit_Limit.
 The same backoff mechanism shall be used when no ACK is
received within a predetermined ACK_Window(T3) after a
directed DATA frame has been transmitted.
 This procedure shall be continue until the ACK_ReTransmit_Counter reaches an ACK_Re-Transmit_Limit.
Wireless LAN - 40/59
Distributed Coordination
Function -- DCF Access Procedure
Setting the NAV Through Use of
RTS/CTS Frames
RTS and CTS frames contain a Duration
field based on the medium occupancy time
of the MPDU from the end of the RTS or
CTS frame until the end of the ACK frame.
Wireless LAN - 41/59
Distributed Coordination Function -DCF Access Procedure
T3
T1
DIFS
Source
Data
RTS
SIFS
SIFS
Destination
CTS
SIFS
ACK
DIFS
Other
Station
NAV (RTS)
Contention
Window
Back offWindow
Next Frame
NAV (CTS)
Defer Access
Back off after
Defer
Wireless LAN - 42/59
Distributed Coordination Function -DCF Access Procedure
Control of the Channel
 The IFS is used to provide an efficient MSDU delivery
mechanism.
 Once a station has contended for the channel, it will
continue to send fragments until either all fragments of a
MSDU have been sent, an ack is not received, or the station
can not send any additional fragments due to a dwell time
boundary.
 If the source station does not receive an ack frame, it will
attempt to retransmit the fragment at a later time (according
to the backoff algorithm).
 When the time arrives to retransmit the fragment, the source
station will contend for access in the contention window.
Wireless LAN - 43/59
Distributed Coordination Function -DCF Access Procedure
DIFS
Fragment Burst
SIFS
Src
Dst
Fragment 1
SIFS
SIFS
Fragment 2
Ack
1
PIFS
SIFS
SIFS
Back offWindow
Fragment 3
Ack
2
SIFS
Ack
3
Wireless LAN - 44/59
Distributed Coordination Function -DCF Access Procedure
RTS/CTS Usage with Fragmentation
The RTS/CTS frames defines the duration of the
first frame and ack. The duration field in the
data and ack frames specifies the total duration
of the next fragment and ack.
The last Fragment and ACK will have the
duration set to zero.
Each Fragment and ACK acts as a virtual RTS
and CTS.
In the case where an ack is not received by the
source station, the NAV will be marked busy for
next frame exchange. This is the worst case
situation.
Wireless LAN - 45/59
Distributed Coordination Function -DCF Access Procedure
RTS/CTS Usage with Fragmentation
If the ack is not sent by the destination, stations
that can only hear the destination will not
update their NAV and be free to access the
channel.
All stations will be free to access the channel
after the NAV from Frame 1 has expired.
The source must wait until the NAV (Fragment
1) expires before attempting to contend for the
channel after not receiving the ack.
Wireless LAN - 46/59
RTS/CTS Usage with
Fragmentation
DIFS
PIFS
SIFS
Other
NAV(RTS)
NAV(Frag 1)
NAV(CTS)
SIFS
SIFS
Fragment 1
RTS
Src
Dst
SIFS
NAV(ACK 1)
CTS
SIFS
Back offWindow
NAV(ACK 2)
SIFS
Fragment 2
Ack
1
NAV(Frag 2)
SIFS
SIFS
Fragment 3
Ack
2
Ack
3
Wireless LAN - 47/59
RTS/CTS Usage with
Fragmentation
DIFS
PIFS
SIFS
Other
NAV(RTS)
NAV(Fragment 1)
NAV(CTS)
SIFS
Src
Dst
SIFS
BackoffWindow
NAV(ACK 1)
SIFS
Fragment 1
RTS
CTS
Ack 1
Wireless LAN - 48/59
Distributed Coordination Function -DCF Access Procedure
Directed MPDU Transfer Procedure
Using RTS/CTS (see Page 52)
STA shall use an RTS/CTS exchange for
directed frames only when the length of the
MPDU is greater than the RTS_Threshold (a
managed object within the MAC MIB, 0...
Max MPDU length).
Directed MPDU Transfer Procedure
Without RTS/CTS
Wireless LAN - 49/59
Distributed Coordination Function -DCF Access Procedure
DIFS
Source
Data
SIFS
Destination
ACK
DIFS
Contention
Window
BackoffWindow
Other
Station
Defer Access
Next Frame
Backoff after Defer
Wireless LAN - 50/59
Point Coordination Function(PCF)
The PCF provides contention free services.
It is an option for a station to become the Point
Coordinator(PC), which generates the
Superframe (SF).
Not all stations must be capable of becoming
the PC and transmitting PCF data frames.
The SF consists of a Contention Free (CF)
period and a Contention Period.
The length of a SF is a manageable parameter
and that of the CF period may be variable on a
per SF basis.
Wireless LAN - 51/59
Point Coordination Function(PCF)
Super Frame
Free contention Period
Contention Period
Wireless LAN - 52/59
Point Coordination Function
-- PCF Access Procedure
The PCF protocol is based on a polling
scheme controlled by one special STA per
BSS called the Point Coordinator.
The PC gains control of the medium at the
beginning of the SF and maintains control
for the entire CF period by waiting a shorter
time between transmissions.
CF-Down Frames and CF-UP Frames.
Wireless LAN - 53/59
Point Coordination Function
-- PCF Access Procedure
At the beginning of the SF, the PCF shall
sense the medium. If it is free the PCF
shall wait a PIFS time and transmit
a Data frame with the CF-Poll Subtype bit
set, to the next station on the polling list,
or
a CF-End frame, if a null CF period is
desired.
Wireless LAN - 54/59
Point Coordination Function
-- PCF Access Procedure
 The PCF uses the PCF priority level of the
CSMA/CA protocol. The shorter PIFS gap causes a
burst traffic with inter-frame gaps that are shorter
than the DIFS gap needed by stations using the
Contention period.
 Each station, except the station with the PCF, shall
preset it's NAV to the maximum CF-Period length
at the beginning of every SF. The PCF shall
transmit a CF-End frame, at the end of the CFPeriod, to reset the NAV of all stations in the BSS.
Wireless LAN - 55/59
Point Coordination Function
-- PCF Transfer Procedure
PCF Transfers When the PCF Station is
Transmitter or Recipient
Stations shall respond to the CF-Poll immediately
when a frame is queued, by sending this frame
after an SIFS gap. This results in a burst of
Contention Free traffic (CF-Burst).
For services that require MAC level ack, the ack
is preferably done through the CF-Ack bit in the
Subtype field of the responding CF-Up frame.
Wireless LAN - 56/59
Point Coordination Function
-- PCF Transfer Procedure
Superframe
Contention free period
PIFS
SIFS
SIFS
PIFS
Busy
CF-D1
CF-D2
CF-U1
SIFS
CF-D3
CF-U2
SIFS
CP
SIFS
CF-D4
CF-End
CF-U4
SIFS
Reset NAV
CF-boundary
NAV
Dx = Down Traffic
Ux = Up Traffic
Wireless LAN - 57/59
Point Coordination Function
-- PCF Transfer Procedure
PCF Transfers When the PCF Station is
Neither Transmitter nor Recipient
 A CF-aware station, when polled by the PCF, may
send a Data frame to any station in the BSS an SIFS
period after receiving the CF-Poll.
 If the recipient of this transmission is not the PCF
station, the Data frame is received and acknowledged
in the same manner as a contention-based Data
frame.
 The PCF resumes (CF-Down) transmissions an SIFS
period after the ACK frame. If not acknowledged, a
PIFS period is employed.
Wireless LAN - 58/59
Point Coordination Function
-- PCF Transfer Procedure
Superframe
CFP
PIFS
Busy
SIFS
SIFS
CF-D1
CF-D2
S-To-S ACK
SIFS SIFS
CP
CF-End
CF-U2
SIFS
Reset NAV
CF-boundary
NAV
Dx = Down Traffic
Ux = Up Traffic
Wireless LAN - 59/59