Nomadic Communications WLAN MAC Fundamentals

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

IEEE WLAN (802.11) Copyright. Nomadic Communications

802.11MAC Fundamentals

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

Wireless LANs. ITS 413 Internet Technologies and Applications

Data Communications. Data Link Layer Protocols Wireless LANs

CSE 461: Wireless Networks

Chapter 6 Medium Access Control Protocols and Local Area Networks

Data and Computer Communications. Chapter 13 Wireless LANs

Mohamed Khedr.

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

Wireless Protocols. Training materials for wireless trainers

Unit 7 Media Access Control (MAC)

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

Local Area Networks NETW 901

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

Lecture 16: QoS and "

Computer Networks. Wireless LANs

Introduction to IEEE

ICE 1332/0715 Mobile Computing (Summer, 2008)

Mobile & Wireless Networking. Lecture 7: Wireless LAN

ECE442 Communications Lecture 3. Wireless Local Area Networks

IEEE Technical Tutorial. Introduction. IEEE Architecture

IEEE MAC Sublayer (Based on IEEE )

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

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

Lesson 2-3: The IEEE x MAC Layer

Wireless Local Area Networks (WLANs) Part I

Wireless LAN -Architecture

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

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

CSCD 433 Network Programming Fall Lecture 7 Ethernet and Wireless

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

Multiple Access Links and Protocols

standard. Acknowledgement: Slides borrowed from Richard Y. Yale

3.1. Introduction to WLAN IEEE

Wireless Communication and Networking CMPT 371

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

Computer Communication III

IEEE , Token Rings. 10/11/06 CS/ECE UIUC, Fall

MAC in /20/06

Shared Access Networks Wireless. 1/27/14 CS mywireless 1

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

Internet Protocol Stack

Wireless Communication and Networking CMPT 371

Local Area Networks. Lecture 17 Fall Token Ring and FDDI

Mobile Communications Chapter 7: Wireless LANs

Getting Connected (Chapter 2 Part 4) Networking CS 3470, Section 1 Sarah Diesburg

Guide to Wireless Communications, Third Edition. Objectives

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

Lecture (08) Wireless Traffic Flow and AP Discovery

Medium Access Control. IEEE , Token Rings. CSMA/CD in WLANs? Ethernet MAC Algorithm. MACA Solution for Hidden Terminal Problem

Mobile Communications Chapter 7: Wireless LANs

Wireless Local Area Networks. Networks: Wireless LANs 1

Wireless Communications

IEEE Medium Access Control. Medium Access Control

Optional Point Coordination Function (PCF)

Rahman 1. Application

IEEE Wireless LANs

MSIT 413: Wireless Technologies Week 8

MAC. Fall Data Communications II 1

Logical Link Control (LLC) Medium Access Control (MAC)

CMPE 257: Wireless and Mobile Networking

Wireless Local Area Network (IEEE )

Table of Contents 1 WLAN Service Configuration 1-1

Wireless# Guide to Wireless Communications. Objectives

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

Ethernet Switches Bridges on Steroids. Ethernet Switches. IEEE Wireless LAN. Ad Hoc Networks

IEEE Wireless LANs Part I: Basics

Mohammad Hossein Manshaei 1393

Wireless Networking & Mobile Computing

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

Data and Computer Communications

Figure.2. Hidden & Exposed node problem

CHAPTER 8: LAN Standards

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

Wireless Communication

The MAC layer in wireless networks

15-441: Computer Networking. Wireless Networking

Advanced Computer Networks WLAN

Wireless Communication Session 4 Wi-Fi IEEE standard

Laboratory of Nomadic Communication. Quick introduction to IEEE

Wireless and Mobile Networks

Medium Access Control Sublayer

Wireless LANs. Wireless Network

Chapter 12 Multiple Access 12.1

Overview of Wireless LANs

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

Transmission Control Protocol over Wireless LAN

Introduction. Giuseppe Bianchi, Ilenia Tinnirello

Solutions to Exercise Session 4,

CSE 6811 Ashikur Rahman

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

Wireless Local Area Networks (WLANs)

Efficient Power MAC Protocol in Ad-hoc Network s

Chapter 7: Wireless LANs

Wireless Local Area Networks (WLANs) and Wireless Sensor Networks (WSNs) Primer. Computer Networks: Wireless LANs

Department of Electrical and Computer Systems Engineering

Media Access Control in Ad Hoc Networks

Transcription:

Nomadic Communications WLAN 802.11 MAC Fundamentals Renato Lo Cigno ANS Group locigno@disi.unitn.it http://disi.unitn.it/locigno/index.php/teaching-duties/nomadic-communications

