Lecture 3.0. Introduction to Wireless LANs

Similar documents
Introduction to Wireless LANs

Introduction. Giuseppe Bianchi, Ilenia Tinnirello

Mobile & Wireless Networking. Lecture 7: Wireless LAN

4.3 IEEE Physical Layer IEEE IEEE b IEEE a IEEE g IEEE n IEEE 802.

Computer Networks. Wireless LANs

Wireless LANs. ITS 413 Internet Technologies and Applications

Basic processes in IEEE networks

ICE 1332/0715 Mobile Computing (Summer, 2008)

Data Communications. Data Link Layer Protocols Wireless LANs

IEEE WLANs (WiFi) Part II/III System Overview and MAC Layer

Chapter 6 Medium Access Control Protocols and Local Area Networks

standard. Acknowledgement: Slides borrowed from Richard Y. Yale

Introduction to IEEE

Page 1. Outline : Wireless Networks Lecture 11: MAC. Standardization of Wireless Networks. History. Frequency Bands

Topics for Today. More on Ethernet. Wireless LANs Readings. Topology and Wiring Switched Ethernet Fast Ethernet Gigabit Ethernet. 4.3 to 4.

Chapter 6 Wireless and Mobile Networks. Csci 4211 David H.C. Du

ECE442 Communications Lecture 3. Wireless Local Area Networks

Mohamed Khedr.

3.1. Introduction to WLAN IEEE

original standard a transmission at 5 GHz bit rate 54 Mbit/s b support for 5.5 and 11 Mbit/s e QoS

WiFi Networks: IEEE b Wireless LANs. Carey Williamson Department of Computer Science University of Calgary Winter 2018

Mobile Communications Chapter 7: Wireless LANs

Lesson 2-3: The IEEE x MAC Layer

Lecture 16: QoS and "

Actual4Test. Actual4test - actual test exam dumps-pass for IT exams

Data and Computer Communications. Chapter 13 Wireless LANs

Overview : Computer Networking. Spectrum Use Comments. Spectrum Allocation in US Link layer challenges and WiFi WiFi

Guide to Wireless Communications, Third Edition. Objectives

IEEE Wireless LANs

04/11/2011. Wireless LANs. CSE 3213 Fall November Overview

CS 348: Computer Networks. - WiFi (contd.); 16 th Aug Instructor: Sridhar Iyer IIT Bombay

Mobile Communications Chapter 7: Wireless LANs

IEEE MAC Sublayer (Based on IEEE )

CSMC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. Fall 2018 CMSC417 Set 1 1

Wireless Protocols. Training materials for wireless trainers

Local Area Networks NETW 901

IEEE Technical Tutorial. Introduction. IEEE Architecture

WLAN (802.11) Nomadic Communications. Renato Lo Cigno - Tel: Dipartimento di Ingegneria e Scienza dell Informazione

Introduction to Wireless Networking CS 490WN/ECE 401WN Winter Lecture 4: Wireless LANs and IEEE Part II

Announcements : Wireless Networks Lecture 11: * Outline. Power Management. Page 1

Introduction to Wireless LAN

Internet Protocol Stack

Wireless Networked Systems

IEEE WLAN (802.11) Copyright. Nomadic Communications

Chapter 7: Wireless LANs

Chapter 7: Wireless LANs

Nomadic Communications WLAN MAC Fundamentals

MAC in /20/06

Wireless# Guide to Wireless Communications. Objectives

Vehicle Networks. Wireless Local Area Network (WLAN) Univ.-Prof. Dr. Thomas Strang, Dipl.-Inform. Matthias Röckl

Advanced Computer Networks WLAN

MAC. Fall Data Communications II 1

Analysis of IEEE e for QoS Support in Wireless LANs

Wireless Local Area Networks (WLANs) Part I

CSCD 433 Network Programming Fall Lecture 7 Ethernet and Wireless

Wireless Communication Session 4 Wi-Fi IEEE standard

Wireless Networking & Mobile Computing

MSIT 413: Wireless Technologies Week 8

Local Area Networks. Lecture 17 Fall Token Ring and FDDI

IEEE Wireless LANs Part I: Basics

Mobile Communications Chapter 7: Wireless LANs

Page 1. Wireless LANs: Design Requirements. Evolution. EEC173B/ECS152C, Winter Wireless LANs

Multiple Access in Cellular and Systems

Wireless and Mobile Networks

CSC344 Wireless and Mobile Computing. Department of Computer Science COMSATS Institute of Information Technology

Optional Point Coordination Function (PCF)

Wireless Communications

Mobile Communications Chapter 7: Wireless LANs

Lecture 25: CSE 123: Computer Networks Alex C. Snoeren. HW4 due NOW

WLAN 1 IEEE Basic Connectivity. Manuel Ricardo. Faculdade de Engenharia da Universidade do Porto

Wireless Communication

Wireless LANs. Outline. Outline II. Benefits Applications Technologies Issues Configurations Overview of Standard

Computer Communication III

Master thesis 60 credits

WLAN 1 IEEE Manuel Ricardo. Faculdade de Engenharia da Universidade do Porto

Multiple Access Links and Protocols

