Wireless Networked Systems

Similar documents
Wireless Networking & Mobile Computing

Wireless & Mobile Networking

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

Wireless Communications

Chapter 12 Multiple Access 12.1

CMPE 257: Wireless and Mobile Networking

Mohamed Khedr.

Multiple Access Links and Protocols

Wireless LANs. ITS 413 Internet Technologies and Applications

The MAC layer in wireless networks

The MAC layer in wireless networks

Data and Computer Communications. Chapter 13 Wireless LANs

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

CSE 461: Wireless Networks

Wireless MACs: MACAW/802.11

MSIT 413: Wireless Technologies Week 8

MULTIPLE ACCESS PROTOCOLS 2. 1

Local Area Networks NETW 901

Lecture 16: QoS and "

ECE 4450:427/527 - Computer Networks Spring 2017

Wireless Local Area Networks. Networks: Wireless LANs 1

ICE 1332/0715 Mobile Computing (Summer, 2008)

Unit 7 Media Access Control (MAC)

CS 43: Computer Networks. 27: Media Access Contd. December 3, 2018

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

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

CHAPTER 7 MAC LAYER PROTOCOLS. Dr. Bhargavi Goswami Associate Professor & Head Department of Computer Science Garden City College

Topics. Link Layer Services (more) Link Layer Services LECTURE 5 MULTIPLE ACCESS AND LOCAL AREA NETWORKS. flow control: error detection:

Rahman 1. Application

Lesson 2-3: The IEEE x MAC Layer

Mohammad Hossein Manshaei 1393

CMPE 257: Wireless and Mobile Networking

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

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

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

CSCD 433 Network Programming Fall Lecture 7 Ethernet and Wireless

Computer Network Fundamentals Spring Week 3 MAC Layer Andreas Terzis

CS 43: Computer Networks Media Access. Kevin Webb Swarthmore College November 30, 2017

Local Area Networks (LANs) SMU CSE 5344 /

ECEN 5032 Data Networks Medium Access Control Sublayer

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

standard. Acknowledgement: Slides borrowed from Richard Y. Yale

IEEE MAC Sublayer (Based on IEEE )

Wireless LAN -Architecture

Chapter 6 Medium Access Control Protocols and Local Area Networks

ICE 1332/0715 Mobile Computing (Summer, 2008)

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

IEEE Medium Access Control. Medium Access Control

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

CSE 6811 Ashikur Rahman

Multiple Access Protocols

Outline. Introduction to Networked Embedded Systems - Embedded systems Networked embedded systems Embedded Internet - Network properties

Internet Protocol Stack

Hands-On Exercises: IEEE Standard

Medium Access Control Sublayer

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

Wireless Communication and Networking CMPT 371

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

Data Communications. Data Link Layer Protocols Wireless LANs

Computer Networks. Wireless LANs

Data Link Layer: Collisions

CS/ECE 439: Wireless Networking. MAC Layer Road to Wireless

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

Nomadic Communications WLAN MAC Fundamentals

Link Layer: Retransmissions

Lecture 6. Data Link Layer (cont d) Data Link Layer 1-1

Intelligent Transportation Systems. Medium Access Control. Prof. Dr. Thomas Strang

Telecommunication Protocols Laboratory Course. Lecture 2

Advanced Computer Networks WLAN

Wireless Local Area Networks (WLANs) Part I

The Link Layer and LANs. Chapter 6: Link layer and LANs

Lecture 4: Wireless MAC Overview. Hung-Yu Wei National Taiwan University

Mobile & Wireless Networking. Lecture 7: Wireless LAN

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

CSE 461: Multiple Access Networks. This Lecture

Chapter 4. The Medium Access Control Sublayer. Points and Questions to Consider. Multiple Access Protocols. The Channel Allocation Problem.

MAC. Fall Data Communications II 1

Redes de Computadores. Medium Access Control

Media Access Control in Ad Hoc Networks

LECTURE PLAN. Script. Introduction about MAC Types o ALOHA o CSMA o CSMA/CD o CSMA/CA

Aloha and slotted aloha

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

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

CSE 461 Multiple Access. David Wetherall

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

CS 455/555 Intro to Networks and Communications. Link Layer

An Efficient Scheduling Scheme for High Speed IEEE WLANs

Introduction to IEEE

IEEE Technical Tutorial. Introduction. IEEE Architecture

Chapter 6 Medium Access Control Protocols and Local Area Networks

Wireless Local Area Network (IEEE )

IEEE WLAN (802.11) Copyright. Nomadic Communications

Medium Access Control Sublayer Chapter 4

Link Layer and LANs 안상현서울시립대학교컴퓨터 통계학과.

Wireless Communication and Networking CMPT 371

Embedded Internet and the Internet of Things WS 12/13

Computer Networks Medium Access Control. Mostafa Salehi Fall 2008

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

IEEE Wireless LANs

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