Copyright Quest opera è protetta dalla licenza: Creative Commons Attribuzione-Non commerciale-non opere derivate 2.5 Italia License Per i dettagli, consultare http://creativecommons.org/licenses/by-nc-nd/2.5/it/ Nomadic Communications locigno@disi.unitn.it 802.11 2

IEEE 802.11 Wireless LAN standard specifying a wireless interface between a client and a base station (or access point), as well as between wireless clients Defines the PHY and MAC layer (LLC layer defined in 802.2) Physical Media: radio or diffused infrared (not used) Standardization process begun in 1990 and is still going on (1st release 97, 2nd release 99, then 03, 05,... 12) Nomadic Communications locigno@disi.unitn.it 802.11 3

802.11 Architecture BSS (Basic Service Set): set of nodes using the same coordination function to access the channel BSA (Basic Service Area): spatial area covered by a BSS (WLAN cell) BSS configuration mode ad hoc mode with infrastructure: the BSS is connected to a fixed infrastructure through a centralized controller, the so-called Access Point (AP) Nomadic Communications locigno@disi.unitn.it 802.11 4

WLAN with Infrastructure n n BSS contains: n n wireless hosts access point (AP): base station BSS s interconnected by distribution system (DS) Nomadic Communications locigno@disi.unitn.it 802.11 5

Ad Hoc WLANs Ad hoc network: IEEE 802.11 stations can dynamically form a network without AP and communicate directly with each other: IBSS Independent BSS Applications: laptop meeting in conference room, car interconnection of personal devices battlefield IETF MANET (Mobile Ad hoc Networks) working group Nomadic Communications locigno@disi.unitn.it 802.11 6

Extended Service Set (ESS) Several BSSs interconnected with each other at the MAC layer The backbone interconnecting the BSS APs (Distribution System) can be a: LAN (802.3 Ethernet/802.4 token bus/802.5 token ring) wired MAN IEEE 802.11 WLAN, possibly meshed (routing problems!) An ESS can give access to the fixed Internet network through a gateway node If fixed network is a IEEE 802.X, the gateway works as a bridge thus performing the frame format conversion Nomadic Communications locigno@disi.unitn.it 802.11 7

Possible Scenarios (1) Ad hoc networking Independent BSS (IBSS) STA STA STA STA STA AP Distribution system IEEE 802.X Network with infrastructure STA AP STA Nomadic Communications locigno@disi.unitn.it 802.11 8

Possible Scenarios (2) Ad hoc WLAN Distribution System STA STA STA AP STA STA AP STA WLANs with infrastructure Nomadic Communications locigno@disi.unitn.it 802.11 9

Frequency bands 802.11 works on ISM bands around 2.4 GHz around 5.5 GHz Specific bands may vary from country to country (but not much) Different bands sometimes mandate slightly different implementations of the same PHY/MAC protocol Between the PHY/MAC and the 802.2 LLC there are additional functions for registering one interface to the others With infrastructured systems we say to join a BSS/AP Nomadic Communications locigno@disi.unitn.it 802.11 10

Joining a BSS Scanning Authentication Association BSS with AP: Both authentication and association are necessary for joining a BSS Independent BSS: Neither authentication neither association procedures are required for joining an IBSS Nomadic Communications locigno@disi.unitn.it 802.11 11

1. Passive scanning Scanning A station willing to join a BSS must get in contact with the AP. This can happen through: The station scans the channels for a Beacon frame that is periodically (100ms) sent by every AP 2. Active scanning (the station tries to find an AP) The station sends a ProbeRequest frame on a given channel All AP s within reach reply with a ProbeResponse frame Active Scanning may be more performing but waste resources Nomadic Communications locigno@disi.unitn.it 802.11 12

Passive Scan Beacons are broadcast frames transmitted periodically (default 100ms). They contain: Timestamp TBTT (Target Beacon Transmission Time) also called Beacon Interval Capabilities SSID (BSSID is AP MAC address + 26 optional octets) PHY layer information System information (Network, Organization, ) Information on traffic management if present STA answer to beacons with a ProbeResponse containing the SSID Nomadic Communications locigno@disi.unitn.it 802.11 13

Active Scan Directed probe: The client sends a probe request with a specific destination SSID; only APs with a matching SSID will reply with a probe response It is often considered secure if APs do not broadcast SSIDs and only respond to Directed Probes Broadcast probe: The client sends a null SSID in the probe request; all APs receiving the probe-request will respond with a probe-response for each SSID they support Useful for service discovery systems Nomadic Communications locigno@disi.unitn.it 802.11 14