Wireless Local Area Networks. Networks: Wireless LANs 1

Mohammad Hossein Manshaei 1393

CHAPTER 8: LAN Standards

Hands-On Exercises: IEEE Standard

WiFi Overview. 2/14/2005 Pietrosemoli 1

Outline. CS5984 Mobile Computing. IEEE 802 Architecture 1/7. IEEE 802 Architecture 2/7. IEEE 802 Architecture 3/7. Dr. Ayman Abdel-Hamid, CS5984

Lecture 24: CSE 123: Computer Networks Stefan Savage. HW4 due NOW

Overview. Wireless networks basics IEEE (Wi-Fi) a/b/g/n ad Hoc MAC protocols ad Hoc routing DSR AODV

Certified Wireless Network Administrator (CWNA) PW Chapter Medium Access. Chapter 8 Overview

Laboratory of Nomadic Communication. Quick introduction to IEEE

Medium Access Control Sublayer

MAC. OSI Layer 2 (Data Link) OSI Layer 1 (Physical)

Investigation of WLAN

Medium Access Control. MAC protocols: design goals, challenges, contention-based and contention-free protocols

WLAN Technology: LAN: a review WLAN: applications & key parameters. protocol architectures

Unit 7 Media Access Control (MAC)

Outline / Wireless Networks and Applications Lecture 9: Wireless LANs Aloha and 802 Wireless. Regular Ethernet CSMA/CD

02/21/08 TDC Branch Offices. Headquarters SOHO. Hot Spots. Home. Wireless LAN. Customer Sites. Convention Centers. Hotel

Wireless LAN -Architecture

Wireless Local Area Networks (WLANs)) and Wireless Sensor Networks (WSNs) Computer Networks: Wireless Networks 1

Chapter 3.1 Acknowledgment:

CSC344 Wireless and Mobile Computing. Department of Computer Science COMSATS Institute of Information Technology

Chapter 6 Wireless and Mobile Networks

Topic 2b Wireless MAC. Chapter 7. Wireless and Mobile Networks. Computer Networking: A Top Down Approach

Transcription:

Lecture 3.0 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. WLAN history Original goal: Deploy wireless Ethernet First generation proprietary solutions (end 80, begin 90): WaveLAN (AT&T) HomeRF (Proxim) Abandoned by major chip makers (e.g. Intel: dismissed HomeRF in april 2001) IEEE 802.11 Committee formed in 1990 Charter: specification of MAC and PHY for WLAN First standard: june 1997 1 and 2 Mbps operation Reference standard: september 1999 Multiple Physical Layers Two operative Industrial, Scientific & Medical (ISM) shared unlicensed band» 2.4 GHz: Legacy; 802.11b/g» 5 GHz: 802.11a 1999: Wireless Ethernet Compatibility Alliance (WECA) certification Later on named Wi-Fi Boosted 802.11 deployment!! 1

WLAN data rates Legacy 802.11 Work started in 1990; standardized in 1997 1 mbps & 2 mbps The 1999 revolution: PHY layer impressive achievements 802.11a: PHY for 5 GHz published in 1999 Products available since early 2002 802.11b: higher rate PHY for 2.4 GHz Published in 1999 Products available since 1999 Interoperability tested (wifi) 2003: extend 802.11b 802.11g: OFDM for 2.4 GHz Published in june 2003 Products available, though no extensive interoperability testing yet Backward compatibility with 802.11b Wi-Fi Ongoing standardization effort: 802.11n Launched in september 2003 Minimum goal: 108 Mbps (but higher numbers considered) Standard 802.11 legacy 802.11b "802.11b+" non-standard 802.11a 802.11g Transfer Method FHSS, DSSS, IR DSSS, HR- DSSS DSSS, HR- DSSS, (PBCC) OFDM DSSS, HR- DSSS, OFDM Freq. Band 2.4 GHz, IR 2.4 GHz 2.4 GHz 5.2, 5.5 GHz 2.4 GHz Data Rates Mbps 1, 2 1, 2, 5.5, 11 1, 2, 5.5, 11, 22, 33, 44 6, 9, 12, 18, 24, 36, 48, 54 1, 2, 5.5, 11; 6, 9, 12, 18, 24, 36, 48, 54 Why multiple rates? Adaptive (?) coding/modulation Example: 802.11a case 2

PHY distance/rate tradeoffs (open office) Distance (m) 140.0 120.0 100.0 80.0 60.0 40.0 5 GHz OFDM (.11a) 2.4 GHz OFDM (.11g) 2.4 GHz (.11b) 20.0 0.0 1Mbps 5.5Mbps 6Mbps 11Mbps 12Mbps 24Mbps 36Mbps 54Mbps Coverage performance Cisco Aironet 350 Access Point 11 Mb/s DSS from ~30 to ~45 mt Configurable TX power: 50, 30, 20, 5, 1 mw (100 mw outside Europe) 5.5 Mb/s DSS from ~45 to ~76 mt 2 Mb/s DSS from ~76 to ~107 mt Greater TX power, faster battery consumptions! Question: how to select transmission rate? (STA does not explicitly know its distance from AP) More later (implementation-dependent ) 3

