Contents IEEE MAC layer operation Basic CSMA/CA operation

Slides:



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

Medium Access Issues David Holmer
Ethernet – CSMA/CD Review
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
Module C- Part 1 WLAN Performance Aspects
14.1 Chapter 14 Wireless LANs Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1 K. Salah Module 4.2: Media Access Control The Media Access Control (MAC) sublayer –Random Access (CSMA), IEEE –Token Passing, IEEE Ch 13-
Network Technology CSE Network Technology CSE3020 Week 9.
1 CSE401n:Computer Networks Lecture 16 Wireless Link & LANs WS: ch-14 KR: 5.7.
Wireless Networking So we talked about wired networks. What about wireless?
1 CSCD 439/539 Wireless Networks and Security CSDA/CA, Frames Lecture 4 Fall 2007 Some Material in these slides from J.F Kurose and K.W. Ross All material.
Copyright © 2003, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 6 Multiple Radio Access.
20 – Collision Avoidance, : Wireless and Mobile Networks6-1.
Networks: Wireless LANs1 Wireless Local Area Networks.
5-1 Data Link Layer r Wireless Networks m Wi-Fi (Wireless LAN) Example Problems m RTS/CTS.
Semester EEE449 Computer Networks The Data Link Layer Part 2: Media Access Control En. Mohd Nazri Mahmud MPhil (Cambridge, UK) BEng (Essex,
6: Wireless and Mobile Networks6-1 Elements of a wireless network network infrastructure wireless hosts r laptop, PDA, IP phone r run applications r may.
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 Simulation - IEEE MAC Protocol
CS640: Introduction to Computer Networks Aditya Akella Lecture 22 - Wireless Networking.
Lecture #2 Chapter 14 Wireless LANs.
9/11/2015 5:55 AM1 Ethernet and CSMA/CD CSE 6590 Fall 2010.
Opersating Mode DCF: distributed coordination function
MAC layer Taekyoung Kwon. Media access in wireless - start with IEEE In wired link, –Carrier Sense Multiple Access with Collision Detection –send.
2014 YU-ANTL Lab Seminar Performance Analysis of the IEEE Distributed Coordination Function Giuseppe Bianchi April 12, 2014 Yashashree.
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.
Ethernet. Problem In an Ethernet, suppose there are three stations very close to each other, A, B and C. Suppose at time 0, all of them have a frame to.
Lecture 4 Wireless Medium Access Control
Computer and Data Communications Semester Mohd Nazri Mahmud Session 4a-12 March 2012.
CWNA Guide to Wireless LANs, Second Edition
IEEE Wireless LAN Standard. Medium Access Control-CSMA/CA IEEE defines two MAC sublayers Distributed coordination function (DCF) Point coordination.
Chapter 6 Multiple Radio Access
Fundamentals of Computer Networks ECE 478/578
1 CSCD 433 Network Programming Fall 2013 Lecture 7 Ethernet and Wireless
Performance Analysis of IEEE Distributed Coordination Function (DCF) Author : Giuseppe Bianchi Presented by: 李政修 December 23, 2003.
IEEE WLAN.
Chapter 6 Medium Access Control Protocols and Local Area Networks Wireless LAN.
Ch 14. Wireless LANs IEEE Specification for a wireless LAN – Cover physical and data link layers Basic service sets (BSS) and extended service.
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.
Wi-Fi. Basic structure: – Stations plus an access point – Stations talk to the access point, then to outside – Access point talks to stations – Stations.
Universität Karlsruhe Institut für Telematik ECE 591
WLAN. Networks: Wireless LANs2 Distribute Coordination Function (DCF) Distributed access protocol Contention-Based Uses CSMA/ CA – Uses both physical.
SMAC: An Energy-efficient MAC Protocol for Wireless Networks
Chapter 14 Wireless LANs.
MAC Sublayer MAC layer tasks: – Control medium access – Roaming, authentication, power conservation Traffic services – DCF (Distributed Coordination.
Medium Access Control in Wireless networks
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.
MAC for WLAN Doug Young Suh Last update : Aug 1, 2009 WLAN DCF PCF.
1 Ethernet CSE 3213 Fall February Introduction Rapid changes in technology designs Broader use of LANs New schemes for high-speed LANs High-speed.
CSMA/CA Simulation  Course Name: Networking Level(UG/PG): UG  Author(s) : Amitendu Panja, Veedhi Desai  Mentor: Aruna Adil *The contents in this ppt.
Distributed-Queue Access for Wireless Ad Hoc Networks Authors: V. Baiamonte, C. Casetti, C.-F. Chiasserini Dipartimento di Elettronica, Politecnico di.
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.
EA C451 (Internetworking Technologies)
Medium Access Control MAC protocols: design goals, challenges,
Lab 7 – CSMA/CD (Data Link Layer Layer)
Computer Communication Networks
Lecture 27 WLAN Part II Dr. Ghalib A. Shah
High Speed LANs – Ethernet and Token Ring
IEEE : Wireless LANs ALOHA, Slotted ALOHA
IEEE Wireless LAN wireless LANs: untethered (often mobile) networking
Multiple Access Methods
Data Communication Networks
Wireless LAN Simulation IEEE MAC Protocol
CSE 313 Data Communication
Chapter 6 Multiple Radio Access.
Presentation transcript:

Contents IEEE 802.11 MAC layer operation Basic CSMA/CA operation Network Allocation Vector (NAV) Backoff operation Wireless medium access example Usage of RTS / CTS Fragmentation S-72.3240 Wireless Personal, Local, Metropolitan, and Wide Area Networks

Medium Access Control (MAC) Medium access control: Different nodes must gain access to the shared medium (for instance a wireless channel) in a controlled fashion (otherwise there will be collisions). Access methods: : FDMA Assigning channels in frequency domain LLC TDMA Assigning time slots in time domain MAC CDMA Assigning code sequences in code domain PHY CSMA Assigning transmission opportunities in time domain on a statistical basis S-72.3240 Wireless Personal, Local, Metropolitan, and Wide Area Networks

CSMA/CD rule: Backoff after collision CSMA/CD vs. CSMA/CA (1) CSMA/CD (Collision Detection) is the MAC method used in a wired LAN (Ethernet). Wired LAN stations can (whereas wireless stations cannot) detect collisions. Basic CSMA/CD operation: CSMA/CD rule: Backoff after collision Wait for free medium Transmit frame If collision, stop transmission immediately Retransmit after random time (backoff) S-72.3240 Wireless Personal, Local, Metropolitan, and Wide Area Networks

CSMA/CA rule: Backoff before collision CSMA/CD vs. CSMA/CA (2) CSMA/CA (Collision Avoidance) is the MAC method used in a wireless LAN. Wireless stations cannot detect collisions (i.e. the whole packets will be transmitted anyway). Basic CSMA/CA operation: CSMA/CA rule: Backoff before collision Wait for free medium Wait a random time (backoff) Transmit frame If collision, the stations do not notice it Collision => erroneous frame => no ACK returned S-72.3240 Wireless Personal, Local, Metropolitan, and Wide Area Networks

Basic wireless medium access We shall next investigate Infrastructure BSS only. As far as medium access is concerned, all stations and AP have equal priority  transmission in downlink (from the AP) and uplink (from a station) is similar. AP wired LAN CSMA: One packet at a time S-72.3240 Wireless Personal, Local, Metropolitan, and Wide Area Networks

DCF (CSMA/CA) vs. PCF Designed for contention-free services (delay-sensitive real-time services such as voice transmission), but has not been implemented (yet) Used for contention services (and basis for PCF) Point Coordination Function (PCF) MAC extent Distributed Coordination Function (DCF) based on CSMA/CA S-72.3240 Wireless Personal, Local, Metropolitan, and Wide Area Networks

Wireless medium access (1) Cyclic Redundancy Check (CRC) is used for error detection Transmitted frame (A=>B) ACK (B=>A) If the received frame is erroneous, no ACK will be sent DIFS SIFS When a frame is received without bit errors, the receiving station (B) sends an Acknowledgement (ACK) frame back to the transmitting station (A). S-72.3240 Wireless Personal, Local, Metropolitan, and Wide Area Networks

Wireless medium access (2) Earliest allowed transmission time of next frame Transmitted frame (A=>B) ACK (B=>A) Next frame (from any station) DIFS SIFS DIFS During the transmission sequence (Frame + SIFS + ACK) the medium (radio channel) is reserved. The next frame can be transmitted at earliest after the next DIFS period. S-72.3240 Wireless Personal, Local, Metropolitan, and Wide Area Networks

Wireless medium access (3) Transmitted frame (A=>B) ACK (B=>A) Next frame DIFS SIFS DIFS There are two mechanisms for reserving the channel: Physical carrier sensing and Virtual carrier sensing using the so-called Network Allocation Vector (NAV). S-72.3240 Wireless Personal, Local, Metropolitan, and Wide Area Networks

Wireless medium access (4) Information about the length of the frame is in the PHY header Transmitted frame (A=>B) ACK (B=>A) Next frame DIFS SIFS DIFS Physical carrier sensing means that the physical layer (PHY) informs the MAC layer when a frame has been detected. Access priorities are achieved through interframe spacing. S-72.3240 Wireless Personal, Local, Metropolitan, and Wide Area Networks

Wireless medium access (5) The two most important interframe spacing times are SIFS and DIFS: SIFS (Short Interframe Space) = 10 ms (16 ms) DIFS (DCF Interframe Space) = 50 ms (34 ms) When two stations try to access the medium at the same time, the one that has to wait for the time SIFS wins over the one that has to wait for the time DIFS. In other words, SIFS has higher priority over DIFS. 802.11b 802.11g S-72.3240 Wireless Personal, Local, Metropolitan, and Wide Area Networks

Wireless medium access (6) Transmission is not allowed as long as NAV is non-zero Transmitted frame ACK NAV value is given here NAV Next frame DIFS SIFS DIFS Virtual carrier sensing means that a NAV value is set in all stations that were able to receive a transmitted frame and were able to read the NAV value in this frame. S-72.3240 Wireless Personal, Local, Metropolitan, and Wide Area Networks

Wireless medium access (7) Long transaction Transmitted frame ACK ACK NAV DIFS SIFS DIFS Virtual carrier sensing using NAV is important in situations where the channel should be reserved for a ”longer time” (RTS/CTS usage, fragmentation, etc.). S-72.3240 Wireless Personal, Local, Metropolitan, and Wide Area Networks

NAV value is carried in MAC header MPDU (MAC Protocol Data Unit) Addr 1 Addr 2 Addr 3 Addr 4 (optional) MAC payload FCS Duration field: 15 bits contain the NAV value in number of microseconds. The last (sixteenth) bit is zero. All stations must monitor the headers of all frames they receive and store the NAV value in a counter. The counter decrements in steps of one microsecond. When the counter reaches zero, the channel is available again. S-72.3240 Wireless Personal, Local, Metropolitan, and Wide Area Networks

Wireless medium access (8) Channel was idle at least DIFS seconds Transmitted frame (A=>B) ACK (B=>A) Next frame (from any station) DIFS SIFS t > DIFS When a station wants to send a frame and the channel has been idle for a time > DIFS (counted from the moment the station first probed the channel) => can send immediately. S-72.3240 Wireless Personal, Local, Metropolitan, and Wide Area Networks

Wireless medium access (9) Channel was busy when station wanted to send frame Transmitted frame (A=>B) ACK (B=>A) Next frame Backoff DIFS SIFS DIFS When a station wants to send a frame and the channel is busy => the station must wait a backoff time before it is allowed to transmit the frame. Reason? Next two slides… S-72.3240 Wireless Personal, Local, Metropolitan, and Wide Area Networks

No backoff => collision is certain Suppose that several stations (B and C in the figure) are waiting to access the wireless medium. When the channel becomes idle, these stations start sending their packets at the same time => collision! Station A ACK Station B Collision! Station C DIFS S-72.3240 Wireless Personal, Local, Metropolitan, and Wide Area Networks

Backoff => collision probability is reduced Contending stations generate random backoff values bn. Backoff counters count downwards, starting from bn. When a counter reaches zero, the station is allowed to send its frame. All other counters stop counting until the channel becomes idle again. Remaining backoff time Station A ACK Backoff Station B bn is large Station C bn is small DIFS S-72.3240 Wireless Personal, Local, Metropolitan, and Wide Area Networks

Contention window (CW) for 802.11b If transmission of a frame was unsuccessful and the frame is allowed to be retransmitted, before each retransmission the Contention Window (CW) from which bn is chosen is increased. 802.11b CW … Initial attempt DIFS CW = 25-1 = 31 slots (slot = 20 ms) … 1st retransm. DIFS CW = 26-1 = 63 slots : 5th (and further) retransmissions … CW = 210-1 = 1023 slots DIFS S-72.3240 Wireless Personal, Local, Metropolitan, and Wide Area Networks

Contention window (CW) for 802.11g In the case of 802.11g operation, the initial CW length is 15 slots. The slot duration is 9 ms. The backoff operation of 802.11g is substantially faster than that of 802.11b. 802.11g CW … Initial attempt DIFS CW = 24-1 = 15 slots (slot = 9 ms) … 1st retransm. DIFS CW = 25-1 = 31 slots : 6th (and further) retransmissions … CW = 210-1 = 1023 slots DIFS S-72.3240 Wireless Personal, Local, Metropolitan, and Wide Area Networks

Selection of random backoff From the number CW (= 15 / 31 … 1023 slots) the random backoff bn (in terms of slots) is chosen in such a way that bn is uniformly distributed between 0 … CW. Since it is unlikely that several stations will choose the same value of bn, collisions are rare. The next slides show wireless medium access in action. The example involves four stations: A, B, C and D. ”Sending a packet” means ”Data+SIFS+ACK” sequence. Note how the backoff time may be split into several parts. S-72.3240 Wireless Personal, Local, Metropolitan, and Wide Area Networks

Wireless medium access (1) Contention Window 1) While station A is sending a packet, stations B and C also wish to send packets, but have to wait (defer + backoff) 2) Station C is ”winner” (backoff time expires first) and starts sending packet Station A ACK Defer Station B 1 Backoff Defer Station C 2 Station D DIFS S-72.3240 Wireless Personal, Local, Metropolitan, and Wide Area Networks