Authentication Once an AP is found/selected, a station goes through authentication Open system authentication Station sends authentication frame with its identity AP sends frame as an ack / nack Shared key authentication (WEP) Stations receive shared secret key through secure channel independent of 802.11 Stations authenticate because they use the secret key (weak) Per Session Authentication (WPA2) Encryption is AES The key can be shared (home networks) or user-based (enterprise) Encryption is always per-station plus one for broadcast Nomadic Communications locigno@disi.unitn.it 802.11 15

Association Once a station is authenticated, it starts the association process, i.e., information exchange about the AP/station capabilities and roaming STA AP: AssociateRequest frame AP STA: AssociationResponse frame In case of Roaming: New AP informs old AP via DS Only after the association is completed, a station can transmit and receive data frames Nomadic Communications locigno@disi.unitn.it 802.11 16

IEEE 802.11 MAC Protocol Performs the following functions: Resource allocation Data segmentation and reassemby MAC Protocol Data Unit (MPDU) addressing MPDU (frame) format Error control Nomadic Communications locigno@disi.unitn.it 802.11 17

MAC Frames Three frame types are defined 1. Control: positive ACK, handshaking for accessing the channel (RTS, CTS) 2. Data Transfer: information to be transmitted over the channel 3. Management: connection establishment/release, synchronization, authentication. Exchanged as data frames but are not reported to the higher layer Nomadic Communications locigno@disi.unitn.it 802.11 18

Data Transfer Ø Asynchronous data transfer for best-effort traffic Ø DCF (Distributed Coordination Function) Ø Coordination is done through Inter Frame Spaces Ø Synchronous data transfer for real-time traffic (like audio and video) Ø PCF (Point Coordination Function): based on the polling of the stations and controlled by the AP (PC) Ø Its implementation is optional (not really implemented in devices, it also has a bug... so we skip it!) Nomadic Communications locigno@disi.unitn.it 802.11 19

Coordination The system is semi-synchronous Maintained through Beacon frames (sent by AP) Time is counted in intervals called slots A slot is the system unit time its duration depends on the implementation of the physical layer and specifically on the 802.11b: 20μs 802.11a/h/g/n/ac: 9μs g/n are forced to use 20 when coexisting with b g supported a reduced slot Nomadic Communications locigno@disi.unitn.it 802.11 20

Inter Frame Spaces IFS Interframe space (IFS) time interval between frame transmissions used to establish priority in accessing the channel 4 types of IFS: Short IFS (SIFS) Point coordination IFS (PIFS) > SIFS Distributed IFS (DIFS) > PIFS Extended IFS (EIFS) > DIFS Duration depends on physical level implementation Nomadic Communications locigno@disi.unitn.it 802.11 21

Short IFS (SIFS) Separates transmissions belonging to the same dialogue Gives the highest priority in accessing the channel Its duration depends on: Propagation time over the channel Time to convey the information from the PHY to the MAC layer Radio switch time from TX to RX mode 2.4GHz: 10μs 5.5GHz: 16μs Nomadic Communications locigno@disi.unitn.it 802.11 22

Point Coordination IFS (PIFS) Used to give priority access to Point Coordinator (PC) Only a PC can access the channel between SIFS and DIFS PIFS=SIFS + 1 time slot Nomadic Communications locigno@disi.unitn.it 802.11 23

Distributed IFS (DIFS) Used by stations waiting to start a contention (for the channel) Set to: PIFS + 1 time slot 802.11b: 50μs 802.11a/h/g/n: 34μs Nomadic Communications locigno@disi.unitn.it 802.11 24

Extended IFS (EIFS) Used by every station when the PHY layer notifies the MAC layer that a transmission has not been correctly received Avoids that stations with bad channels disrupt other stations performance Forces fairness in the access if one station does not receive an ACK (e.g., hidden terminal) Reduce the priority of the first retransmission (indeed make it equal to all others) Set to: DIFS + 1 ACK time Nomadic Communications locigno@disi.unitn.it 802.11 25

DCF Access Scheme Nomadic Communications locigno@disi.unitn.it 802.11 26

Basic Characteristics Its implementation is mandatory DCF is based on the Carrier Sense Multiple Access/Collision Avoidance (CSMA/CA) scheme: stations that have data to transmit contend for accessing the channel a station has to repeat the contention procedure every time it has a data frame to transmit Nomadic Communications locigno@disi.unitn.it 802.11 27