WLAN NIC addresses Same as Ethernet NIC 48 bits = 2 + 46 Ethernet & WLAN addresses do coexist undistinguishable, in a same (Layer-2) network role of typical AP = bridge» (to be precise: when the AP act as portal in 802.11 nomenclature) 802 IEEE 48 bit addresses 1 bit = individual/group 1 bit = universal/local 46 bit address C:>arp -a 192.168.1.32 00-0a-e6-f8-03-ad dinamico 192.168.1.43 00-06-6e-00-32-1a dinamico 192.168.1.52 00-82-00-11-22-33 dinamico AP AP 192.168.1.32 00:0a:e6:f8:03:ad 192.168.1.43 00:06:6e:00:32:1a 192.168.1.52 00:82:00:11:22:33 Protocol stack 802.11: just another 802 link layer LLC 802.2 Logical Link DATA LINK LAYER LLC sublayer 802 overview & architecture MAC 802.1 management & bridging 802.3 MAC 802.3 PHY 802.11 FSSS PHY 802.11 DSSS PHY 802.11 MAC 802.11a OFDM PHY 802.11b HR-DSSS PHY 802.11g Extended Rate PHY DATA LINK LAYER MAC sublayer PHYSICAL LAYER 4

802.11 MAC Data Frame MAC header: - 28 bytes (24 header + 4 FCS) or - 34 bytes (30 header + 4 FCS) PHY IEEE 802.11 Data 0-2312 FCS Frame Duration / ID Address 1 Address 2 Address 3 Sequence Address 4 Data Frame check sequence 2 2 6 6 6 2 6 0-2312 4 Protocol version Type Sub Type info 2 2 12 Fragment Sequence number number 4 12 To From More Sub Type DS DS Frag Retry Pwr More WEP Order MNG Data 4 1 1 1 1 1 1 1 1 DETAILS AND EXPLANATION LATER ON Encapsulation 802.11 MAC frame: no type field (such as Ethernet II)!! LLC encapsulation mandatory Identical To 802.3/LLC encapsulation 5

Why Ethernet Tunnel? (just needed in very special cases: : IPX, AARP) DESC SRC Len AAAA 03 00.00.00 Type P ETH/802.11 bridge DESC SRC Type P????? DESC SRC Len AAAA 03 00.00.00 Type P 802.11/ETH bridge Some protocols MUST have this Encapsulation: -Novell IPX (Type 0x8137) - Apple-Talk ARP (Type 0x80F3) Handling 802.11 frames Radio Radio Hardware Hardware PC-Card PC-Card Hardware Hardware 802.11 frame format WMAC controller with WMAC controller with Station Firmware Station Firmware (WNIC-STA) (WNIC-STA) 802.3 frame format Driver Driver Software Software (STADr) (STADr) STA Platform Platform Computer Computer Ethernet V2.0 / 802.3 frame format Protocol Stack Protocol Stack Ethernet-like driver interface supports virtually all protocol stacks Maximum Data limited to 1500 octets Frame translation IEEE Std 802.1H IEEE 802.3 frames: translated to 802.11 Ethernet Types 8137 (Novell IPX) and 80F3 (AARP) encapsulated via Ethernet Tunnel All other Ethernet Types: encapsulated via RFC 1042 SNAP AP Radio Radio Hardware Hardware PC-Card PC-Card Hardware Hardware 802.11 frame format WMAC controller with WMAC controller with Access Point Firmware Access Point Firmware (WNIC-AP) (WNIC-AP) 802.3 frame format Bridge Driver Bridge Driver Software Software Software Software (APDr) (APDr) Ethernet V2.0 / 802.3 frame format Kernel Software (APK) Kernel Software (APK) Transparent bridging to Ethernet Ethernet Ethernet Interface Interface Bridge Bridge Hardware Hardware 6

Lecture 3.1 802.11 Network Architecture And related addressing group of Basic Service Set (BSS) of stations that can communicate with each other Infrastructure BSS or, simply, BSS Stations connected through AP Typically interconnetted to a (wired) network infrastructure Network infrastructure Independent BSS (IBSS) Stations communicate directly with each other Smallest possible IBSS: 2 STA IBSS set up for a specific purpose and for short time (e.g. meeting) That s why they are also called ad hoc networks AP 7

Frame Forwarding in a BSS Network infrastructure AP BSS: AP = relay function No direct communication allowed! IBSS: direct communication between all pairs of STAs Why AP = relay function? Management: Mobile stations do NOT neet to maintain neighbohr relationship with other MS in the area But only need to make sure they remain properly associated to the AP Association = get connected to (equivalent to plug-in a wire to a bridge ) Power Saving: APs may assist MS in their power saving functions by buffering frames dedicated to a (sleeping) MS when it is in PS mode Obvious disadvantage: use channel bandwidth twice 8

Addressing in IBSS (ad hoc) SA DA Frame Duration / ID Address 1 DA Address 2 SA Address 3 BSSID Sequence SA = Source Address DA = Destination Address BSSID = Basic Service Set IDentifier used for filtering frames at reception (does the frame belong to OUR cell?) format: 6 bytes random MAC address with Universal/Local bit set to 1 Data FCS Addressing in a BSS? AP SA X DA 9

