1 / 60

Wireless LAN - MAC layer

Wireless LAN - MAC layer. Omer Ben-shalom. references. 802.11 Wireless Networks: The Definitive Guide, M.Gast, O’Reilly, 2002 Some drawings are taken from the O’Reilly book White papers at Intersil Few drawings and slides borrowed from other lectures in the IEEE and universities.

forest
Télécharger la présentation

Wireless LAN - MAC layer

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Wireless LAN - MAC layer Omer Ben-shalom

  2. references • 802.11 Wireless Networks: The Definitive Guide, M.Gast, O’Reilly, 2002 • Some drawings are taken from the O’Reilly book • White papers at Intersil • Few drawings and slides borrowed from other lectures in the IEEE and universities

  3. Introduction • The 802.11 MAC is common to all 802.11 flavors • provides transmission of user data into the air • Uses Carrier sense multiple access (CSMA) • Uses Collision avoidance (CA) rather than detection • Uses a distributed access function like Ethernet with no central controller but has a controller based mode

  4. Lecture brief • 802.11 terminology and challenges • 802.11 services • Media access coordination functions • Distributed coordination • Point coordination • Frame types and formats

  5. 802.11 Vs 802.3 (Ethernet) • 802.11 is an 802 (i.e. Ethernet) protocol for use in a wireless environment • The protocol has to deal with some significant differences from wired Ethernet • Power management – Common devices are mobile, battery life is of utmost important • Bandwidth The ISM spread spectrum do not offer BW similar to the wired options and is shared • Security – The wireless signal can be picket up without direct attachment removing the option of physical security.

  6. 802.11 Vs 802.3 (Ethernet) • Addressing -The topology of a wireless network is dynamic since the stations are free to move around. The protocol is expected to allow and support such roaming • Noise - Radio networks are very noisy • Narrowband transmissions • Microwaves and other • Multi path fading • Media sense • The transmitter cannot listen while talking • The Hidden node problem - Not all the users are guarantied to hear each other, unlike Ethernet

  7. Hidden node problem • not everyone hears everyone • Distance • Physical barriers (walls etc) • A traffic to B can collide with C traffic to B without A or C being in the know A B C

  8. Basic 802.11 terminology • AP – Access Point. A central controller that can extend the range of the service set • stations in the BSS talk through a central controller (AP) • The AP sets configurable parameters that all must match • Those are carried in special packets called beacons • BSS – Basic service set (‘cell’) • Group of stations using the same media and in a Basic Set Area (BSA) • Stations communicate directly or using an AP • If no central controller exist this is an iBSS • Membership in a BSS is defined by the Service Set Identifier (SSID) and the BSSID (Normally controlled by the AP) • Multiple APs per SSID. Potentially multiple SSID per AP

  9. Basic 802.11 terminology • Different APs connect through a distribution system (DS). Normally a wired backbone • All the APs connected on the DS and their BSS form the ESS - Extended service set • The ESS is a single L2 environment /broadcast domain • Stations send packets other stations in the same ESS ‘directly’ • Stations can freely move within the ESS

  10. An EBSS environment DS

  11. 802.11 MAC layer details • 802.11 is a “listen before talk” protocol with two basic modes of operation: • Basic access – send whenever media is free • RTS/CTS – asking request for sending • Based on a series of timers governing the sending of frames (Interframe spaces) • Uses ARQ Scheme based on positive acknowledgment of packets (ACK) for unicast • No ACK mechanism for broadcast/multicast • Distributes the resources ‘fairly’ among clients • In spite of using ‘Collision avoidance’ collisions can and do occur

  12. Associations and Mobility • There are three kinds of mobility: • No AP transition: • A wireless station is either stationary or moves only within a single BSS. Nothing special is needed. • BSS transition: • The wireless station is moving from one BSS to another BSS inside the same ESS. Uses the reassociation service to support the move. No packets should be lost • ESS transition: • Requires a disassociation and a new association in the new ESS. Usually involves change of IP address and sessions are broken unless using mobile IP or similar.

  13. Power save modes • 802.11 allows for a power save mode • Clients go to ‘sleep’ for intervals set by the AP • AP buffers frames to the client for that period • When client wakes up it will retrieve missing frames by sending a DS-poll to the AP • The AP can respond in two ways • Immediately send the packet • Send a simple ACK on the request with no data. Station than has to stay awake until data is delivered and the AP beacon specifies it has no waiting data

  14. Defined 802.11 services – station services • MAC Services Data Unit (MSDU) delivery • This is the service of passing a data unit from sender to receiver in the same BSS • WEP/security services • Authentication: supplying identity to the other station in order to be allowed to for relationship • De-authentication: informing the other side that you are terminating the relationship • Privacy includes the use of WEP for encryption • Those are the only services allowed in an iBSS (no AP)

  15. Defined 802.11 services – distribution services • Distribution • Data delivery service from any station to any other station in the ESS though the AP • For this to work any AP has to know all the stations associated to it and be a proxy for them on the DS • Association services • Association: The act of joining a BSS and registering in the AP for distribution to work (initiated by station) • Disassociation: The act of terminating the relations between AP and station (initiated by both sides) • Reassociation: The act of letting an AP know you are joining his BSS from another BSS and specifying the last AP. New AP can instruct the old AP to void the station registration • Integration • Allows stations on an ESS to talk to devices on different kinds of LAN (Ethernet for example)

  16. 802.11 distribution services • There are two basic types of distribution services define controlling how stations can access the medium • Distributed coordination function (DCF) – not using a central controller. More similar to normal Ethernet. Mandatory • Two sub implementations with and without RTS/CTS • Point coordination function (PCF) – access is regulated by a central controller (the AP). Not mandatory and usually not implemented • Will be discussed at the end of the lecture only

  17. DCF (Distributed coordination function) • Fundamental channel access method in 802.11 • Used by asynchronous data services • implements explicit Acknowledgements • Does not use a central controller • Based on CSMA/CA (Collision Avoidance) • Collision detection is not used, because a station cannot listen to the (air) channel for collisions when transmitting • Uses Collision Avoidance (CA) with timers

  18. Contention function timers • Inter frame space (IFS): Time interval between transmission of frames • Three IFS values are specified • Time slot is defined to 9 microseconds • Short-IFS (SIFS) defined to 16 microseconds • DCF-IFS (DIFS) = SIFS + 2*time slot • PCF-IFS (PIFS) = DIFS + time slot for PCF • SIFS < PIFS < DIFS • Access to the media is controlled through these three IFS intervals

  19. Media sense • DCF implements two different kinds of media sense • Physical Carrier sense/Clear Channel assessment is carried out in the physical layer and is based on energy levels and/or 802.11 protocol activity detection • network allocation vector (NAV) or Logical Carrier sense – indicates amount of time that must elapse before channel can be tested again for idle. For simple DCF the NAV is Initiated by hearing the duration field of a data frame

  20. Collision Avoidance in DFS • If a node wants to broadcast, it checks if the channel is idle for a little while (DIFS microseconds). • DIFS is the distributed inter frame spacing • If the channel is idle, it broadcasts. When the receiver gets the frame, it check the CRC and if all is ok, it transmits an ACK after a shorter (SIFS microseconds) interval. Else source will resent. Means ACK has preference over any other frame transmission • Essentially collision detection is performed by not receiving an ACK

  21. Fragmentation support • The short IFS (SIFS) was created to support fragmentation and resending of corrupted packets • That is the real difference from Ethernet • Another fragment or a resent packet only have to wait SIFS microseconds and not DIFS • So resent/fragment has preference over new packets and the same preference as the ACK

  22. Exponential backoff algorithm • If the channel is busy, waits until it is clear + DIFS interval • Allows more fragments or ACKs • After DIFS add a random interval between 0 and the CW (contention window) time slots • CW is started at 31 and decremented by 1 while medium is free • If medium becomes busy, the timer is frozen

  23. Collision Avoidance in 802.11

  24. More collision avoidance • Having different counters does not guarantee that transmissions will not collide • When two stations transmit simultaneously a collision will occur • The collision is resolved as by both stations doubling the CW and restarting the random access process again • Exponential backoff algorithm

  25. CSMA/CA flowchart start NAV=0 ? yes sense channel random backoff Channel Idle ? no yes transmit frame collision ? no ? No - success

  26. Limitation of simple DCF • Assumes stations can hear each other • susceptible to the ‘Hidden node’ problem • Sender cannot detect a collision during transmission • Wasteful if collision happen for a long frame

  27. Solution – RTS/CTS • RTS/CTS allows a station to seize the channel for a short time avoiding collisions • A requests to send to B (RTS) for duration X after contending for the channel • If B senses does not know of a conflict will clear A to send (CTS) with same timer after waiting SIFS microseconds • A will send the packet after waiting just SIFS microseconds • If C hears the CTS it will not transmit itself • All stations in the BSS, read the RTS frame and adjust their NAV accordingly • RTS/CTS frames are very short (20 bytes), so collision is unlikely and if it happens less BW is wasted

  28. Implications of CTS/RTS • CTS/RTS has overhead • Need to send both for each packet send • Used only for packets over a certain length threshold (XXX bytes by default) • Taken into consideration when implementing logical carrier sense • The NAV can be now set by the duration fields in CTS/RTS • Solves the hidden node problem because every ‘hidden’ node will hear RTS or CTS

  29. Timing SIFS = 16s, PIFS = 25s, DIFS = 34s, EIFS = 43s, Slottime = 9s Sending a single data packet DIFS DIFS SIFS SIFS SIFS RTS CTS DATA ACK channel sense begin to sense channel decide that the channel to be idle Sending a fragmented data packet DIFS SIFS SIFS SIFS SIFS SIFS SIFS RTS CTS Frag 1 ACK Frag 2 ACK How long does it take to send an RTA, CTA, Data or ACK? Later

  30. Sending back to back packets DIFS DIFS SIFS SIFS SIFS SIFS RTS CTS Data ACK RTS CTS Wait an random backoff, i.e., random(0,CW)*slottime) But don’t increment/decrement CW.

  31. RTS/CTS overhead (intersil)

  32. Virtual Channel Sensing (no RTS/CTS)

  33. Virtual Channel Sensing (RTS/CTS)

  34. DCF –without CTS/RTS

  35. DCF – RTS/CTS

  36. 802.11 MAC Frame types • Management Frames: Used for • Station association, dissociation, timing and synchronization, authentication and more • Control Frames: Used for controlling medium access • Handshaking during contention periods (RTS/CTS) • ACK frames during contention period • Data Frames: • Used for Sending data

  37. Frame formats

  38. Address fields • The address fields are used differently for different frame types • Normally 3 addresses are used: • Source Address • Destination Address • BSSID – network identifier. May be the AP MAC • The 4 address format is only used with WLAN bridges • Source/address bridges • Source/address of original packet

  39. Bits: 2 2 4 1 1 1 1 1 1 1 1 Protocol To From More Pwr More Type SubType Retry WEP Rsvd Version DS DS Frag Mgt Data Frame Control Field 802.11 Frame control field

  40. 802.11 frame types

  41. Management frames • Management frames carry in the MSDU a payload made of information elements and fixed fields • Are very versatile and contain two types of fields • Fixed length fields defined by the standard • Variable length fields that can be extended in the future by vendors. Support proprietary/extension features called information elements

  42. Fixed fields • Fixed fields are used for the various management operations and include: • Authentication details • Beacon interval • Capacity information • AP address • Listen interval • Time stamp • Reason and status codes for authentication and association

  43. Information elements • Information elements are variable length components. Each has the ID, length and data. New ones can be created as needed Examples include: • SSID • Supported rates • Traffic indication map (TIM) – an indication of waiting traffic for stations coming up from a sleep period

  44. Main management frame types • Beacon – Sent by the AP to coordinate • Allow finding and identifying networks • Includes the SSID and the BSSID • Set timers and other parameters for the cell • Has the traffic indication map (TIM) for all stations • Probe request/response • A request to get service for a specific SSID and transmission rates. • Candidate APs will answer • Association/Authentication request, responses and the relevant de-association/de-authentication

  45. PCF • PCF is an optional capability which is connection oriented and provides contention free frame transfer • PCF is based on a central coordinator (PC which is usually at the AP • The PC arbitrates the media using polling. Polling interval is not standardized and left to implementers • Polled stations are allowed to transmit data sequentially, thus removing contention

  46. PCF • PCF sits of top of DCF (shown earlier) • PCF and DCF times alternate • PCF uses the contention free period (CFP) • DCF uses the contention period (CP) • A CFP followed by a CP form a superframe • CFP_Rate is parameter used to determine the frequency with which CFP occurs • A limit is set on the duration of CFP so that the DCF traffic is not starved. It has to allow for a minimum of one maximum size frame

  47. PCF operation • AP initiates the PCF by sending a beacon frame announcing the CFP and its duration • Beacon is sent every target beacon transmission time (TBTT) • The CFP is ended by the PC sending an CF-End management frame • All clients must honor the CFP, if they do not implement the PCF they are simply not able to transmit during the CFP and wait for the CP • In any case PCF has priority over DCF since a sending station only has to wait a shorter time (PIFS) to transmit

  48. PCF operation • Stations register for the CFP in the AP and are on a polled station vector • Once CFP starts, the PC polls the stations in its polling vector • SIFS interval after the beacon frame, the PC sends a CF-Poll frame sequentially to each station that required service • A station on receiving this, sends a CF-ACK (no data) or a CF-ACK + Data frame, after SIFS duration

  49. PCF • A station can send data to the AP in this way

  50. Problems with PCF • The beacon starting the CFP is subject to the DCF contention as so its timing is not guarantied in spite of using PIFS (Deferred beacon problem) • The duration of transmission from a station is not really under the control of the PC

More Related