Transcription:

Wireless Networked Systems CS 795/895 - Spring 2013 Lec #2: Medium Access Control The CSMA/CA Regime, IEEE 802.11 Tamer Nadeem Dept. of Computer Science

Data Link Layer (DLL) Main Task of the data link layer: Provide error-free transmission over a link Page 2 Spring 2013 CS 795/895 - Wireless Networked Systems

DLL Services Framing The DLL translates the physical layer's raw bit stream into discrete units (messages) called frames. How can the receiver recognize the start and end of a frame? Flow Control Flow control deals with throttling the speed of the sender to match that of the receiver. Usually, this is a dynamic process, as the receiving speed depends on such changing factors as the load, and availability of buffer space. Page 3 Spring 2013 CS 795/895 - Wireless Networked Systems

DLL Services Link Management Allocating buffer space, control blocks, agreeing on the maximum message size, etc. Synchronize and initialize send and receive sequence numbers with its peer at the other end of the communications channel Error Control Error control is concerned with insuring that all frames are eventually delivered (possibly in order) to a destination. Three items are required: Acknowledgments, Timers, Sequence Numbers Error Detection and Correction line noise is a fact of life (e.g., signal attenuation, natural phenomenon such as lightning, and the telephone repairman). Error Detecting Codes: Include enough redundancy bits to detect errors and use ACKs and retransmissions to recover from the errors. Error Correcting Codes: Include enough redundancy to detect and correct errors. Page 4 Spring 2013 CS 795/895 - Wireless Networked Systems

DLL = LLC + MAC LANs first began to emerge as potential business tools in the late 1970s IEEE launched Project 802 (1980, February) to define certain LAN standards. Project 802 defined network standards for the physical components of a network (the interface card and the cabling) Define the ways NICs access and transfer data over physical media. These include connecting, maintaining, and disconnecting network devices. The IEEE 802 standards incorporated the specifications in the bottom two OSI layers, the physical layer and the data-link layer. Page 5 Spring 2013 CS 795/895 - Wireless Networked Systems

DLL = LLC + MAC More detail was needed at the data-link layer, the 802 standards committee divided the data-link layer into two sublayers. Logical Link Control (LLC) Sublayer: Manages data-link communication: establishing and terminating links, controlling frame traffic, sequencing frames, and acknowledging frames. Media Access Control (MAC) Sublayer: Communicates directly with the NIC to provide shared access to the physical layer: Managing media access, delimiting frames, checking frame errors, and recognizing frame addresses. Page 6 Spring 2013 CS 795/895 - Wireless Networked Systems

DLL = LLC + MAC Page 7 Spring 2013 CS 795/895 - Wireless Networked Systems

DLL = LLC + MAC Wireless LAN Standards (IEEE 802.11) Page 8 Spring 2013 CS 795/895 - Wireless Networked Systems

Medium Access Control (MAC) Page 9 Spring 2013 CS 795/895 - Wireless Networked Systems

Introduction Multiple access control channels Each node is attached to a transmitter/receiver which communicates via a channel shared by other nodes Transmission from any node is received by other nodes Node 3 Node 2 Shared Channel Node 4 Node 1 Node N Page 10 Spring 2013 CS 795/895 - Wireless Networked Systems

The Channel Access Problem Multiple nodes share a channel A B C Pairwise communication desired Simultaneous communication not possible MAC Protocols Suggests a scheme to schedule communication Maximize number of communications Ensure fairness among all transmitters Page 11 Spring 2013 CS 795/895 - Wireless Networked Systems 11

The Trivial Solution A B C collision Transmit and pray Plenty of collisions --> poor throughput at high load Page 12 Spring 2013 CS 795/895 - Wireless Networked Systems 12

Classification of MAC Protocols Contention-free MAC TDMA, FDMA, CDMA: Divides channel by time, frequency, or code More applicable to static networks and/or networks with centralized control Contention-based MAC Single Channel vs. Multi-Channels Sender Initiated vs. Receiver Initiated Single Channel and Sender Initiated Protocols Page 13 Spring 2013 CS 795/895 - Wireless Networked Systems

Contention Free (TDMA, FDMA, Token Based) Page 14 Spring 2013 CS 795/895 - Wireless Networked Systems

TDMA: Time Division Multiple Access Access to channel in "rounds" Each station gets fixed length slot (length = pkt trans time) in each round Unused slots go idle Example: 6-station LAN, 1,3,4 have packets, slots 2,5,6 idle Page 15 Spring 2013 CS 795/895 - Wireless Networked Systems

Dynamic TDMA In dynamic time division multiple access, a scheduling algorithm dynamically reserves a variable number of timeslots in each frame to variable user data streams, based on the traffic demand of each user data stream. Negotiations (beforehand) to determine how to allocate slots dynamically. Modem preamble TDM Downlink TDMA Frame D-TDMA Uplink S-ALOHA control Burst from Access Point -> Mobiles Burst from User A To Access Point User B User C Page 16 Spring 2013 CS 795/895 - Wireless Networked Systems