IEEE 802.11 MAC Protocol Overview 802.11 CSMA sender: - if sense channel idle for DISF sec. then transmit frame - if sense channel busy then random access over a contention window CWmin (CA) when the channel becomes free 802.11 CSMA receiver: if received OK return ACK after SIFS Nomadic Communications locigno@disi.unitn.it 802.11 28

IEEE 802.11 MAC Protocol Overview 802.11 CSMA Protocol others: NAV: Network Allocation Vector transmission length field others (hearing data) defer access for NAV time units NAV is contained in the header of all frames Allows reducing energy consumption Helps reducing hidden terminals problems Nomadic Communications locigno@disi.unitn.it 802.11 29

Hidden Terminal Effect hidden terminals: A, C cannot hear each other obstacles, signal attenuation à (deterministic) collisions at B goal: avoid collisions at B CSMA/CA with handshaking Nomadic Communications locigno@disi.unitn.it 802.11 30

MAC Handshaking CSMA/CA: explicit channel reservation sender: send short RTS (request to send) receiver: reply with short CTS (clear to send) CTS reserves channel for sender, notifying (possibly hidden) stations reduces hidden station collisions increase overhead Nomadic Communications locigno@disi.unitn.it 802.11 31

MAC Handshaking RTS and CTS are short: collisions of shorter duration, hence less costly DCF allows: CSMA/CA CSMA/CA with handshaking Nomadic Communications locigno@disi.unitn.it 802.11 32

The exposed terminal problem Sensing range is normally larger than receiving range Terminals may be exposed in that they sense the channel occupied, but cannot compete for it CS range bla bla bla TX range Nomadic Communications locigno@disi.unitn.it 802.11 33

DCF Basic Access Mode Details Nomadic Communications locigno@disi.unitn.it 802.11 34

Carrier Sensing Used to determine whether the channel is busy or idle Performed at the physical layer (physical carrier sensing) and at the MAC layer (virtual carrier sensing) Physical carrier sensing: detection of nearby energy sources Virtual carrier sensing: the frame header indicates the remaining duration of the current Channel Access Phase (till ACK is received) Nomadic Communications locigno@disi.unitn.it 802.11 35

Network Allocation Vector (NAV) Ø Used by the stations nearby the transmitter to store the duration of the dialogue that is occupying the channel Ø The channel will become idle when the NAV expires Ø Upon the NAV expiration, stations that have data to transmit sense to the channel again Nomadic Communications locigno@disi.unitn.it 802.11 36

Using DIFS and SIFS Transmitter: sense the channel if the channel is idle, wait a time equal to DIFS if the channel remains idle for DIFS, transmit MPDU Receiver: compute the checksum verifying whether the transmission is correct if so, it sends an ACK after a time equal to SIFS ACK is only a header with a Tx rate less than or equal to the one used by the transmitter and no larger than 2 Mbit/s in 802.11b 6/12 Mbit/s in 802.11g/a/h/n Nomadic Communications locigno@disi.unitn.it 802.11 37

Using DIFS and SIFS Ø Neighbors: Ø set their NAV to the value indicated in the transmitted MPDU Ø NAV set to: the MPDU tx time + 1 SIFS + ACK time Nomadic Communications locigno@disi.unitn.it 802.11 38

MPDU Transmission DIFS DATA SIFS source ACK destination NAV others time Nomadic Communications locigno@disi.unitn.it 802.11 39

Frame Retransmissions A frame transmission may fail because of collision or errors on the radio channel A failed transmission is re-attempted till a max no. of retransmissions is reached ARQ scheme: Stop&Wait Nomadic Communications locigno@disi.unitn.it 802.11 40

Collision Avoidance (CA) The backoff procedure is run also if no collisions occurred yet but the channel is busy If a station senses the channel busy, it waits for the channel to be idle As soon as the channel is idle for DIFS, the station computes the backoff time interval sets the backoff counter to this value The station will be able to transmit when its backoff counter reaches 0 Nomadic Communications locigno@disi.unitn.it 802.11 41

MPDU Transmission on busy channel DIFS DATA SIFS source ACK destination others NAV DIFS CW backoff time CW=Contention Window Nomadic Communications locigno@disi.unitn.it 802.11 42

Backoff Value Ø Integer value corresponding to a number of time slots Ø The number of slots is a r.v. uniformly distributed in [0,CW-1] Ø CW is the Contention Window and at each transmission attempt of the same frame is updated as: Ø For i=1, CW 1 =CW min Ø For i>1, CW i =2CW i-1 with i>1 being the no. of consecutive attempts for transmitting the MPDU Ø For any i, CW i CW max Ø After a successful transmission CW 1 =CW min Nomadic Communications locigno@disi.unitn.it 802.11 43

