Media Access Control and

Slides:



Advertisements
Similar presentations
Nick Feamster CS 4251 Computer Networking II Spring 2008
Advertisements

Contents IEEE MAC layer operation Basic CSMA/CA operation
Lecture 5: IEEE Wireless LANs (Cont.). Mobile Communication Technology according to IEEE (examples) Local wireless networks WLAN a.
– Wireless PHY and MAC Stallings Types of Infrared FHSS (frequency hopping spread spectrum) DSSS (direct sequence.
© Kemal AkkayaWireless & Network Security 1 Department of Computer Science Southern Illinois University Carbondale CS591 – Wireless & Network Security.
Comp 361, Spring 20056:Basic Wireless 1 Chapter 6: Basic Wireless (last updated 02/05/05) r A quick intro to CDMA r Basic
Network Technology CSE Network Technology CSE3020 Week 9.
P. Bhagwat Specification overview. P. Bhagwat Specifications PLCP Sublayer PHY layer Management PMD Sublayer MAC sublayer MAC Layer Management.
1 CSE401n:Computer Networks Lecture 16 Wireless Link & LANs WS: ch-14 KR: 5.7.
Copyright © 2003, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 6 Multiple Radio Access.
protocol continued. DCF The basic idea is non-persistent. Can do an optimization: For a new packet (Q len = 0), the sender needs only wait for.
Wireless LAN Advantages 1. Flexibility 2. Planning 3. Design
Overview of Wireless LANs Use wireless transmission medium Issues of high prices, low data rates, occupational safety concerns, & licensing requirements.
MAC layer Taekyoung Kwon. Media access in wireless - start with IEEE In wired link, –Carrier Sense Multiple Access with Collision Detection –send.
IEEE Project started by IEEE for setting standard for LAN. This project started in (1980, February), Name given to project is year and month.
Wireless Medium Access. Multi-transmitter Interference Problem  Similar to multi-path or noise  Two transmitting stations will constructively/destructively.
Lecture 4 Wireless Medium Access Control
IEEE Wireless LAN Standard. Medium Access Control-CSMA/CA IEEE defines two MAC sublayers Distributed coordination function (DCF) Point coordination.
4: DataLink Layer1 Multiple Access Links and Protocols Three types of “links”: r point-to-point (single wire, e.g. PPP, SLIP) r broadcast (shared wire.
CSC 581 Communication Networks II Chapter 6c: Local Area Network (Wireless LAN – ) Dr. Cheer-Sun Yang.
Chapter 6 Multiple Radio Access
IEEE WLAN.
Chapter 6 Medium Access Control Protocols and Local Area Networks Wireless LAN.
5: DataLink Layer 5a-1 Multiple Access protocol. 5: DataLink Layer 5a-2 Multiple Access Links and Protocols Three types of “links”: r point-to-point (single.
Ch 12. Multiple Access. Multiple Access for Shared Link Dedicated link – Point-to-point connection is sufficient Shared link – Link is not dedicated –
Universität Karlsruhe Institut für Telematik ECE 591
WLAN.
MAC Sublayer MAC layer tasks: – Control medium access – Roaming, authentication, power conservation Traffic services – DCF (Distributed Coordination.
Medium Access Control in Wireless networks
Wireless Protocols. 2 Outline MACA 3 ISM: Industry, Science, Medicine unlicensed frequency spectrum: 900Mhz, 2.4Ghz, 5.1Ghz, 5.7Ghz.
MAC Layer Protocols for Wireless Networks. What is MAC? MAC stands for Media Access Control. A MAC layer protocol is the protocol that controls access.
DSSS PHY packet format Synchronization SFD (Start Frame Delimiter)
IEEE Wireless LAN. Wireless LANs: Characteristics Types –Infrastructure based –Ad-hoc Advantages –Flexible deployment –Minimal wiring difficulties.
CS434/534: Topics in Networked (Networking) Systems Wireless Foundation: Wireless MAC; MAC; New Designs Yang (Richard) Yang Computer Science.
Chapter 15 Wireless LANs.
Wireless MAC.
Wireless MAC.
EA C451 (Internetworking Technologies)
Medium Access Control MAC protocols: design goals, challenges,
Sidevõrgud IRT 4060/ IRT 0020 vooruloeng 6 / 20. okt 2004
Computer Communication Networks
Distributed Medium Access Control in Wireless Networks
Lecture 27 WLAN Part II Dr. Ghalib A. Shah
Mobile and Ad hoc Networks
Multiple Access Mahesh Jangid Assistant Professor JVW University.
Net301 lecture9 11/5/2015 Lect 9 NET301.
IEEE : Wireless LANs ALOHA, Slotted ALOHA
Services of DLL Framing Link access Reliable delivery
Multiple access.
Link Layer; Media Access Control
and Hidden Terminals Y. Richard Yang 2/3/2009.
Wireless Local Area Networks (LANs)
IEEE Wireless LAN wireless LANs: untethered (often mobile) networking
Specification overview
Chapter 6 Medium Access Control Protocols and Local Area Networks
Specification overview
Protocol Details John Bellardo UCSD.
Introduction to Wireless Networks
Specification overview
Link Layer and LANs Not everyone is meant to make a difference. But for me, the choice to lead an ordinary life is no longer an option 5: DataLink Layer.
Specification overview
Performance Evaluation of an Integrated-service IEEE Network
Wireless LAN Simulation IEEE MAC Protocol
Specification overview
Specification overview
MITP 413: Wireless Technologies Week 8
Specification overview
WiFi Networks: IEEE b Wireless LANs
Enhanced Backoff Scheme in CSMA/CA for IEEE
Chapter 6 Multiple Radio Access.
Presentation transcript:

Media Access Control and 802.11 Y. Richard Yang 2/7/2011

Outline Admin. and recap Media access control

Admin. Start to think about project Admin: homework 2 linked online 2-3 students per group Make appointment to talk to me Admin: homework 2 linked online

Recap SDMA, TDMA, FDMA and CDMA are basic media partitioning techniques divide media into smaller “pieces” (space, time slots, frequencies, codes) for multiple transmissions to share

WCDMA Orthognal Variable Spreading Factor (OSVF) Flexible code (spreading factor) allocation up link SF: 4 – 256 down link SF: 4 - 512 1,1,1,1,1,1,1,1 1,1,1,1 ... 1,1,1,1,-1,-1,-1,-1 1,1 1,1,-1,-1,1,1,-1,-1 ... 1,1,-1,-1 X,X 1,1,-1,-1,-1,-1,1,1 1 X 1,-1,1,-1,1,-1,1,-1 X,-X ... No parent-child on the code tree 1,-1,1,-1 1,-1,1,-1,-1,1,-1,1 1,-1 SF=n SF=2n 1,-1,-1,1,1,-1,-1,1 ... 1,-1,-1,1 1,-1,-1,1,-1,1,1,-1 SF=1 SF=2 SF=4 SF=8

Recap Media Access Control (MAC) scheduling problem: how does a network allocate space/time/freq/code to maximize resource efficiency to allocate resource fairly to satisfy app requirements Sharing 802.11 or cellular up links: time sharing the same frequency and code a single receiver (the Access Point) Time sharing techniques fixed allocation centralized authority, e.g., polling taking turns, e.g., token passing distributed random access

Success (S), Collision (C), Empty (E) slots A Recap: Slotted Aloha B Time divided into slots get a frame repeat: at each slot transmit with probability p; until no collision Success (S), Collision (C), Empty (E) slots

Slotted Aloha Efficiency S = throughput = “goodput” (success rate) G = offered load = np 0.5 1.0 1.5 2.0 Slotted Aloha when p n < 1, as p (or n) increases probability of empty slots reduces probability of collision is still low, thus goodput increases when p n > 1, as p (or n) increases, probability of empty slots does not reduce much, but probability of collision increases, thus goodput decreases goodput is optimal when p n = 1

Dynamics of Aloha: Effects of Fixed Probability - assume a total of m stations; - An idle station starts a frame with prob. pa pa << p success rate is the departure rate, the rate the backlog is reducing desirable stable point successful transmission rate at offered load np + (m-n)pa dep. and arrival rate of backlogged stations new arrival rate: (m-n) pa undesirable stable point m n: number of backlogged stations offered load = 1 Lesson: if we fix p, but n varies, we may have an undesirable stable point

Pros and Cons of Slotted Aloha Pros: simple Cons: low efficiency: utilization at ~1/e undesirable stable point

Ethernet fix: CSMA/CD w/ Exp Backoff Given collision detection, instead of wasting the whole packet transmission time (a slot), we waste only the time needed to detect collision. Instead of a fixed probability, adapt probability according to # of collision P: packet size, C: contention window C C C P

Does collision detection work well in wireless? Ethernet Fix: Carrier-Sense Multiple Access /Collision Detection/Exponential Backoff The Ethernet algorithm get a frame from upper layer; K := 0; n := 0; // K: control wait time; n: no. of collisions repeat: wait for K * 512 bit-time; while (network busy) wait; wait for 96 bit-time after detecting no signal; transmit and detect collision; if detect collision stop and transmit a 48-bit jam signal; n ++; m:= min(n, 10), where n is the number of collisions choose K randomly from {0, 1, 2, …, 2m-1}. if n < 16 goto repeat else give up else declare success Does collision detection work well in wireless?

The Hidden Terminal Problem C A is sending to B, but C cannot detect the transmission Therefore C sends to B In summary, A is “hidden” from C

CSMA/CD + Hidden Terminals get a frame from upper layer; K := 0; n := 0; // K: control wait time; n: no. of collisions repeat: wait for K * 512 bit-time; while (network busy) wait; wait for 96 bit-time after detecting no signal; transmit and detect collision; if detect collision stop and transmit a 48-bit jam signal; n ++; m:= min(n, 10), where n is the number of collisions choose K randomly from {0, 1, 2, …, 2m-1}. if n < 16 goto repeat else give up else declare success Hidden terminals cause collapse! Q: what is the outcome of CSMA/CD + hidden terminals?

Handling Hidden Terminals Hidden terminals -> collision detection is not reliable -> if do not detect collision, there is still a chance of collision -> transmit with only prob. CSMA/CD -> CSMA/CA/ACK (congestion avoidance) default in 802.11 even if media is not sensed busy, transmits with a probability in real implementation, with a random delay receiver ACK to make sure collision does not happen

Handling Hidden Terminals: Detect Develop techniques to detect hidden terminals Why cannot C detect potential collision? Collision is spatially dependent C is at a different location than B Only receiver can detect collision, to avoid, B should tell C that it is receiving A B C

Hidden-Terminal Detection: Busy-tone Used in CDPD (cellular digital packet data) The base station sends a busy tone on the down link when receiving data

Hidden-Terminal Detection: Virtual Carrier Sense/ACK Short signaling packets (virtual carrier sense) RTS (request to send) and CTS (clear to send) contain sender address, receiver address, transmission duration, called network allocation vector (NAV) A node keeps quiet for NAV in CTS DATA RTS A B C D CTS

Comparisons: Media Access Techniques Handling Hidden Terminals Slotted Aloha very simple to implement but need clock sync and low efficiency CSMA/CD (Ethernet alg.) hidden terminal causes collapse CSMA/CA/ACK simple to implement low efficiency

Comparisons: Media Access Techniques Handling Hidden Terminals Busy tone simple to implement but need a channel for busy signal Virtual carrier sensing (RTS/CTS) higher efficiency when a collision occurs (not waste the whole duration) But energy consumption can be high because a node needs to monitor the environment all the time Idle:receive:send: 1:1.05:1.4 [Stemm and Katz 1997]; Digitan 2 Mbps WLAN 1:2:2.5 many measurements show that overhead hurts performance

Outline Admin. and recap MAC in wireless networks 802.11

IEEE 802.11 Requirements Design for small coverage (e.g. office, home) (implication?) Low/no mobility (implications?) High data-rate applications Ability to integrate real time applications and non-real-time applications (implications?) Use un-licensed spectrum

802.11: Infrastructure Mode Architecture similar to cellular 802.11 LAN Architecture similar to cellular networks station (STA) terminal with access mechanisms to the wireless medium and radio contact to the access point access point (AP) station integrated into the wireless LAN and the distribution system basic service set (BSS) group of stations using the same AP portal bridge to other (wired) networks distribution system interconnection network to form one logical network (EES: Extended Service Set) based on several BSS 802.x LAN STA1 BSS1 Portal Access Point Distribution System Access Point ESS BSS2 STA2 STA3 802.11 LAN 9

The IEEE 802.11 Family Protocol Release Data Freq. Rate (max) Modulation Range (indoor) Legacy 1997 2.4 GHz 2Mbps DSSS/FHSS ~20 m 802.11a 1999 5 GHz 54 Mbps OFDM ~35 m 802.11b 11 Mbps DSSS ~38 m 802.11g 2003 OFDM/DSSS 802.11n 2009 2.4/5 GHz 540 Mbps ~70 m

5000 + 5*channel number [MHz] 802.11a Physical Channels 36 40 44 48 52 56 60 64 channel# 5150 5180 5200 5220 5240 5260 5280 5300 5320 5350 [MHz] center frequency = 5000 + 5*channel number [MHz] 149 153 157 161 channel# 5725 5745 5765 5785 5805 5825 [MHz]

802.11a Modulation Use OFDM to divide each physical channel (20 MHz) into 52 subcarriers (20M/64=312.5 KHz each) 48 data, 4 pilot Adaptive modulation BPSK: 6, 9 Mbps QPSK: 12, 18 Mbps 16-QAM: 24, 36 Mbps 64-QAM: 48, 54 Mbps

802.11 - MAC Layer Traffic services Asynchronous Data Service (mandatory) exchange of data packets based on “best-effort” support of broadcast and multicast Time-Bounded Service (optional) exchange of bounded delay service

802.11 MAC Layer: Access Methods DFWMAC-DCF CSMA/CA (mandatory) collision avoidance via randomized “back-off“ ACK packet for acknowledgements/detection DFWMAC-DCF w/ RTS/CTS (optional) additional virtual “carrier sensing: to avoid hidden terminal problem DFWMAC- PCF (optional) access point polls terminals according to a list

802.11 CSMA/CA CSMA: Listen before transmit Collision avoidance when transmitting a packet, choose a backoff interval in the range [0, CW] CW is contention window Count down the backoff interval when medium is idle count-down is suspended if medium becomes busy Transmit when backoff interval reaches 0

20 usec (mixed); 9 usec (g-only) 802.11 Backoff IEEE 802.11 contention window CW is adapted dynamically depending on collision occurrence after each collision, CW is doubled thus CW varies from CWmin to CWmax 802.11b 802.11a 802.11g aSlotTime 20 usec 9 usec 20 usec (mixed); 9 usec (g-only) aCWmin 31 slots 15 slots

Congestion Avoidance: Example busy B1 = 25 B2 = 20 B1 = 5 data wait data wait B2 = 10 B2 = 15 busy B1 and B2 are backoff intervals at nodes 1 and 2 cw = 31

802.11 – RTS/CTS + ACK Sender sends RTS with NAV (Network allocation Vector, i.e. reservation parameter that determines amount of time the data packet needs the medium) Receiver acknowledges via CTS (if ready to receive) CTS reserves channel for sender, notifying possibly hidden stations Sender can now send data at once, acknowledgement via ACK Other stations store NAV distributed via RTS and CTS DIFS RTS data sender SIFS SIFS CTS SIFS ACK receiver NAV (RTS) DIFS data other stations NAV (CTS) t defer access new contention

direct access if medium is free  DIFS 802.11 – Inter Frame Spacing Defined different inter frame spacing SIFS (Short Inter Frame Spacing); 10 us in 802.11b highest priority, for ACK, CTS, polling response PIFS (PCF IFS); 30 us in 802.11b medium priority, for time-bounded service using PCF DIFS (DCF, Distributed Coordination Function IFS); 50 us in 802.11b lowest priority, for asynchronous data service t medium busy SIFS PIFS DIFS next frame contention direct access if medium is free  DIFS

802.11 – Inter Frame Spacing 802.11b 802.11a 802.11g aSIFSTime 10 usec aSlotTime 20 usec 9 usec 20 usec (mixed); 9 usec (g only) aDIFTime (2xSlot+SIFS) 50 usec 34 usec 50 usec; 28 usec

802.11: PCF for Polling (Infrastructure Mode) PIFS SIFS D D point coordinator SIFS U polled wireless stations NAV NAV contention free period t medium busy contention period D: downstream poll, or data from point coordinator U: data from polled wireless station

802.11b Frame Format preamble Sync SFD PLCP header MAC Data CRC Preamble (192 usec; or optional 96 short version) - Sync: alternating 0s and 1s (DSSS 128 bits) - SFD: Start Frame delimiter: 0000 1100 1011 1101 PLCH (Phsical Layer Convergence Procedure) Header - payload length - signaling field: the rate info. - CRC: 16 bit protection of header

802.11 – MAC Data Format Types Sequence numbers Addresses control frames, management frames, data frames Sequence numbers important against duplicated frames due to lost ACKs Addresses receiver, transmitter (physical), BSS identifier, sender (logical) Miscellaneous sending time, checksum, frame control, data bytes 2 2 6 6 6 2 6 0-2312 4 Frame Control Duration/ ID Address 1 Address 2 Address 3 Sequence number Address 4 Data CRC bits 2 2 4 1 1 1 1 1 1 1 1 Protocol version Type Subtype To DS From DS More Frag Retry Power Mgmt More Data WEP Order

Example: 802.11b Throughout Suppose TCP with 1460 bytes data payload TCP data frame size (not including preamble) 1536 bytes (1460 + 40 TCP header + 36 802.11 header) TCP ACK data frame size (not including preamble) 76 bytes 802.11b ACK frame size 14 bytes Suppose 802.11b at the highest rate 8 bits per symbol 1.375 Msps Q: What is TCP/802.11b throughput? See page 4 http://www.andrews.edu/~swensen/Wifi%20Throughput.pdf

802.11b Throughout TCP Data TCP Ack DIFS (us) 50 802.11 Data (us) 192 + 1536 / 1.375 = 1,310 192 + 76 / 1.375 = 248 SIFS (us) 10 802.11 ACK (us) 192 + 14 / 1.375 =203 203 Frame total (us) 1,573 511 Transactions total (us) 2,084

Example: 802.11g Throughout Suppose 802.11g at the highest rate (54Mbps) symbol duration: 4 usec; 216 bits/symbol 20 usec preamble; 6 usec “signal extension time” at the end of each frame Suppose TCP with 1460 bytes data payload data: 57 symbols; ACK: 3 symbols 802.11b ACK frame size 14 bytes 1 symbol Data: 28 (DIFS) + (20 + 57 * 4 + 6) + 10 (SIFS) + (20 + 1 * 4 + 6) = 322 Ack: 106 http://www.andrews.edu/~swensen/Wifi%20Throughput.pdf

802.11g Throughout TCP Data TCP Ack DIFS (us) 28 802.11 Data (us) 20 + 57 *4 + 6 = 254 20 + 3 * 4 + 6 = 38 SIFS (us) 10 802.11 ACK (us) 20 + 1 * 4 + 6 =30 30 Frame total (us) 322 106 Transactions total (us) 428

Example: TCP/802.11g + CTS RTS/CTS uses 802.11b DIFS (50 usec) and long preamble (192 usec) RTS/CTS uses 802.11b frame coding 20 bytes RTS 14 bytes CTS Q: What is throughput? http://www.andrews.edu/~swensen/Wifi%20Throughput.pdf

802.11g + CTS Throughout TCP Data TCP Ack DIFS (us) 28 -> 50 CTS 192 + 14/1.375 = 203 = 203 SIFS 10 802.11 Data (us) 20 + 57 *4 + 6 = 254 20 + 3 * 4 + 6 = 38 SIFS (us) 802.11 ACK (us) 20 + 1 * 4 + 6 =30 30 Frame total (us) 322 106 Transactions total (us) 428 -> 898

Summary Technology Transactions per sec Mbps of TCP Relative to 802.11b 11b, 11Mbps 479 5.6 1 11a, 54 Mbps 2,336 27.3 4.9 11g, no CTS/RTS 11g, CTS 1,113 13.0 2.3 11g, RTS/CTS 750 8.8 1.6

Outline Admin. and recap 802.11 802.11 hidden-terminal revisited

The Hidden Terminal Problem No ACK Collision! Alice Bob

The Hidden Terminals Problem Retransmission One more Collision Alice Bob The problem does not stop here. Alice and Bob retransmit their packets after increasing their contention window. But this does not help. Their transmissions still overlap causing more collisions. Alice and Bob will continue increasing their contention window and retransmitting, until after many trials they get a packet through or they time out.