FDMA: Frequency Division Multiple Access Similar to broadcast radio and TV, assign a different carrier frequency per call Channel spectrum divided into frequency bands Each station assigned fixed frequency band Unused transmission time in frequency bands go idle Need to set aside some frequencies that are operated in randomaccess mode to enable a wireless user to request and receive a carrier for data transmission Page 17 Spring 2013 CS 795/895 - Wireless Networked Systems

Frequency vs. Time FDMA Carrier TDMA Hybrid FDMA/TDMA Frequency Frequency Frequency Time Time Time Basic principle of communication: Two regions in the timefrequency plane with equal areas can carry the same amount of information 18 Page 18 Spring 2013 CS 795/895 - Wireless Networked Systems

Summary of Scheduled Access Protocols Avoid of contention/collision; better channel efficiency with a large number of hosts predetermined channel allocation Need centralized control Require global synchronization Guard time period to protect slots Delay? Page 19 Spring 2013 CS 795/895 - Wireless Networked Systems

CDMA: Code Division Multiple Access What if not divide up the channel by time (as in TDMA), or frequency (as in FDMA)? Is collision inevitable? Not if collision is no longer damaging! Is there any way to decode bits garbled by other overlapping frames? CDMA based on Spread Spectrum A new perspective to solve multiple access problems Spread Spectrum is a PHY innovation, not a MAC technique. CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing. Break each bit into k chips according to fixed pattern specific to each user (User s code) Page 20 Spring 2013 CS 795/895 - Wireless Networked Systems

CDMA: Code Division Multiple Access Multiplexing Technique used with spread spectrum Start with data signal rate D Called bit data rate Break each bit into k chips according to fixed pattern specific to each user User s code New channel has chip data rate kd chips per second E.g. k=6, three users (A,B,C) communicating with base receiver R Code for A = <1,-1,-1,1,-1,1> Code for B = <1,1,-1,-1,1,1> Code for C = <1,1,-1,1,1,-1> Page 21 Spring 2013 CS 795/895 - Wireless Networked Systems

CDMA Example E.g. k=6, three users (A,B,C) communicating with base receiver R Code for A = <1,-1,-1,1,-1,1> Code for B = <1,1,-1,-1,1,1> Code for C = <1,1,-1,1,1,-1> Page 22 Spring 2013 CS 795/895 - Wireless Networked Systems

Token Ring (802.5) Small frame (token) circulates when idle Station waits for token Frame makes round trip and is absorbed by transmitting station Station then inserts new token when transmission has finished and leading edge of returning frame arrives Under light loads, some inefficiency Under heavy loads, round robin makes efficiency and fair. Page 23 Spring 2013 CS 795/895 - Wireless Networked Systems 23

Contention Based Random Access Non-Carrier Sensing (ALOHA, Slotted ALOHA) Page 24 Spring 2013 CS 795/895 - Wireless Networked Systems

Random Access Random Access (or contention) Protocols: No station is superior to another station and none is assigned the control over another. A station with a frame to be transmitted can use the link directly based on a procedure defined by the protocol to make a decision on whether or not to send. ALOHA Protocols Developed @ U of Hawaii in early 70 s. Was designed for wireless LAN and can be used for any shared medium Pure ALOHA vs. Slotted ALOHA Page 25 Spring 2013 CS 795/895 - Wireless Networked Systems

Pure ALOHA All frames from any station are of fixed length (L bits) Stations transmit at equal transmission time (all stations produce frames with equal frame lengths). A station that has data can transmit at any time After transmitting a frame, the sender waits for an acknowledgment for an amount of time (time out) equal to the maximum round-trip propagation delay = 2* t prop If no ACK was received, sender assumes that the frame or ACK has been destroyed and resends that frame after it waits for a random amount of time If station fails to receive an ACK after repeated transmissions, it gives up Page 26 Spring 2013 CS 795/895 - Wireless Networked Systems

Pure Aloha In Pure Aloha, frames are transmitted at completely arbitrary times. Page 27 Spring 2013 CS 795/895 - Wireless Networked Systems

Pure ALOHA Vulnerable If the frame transmission time is T sec, the vulnerable time is = 2T sec. This means no station should send during the T-sec before this station starts transmission and no station should start sending during the T-sec period that the current station is sending. Page 28 Spring 2013 CS 795/895 - Wireless Networked Systems

Pure ALOHA s Performance Assume that users try to send frames at random times (Poisson events). Let G be the average rate that users try to send frames per frame time. The probability of trying to send k frames in TWO frame time is The probability no other frames are sent is P(0) = e -2G. The throughput is the rate that frames are sent multiplied by the probability that the transmission is successful: S = G.P(0) = G.e -2G S is optimum at G=1/2 S=1/2e = 0.184 0.184 G e 2 G ( k) ( 2G) 0 0 0 1 2 3 Page 29 Spring 2013 CS 795/895 - Wireless Networked Systems 0.2 0.1 P = k e k! 2G

