Upload
dangdiep
View
217
Download
1
Embed Size (px)
Citation preview
Wireless Local Area Networks: Basics, MAC,Headers
Dr. Ramana
I.I.T Rajasthan
Dr. Ramana ( I.I.T Rajasthan ) Wireless Local Area Networks: Basics, MAC, Headers 1 / 34
Outline of the Lectures
1 Overview
2 Wireless LAN Technologies
3 IEEE 802.11 Services
4 IEEE 802.11 Medium Access Control
Dr. Ramana ( I.I.T Rajasthan ) Wireless Local Area Networks: Basics, MAC, Headers 2 / 34
Overview
Introduction
Wireless LANs (WLANs or WiLANs or WiFi-LANs) have samecharacteristics (like limitted distance, shared broadcast medium)of Wired-LANs.But medium is unguided instead of guided.Wireless link characteristics
Decreased signal strength: radio signal attenuates as it propagatesthrough matter (path loss). (Ex. free-space path loss in dB L =20× Log10
4πdλ , i.e., free-space path loss = ( 4πd
λ )2 )Interference from other sources: standardized wireless networkfrequencies (e.g., 2.4 GHz) shared by other devices (e.g.,microwave devices) interfere as well.Multipath propagation: A phenomenon that results in radio signalsreaching the receiving antenna by two or more paths at slightlydifferent times.
Dr. Ramana ( I.I.T Rajasthan ) Wireless Local Area Networks: Basics, MAC, Headers 3 / 34
Overview
WLAN Requirements
Throughput - MAC should be efficient to maximize the capacitySupport for large number of nodesConnection to backbone LANService Area - cover about 100 to 300mBattery power consumption - reduce the power consumptionTransmission robustness and security - vulnerable to interferenceand eavesdroppingCollocated network operations - more than one WLAN in thesame areaLicense-free operations - to cost cuttingHandoff - to enable roamingDynamic configuration - association and disassociation of a nodeshould take place without disruption to other nodes
Dr. Ramana ( I.I.T Rajasthan ) Wireless Local Area Networks: Basics, MAC, Headers 4 / 34
Wireless LAN Technologies
Classification of Wireless Networks
Basic Service Set: A group of stations (fixed or mobile) contolledby a single coordinating entity, Access Point (AP).Distributed System: A system used to interconnect a set of BSSsand integrated LANs to create an Extended Service Set (ESS).Types of wireless configurations
Infrastructure mode - stations can communicate with each otherthrough an AP
WLANs: singlehop transmissions.Mesh Networks: multihop transmissions, have a relatively stabletopology.
Ad-hoc mode - stations can directly communicate with each otherto form an Independent BSS (IBSS) without connectivity to anywired backbone.
Bluetooth ad hoc networks: singlehop transmissionsMobile ad hoc networks: multihop transmissions, topology changesas nodes are mobile, no infrastructure support.
Dr. Ramana ( I.I.T Rajasthan ) Wireless Local Area Networks: Basics, MAC, Headers 5 / 34
Wireless LAN Technologies
High-speed Backbone Wired LAN
(b) Ad hoc LAN
Figure 17.3 Wireless LAN Configurations
(a) Infrastructure Wireless LAN
Cell
Nomadicstation
Dr. Ramana ( I.I.T Rajasthan ) Wireless Local Area Networks: Basics, MAC, Headers 6 / 34
Wireless LAN Technologies
BasicService Set
STA2
STA3
STA = stationAP = access point
STA4 BasicService Set
ExtendedService Set
IEEE 802.11 Architecture
STA6 STA7
Distribution System
IEEE 802.x LAN
STA1
AP
STA5
AP
portal
Dr. Ramana ( I.I.T Rajasthan ) Wireless Local Area Networks: Basics, MAC, Headers 7 / 34
Wireless LAN Technologies
Standards at glance
IEEE 802.3 - Ethernet LANsIEEE 802.5 - Token LANsIEEE 802.11 - Wireless LANsIEEE 802.15 - Personal Area Networks (Bluetooth and Zigbee)IEEE 802.16 - Broadband wireless network (WiMAX)
Dr. Ramana ( I.I.T Rajasthan ) Wireless Local Area Networks: Basics, MAC, Headers 8 / 34
Wireless LAN Technologies
(Cont.)
802.11a - 54 Mbps standard, 5 GHz signaling (ratified 1999)802.11b - 11 Mbps standard, 2.4 GHz signaling (1999)802.11e - Quality of Service (QoS) support (not yet ratified)802.11g - 54 Mbps standard, 2.4 GHz signaling (2003)802.11i- security improvements for the 802.11 family (2004)802.11n - OFDM version at 248 Mbps; MIMO version up to 600Mbps (formally voted into the standard in September 2009!)802.11u - internetworking with 3G / cellular and other forms ofexternal networks
Dr. Ramana ( I.I.T Rajasthan ) Wireless Local Area Networks: Basics, MAC, Headers 9 / 34
IEEE 802.11 Services
Services
Station services - implemented in every 802.11 station includingAPs.
Delivery of dataAuthentication and deauthenticationPrivacy
Distribution Services - provided between BSSs; Implemented ineither AP or any other special purpose device.
Association - Association between AP and a stationDisassociation - association terminationReassociation - association with AP in another BSSDistribution - data transfer between BSSsIntegration - data transfer between 802.11 and 802.x
Dr. Ramana ( I.I.T Rajasthan ) Wireless Local Area Networks: Basics, MAC, Headers 10 / 34
IEEE 802.11 Medium Access Control
Protocol Architecture
PointCoordination
Function (PCF)
Contention-freeservice
Contentionservice
IEEE 802.11 Protocol Architecture
MACLayer
Distributed Coordination Function
Logical Link Control
(DCF)
2.4-Ghzfrequency-
hoppingspread
spectrum1 Mbps2 Mbps
2.4-Ghzdirect-
sequencespread
spectrum1 Mbps2 Mbps
2.4-Ghzdirect
sequencespread
spectrum5.5 Mbps11 Mbps
2.4-GhzDS-SS
6, 9, 12,18, 24, 36,
48, 54 Mbps
Infrared1 Mbps2 Mbps
IEEE 802.11 IEEE 802.11a IEEE 802.11b
5-Ghzorthogonal
FDM6, 9, 12,
18, 24, 36,48, 54 Mbps
IEEE 802.11g
Dr. Ramana ( I.I.T Rajasthan ) Wireless Local Area Networks: Basics, MAC, Headers 11 / 34
IEEE 802.11 Medium Access Control
(Cont.)
Dr. Ramana ( I.I.T Rajasthan ) Wireless Local Area Networks: Basics, MAC, Headers 12 / 34
IEEE 802.11 Medium Access Control
MAC
FunctionalityReliable data deliveryFairly control accessProtection of data
DealsNoisy and unreliable mediumFrame exchange protocol - ACK (unlike in IEEE 802.3)Hidden Node Problem - RTS/CTS
Dr. Ramana ( I.I.T Rajasthan ) Wireless Local Area Networks: Basics, MAC, Headers 13 / 34
IEEE 802.11 Medium Access Control
Hidden Node Problem
Hidden node problem
Wireless stations havetransmission ranges and notall stations are within radiorange of each other.Simple CSMA will not work.While C is transmiting to B, Afalsely conclude that thechannel is idle, as it will nothear C’s transmission.
Dr. Ramana ( I.I.T Rajasthan ) Wireless Local Area Networks: Basics, MAC, Headers 14 / 34
IEEE 802.11 Medium Access Control
Exposed Node Problem
Exponsed node problem
This is the inverse problem.B wants to send to A andlistens to the channel.B hears C’s transmission (toD), B falsely assumes that itstransmission interfer with C’stranmission.
Dr. Ramana ( I.I.T Rajasthan ) Wireless Local Area Networks: Basics, MAC, Headers 15 / 34
IEEE 802.11 Medium Access Control
CSMA/CA (Collision Avoidance)
Collision detection is not possibleDifficult to receive (sense collisions) when transmitting due to weakreceived signals (fading)Can’t sense all collisions in any case: hidden terminal, fading
CSMA/CA operation:1-Persistent physical carrier sensing - Mandatory (like in Ethernet)Virtual carrier sensing - Optional
Mode of operationOnly physical CS: DATA - ACKBoth physical and virtual CS - RTS-CTS-DATA-ACK
Dr. Ramana ( I.I.T Rajasthan ) Wireless Local Area Networks: Basics, MAC, Headers 16 / 34
IEEE 802.11 Medium Access Control
MAC LogicWait for frame
to transmit
Wait IFS
IEEE 802.1 1 Medium Access Control Logic
No
Yes
Yes
Yes
No
No
Wait IFS
Mediumidle?
Stillidle?
Wait until currenttransmission ends
Exponential backoffwhile medium idle
Transmit frame
Transmit frame
Stillidle?
Dr. Ramana ( I.I.T Rajasthan ) Wireless Local Area Networks: Basics, MAC, Headers 17 / 34
IEEE 802.11 Medium Access Control
(Cont.)
1 Station with frame senses medium2 If idle, wait to see if remains idle for one DIFS.
If so, may transmit immediately3 If busy (either initially or becomes busy during DIFS)
Station defers transmission and continue to monitor until currenttransmission is overOnce current transmission is over, delay another DIFSIf remains idle, back off random time and again senseIf medium still idle, station may transmitDuring backoff time, if becomes busy, backoff timer is halted andresumes when medium becomes idleTo ensure stability, binary exponential backoff used
Dr. Ramana ( I.I.T Rajasthan ) Wireless Local Area Networks: Basics, MAC, Headers 18 / 34
IEEE 802.11 Medium Access Control
Binary Exponential Backoff Algorithm
Contention window (cw) of size 0 < cwminx ≤ cwmax
Generate a random number, r , from [0 . . . 2cwmin − 1]r represents number of slots to be deferred medium accessfor every successive ack loss - cwmin → cwmin + 1Default values for cwmin = 5 and cwmax = 10.Defines limits for the number of MAC retries for different types ofpackets.Short retry limit (7) for a control frame or a short frame smallerthan the RTSThreshold is retransmitted.Long retry limit (4) when a long packet frame is retransmitted.If retry count reaches their respective limits the frame isautomatically discarded.
Dr. Ramana ( I.I.T Rajasthan ) Wireless Local Area Networks: Basics, MAC, Headers 19 / 34
IEEE 802.11 Medium Access Control
MAC Timing
Defer access
DIFS
Immediate accesswhen medium is free
longer than DIFS
SIFS
PIFS
DIFS
Busy Medium Next frameBackoff window
Contention window
Slot time
Select slot using binary exponential backoff
(a) Basic Access Method
time
PCF (optional)
Contention-freeperiod
Variable length(per superframe)
Busy medium PCF (optional)DCF
Contention period
Superframe (fixed nominal length)
Superframe (fixed nominal length)
Foreshortened actualsuperframe period
PCFdefers
CF-Burst;asynchronoustraffic defers
(b) PCF Superframe Construction
IEEE 802.11 MAC TimingDr. Ramana ( I.I.T Rajasthan ) Wireless Local Area Networks: Basics, MAC, Headers 20 / 34
IEEE 802.11 Medium Access Control
DCF in detail
Dr. Ramana ( I.I.T Rajasthan ) Wireless Local Area Networks: Basics, MAC, Headers 21 / 34
IEEE 802.11 Medium Access Control
Timings in IEEE 802.11
Interframe spacing (IFS) - to introduce priority among the transmissions andstations.SIFS - Short Interframce Space - The nominal time (in µsec) that the MAC andPHY will require to receive the last symbol of a frame at the air interface, processthe frame, and respond with the first symbol on the air interface of the earliestpossible response frame.SIFS time in µsec, aSIFS = aRxRFDelay + aRxPLCPDelay +aMACProcessingDelay + aRxTxTurnaroundTime.aSlotTime = aCCATime + aRxTxTurnaroundTime + aAirPropagationTime +aMACProcessingDelay. (Slottime is the time that is good enough to determinethe transmission, if any, made by other station that accessed medium at thebegining of the previous slot).aCCATime - The minimum time (in microseconds) the CCA mechanism hasavailable to assess the medium within every time slot to determine whether themedium is busy or idle.aAirPropagationTime = Twice the propagation time (in microseconds) for asignal to cross the maximum distance between the most distant allowable STAsthat are slot synchronized.
Dr. Ramana ( I.I.T Rajasthan ) Wireless Local Area Networks: Basics, MAC, Headers 22 / 34
IEEE 802.11 Medium Access Control
(Cont.)
PCF-IFS time in µsec, aPIFS = aSIFS + SlotTimeDCF-IFS time in µsec, aDIFS = aSIFS + 2×SlotTimeEIFS - Extended IFS - Used when a node senses an idle mediumfollowing reception of an erronesous frame (incompleteframe/incorrect FCS), however to defer access for a longer periodin order to avoid collision with future packets that belong to thecurrent dialog.aEIFS = aSIFSTime + (8 x ACKSize) + aPreambleLength +aPLCPHeaderLngth + aDIFS.Relation: SIFS < PIFS < DIFS < EIFSExample -
802.11a 802.11bSlotTime 9 µsec 20 µsec
SIFS 16 µsec 10 µsecPIFS 25 µsec 30 µsecDIFS 34 µsec 50 µsec
Dr. Ramana ( I.I.T Rajasthan ) Wireless Local Area Networks: Basics, MAC, Headers 23 / 34
IEEE 802.11 Medium Access Control
How nodes selects their Access points? - Association
Before a node is allowed to send a data message via an AP, itshall first become associated with the AP.The technique for selecting an AP is called active or passivescanning.Active scanning
1 The node sends a Probe frame.2 All APs within reach reply with a Probe Response frame.3 The node selects one of the access points and sends that AP an
Association Request frame.4 The AP replies with an Association Response frame.
Passive scanningAPs periodically send a Beacon frame that advertises thecapabilities (ex. transmission rates supported) of the access point.A node can change to this AP based on the Beacon frame simply bysending it an Association Request frame back to the access point.
At any given instant, a node may be associated with no more thanone AP.
Dr. Ramana ( I.I.T Rajasthan ) Wireless Local Area Networks: Basics, MAC, Headers 24 / 34
IEEE 802.11 Medium Access Control
Disassociation/Reassociation
Disassociation - can be iniated by either AP or nodeAPs may need to disassociate nodes to enable the AP to beremoved from a network for service or for other reasons.Nodes shall attempt to disassociate when they leave a network.Disassociation is a notification, not a request. Disassociationcannot be refused by either party to the association.
ReassociationThe reassociation service is invoked to “move” a currentassociation from one AP to another.This keeps the DS informed of the current mapping between APand STA as the STA moves from BSS to BSS within an ESS.Reassociation also enables changing association attributes of anestablished association while the STA remains associated with thesame AP.Reassociation is always initiated by the mobile STA.
Dr. Ramana ( I.I.T Rajasthan ) Wireless Local Area Networks: Basics, MAC, Headers 25 / 34
IEEE 802.11 Medium Access Control
Framing in 802.11
Physical Layer - Responsible to the transmission of data over medium (RF)under the control of PMD as directed by the PLCP.
Physical Layer Convergence Procedure SublayerPhysical Medium Dependent Sublayer - takes the binary bits ofinformation from PLCP-PDU (PPDU) and transform them into RFsignals using carrier modulation and transmission techniques.Example, in 802.11b, Frequency band - 2.4 GHz, modulations -DBPSK, DQPSK, Complementary code keying (CCK) etc.,transmission technique - DSSS
MAC - which is responsible to arbiterate accesses to the medium - alsoresponsible for preparing MPDUs (MAC-PDU) or frames, which consist thefollowing basic components.
A MAC header, which comprises frame control, duration, address,and sequence control information, and, for QoS data frames, QoScontrol information;A variable length frame body, which contains information specific tothe frame type and subtype;A FCS, which contains an IEEE 32-bit CRC.Dr. Ramana ( I.I.T Rajasthan ) Wireless Local Area Networks: Basics, MAC, Headers 26 / 34
IEEE 802.11 Medium Access Control
PPDU in 802.11b
Signal
8−bits
Length CRC
8−bits16−bits
SFD
128−bits
Sync
PSDU
Reserved
Preamble PLCP Header
16−bits8/16−bits
PPDU
1 Mbps DBPSK
SYNC - bitsteam that help receive to synchronize the clock prior toreceive the frameSFD - Indiacate the begining of frame F3A0Signal - Type of modulation to be used to receive the rest of PPDULength - Total frame lengthCRC - Protection to the PLCP headerLong and short preambles
Dr. Ramana ( I.I.T Rajasthan ) Wireless Local Area Networks: Basics, MAC, Headers 27 / 34
IEEE 802.11 Medium Access Control
Protocol Version Frame Type and
Sub Type To DS and From
DS More Fragments Retry Power
Management More Data WEP Order
FCDuration
/IDAddress
1Address
2Address
3Sequence
ControlAddress
4DATA FCS
2 2 6 6 6 2 6 0-2312 4 bytes
NAV information OR Short Id for PS-Poll
BSSID –BSS Identifier
TA - Transmitter RA - Receiver SA - Source DA - Destination
IEEE 48 bit address
Individual/Group Universal/Local 46 bit address
Sequence Number – 12 bit
Fragment Number – 4 bit
CRC-32 Polynomial
Upper layer data
802.11 MAC Frame
Dr. Ramana ( I.I.T Rajasthan ) Wireless Local Area Networks: Basics, MAC, Headers 28 / 34
IEEE 802.11 Medium Access Control
Address Fields
IEEE 48bit address comprises three fields:single-bit Individual/Group field: When set to 1, the address is thatof a group. if all bit are 1, that means broadcast.single-bit Universal/Local bit; when zero, the address is global andunique, otherwise it may no be unique and locally administered.
46bit address fieldsBSS Identifier (BSSID): unique identifier for a particular BSS. In aninfrastructure BSSID it is the MAC address of the AP. In IBSS, it israndom and locally administered by the starting station. This alsogive uniqueness. In the probe request frame and group addresscan be used.Transmitter Address (TA): MAC address of the station that transmitthe frame to the wireless medium. Always an individual address.Receiver Address (RA)Source Address (SA)Destination Address (DA)
Dr. Ramana ( I.I.T Rajasthan ) Wireless Local Area Networks: Basics, MAC, Headers 29 / 34
IEEE 802.11 Medium Access Control
(Cont.)
Function To DS From DS Address 1 Address 2 Address 3 Address 4IBSS 0 0 RA=DA SA BSSID N/A
From the AP 0 1 RA=DA BSSID SA N/ATo the AP 1 0 RA=BSSID SA DA N/A
Wireless DS 1 1 RA TA DA SA
Dr. Ramana ( I.I.T Rajasthan ) Wireless Local Area Networks: Basics, MAC, Headers 30 / 34
IEEE 802.11 Medium Access Control
Frame Subtypes
RTS CTS ACK PS-Poll CF-End & CF-End
ACK
Data Data+CF-ACK Data+CF-Poll Data+CF-ACK+CF-
Poll Null Function CF-ACK (nodata) CF-Poll (nodata) CF-ACK+CF+Poll
Beacon Probe Request & Response Authentication Deauthentication Association Request &
Response Reassociation Request &
Response Disassociation Announcement Traffic
Indication Message (ATIM)
CONTROL DATA MANAGEMENT
Dr. Ramana ( I.I.T Rajasthan ) Wireless Local Area Networks: Basics, MAC, Headers 31 / 34
IEEE 802.11 Medium Access Control
Control Frames
Assist in reliable data deliveryPower Save-Poll (PS-Poll)
Sent by any station to station that includes APRequest AP transmit frame buffered for this station while station inpower-saving mode
Request to Send (RTS)First frame in four-way frame exchange
Clear to Send (CTS)Second frame in four-way exchange
Acknowledgment (ACK)Contention-Free (CF)-end
Announces end of contention-free period part of PCFCF-End + CF-Ack:
Acknowledges CF-endEnds contention-free period and releases stations from associatedrestrictions
Dr. Ramana ( I.I.T Rajasthan ) Wireless Local Area Networks: Basics, MAC, Headers 32 / 34
IEEE 802.11 Medium Access Control
Data Frames-Data Carrying
Eight data frame subtypes, in two groupsFirst four carry upper-level data from source station to destinationstationData
Simplest data frameMay be used in contention or contention-free period
Data + CF-AckOnly sent during contention-free periodCarries data and acknowledges previously received data
Data + CF-PollUsed by point coordinator to deliver dataAlso to request station send data frame it may have buffered
Data + CF-Ack + CF-PollCombines Data + CF-Ack and Data + CF-Poll
Dr. Ramana ( I.I.T Rajasthan ) Wireless Local Area Networks: Basics, MAC, Headers 33 / 34
IEEE 802.11 Medium Access Control
Data Frames NO Data Carrying
Remaining four data frames do not carry user dataNull Function
Carries no data, polls, or acknowledgmentsCarries power management bit in frame control field to APIndicates station is changing to low-power state
Other three frames (CF-Ack, CF-Poll, CF-Ack + CF-Poll) same ascorresponding frame in preceding list (Data + CF-Ack, Data +CF-Poll, Data + CF-Ack + CF-Poll) but without data
Dr. Ramana ( I.I.T Rajasthan ) Wireless Local Area Networks: Basics, MAC, Headers 34 / 34