Addressing in a BSS! AP Distribution system SA DA Frame must carry following info: 1) Destined to DA 2) But through the AP What is the most general addressing structure? Addressing in a BSS (to( AP) Distribution system AP BSSID Address 2 = wireless Tx Address 1 = wireless Rx Address 3 = dest BSSID = AP MAC address SA DA Frame Duration / ID Address 1 BSSID Address 2 SA Address 3 DA Sequence Data FCS Protocol Type version 2 2 To From More Sub Type DS DS Frag Retry Pwr More WEP Order MNG Data 4 1 1 1 1 1 1 1 1 1 0 10

Addressing in a BSS (from( AP) AP BSSID Distribution system Address 2 = wireless Tx Address 1 = wireless Rx Address 3 = src SA DA Frame Duration / ID Address 1 DA Address 2 BSSID Address 3 SA Sequence Data FCS Protocol Type version 2 2 To From More Sub Type DS DS Frag Retry Pwr More WEP Order MNG Data 4 1 1 1 1 1 1 1 1 0 1 From AP: do we really need 3 addresses? Distribution system AP BSSID SA DA 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) 11

Extended Service Set BSS1 AP1 BSS2 BSS3 BSS4 AP2 AP3 AP4 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 procedures APs acting as bridges MUST be on a same LAN or switched LAN or VLAN (no routers in between) 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!) IEEE 802.11 wireless LAN management frame Fixed parameters (12 bytes) Timestamp: 0x00000109EAB69185 Beacon Interval: 0,102400 [Seconds] Capability Information: 0x0015............1 = ESS capabilities: Transmitter is an AP...........0. = IBSS status: Transmitter belongs to a BSS......... 01.. = CFP participation capabilities: Point coordinator at AP for delivery and polling (0x0001).........1... = Privacy: AP/STA can support WEP........0.... = Short Preamble: Short preamble not allowed.......0..... = PBCC: PBCC modulation not allowed...... 0...... = Channel Agility: Channel agility not in use....0........ = Short Slot Time: Short slot time not in use..0.......... = DSSS-OFDM: DSSS-OFDM modulation not allowed Tagged parameters Tag Number: 0 (SSID parameter set) Tag length: 4 Tag interpretation: WLAN Tag Number: 1 (Supported Rates) Tag length: 4 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) 12

The concept of Distribution System Logical architecture component Provides 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/disassociation Registration/de-registration of a STA to an AP Equivalent to plugging/unplugging the wire to a switch DS uses this information to determine which AP send frames to Reassociation i.e. handling STA mobility in a same ESS! Distribution An AP receives a frame on its air interface (e.g. STA 2) It gives the message to the distribution service (DSS) of the DS The DSS has the duty to deliver the frame to the proper destination (AP) Integration Must allow the connection to non 802.11 LANs Though, in practice, non 802.11 LANs are Ethernet and no real portals are deployed MSs in a same ESS need to 1) communicate each other 2) move through the ESS DS, again Distribution system (physical connectivity + logical service support) AP1 AP2 AP3 IAPP/proprietary IAPP/proprietary Association Typical implementation (media) Switched Ethernet Backbone But alternative Distribution Medium are possible E.g. Wireless Distribution System (WDS) Implementation duties an AP must inform other APs of associated MSs MAC addresses Standardization From 1997: tentative to standardize an IAPP Finalized as working practice standard in 802.11F (june 2003) Nobody cared! Plenty of proprietary solutions Must use APs from same vendor in whole ESS Current trends (2004+): Centralized solutions (see Aruba, Cisco, Colubris) Include centralized management, too! Current attempt: convergence to CAPWAP? 13

Addressing in an ESS Same approach!! Works in general, even if DA in different BSS Distribution System AP AP BSSID#1 DA DA SA (unprecise! No portal here) idea: DS will be able to forward frame to dest (either if fixed or wireless MAC) Frame Duration / ID Address 1 BSSID#1 Address 2 SA Address 3 DA Sequence Data FCS Protocol Type version 2 2 To From More Sub Type DS DS Frag Retry Pwr More WEP Order MNG Data 4 1 1 1 1 1 1 1 1 1 0 Addressing in an ESS Same approach!! Works in general, even if DA in different BSS Distribution System AP AP BSSID#2 SA DA DA Frame Duration / ID Address 1 DA Address 2 BSSID#2 Address 3 SA Sequence Data FCS Protocol Type version 2 2 To From More Sub Type DS DS Frag Retry Pwr More WEP Order MNG Data 4 1 1 1 1 1 1 1 1 0 1 14

Wireless Distribution System AP1 AP2 AP3 DS medium: - not necessarily an ethernet backbone! - could be the 802.11 technology itself Resulting AP = wireless bridge Addressing within a WDS Wireless Distribution System AP TA AP RA SA Address 4: initially forgotten? DA Frame Duration / ID Address 1 RA Address 2 TA Address 3 DA Sequence Address 4 SA Data FCS Protocol Type version 2 2 To From More Sub Type DS DS Frag Retry Pwr More WEP Order MNG Data 4 1 1 1 1 1 1 1 1 1 1 15