Slotted Aloha Slotted ALOHA cuts the vulnerable period for packets from 2t to t. Time is slotted. Packets must be transmitted at the beginning of a slot. Need central clock (or other sync mechanism) Procedure 1. If a host has a packet to transmit, it waits until the beginning of the next slot before sending 2. If there was a collision, wait a random number of slots and try to send again Success (S), Collision (C), Empty (E) slots Page 30 Spring 2013 CS 795/895 - Wireless Networked Systems

Slotted ALOHA s Performance Assume that users try to send frames at random times (Poisson events). Let G be the average rate that users try to send frames per frame time. The probability of trying to send k frames in ONE frame time is The probability no other frames are sent is P(0) = e -G. ( P( k) = G ) k e G k! The throughput is the rate that frames are sent multiplied by the probability that the transmission is successful: S = G.P(0) = G.e -G S is optimum at G=1 0.368 G e G 0.4 0.2 S=1/e = 0.368 0 0 0 2 4 Page 31 Spring 2013 CS 795/895 - Wireless Networked Systems

Pure ALOHA and Slotted ALOHA Throughput versus offered traffic for ALOHA systems. Page 32 Spring 2013 CS 795/895 - Wireless 32 Networked Systems

Contention Based Random Access Carrier Sense Multiple Access (CSMA) Page 33 Spring 2013 CS 795/895 - Wireless Networked Systems

CSMA Don t transmit A B C Listen before you talk Carrier sense multiple access (CSMA) Defer transmission when signal on channel Advantages Fairly simple to implement Functional scheme that works Disadvantages Can not recover from a collision (inefficient waste of medium time) Can collisions still occur? Page 34 Spring 2013 CS 795/895 - Wireless Networked Systems

Persistent and Nonpersistent CSMA reduces chance of collisions reduces the efficiency increases the chance for collisions 1-persistant p-persistant Page 35 Spring 2013 CS 795/895 - Wireless Networked Systems

Persistent and Nonpersistent CSMA Comparison of the channel utilization versus load for various random access protocols. Page 36 Spring 2013 CS 795/895 - Wireless 36 Networked Systems

CSMA/CD (Collision Detection) Collisions can still occur: Propagation delay non-zero between transmitters spatial layout of nodes When collision: Entire packet transmission time wasted note: Role of distance & propagation delay in determining collision probability Page 37 Spring 2013 CS 795/895 - Wireless Networked Systems

CSMA/CD (Collision Detection) Keep listening to channel While transmitting If (Transmitted_Signal!= Sensed_Signal) à Sender knows it s a Collision à ABORT Page 38 Spring 2013 CS 795/895 - Wireless Networked Systems

2 Observations on CSMA/CD Transmitter can send/listen concurrently If (Sensed - Transmitted = null)? Then success The signal is identical at Tx and Rx Non-dispersive The TRANSMITTER can detect if and when collision occurs Page 39 Spring 2013 CS 795/895 - Wireless Networked Systems

Unfortunately Both observations do not hold for wireless Because Page 40 Spring 2013 CS 795/895 - Wireless Networked Systems

Wireless Medium Access Control A cannot send and listen in parallel A B C D Signal power Signal not same at different locations CS threshold Distance Page 41 Spring 2013 CS 795/895 - Wireless Networked Systems

CSMA with Collision Avoidance (CSMA/CA) CMSA/CA The CSMA/CA algorithm is based on a basic time unit called slot σ. Slot duration (σ) is equal to maximum propagation delay. Time space is slotted at the boundaries of σ. Channel access slotted CSMA can only occur at the boundary of σ Next Frame Slot Time Slotting solved collisions because of propagation delays Page 42 Spring 2013 CS 795/895 - Wireless Networked Systems

But Still, More Problems to Solve Page 43 Spring 2013 CS 795/895 - Wireless Networked Systems

Hidden Node Collisions Important: D has not heard A, but can interfere at receiver B A B C D Signal power D is the hidden node to A CS threshold Distance Page 44 Spring 2013 CS 795/895 - Wireless Networked Systems

Hidden Node Collisions Important: D has not heard A, but can interfere at receiver B A B C D SignalOfInterest ( SoI) SNR = Interference( I) + Noise( N) SoI I D B A B = = P P d A transmit α AB D transmit α d DB SNR A B P A transmit d = P N + α AB D transmit α d DB D is the hidden node to A Page 45 Spring 2013 CS 795/895 - Wireless Networked Systems

Exposed Node Collisions Y Important: X has heard A, but should not defer transmission to Y X A B C D Signal power X is the exposed terminal to A CS threshold Distance Page 46 Spring 2013 CS 795/895 - Wireless Networked Systems