Wireless medium access (2) 3) Station D also wishes to send a packet 4) However, station B is ”winner” and starts sending packet Station A Station B 4 Station C ACK 3 Station D Defer DIFS DIFS S-72.3240 Wireless Personal, Local, Metropolitan, and Wide Area Networks

Wireless medium access (3) 5) Station D starts sending packet. Now there is no competition. Station A Station B ACK Station C 5 Station D DIFS DIFS S-72.3240 Wireless Personal, Local, Metropolitan, and Wide Area Networks

No shortcuts for any station… Transmitted frame (A=>B) Next frame (A=>B) Backoff ACK (B=>A) DIFS SIFS DIFS When a station wants to send more than one frame, it has to use the backoff mechanism like any other station (of course it can ”capture” the channel by sending a long frame, for instance using fragmentation). S-72.3240 Wireless Personal, Local, Metropolitan, and Wide Area Networks

ACK frame structure Frame type = control MPDU Frame subtype = ACK NAV FCS No MAC payload 1 1 1 1 Address of station from which frame was sent that is now acknowledged S-72.3240 Wireless Personal, Local, Metropolitan, and Wide Area Networks

Usage of RTS & CTS The RTS/CTS (Request/Clear To Send) scheme is used as a countermeasure against the “hidden node” problem: Hidden node problem: WS 1 and WS 2 can ”hear” the AP but not each other => WS 1 AP If WS 1 sends a packet, WS 2 does not notice this (and vice versa) => collision! WS 2 S-72.3240 Wireless Personal, Local, Metropolitan, and Wide Area Networks