Backoff Decrease Ø While the channel is busy, the backoff counter is frozen Ø While the channel is idle, and available for transmission (after sensing it free for DIFS) the station decreases the backoff value (-1 every slot) until Ø the channel becomes busy or Ø the backoff counter reaches 0 Nomadic Communications locigno@disi.unitn.it 802.11 44

Accessing the Channel Ø If more than one station decrease their counter to 0 at the same time collision Ø Colliding stations have to re-compute a new backoff value Ø A station that lost a contention keeps counting down the old backoff Nomadic Communications locigno@disi.unitn.it 802.11 45

Basic DCF: An Example Stations A/C Data ACK Station B SIFS Backoff Data wait DIFS Nomadic Communications locigno@disi.unitn.it 802.11 46

Data Fragmentation A MSDU is fragmented into more than one frame (MPDU) when its size is larger than a certain fragmentation threshold All MPDUs have same size except for the last MPDU that may be smaller than the fragmentation threshold PHY header is inserted in every fragment MPDUs originated from the same MSDU are transmitted at distance of SIFS + ACK + SIFS Useful if losses are dominated by random errors Unused today thanks to the use of error correcting codes Nomadic Communications locigno@disi.unitn.it 802.11 47

Recontending for the Channel Ø A station recontends for the channel when Ø it has completed the transmission of an MPDU, but still has data to transmit Ø a MPDU transmission fails and the MPDU must be retransmitted à binary backoff Ø Before recontending the channel after a successful transmission, a station must perform a backoff procedure with CWmin Nomadic Communications locigno@disi.unitn.it 802.11 48

DCF ACCESS WITH HANDSHAKING Nomadic Communications locigno@disi.unitn.it 802.11 49

Access with Handshake Used to reserve the channel Why? Hidden stations Colliding stations keep transmitting their MPDU; the larger the MPDU involved in the collision, the more bandwidth is wasted Need to avoid collisions, especially when frame is large Particularly useful when a large no. of STAs contend for the channel Nomadic Communications locigno@disi.unitn.it 802.11 50

RTS/CTS Ø Handshaking procedure uses the Request to send (RTS) and Clear to send (CTS) control frames Ø RTS / CTS should be always transmitted @1 (b) (6 a/g/h/n) Mbit/s (they are only headers) Ø Access with handshaking is used for frames larger than an RTS_Threshold Nomadic Communications locigno@disi.unitn.it 802.11 51

DCF with Handshaking ü Transmitter: ü send a RTS (20 bytes long) to the destination ü Neighbors: ü read the duration field in RTS and set their NAV ü Receiver: ü acknowledge the RTS reception after SIFS by sending a CTS (14 bytes long) ü Neighbors: ü read the duration field in CTS and update their NAV ü Transmitter: ü start transmitting upon CTS reception Nomadic Communications locigno@disi.unitn.it 802.11 52

MPDU Transmission & NAV DIFS SIFS RTS DATA source SIFS CTS ACK SIFS destination others NAV (RTS) NAV (CTS) NAV (data) CW backoff DIFS Nomadic Communications locigno@disi.unitn.it 802.11 53

EXAMPLES OF GENERIC MAC-LEVEL FRAME FORMAT Nomadic Communications locigno@disi.unitn.it 802.11 54

Example: DATA Frame Frame Control Duration RA TA DATA CRC MAC Header Duration (in µs): Time required to transmit next (data) frame + ACK + 1 SIFs RA: Address of the intended immediate recipient TA: Address of the station transmitting this frame Nomadic Communications locigno@disi.unitn.it 802.11 55

Example: RTS Frame Frame Control Duration RA TA CRC MAC Header Duration (in µs): Time required to transmit next (data) frame + CTS + ACK + 3 SIFs RA: Address of the intended immediate recipient TA: Address of the station transmitting this frame Nomadic Communications locigno@disi.unitn.it 802.11 56

Example: CTS Frame Frame Control Duration RA CRC MAC Header Duration (in µs): Duration value of previous RTS frame - 1 CTS time - 1 SIFS RA: The TA field in the RTS frame Nomadic Communications locigno@disi.unitn.it 802.11 57

Example: ACK Frame Frame Control Duration RA CRC MAC Header Duration: set to 0 if More Fragments bit was 0, otherwise equal to the duration of previous frame - 1 ACK - 1 SIFS RA: copied from the Address 2 field of previous frame Nomadic Communications locigno@disi.unitn.it 802.11 58