So, how do we cope with Hidden/Exposed Terminals? Page 47 Spring 2013 CS 795/895 - Wireless Networked Systems 47

Contention Based Reservation Page 48 Spring 2013 CS 795/895 - Wireless Networked Systems

The Emergence of MACA, MACAW, & 802.11 Wireless MAC proved to be non-trivial 1992 - research by Karn (MACA) 1994 - research by Bhargavan (MACAW) Led to IEEE 802.11 committee The standard was ratified in 1999 Page 49 Spring 2013 CS 795/895 - Wireless Networked Systems

CA with Control Handshaking - (MACA) Alternative to carrier sensing, i.e. does not use CSMA Multiple access with collision avoidance (MACA) uses a three way handshake to avoid hidden terminal problem (Karn, 90) When node A wants to send a packet to node B, node A first sends a Request-to-Send (RTS) to B On receiving RTS, node B responds by sending Clear-to-Send (CTS) All nodes within one hop of node A hear the RTS and defer their transmissions until corresponding CTS. When a node (such as D) overhears a CTS, it keeps quiet for the duration of the transfer Transfer duration is included in RTS and CTS both Page 50 Spring 2013 CS 795/895 - Wireless Networked Systems

MACA examples MACA avoids the problem of hidden terminals A and C want to send to B A sends RTS first C waits after receiving CTS from B RTS CTS CTS A B C MACA avoids the problem of exposed terminals B wants to send to A, C to another terminal now C does not have to wait for it cannot receive CTS from A A B C 51 Page 51 Spring 2013 CS 795/895 - Wireless Networked Systems RTS CTS RTS

MACA Limitations MACA does not provide ACK RTS-CTS approach does not always solve the hidden node problem Examples Page 52 Spring 2013 CS 795/895 - Wireless Networked Systems

MACAW (MACA for Wireless) RTS-CTS-DS-DATA-ACK RTS from A to B CTS from B to A Data Sending (DS) from A to B Data from A to B ACK from B to A Random wait after any successful/ unsuccessful transmission Significantly higher throughput than MACA Does not completely solve hidden & exposed node problems A B C D RTS CTS DS Data Ack Page 53 Spring 2013 CS 795/895 - Wireless Networked Systems

IEEE 802.11 Standards Page 54 Spring 2013 CS 795/895 - Wireless Networked Systems

IEEE 802.11 MAC Very popular wireless MAC protocol Two Architectures IEEE 802.11 Medium Access Control (PCF+DCF) FHSS DSSS Infrared OFDM MAC PHY SSID BSSID Page 55 Spring 2013 CS 795/895 - Wireless Networked Systems

802.11 Channels The IEEE 802.11 channelization scheme. The 2.4-GHz band is broken down into 11 in USA. However, at most there is 3 non-overlapping channels. Page 56 Spring 2013 CS 795/895 - Wireless Networked Systems

IEEE 802.11 MAC Two modes: DCF (distributed coordination function) PCF (point coordination function) IEEE 802.11 DCF is based on CSMA/CA Physical Carrier Sense Explicit ACK from receiver (for unicast transmission) RTS/CTS reservation frames (Virtual Carrier Sensing) Retry Counters Different Timing Intervals for priorities Page 57 Spring 2013 CS 795/895 - Wireless Networked Systems

IEEE 802.11 DCF Basics RTS/CTS & Virtual Carrier Sense RTS-CTS used for frames longer than a Threshold RTS-CTS overhead not efficient for short frames Some environments may not find RTS-CTS useful, e.g. many infrastructure networks Threshold variable can be tuned Virtual carrier sensing Duration field in all frames, including RTS and CTS, monitored by every station Duration field used to construct a network access vector (NAV) Inhibits transmission, even if no carrier detected Page 58 Spring 2013 CS 795/895 - Wireless Networked Systems

IEEE 802.11 DCF Basics Retry Counters Counter and timer for each frame Short or long retry counter Lifetime timer Retry counter Incremented for each transmission attempt Use of short versus long retry counter based on Threshold variable Threshold limit ShortRetryLimit for short retry counter LongRetryLimit for long retry counter If threshold exceeded, frame is discarded and upper layer is notified via MAC interface Page 59 Spring 2013 CS 795/895 - Wireless Networked Systems

IEEE 802.11 DCF Basics Timing Intervals Timing intervals are defined that control a station s access to the medium Slot time (SlotTime) Specific value depends on PMD layer Derived from propagation delay, transmitter delay, etc. (20micro-sec for DSSS and 50 for FHSS) Basic unit of time for MAC, e.g. for backoff time is a multiple of slot time Short Inter-Frame Space (SIFS) Shortest interval -- SIF < SlotTime e.g. 10 microsec for FHSS Used for highest priority access to the medium, e.g., for ACK and CTS Allows Data-ACK and RTS-CST to be atomic transactions Page 60 Spring 2013 CS 795/895 - Wireless Networked Systems