Reservation of medium using NAV The RTS/CTS scheme makes use of “SIFS-only” and the NAV (Network Allocation Vector) to reserve the medium: SIFS DIFS WS 1 RTS Data frame AP CTS ACK SIFS SIFS NAV in RTS NAV = CTS + Data + ACK + 3xSIFS NAV in CTS NAV = Data + ACK + 3xSIFS S-72.3240 Wireless Personal, Local, Metropolitan, and Wide Area Networks

Danger of collision only during RTS WS 2 does not hear the RTS frame (and associated NAV), but can hear the CTS frame (and associated NAV). WS 1 RTS Data frame AP CTS ACK Danger of collision NAV in RTS NAV = CTS + Data + ACK + 3xSIFS NAV in CTS NAV = Data + ACK + 3xSIFS S-72.3240 Wireless Personal, Local, Metropolitan, and Wide Area Networks

Advantage of RTS & CTS (1) Usage of RTS/CTS offers an advantage if the data frame is very long compared to the RTS frame: WS 1 (RTS/CTS used) RTS Data frame AP CTS ACK Short interval: collision not likely WS 1 (RTS/CTS not used) Data frame AP ACK Long interval: collision likely S-72.3240 Wireless Personal, Local, Metropolitan, and Wide Area Networks

Advantage of RTS & CTS (2) A long “collision danger” interval (previous slide) should be avoided for the following reasons: Larger probability of collision Greater waste of capacity if a collision occurs and the frame has to be retransmitted. A threshold parameter (dot11RTSThreshold) can be set in the wireless station. Frames shorter than this value will be transmitted without using RTS/CTS. S-72.3240 Wireless Personal, Local, Metropolitan, and Wide Area Networks

Fragmentation Fragmentation makes use of the RTS/CTS scheme and the NAV mechanism: SIFS SIFS DIFS WS 1 RTS Frag 0 Frag 1 AP CTS ACK 0 ACK 1 SIFS SIFS SIFS RTS NAV in WS Frag 0 NAV in AP CTS ACK 0 S-72.3240 Wireless Personal, Local, Metropolitan, and Wide Area Networks

Sequence control field MPDU (MAC Protocol Data Unit) Addr 1 Addr 2 Addr 3 Addr 4 (optional) MAC payload FCS Fragment number (for identifying fragments) Frame sequence number (for identifying frames) S-72.3240 Wireless Personal, Local, Metropolitan, and Wide Area Networks

Advantage of fragmentation Transmitting long data frames should be avoided for the following reasons: Larger probability that the frame is erroneous Greater waste of capacity if a frame error occurs and the whole frame has to be retransmitted. A threshold parameter (dot11FragmentationThreshold) can be set in the wireless station. Frames longer than this value will be transmitted using fragmentation. S-72.3240 Wireless Personal, Local, Metropolitan, and Wide Area Networks