Function Addressing: summary To DS From DS Receiver Address 1 Transmitter Address 2 Address 3 Address 4 IBSS 0 0 RA = DA SA BSSID N/A From AP 0 1 RA = DA BSSID SA N/A To AP 1 0 RA = BSSID SA DA N/A Wireless DS 1 1 RA TA DA SA BSS Identifier (BSSID) unique identifier for a particular BSS. In an infrastructure BSSID it is the MAC address of the AP. In IBSS, it is random and locally administered by the starting station. (uniqueness) Transmitter Address (TA) MAC address of the station that transmit the frame to the wireless medium. Always an individual address. Receiver Address (RA) to which the frame is sent over wireless medium. Individual or Group. Source Address (SA) MAC address of the station who originated the frame. Always individual address. May not match TA because of the indirection performed by DS of an IEEE 802.11 WLAN. SA field is considered by higher layers. Destination Address (DA) Final destination. Individual or Group. May not match RA because of the indirection. Lecture 3.2 802.11 MAC CSMA/CA Distributed Coordination Function Carrier Sense Multiple Access With Collision Avoidance 16

Wireless Medium Unreliability 11 Mbps 802.11b outdoor measurements - Roma 2 Campus - roof nodes Must rely on explicit ACKs Successful DATA transmission: ONLY IF an ACK is received SENDER RECEIVER ACK transmission provided by MAC layer Immediate retransmission» Don t get confused with higher layer rtx DATA ACK DATA-ACK exchange: Also called two-way handshake Or Basic Access Mechanism 17

Possible errors Three causes of insuccess PHY Error Receiver cannot synchronize with transmitted frame» preamble + SFD needed or cannot properly read Physical Layer Protocol (PLCP) header» PLCP header contains the essential information on employed rate» Without it receiver cannot know how to demodulate/decode received frame! CRC32 error MAC frame (MAC Header + Payload) CRC failures» The greater the rate, the higher the SNR required to correctly transmit ACK Error Transmitter does not receive ACK» ACK corrupted by PHY or CRC32 errors It IS an error: though data frame was correctly received, transmitted does not know» Introduce issue of duplicated frames at the receiver PHY MAC header Payload FCS Preamble SFD PLCP hdr Wireless errors 11 Mbps 802.11b/g OUTDOOR measurements - Roma 2 Campus - roof nodes 802.11b@11Mbps 802.11g@6Mbps PHY errors CANNOT be reduced through automatic rate fallback mechanisms An (apparent) paradox: 802.11b@11mbps outdoor outperforms 802.11g@6mbps!!! but it is NOT a paradox since most 802.11g errors are PHY (unrelated with rate) 18

Must forget Collision Detection! One single RF circuitry Either TX or RX Half-duplex Even if two simultaneous TX+RX: large difference (100+ db!) in TX/RX signal power Impossible to receive while transmitting On a same channel, of course Collision detection at sender: meaningless in wireless! Ethernet = collision detection at sender Wireless = large difference in the interference power between sender & receiver! Collision OCCURS AT THE RECEIVER STA tx rx A detects a very low interference (C is far) no collision A B C B detects a disructive interference (C is near) collision occurs Distributed Coordination Function Basics 19

802.11 MAC Intended for Contention-Free Services Used for all other services, and used as basis for PCF POINT COORDINATION FUNCTION PCF (polling) DISTRIBUTED COORDINATION FUNCTION DCF (CSMA/CA) PCF: baiscally never user / supported!! 802.11 MAC evolution (802.11e, finalized in december 2005) Dead Intended for Contention-Free Services Used for service differentiation (priorities) Legacy PCF (polling) HYBRID COORDINATION FUNCTION HCF led Channel Access HCCA (scheduling) HCF Enhanced Distributed ChannelAccess EDCA (prioritized CSMA) DCF All enhancements rely on DCF basic operation! 20

Carrier Sense Multiple Access Station may transmit ONLY IF senses channel IDLE for a time = Distributed Inter Frame Space Key idea: ACK replied after a SIFS < SIFS = Short Inter Frame Space Other stations will NOT be able to access the channel during the handshake Provides an atomic DATA-ACK transaction TX Packet arrival DATA RX SIFS ACK OTHER STA Packet arrival Must measure a whole OK! Frame Duration / ID DATA/ACK frame format DATA frame: 28 (or 34) bytes + payload Address 1 Address 2 Address 3 Sequence Address 4 Data Frame check sequence 2 2 6 6 6 2 6 0-2312 4 0 0 Protocol Type version 2 2 1 0 0 0 0 0 x x x x x x x x To From More Sub Type DS DS Frag Retry Pwr More WEP Order MNG Data 4 1 1 1 1 1 1 1 1 Type = Data (10) SubType = Data (0000) ACK frame: 14 bytes No need for TA address (the station receiving the ACK knows who s this from)!! Frame Duration / ID Address (RA) Frame check sequence 2 2 6 4 0 0 0 1 1 1 0 1 0 0 0 0 x 0 0 0 Protocol Type version 2 2 To From More Sub Type DS DS Frag Retry Pwr More WEP Order MNG Data 4 1 1 1 1 1 1 1 1 Type = (01) SubType = ACK (1101) 21