IEEE 802.11 DCF Basics Timing Intervals Priority (or PCF) Inter-Frame Space (PIFS) PIFS = SIFS + SlotTime Used for Point Coordination Function (PCF) access to the medium Allows priority based access to the medium after ACKs but before contention based access Distributed (or DCF) Inter-Frame Space (DIFS) DIFS = SIFS + 2 SlotTime Used for Distributed Control Function (DCF) access to the medium Results in lower priority access than using SIFS or PIFS Extended Inter-Frame Space (EIFS) EIFS = SIFS + (8 ACK) + PreambleLength + PLCPHeaderLength + DIFS Used in the event that the MAC receives a frame with an error Provides an opportunity for a fast retransmit of the error frame In summary SIFS < SlotTime < PIFS < DIFS << EIFS Page 61 Spring 2013 CS 795/895 - Wireless Networked Systems

802.11 DCF Mode Principles When a sender has a data to transmit, it picks a random wait period. The wait period is decremented if the channel is idle When this period expires, the node tries to acquire the channel by sending a RTS packet The Receiving node (destination) responds with a CTS packet indicating that its ready to receive the data The sender then completes the packet transmission If the packet is received without errors, the destination node responds with an ACK If an ACK is not received, the packet is assumed to be lost and the packet is retransmitted Page 62 Spring 2013 CS 795/895 - Wireless Networked Systems

802.11 DCF Mode Principles If RTS fails, the node attempts to resolve the collision by doubling the wait period. (This is known as binary exponential back-off (BEB)). Station trying to send an ACK is given preference over a station that is acquiring a channel (Different waiting intervals are specified) A node needs to sense channel for Distributed Inter- Frame Space (DIFS) interval before making an RTS attempt and a Short Inter Frame Space (SIFS) interval before sending an ACK packet Page 63 Spring 2013 CS 795/895 - Wireless Networked Systems

802.11 DCF Mode C A B D Deferred CW DIFS C D DIFS Contention Window NAV (RTS) NAV (CTS) RTS A RTS DATA SIFS SIFS SIFS CTS ACK B Page 64 Spring 2013 CS 795/895 - Wireless Networked Systems

802.11 DCF Mode Notes Because SIFS is shorter than the DIFS interval, the station sending an ACK attempts transmission before a station sending a data packet In addition to physical channel sensing, virtual carrier sensing is achieved due to NAV (Network allocation vector) field in the packet NAV indicates the duration of current transmission Nodes listening to RTS, or CTS messages back off NAV amount of time before sensing the channel again Several papers describe this protocol and even suggest enhancements. Page 65 Spring 2013 CS 795/895 - Wireless Networked Systems

802.11 Frames Type Control Frame: RTS, CTS, ACK Data Frame Management Frame: Beacon Probe Req, Probe Resp Assoc Req, Assoc Resp Reassoc Req, Reassoc Resp Disassociation Authentication Deauthentication Page 66 Spring 2013 CS 795/895 - Wireless Networked Systems

802.11 Data Frame Format Ver - The Protocol Version number is always 0 Type - indicates whether the frame is a Management, Control or Data frame. Subtype - describe the detail of the frame type. To DS - set if the frame is to be sent by the AP to the Distribution System From DS - set if the frame is from the Distribution System More Frag - set if this frame is a fragment of a bigger frame and there are more fragments to follow. Retry - set if this frame is a retransmission, maybe through the loss of an ACK Page 67 Spring 2013 CS 795/895 - Wireless Networked Systems

802.11 Data Frame Format Power Mgmt - indicates what power mode ('save' or 'active') the station is to be in once the frame has been sent More Data - set by the AP to indicate that more frames are destined to a particular station that may be in power save mode. These frames will be buffered at the AP ready for the station should it decide to become 'active'. WEP - set if WEP is being used to encrypt the body of the frame Duration & ID - In Power save poll messages this is the station ID, whereas in all other frames this is the duration used when calculating the NAV Address 1 - The recipient station address on the BSS. If To DS is set, this is the AP address; if From DS is set then this is the station address Address 2 - The transmitter station address on the BSS. If From DS is set, this is the AP address; if To DS is set then this is the station address Address 3 - If Address 1 contains the destination address then Address 3 will contain the source address. Similarly, if Address 2 contains the source address then Address 3 will contain the destination address. Page 68 Spring 2013 CS 795/895 - Wireless Networked Systems

802.11 Data Frame Format Address 4 - If a Wireless Distribution System (WDS) is being used (with AP to AP communication), then Address 1 will contain the receiving AP address; Address 2 will contain the transmitting AP address; Address 3 will contain the destination station address and Address 4 the source station address. Sequence Control - contains the Fragment Number and Sequence Number that define the main frame and the number of fragments in the frame Frame Body - contains the actual data e.g. IP datagrams and can be up to 2312 octets in size CRC - 32-bit Cyclic Redundancy Check on the whole 802.11 frame. Page 69 Spring 2013 CS 795/895 - Wireless Networked Systems

