1 Reti di Accesso e di Trasporto (Reti di Accesso) Ing. Stefano Salsano e-mail: [email protected]AA2009/10 – Blocco 7 (v3) 2 Introduction to 802.11 Wireless LANs Introduction to 802.11 Wireless LANs Quote from Matthew Gast - 802.11® Wireless Networks The Definitive Guide – apr. 2005, 2nd edition At this point, there is no way to prevent the spread of Wi-Fi. In the years since the first edition of [his] book, wireless networking has gone from an interesting toy to a must-have technology. […] [Wireless networking] seems poised to continue its march towards the standard method of network connection, replacing "Where's the network jack?" with "Do you have Wi-Fi?" as the question to ask about network access.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
From AP: do we really need 3 addresses?From AP: do we really need 3 addresses?
AP
Distribution system
DASA
BSSID
DA correctly receives frame, and send 802.11 ACK to … BSSID (wireless transmitted)
DA correctly receives frame, and send higher level ACK to … SA (actual transmitter)
28
ESS - Extended Service SetESS - Extended Service Set
AP1
AP2 AP3 AP4
BSS1
BSS2 BSS3 BSS4
ESS: created by merging different BSS through a network infrastructure(possibly overlapping BSS – to offer a continuous coverage area)
Stations within ESS MAY communicate each other via Layer 2 proceduresAPs acting as bridgesMUST be on a same LAN or switched LAN or VLAN (no routers in between)
29
Service Set IDentifier (SSID)Service Set IDentifier (SSID)
• name of the WLAN network
» Plain text (ascii), up to 32 char
• Assigned by the network
administrator
» All BSS in a same ESS have same SSID
• Typically (but not necessarily) is
transmitted in periodic management
frames (beacon)
» Disabling SSID transmission = a (poor!) security mechanism
» Typical: 1 broadcast beacon every 100 ms
(configurable by sysadm)
» Beacon may transmit a LOT of other info (see example – a simple one!)
Tag interpretation: Supported rates: 1,0(B) 2,0(B) 5,5 11,0 [Mbit/sec]
Tag Number: 6 (IBSS Parameter set)
Tag length: 1
Tag interpretation: ATIM window 0x2
Tag Number: 5 ((TIM) Traffic Indication Map)Tag length: 4
Tag interpretation: DTIM count 0, DTIM period 1,
Bitmap control 0x0, (Bitmap suppressed)
30
The concept of Distribution SystemThe concept of Distribution System
“Logical” architecture componentProvides a “service”
DSS = Distribution System Service
Standard does NOT say how it is implemented
Specified only which functions it provides
Association
Disassociation
Reassociation
Integration
Distribution
Association/disassociationRegistration/de-registration of a STA to an APEquivalent to “plugging/unplugging the wire” to a switchDS uses this information to determine which AP send
frames to
Reassociationi.e. handling STA mobility in a same ESS!
DistributionAn AP receives a frame on its air interface (e.g. STA 2)It gives the message to the distribution service (DSS) of the
DSThe DSS has the duty to deliver the frame to the proper
destination (AP)
IntegrationMust allow the connection to non 802.11 LANs
Though, in practice, non 802.11 LANs are Ethernet and no “real portals” are deployed
31
DS, againDS, again
AP1 AP2 AP3
Association
IAPP/proprietary IAPP/proprietary
Distribution system (physical connectivity + logical service support)
MSs in a same ESS need to1) communicate each other
• ACK frame: TX at basic rate» Typically 1 mbps but 2 mbps possible…
» ACK frame duration (1mbps): 304 µµµµs
Preamble SFD PLCP hdr
128 16 48
1 mbps DBPSK
192 µs
(28+payload) [bytes] x 8 / TX_rate [mbps] = µs
PHY ACK 14
192 µs
DATA
ACK
112 µs
49
And when an ACK is “hidden”?And when an ACK is “hidden”?
SENDER RECEIVERSTA
1)Sender TX
Receiver RX
STA defers
BUSY DETECT (DATA)
SENDER RECEIVERSTA
2)Receiver ACKs(after SIFS)
STA cannot hear…
SIFSACK
STASTA TX!DIFS
SENDER RECEIVERSTA
3)STA tranmits
And destroys ACK!
50
The Duration FieldThe Duration Field
Frame
Control
Duration
/ IDAddress 1 Address 2 Address 3
Sequence
ControlAddress 4 Data
Framecheck
sequence
2 2 2 40-23126666
0# microseconds
1514131211109876543210
When bit 15 = 1 � NOT used as duration(used by power-saving frames to specify station ID)
DIFSDATA
SIFS ACK
OTHER
STA
Physical carrier sensing
NAV (data)
• Allows “Virtual Carrier Sensing”» Other than physically sensing the channel, each station keeps a Network
Allocation Vector (NAV)» Continuously updates the NAV according to information read in the duration
field of other frames
Virtual carrier sensing
51
And when a terminal is “hidden”?And when a terminal is “hidden”?
RECEIVERSENDER STA
… this can be “solved” by increasing the sensitiveness of the Carrier Sense…Quite stupid, though (LOTS of side effects – out of the goals of this lecture)
SENDER STA
… this can’t be “solved”
by any means!
RECEIVER
• The Hidden Terminal Problem» SENDER and STA cannot hear each
other
» SENDER transmits to RECEIVER
» STA wants to send a frame
» Not necessarily to RECEIVER…» STA senses the channel IDLE
» Carrier Sense failure
» Collision occurs at RECEIVER
• Destroys a possibly very long TX!!
52
DIFSDATA
SIFS ACK
TX
RX
Packetarrival
RTS
SIFS CTS SIFS
The RTS/CTS solutionThe RTS/CTS solution
TX
RX
hidden
others
RTS
NAV (RTS)
RTS/CTS: carry the amount of time the channel
will be BUSY. Other stations may update a
Network Allocation Vector, and defer TX
even if they sense the channel idle
(Virtual Carrier Sensing)
CTS CTS
NAV (CTS)
(Update NAV)
data
53
RTS/CTS framesRTS/CTS frames
Frame
Control
Duration
/ IDAddress (RA)
Framecheck
sequence
2 2 46
CTS frame: 14 bytes (same as ACK)
Protocol
versionType
2 2
Sub TypeTo
DS
From
DS
More
FragRetry
Pwr
MNG
More
DataWEP Order
4 1 1 1 1 1 1 1 1
0 1Type = Control (01)SubType = CTS (1100)1 1 0 0
Frame
Control
Duration
/ IDAddress 1 (RA)
Framecheck
sequence
2 2 46
RTS frame: 20 bytes
Protocol
versionType
2 2
Sub TypeTo
DS
From
DS
More
FragRetry
Pwr
MNG
More
DataWEP Order
4 1 1 1 1 1 1 1 1
Type = Control (01)SubType = RTS (1011)
Address 2 (TA)
6
0 0 0 0 0 0 0 00 x
0 1 1 0 1 10 0 0 0 0 0 0 00 x
54
RTS/CTS and performanceRTS/CTS and performance
RTS/CTS cons: larger overhead
RTS/CTS pros: reduced collision duration
ESPECIALLY FOR LONG PACKETSLong ���� packet > RTS_Threshold (configurable)
TODAY higher rates � No more significant
55
Issues with “duration” readingIssues with “duration” reading
RX
TXC
• “Duration” field in MAC header» Coded at same rate as payload
» Must receive whole MAC frame correctly
11 Mbps tx
11 mbps
range5.5 mbps
range
2 mbps
range
1 mbps
range
• C cannot read TX frame» No way to know duration value
56
ACK may be hidden once again!ACK may be hidden once again!
RX
TXC
• C hidden from RX» Carrier sense remains IDLE during RX����TX ACK
» NAV could not be updated» May transmit after a DIFS» Destroying ACK!
ACK transm
57
EIFS = protect ACKEIFS = protect ACK
RX
TXC
• C cannot read data frame» CRC32 error» Most of PHY errors
11 Mbps tx
11 mbps
range5.5 mbpsrange
2 mbps
range
1 mbps
range
• If planning to transmit:» No more after a DIFS» But after a LONGER interval of time
» Sufficiently long to protect ACK transmission
58
EIFSEIFS
Data ACKNAV
SourcestationDestination stationOther stations receiving Data frame correctlyOther stationsreceiving Data frameincorectly
DIFSSIFS
EIFSBack- offBack- offBack- off
59
Why backoff?Why backoff?
DIFSDATA
SIFS ACK
STA1
STA2
STA3
DIFS
Collision!
RULE: when the channel is initially sensed BUSY, station defers transmission;
THEN,when channel sensed IDLE again for a DIFS, defer transmission of a
further random time (Collision Avoidance)
60
Slotted BackoffSlotted Backoff
STA2
STA3
DIFS
Extract random number
in range (0, W-1)
Decrement every slot-time σ
w=7
w=5
Note: slot times are not physically delimited on the channel!
Rather, they are logically identified by every STA
Slot-time values: 20µs for DSSS (wi-fi)Accounts for: 1) RX_TX turnaround time
2) busy detect time
3) propagation delay
61
Backoff freezingBackoff freezing
• When STA is in backoff stage:» It freezes the backoff counter as long as the channel is sensed
BUSY
» It restarts decrementing the backoff as the channel is sensed IDLE for a DIFS period
DIFS DATA
SIFS ACK
STATION 1
DIFS
SIFS ACK 6 5
DIFS
Frozen slot-time 4
BUSY medium
STATION 2
DIFS
3 2 1
62
Why backoff betweenconsecutive tx?
Why backoff betweenconsecutive tx?
• A listening station would never find a slot-time after the DIFS (necessary to decrement the backoff counter)
• Thus, it would remain stuck to the current backoff counter valueforever!!
DIFS DATA
SIFS ACK
S 1
DIFS
6 5
DIFS
Frozen slot-time 4
BUSY medium
S 2
DIFS
3
DATA
SIFS ACK
DIFS
BUSY medium DIFS
63
Backoff rulesBackoff rules
• First backoff value:» Extract a uniform random number in range (0,CWmin)
• If unsuccessful TX:» Extract a uniform random number in range (0,2×(CWmin+1)-1)
• If unsuccessful TX:» Extract a uniform random number in range (0,22×(CWmin+1)-1)
• Etc up to 2m×(CWmin+1)-1
Exponential Backoff!
For 802.11b:
CWmin = 31
CWmax = 1023 (m=5)
64
Further backoff rulesFurther backoff rules
• Truncated exponential backoff
» After a number of attempts, transmission fails and frame is dropped
» Backoff process for new frame restarts from CWmin
» Protects against cannel capture
» unlikely when stations are in visibility, but may occur in the case of hidden stations
• Two retry limits suggested:
» Short retry limit (4), apply to frames below a given threshold
» Long retry limit (7), apply to frames above given threshold
» (loose) rationale: short frames are most likely generated by real time stations
» Of course not true in general; e.g. what about 40 bytes TCP ACKs?
If you have understood the previous example, you easilyrealize that 802.11 provides FAIR access to stations in terms of EQUAL NUMBER of transmissionopportunities in the long term!
But this is INDEPENDENT OF transmission speed!
STA1 STA2 STA1 STA1STA2 STA2
76
Computing answer 3Computing answer 3
STA (2mbps) SIFS
ACK
DIFS
Cycle time
STA 11 SIFS
ACK
DIFS
Frozen backoff
RESULT: SAME THROUGHPUT (in the long term)!!
!!!!!!39.1310)5030410(213036304
81500
][]2[]1[
81500
][
][]2[]1[
Mbps
backoffEDIFSACKSIFSTDIFSACKSIFST
timecycleE
payloadEThrThr
MPDUMPDU
=+++++
×=
=++++++++
×=
===
DRAMATIC CONSEQUENCE: throughput is limited by
STA with slowest rate (lower that the maximum throughputachievable by the slow station)!!
77
Performance anomaly into actionPerformance anomaly into action
Why the network issoooo slow today? We’re so Close, we have a 54 mbps and