Grasping wi-fi (802.11b) numbers = 50 µs Rationale: 1 SIFS + 2 slot-times Slot time = 20 µs, more later SIFS = 10 µs Rationale: RX_TX turnaround time The shortest possible! DATA (28+payload) [bytes] x 8 / TX_rate [mbps] = µs PHY MAC header 24 (30) Payload FCS ACK 128 16 48 Preamble SFD PLCP hdr 1 mbps DBPSK 192 µs PHY ACK 14 192 µs 112 µs DATA frame: TX time = f(rate) Impressive PHY overhead! 192 µs per every single frame Total data frame time (1500 bytes) @1 Mbps: 192+12224= 12416 µs» PHY+MAC overhead = 3.3% @11 Mbps: 192+ 1111.3 = 1303.3 µs» PHY+MAC overhead = 16.% Overhead increases for small frames! ACK frame: TX at basic rate Typically 1 mbps but 2 mbps possible ACK frame duration (1mbps): 304 µs And when an ACK is hidden? 1) Sender TX Receiver RX STA defers STA SENDER RECEIVER 2) Receiver ACKs (after SIFS) STA cannot hear STA SENDER RECEIVER 3) STA tranmits And destroys ACK! STA SENDER RECEIVER STA BUSY DETECT (DATA) SIFS STA TX! ACK 22

The Duration Field Frame Duration / ID Address 1 Address 2 Address 3 Sequence Address 4 Data Frame check sequence 2 2 6 6 6 2 6 0-2312 4 # microseconds 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 When bit 15 = 1 NOT used as duration (used by power-saving frames to specify station ID) 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 DATA SIFS ACK OTHER STA Physical carrier sensing Virtual carrier sensing NAV (data) And when a terminal is hidden? STA RECEIVER SENDER 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) this can s be solved by any means! STA RECEIVER SENDER 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!! 23

TX RX Packet arrival The RTS/CTS solution RTS SIFS CTS SIFS DATA SIFS ACK others TX RTS CTS data RX CTS hidden (Update NAV) NAV (RTS) NAV (CTS) 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) RTS frame: 20 bytes RTS/CTS frames Frame Duration / ID Address 1 (RA) Frame check sequence 2 2 6 6 4 Protocol Type version 2 2 Address 2 (TA) 0 0 0 1 1 0 1 1 0 0 0 0 x 0 0 0 To From More Sub Type DS DS Frag Retry Pwr More WEP Order MNG Data 4 1 1 1 1 1 1 1 1 Type = (01) SubType = RTS (1011) CTS frame: 14 bytes (same as ACK) Frame Duration / ID Address (RA) Frame check sequence 2 2 6 4 0 0 0 1 1 1 0 0 0 0 0 0 x 0 0 0 Protocol Type version 2 2 To From More Sub Type DS DS Frag Retry Pwr More WEP Order MNG Data 4 1 1 1 1 1 1 1 1 Type = (01) SubType = CTS (1100) 24

RTS/CTS and performance RTS/CTS cons: larger overhead RTS/CTS pros: reduced collision duration ESPECIALLY FOR LONG PACKETS Long packet > RTS_Threshold (configurable) TODAY higher rates No more significant Issues with duration reading Duration field in MAC header Coded at same rate as payload Must receive whole MAC frame correctly 11 mbps range 5.5 mbps range 2 mbps range 1 mbps range RX TX 11 Mbps tx C cannot read TX frame No way to know duration value C 25

ACK may be hidden once again! C hidden from RX Carrier sense remains IDLE during RX TX ACK NAV could not be updated May transmit after a Destroying ACK! ACK transm TX C RX EIFS = protect ACK C cannot read data frame CRC32 error Most of PHY errors 11 mbps range 5.5 mbps range 2 mbps range 1 mbps range RX TX 11 Mbps tx If planning to transmit: No more after a But after a LONGER interval of time Sufficiently long to protect ACK transmission C 26

EIFS Source station Destination station Data ACK Back-off SIFS Back-off Other stations receiving Data frame correctly NAV Back-off Other stations receiving Data frame incorectly EIFS Why backoff? STA1 DATA SIFS ACK STA2 STA3 Collision! RULE: when the channel is initially sensed BUSY, station defers transmission; THEN,when channel sensed IDLE again for a, defer transmission of a further random time (Collision Avoidance) 27

STA2 STA3 Slotted Backoff w=7 Extract random number in range (0, W-1) Decrement every slot-time σ 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 Backoff 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 period STATION 1 DATA SIFS ACK STATION 2 SIFS ACK 6 5 BUSY medium Frozen slot-time 4 3 2 1 28

Why backoff between consecutive tx? A listening station would never find a slot-time after the (necessary to decrement the backoff counter) Thus, it would remain stuck to the current backoff counter value forever!! S 1 DATA SIFS ACK DATA SIFS ACK S 2 6 5 BUSY medium Frozen slot-time 4 BUSY medium 3 Backoff rules First backoff value: Extract a uniform random number in range (0,CW min ) If unsuccessful TX: Extract a uniform random number in range (0,2 (CW min +1)-1) If unsuccessful TX: Extract a uniform random number in range (0,2 2 (CW min +1)-1) Etc up to 2 m (CW min +1)-1 Exponential Backoff! For 802.11b: CWmin = 31 CWmax = 1023 (m=5) 29