802.11 Control Frame Format Page 70 Spring 2013 CS 795/895 - Wireless Networked Systems

802.11 Contention Window Random number selected from [0,cw] If transmission was successful, set CW = CW min If transmission fails (i.e., no ACK), CW = min{2(cw+1)-1, CW max } Small value for cw Less wasted idle slots time Large number of collisions with multiple senders (two or more stations reach zero at once) Optimal CW for known number of contenders & know packet size Computed by minimizing expected time wastage (by both collisions and empty slots) Tricky to implement because number of contenders is difficult to estimate and can be VERY dynamic Project Idea: Evaluate literature for CW calculation schemes under different scenarios Enhance/New adaptive CW scheme Page 71 Spring 2013 CS 795/895 - Wireless Networked Systems

Physical Carrier Sense Mechanisms Energy detection threshold Monitors channel during idle times between packets to measure floor noise Energy levels above this floor noise by a threshold trigger carrier sense DSSS correlation threshold Monitors the channel for Direct Sequence Spread Spectrum (DSSS) coded signal Triggers carrier sense if the correlation peak is above a threshold More sensitive than energy detection (but only works for 802.11 transmissions) High BER disrupts transmission but not detection Carrier can be sensed at lower levels than packets can be received Receive Range Results in larger carrier sense range than transmission range More than double the range in NS2 802.11 simulations Carrier Sense Range Page 72 Spring 2013 CS 795/895 - Wireless Networked Systems

On 802.11 Issues RTS/CTS & Carrier Sense When RTS/CTS is useful? Should Carrier Sensing replace RTS/CTS? Interference Range vs. Carrier Sense Range How effective CSMA carrier sense? BER & Date rate and Transmission Range (data rate affect the SNR threshold and hence the transmission range but not the physical CS) Contention Window Size Is ACK necessary? MACA said no ACKs. Let TCP recover from losses The search for the best MAC protocol is still on. However, 802.11 is being optimized too. Thus, wireless MAC research still alive Page 73 Spring 2013 CS 795/895 - Wireless Networked Systems

On RTS/CTS & Carrier Sense Does RTS/CTS (Virtual CS) solve hidden terminals? Assuming carrier sensing zone = communication zone A B C D CTS E RTS F E does not receive CTS successfully à Can later initiate transmission that interferes with D Hidden terminal problem remains Page 74 Spring 2013 CS 795/895 - Wireless Networked Systems 74

On RTS/CTS & Carrier Sense Hidden Terminal: How about increasing Physical Carrier Sense range?? E will defer on sensing carrier à no collision!!! CTS E RTS F A B C Data D Page 75 Spring 2013 CS 795/895 - Wireless Networked Systems

On RTS/CTS & Carrier Sense Exposed Terminal: B should be able to transmit to A Carrier sensing makes the situation worse RTS CTS E A B C D Page 76 Spring 2013 CS 795/895 - Wireless Networked Systems

On RTS/CTS & Carrier Sense 802.11 does not solve HT/ET completely Only alleviates the problem through RTS/CTS and recommends larger CS zone Large CS zone aggravates exposed terminals Spatial reuse reduces à A tradeoff RTS/CTS packets also consume bandwidth Moreover, backing off mechanism is also wasteful Carrier sense relies on channel measurements at the sender to infer the probability of reception at the receiver! Project Idea: Evaluation of the benefits and drawbacks of carrier sense Scheme to intelligently choose a Carrier sensing threshold Evaluate tracking correlation between channel conditions at the sender and at the receiver. Page 77 Spring 2013 CS 795/895 - Wireless Networked Systems

On Contention Window Size Optimal CW for known number of contenders & know packet size Computed by minimizing expected time wastage (by both collisions and empty slots) Tricky to implement because number of contenders is difficult to estimate and can be VERY dynamic 802.11 adaptive scheme is unfair Under contention, unlucky nodes will use larger cw than lucky nodes (due to straight reset after a success) Lucky nodes may be able to transmit several packets while unlucky nodes are counting down for access Fair schemes should use same cw for all contending nodes Project Idea: Evaluate literature for CW calculation schemes under different scenarios Enhance/New adaptive CW scheme Page 78 Spring 2013 CS 795/895 - Wireless Networked Systems

On Interference Range vs. Carrier Sense Range 802.11 physical layer (e.g., Direct Sequence Spread Spectrum (DSSS) used in 802.11b) Ø Capture effect: two transmissions received by the same receiver, the signals of the stronger transmission will capture the receiver radio, and signals of the weaker transmission will be rejected as noise. Simple and widely accepted model: Capturing stronger signal Capturing stronger frame Received Frame Received Frame Frame 1 Frame 2 Frame 1 Frame 2 Page 79 Spring 2013 CS 795/895 - Wireless Networked Systems

On Interference Range vs. Carrier Sense Range Power path loss model: Capture model: Given: R=250m, R C=550, l =2, α=5 d Interference Range: I 1 2 I C Inefficiency: Page 80 Spring 2013 CS 795/895 - Wireless Networked Systems

On Interference Range vs. Carrier Sense Range Project Idea: How to estimate interference range (distance) Propagation Delay? Interference Aware MAC Scheme Page 81 Spring 2013 CS 795/895 - Wireless Networked Systems

On Transmission Date rate Bit error (p) for BPSK and QPSK : Received Power Channel Bandwidth SNR Floor Noise Data Rate Page 82 Spring 2013 CS 795/895 - Wireless Networked Systems

On Transmission Date rate Page 83 Spring 2013 CS 795/895 - Wireless Networked Systems

On ACKnowledgment APs typically backlogged with traffic Persistent traffic à possibility of optimization Use implicit ACK optimization 802.11 Piggyback the CTS with ACK for previous dialog Gain Implicit ACK Page 84 Spring 2013 CS 795/895 - Wireless Networked Systems

On ACKnowledgment The optimization timeline 802.11 Implicit ACK Hybrid Channel Access T R T R T R RTS RTS RTS CTS CTS CTS Backoff Data ACK RTS CTS Data ACK Backoff Backoff Data Data RTS Poll +ACK CTS +ACK Data Data Poll +ACK RTS Data CTS +ACK Page 85 Spring 2013 CS 795/895 - Wireless Networked Systems Backoff Backoff Backoff

Performance Analysis of the IEEE 802.11 Distributed Coordination Function (Giuseppe Bianchi) Page 86 Spring 2013 CS 795/895 - Wireless Networked Systems

802.11 DCF Throughput Analysis (Bianchi) Objective: Analytical Evaluation of Saturation Throughput Assumptions: Fixed number of stations having packet for transmission Each packet collide with constant and independent probability Model bi-dimensional process {s(t), b(t)} with discretetime Markov chain Analysis divided into two parts: Study the behavior of single station with a Markov model Study the events that occur within a generic slot time & expressed throughput for both Basic & RTS/CTS access method Page 87 Spring 2013 CS 795/895 - Wireless Networked Systems

Markov Chain Model Page 88 Spring 2013 CS 795/895 - Wireless Networked Systems

Markov Chain Model Closed form solution for Markov chain Stationary Probability Page 89 Spring 2013 CS 795/895 - Wireless Networked Systems

Markov Chain Model Probability τ that a station transmits in randomly chosen slot time When m =0 no exponential backoff is considered probability τ results independent of p In general τ depends on conditional collision probability p Page 90 Spring 2013 CS 795/895 - Wireless Networked Systems

Throughput Analysis Normalized system throughput S Probability of transmission P tr Probability of successful transmission P s Page 91 Spring 2013 CS 795/895 - Wireless Networked Systems

Throughput Analysis Normalized system throughput Specify T s and T c to compute throughput for DCF access mechanism Page 92 Spring 2013 CS 795/895 - Wireless Networked Systems

Throughput Analysis Considering System via Basic Access mechanism Packet header H = PHY hrd +MAC hrd Propagation delay δ Page 93 Spring 2013 CS 795/895 - Wireless Networked Systems

Throughput Analysis Packet transmission via RTS/CTS Access mechanism Page 94 Spring 2013 CS 795/895 - Wireless Networked Systems

Model Validation Compared analytical results with that obtained by means of simulation Analytical model extremely accurate Analytical results (lines) coincide with simulation results (symbols) in both Basic Access & RTS/CTS cases Saturation throughput analysis vs. simulation Page 95 Spring 2013 CS 795/895 - Wireless Networked Systems

Performance Evaluation Greater the network size lower is the throughput for basic access Saturation throughput vs. initial window size for Basic Access mechanism Page 96 Spring 2013 CS 795/895 - Wireless Networked Systems

Performance Evaluation Throughput of Basic Access mechanism depends on W W depends on number of terminals High value of W gives excellent throughput performance Saturation throughput vs. initial window size for Basic Access mechanism Page 97 Spring 2013 CS 795/895 - Wireless Networked Systems

Performance Evaluation Throughput obtained with RTS/CTS mechanism Independent of value of W Saturation throughput vs. initial window size for RTS/CTS mechanism Page 98 Spring 2013 CS 795/895 - Wireless Networked Systems

Performance Evaluation Number of transmissions per packet increases as W reduces & network size n increases. Average number of transmissions per packet Page 99 Spring 2013 CS 795/895 - Wireless Networked Systems

Questions Page 100 Spring 2013 CS 795/895 - Wireless Networked Systems