Further 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 bu realk time stations Of course not true in general; e.g. what about 40 bytes TCP ACKs? DCF Overhead 30

802.11b parameters (summary) Parameters PIFS used by Point Coordination Function - Time-bounded services - Polling scheme PCF Never deployed SIFS (µsec) 802.11b 10 PHY (µsec) 50 Slot Time (µsec) 20 CWmin 31 CWmax 1023 S = station DCF overhead Frame _ Tx E[ payload] E[ T ] + + CW / 2 min T = T + SIFS + T Frame _ Tx MPDU ACK T = T + SIFS + T + SIFS + T + SIFS + T Frame _ Tx RTS CTS MPDU ACK T T T T MPDU ACK RTS CTS = T = T = T = T PLCP PLCP PLCP PLCP + 8 (28 + L) / R + 8 14 / R + 8 20/ R + 8 14 / R ACK _ Tx RTS _ Tx CTS _ Tx MPDU _ Tx 31

Example: maximum achievable throughput for 802.11b DATA SIFS ACK backoff DATA Cycle time Data Rate = 11 mbps; ACK rate = 1 mbps Payload = 1500 bytes T T MPDU ACK = 192+ 8 14/1= 304 SIFS = 10; = 192 + 8 (28 + 1500)/11 1303 = 50 31 E[ Backoff ] = 20 = 310 2 1500 8 Thr = = 6.07Mbps 1303+ 10 + 304 + 50 + 310 Data Rate = 11 mbps; ACK rate = 1 mbps Payload = 576 bytes T T MPDU ACK = 192 + 8 14/1= 304 SIFS = 10; = 192+ 8 (28+ 576)/11 631 = 50 31 E[ Backoff ] = 20 = 310 2 576 8 Thr = = 3.53Mbps 631+ 10 + 304+ 50 + 310 REPEAT RESULTS FOR RTS/CTS Not viable (way too much overhead) at high rates! DCF overhead (802.11b) RTS/CTS Basic RTS/CTS Basic 0 2000 4000 6000 8000 Tra nsmssion Time (use c ) Ave Backoff RTS+SIFS CTS+SIFS Payload+SIFS ACK 32

DCF overhead (802.11b) 1 0,9 t u p0,8 h g u0,7 o r h0,6 T d0,5 e liz 0,4 a m0,3 r o N0,2 0,1 0 BAS-2M bps RTS-2M bps BAS-11M bps RTS-11M bps 1 00 3 00 5 00 7 00 9 00 1 100 1 300 1 500 1 700 1 900 2 100 2 300 Payload Size (B ytes) Lecture 3.3 802.11 MAC extras Selected topics, and for BSS case only (no IBSS) 33

Radio impairment Why Fragmentation High Bit Error Rate (BER) increases with distance The longer the frame, the lower the successful TX probability High BER = high rtx overhead & increased rtx delay backoff window increase: cannot distinguish collision from tx error!! frame frame frag0 frag1 frag2 frag3 frag4 frag5 Radio impairment Once again : Fragmentation not Viable with modern 802.11 rates not used frag0 frag1 frag1 frag2 frag3 frag4 frag5 A C K A C K A C K A C K A C K A C K splits message (MSDU) into several frames (MPDU) Same fragment size except last one Fragmentation burst Fragments separated by SIFS channel cannot be captured by someone else Each fragment individually ACKed Fragmentation Each fragment reserves channel for next one NAV updated fragment by fragment Missing ACK for fragment x release channel (automatic) ACK_Timeout much longer that SIFS! Backoff Restart from transmission of fragment x sender receiver Other stations RTS SIFS SIFS SIFS SIFS CTS frag0 frag1 ACK ACK NAV (RTS) NAV (CTS) NAV(frag0) NAV(ACK) t SIFS 34

Frame Fragment and sequence numbers DATA frame: 28 (or 34) bytes + payload Duration / ID Address 1 Address 2 Address 3 Sequence Address 4 Data Frame check sequence 2 2 6 6 6 2 6 0-2312 4 prot typ subtype to fr ds ds More Retry Frag 1 1 P + S da Wor Fragment Sequence Number number 4 12 Fragment number Increasing integer value 0 15 (max 16 fragments since 4 bits available) Essential for reassembly More Fragment bit (frame control field) set to: 1 for intermediate fragments 0 for last fragment Sequence Number Used to filter out duplicates Unlike Ethernet, hede duplicates are quite frequent! retransmissions are a main feature of the MAC Retry bit: helps to distingush retransmission Set to 0 at transmission of new frame Set to 1 at retransmissions beacons: Periodically transmitted Include timestamp To enable STA synchronization [.etc etc ] Power management Every beacon includes a Traffic Indication Map (TIM) Information element listing the stations for which UNICAST frames are buffered Bitmap!! (2008 bits = 251 bytes transmission split over multiple beacons) A station may then issue a PS-Poll control frame to enable transmission Instead of duration, PS-Poll contains AID (Association IDentifier of the STA: 1 2007) What about broadcast & multicast frames transmitted only after beacons containing a DTIM (Delivery TIM) 1 DTIM every X beacon (X configurable) 35

Power management - example STA A STA B STA B has set ReceiveDTIM to false to minimize power consumption! losing broadcast & multicast frames Point Coordination Function Token-based access mechanism Polling Channel arbitration enforced by a point Coordinator (PC) Typically the AP, but not necessarily Contention-free access No collision on channel DCF PCF PCF deployment: minimal!! Optional part of the 802.11 specification As such, almost never deployed HCCA (802.11e) may be considered as PCF extension PHY PCF deployed on TOP of DCF Backward compatibility 36

PCF frame transfer SIFS Polling strategy: very elementary!! - send polling command to stations with increasing Association ID value - (regardless whether they might have or not data to transmit) Multi-rate operation Rate selection: proprietary mechanism! Result: different chipsets operate widely different Two basic approaches Adjust rate according to measured link quality (SNR estimate) How link quality is computed is again proprietary! Adjust rate according to frame loss How many retries? Step used for rate reduction? Proprietary! Problem: large amount of collisions (interpreted as frame loss) forces rate adaptation 37

Performance Anomaly Question 1: Assume that throughput measured for a single 11 mbps greedy station is approx 6 mbps. What is per-sta throughput when two 11 mbps greedy stations compete? Answer 1: Approx 3 mbps (easy ) Question 2: Assume that throughput measured for a single 2 mbps greedy station is approx 1.7 mbps. What is per-sta throughput when two 2 mbps greedy stations compete? Answer 2: Approx 0.85 mbps (easy ) Question 3: What is per-sta throughput when one 11 mbps greedy station compete with one 2 mbps greedy station? Answer 3:... Understanding Answers 1&2 (neclect collision indeed rare just slightly reduce computed value) backoff Frozen backoff STA 1 SIFS ACK STA 2 SIFS ACK Cycle time E[ payload] Thr[1] = Thr[2] = = E[ cycle time] T 1500 8 [1] + SIFS + ACK + + T [2] + SIFS + ACK + MPDU MPDU + E[ backoff ] Data Rate = 11 mbps; ACK rate = 1 mbps Payload = 1500 bytes T T MPDU ACK = 192 + 8 14/1= 304 SIFS = 10; = 192 + 8 (28+ 1500)/11 1303 = 50 31 E[ Backoff ] = 20 = 310 2 1500 8 Thr = = 3.3Mbps 2 (1303+ 10 + 304+ 50) + 310 T T Data Rate = 2 mbps; ACK rate = 1 mbps Payload = 1500 bytes MPDU ACK = 192+ 8 (28 + 1500)/ 2 6304 = 192+ 8 14/1= 304 SIFS = 10; = 50 31 E[ Backoff ] = 20 = 310 2 1500 8 Thr = = 0.88Mbps 2 (6304+ 10 + 304+ 50) + 310 38

Emerging problem : long-term fairness! If you have understood the previous example, you easily realize that 802.11 provides FAIR access to stations in terms of EQUAL NUMBER of transmission opportunities in the long term! STA1 STA2 STA2 STA1 STA2 STA1 But this is INDEPENDENT OF transmission speed! Computing answer 3 Frozen backoff STA (2mbps) SIFS ACK STA 11 SIFS ACK Cycle time RESULT: SAME THROUGHPUT (in the long term)!! E[ payload] Thr[1] = Thr[2] = = E[ cycle time] = T MPDU 1500 8 = [1] + SIFS + ACK + + T [2] + SIFS + ACK + + E[ backoff ] 1500 8 = = 1.39 Mbps!!!!!! 6304 + 1303+ 2(10 + 304 + 50) + 310 MPDU DRAMATIC CONSEQUENCE: throughput is limited by STA with slowest rate (lower that the maximum throughput achievable by the slow station)!! 39

Performance anomaly into action Why the network is soooo slow today? We re so Close, we have a 54 mbps and excellent channel, and we get Less than 1 mbps Hahahahahah!! Poor channel, Rate-fallbacked @ 1mbps EDCA operation See details in: G. Bianchi, I Tinnirello,, and L. Scalia IEEE NETWORK Magazine July/Aug. 2005 40

Multiple queues AP AC AC Video Voice Virtual collision Handler AC Best- AC Backefforground Wireless Channel 4 Access Categories Mapping the 8 priority levels provided by 802.1p Different parameters Independently operated Collide (virtually) each other! Differentiation methods in IEEE 802.11e EDCA Varying time to wait before channel access Different size of AIFS (arbitrary inter frame space) Varying the size of contention windows Different size of CWmin and CWmax Varying the amount of channel accessible time Different duration of TXOP 41

TXOP differentiation Effective since it changes the holding time of the channel for each station Does not affect collisions CWmin differentiation Operates by changing the long-term fairness ratio The sharing of resources is inversly proposional to the employed CWmin value A station with CWmin/4 will have 4 transmission opportunities versus 1, in average Problem: small CWs increase collision level! Large N = large amount of collisions = = less effective differentiation = penalty in overall thr 42

AIFS differentiation Light traffic Protected slots for green Heavy traffic Protected slots for green % of protected slots INCREASES 43