1 / 71

IEEE 802.11 MAC

Wireless LANs June – September 2005. IEEE 802.11 MAC. ผศ. ดร . อนันต์ ผลเพิ่ม Asst. Prof. Anan Phonphoem, Ph.D. anan@cpe.ku.ac.th Intelligent Wireless Network Group (IWING Lab) http://iwing.cpe.ku.ac.th Computer Engineering Department Kasetsart University, Bangkok, Thailand. MAC Layer.

samuru
Download Presentation

IEEE 802.11 MAC

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 LANsJune – September 2005 IEEE 802.11 MAC ผศ. ดร. อนันต์ผลเพิ่ม Asst. Prof. Anan Phonphoem, Ph.D. anan@cpe.ku.ac.th Intelligent Wireless Network Group (IWING Lab) http://iwing.cpe.ku.ac.th Computer Engineering Department Kasetsart University, Bangkok, Thailand

  2. MAC Layer MAC Layer operation • MAC Layer operation • Contention & contention-free • Priority frame transmission • MAC frame structure • Create MAC frame • MAC frame Types • MAC management, control, and data frame

  3. MAC Layer Operations • Accessing the wireless medium • Joining the network • Providing authentication and privacy Accessing the wireless medium

  4. Accessing the Wireless Medium • Two operation modes: • Distributed Coordination Function (DCF) • Point Coordination Function (PCF) • The coexist of DCF & PCF • PCF & DCF tradeoff Distributed Coordination Function (DCF)

  5. DCF • CSMA/CA • Error Recovery Mechanism • Carrier Sense Mechanism • Access Spacing

  6. X Y Z CRS defer CRS defer CRS CRS collision CSMA/CD Modified from Lucent Slide

  7. X Y Z CRS defer defer CRS defer defer CRS CRS DCF - CSMA/CA Modified from Lucent Slide

  8. Error Recovery Mechanism • Transmission impairments • Errors (interference, collision) • Handshake mechanism • RTS: Request to send • CTS: Clear to send • ACK: Acknowledge • Data: Data Frame

  9. X Y Z SIFS SIFS SIFS Data(Z) CTS(X) ACK(X) Error Recovery Mechanism RTS(Z)

  10. Carrier Sense Mechanism • Check for Availability of the Medium • Status = Idle / Busy • Two methods • Physical Carrier Sense (Physical Channel Assessment) • Virtual Carrier Sense (Network Allocation Vector: NAV)

  11. LLC MAC FHSS DSSS Infrared LLC Layer 2 Data Link MAC FHSS DSSS Infrared Layer 1 Physical PHY Physical Carrier Sense • Depend on the modulation techniques/medium • Cannot Tx and Rx simultaneously (too expensive) • Hidden nodes MAC coordination PHY coordination

  12. Virtual Carrier Sense • Used “Network Allocation Vector” (NAV) • A timer for channel reserved period • Included in the RTS and CTS frames • Each station will count down until NAV = 0 • If NAV ≠ 0  Medium is Busy • If NAV = 0  Medium is idle

  13. A B X Y SIFS SIFS SIFS CTS A RTS Data(Z) NAV set Medium Busy Medium Idle NAV set Virtual Carrier Sense NAV set

  14. DIFS PIFS SIFS Data time Access Spacing

  15. DIFS Source Data SIFS Destination Ack DIFS Contention Window Other Next MPDU Backoff after Defer Defer Access Sending Data and Ack From WaveLAN Slide

  16. Min: Window = 31 slots DIFS Start … Window = 63 slots … #1 retry DIFS DIFS Max: Window = 1023 slots … #6 retry DCF Backoff • Similar to Ethernet • Each retry  window size increases • For DSSS • Contention window = 2n– 1 • Smallest = 31, Biggest = 1023 …

  17. Some DCF rules • If medium idle after DIFS • Tx can begin • If no error  medium must be free for DIFS • If error  medium must be free for EIFS • If medium Busy • Defer Access • Positive ACK is required (For unicast)

  18. Accessing the Wireless Medium • Two operation modes: • Distributed Coordination Function (DCF) • Point Coordination Function (PCF) • The coexist of DCF & PCF • PCF & DCF tradeoff Point Coordination Function (PCF)

  19. PCF • Priority-based  QoS • Contention-free frame transfer • Optional

  20. PCF operation • Point Coordinator (PC) takes control the medium • Sense the medium @ beginning of PCF period • If idle after PIFS interval, sends Beacon frame • Beacon includes CF parameters (CFPMaxDuration : length of CF period) • All stations receive Beacon: • Update NAV with the CFPMaxDuration • Cannot take control the medium until CF period end

  21. PCF operation • After SIFS interval, PC may transmit Data frame (PC  station) • Individual, broadcast, multicast • Immediate retransmit is allowed (PIFS) CF Poll frame • Grants permission to stations • Can transmit to any destination • Only single frame allowed per poll Data + CF Poll frame (piggyback) CF End frame • Announce the end of CF period

  22. PC Y Z PIFS B Poll(Z) CF End NAV PCF operation Data(Z) Busy A A Data(Y) NAV set

  23. Accessing the Wireless Medium • Two operation modes: • Distributed Coordination Function (DCF) • Point Coordination Function (PCF) • The coexist of DCF & PCF • PCF & DCF tradeoff The coexist of DCF & PCF

  24. CFP Repetition Interval CFP Repetition Interval CFP CP CFP CP B B PCF DCF PCF DCF The coexist of DCF & PCF

  25. Accessing the Wireless Medium • Two operation modes: • Distributed Coordination Function (DCF) • Point Coordination Function (PCF) • The coexist of DCF & PCF • PCF & DCF tradeoff PCF & DCF tradeoff

  26. PCF & DCF tradeoff • DCF by default, PCF is optional • DCF cannot guarantee the transmission delay • PCF is more suitable for QoS • PCF needs to pay for the overhead (Poll)

  27. MAC Layer Operations • Accessing the wireless medium • Joining the network • Providing authentication and privacy Joining the network

  28. Startup/Joint the network • Turn on  discovery phase • determine AP or other stations exist • If exist  joint the network, get the following: • Service Set Id (SSID) • Timing Synchronization Function (TSF) • Timer Value • PHY setup parameters • Negotiate for connection • Authentication & Association

  29. Discovery Phase • Enter scanning mode • Passive / Active scanning mode • Passive • Listen for a Beacon for ChannelTime period • In Beacon  get the SSID & parameters • Active • Transmit a probe frame (including the SSID that wishes to join) • Wait for a period responded by AP or other stations

  30. MAC Layer Operations • Accessing the wireless medium • Joining the network • Providing authentication and privacy Providing authentication and privacy

  31. Authentication • Open system authentication • Default mode • Shared key authentication • Higher degree of security • More rigorous frame exchange • Need to implement WEP

  32. Initiating Station Authenticating Station Open System Authentication Authentication Frame Algorithm = “Open” Seq. No. = 1 Request Authentication Frame Algorithm = “Open” Seq. No. = 2 Result = accept/Rej Accept/Reject

  33. Initiating Station Authenticating Station Shared Key Authentication Algorithm = “Shared Key” Seq. No. = 1 Algorithm = “Shared Key” Seq. No. = 2 Challenge Text Algorithm = “Shared Key” Seq. No. = 3 Enrypt Challenge Text Algorithm = “Shared Key” Seq. No. = 4 Authen result

  34. Key Key Cipher Text Plain Text Plain Text Wired Equivalent Privacy Encryption Decryption Symmetric Encryption

  35. WEP - Encryption Secret Key Pseudo-Random Number Generator Key Sequence Bitwise XOR Cipher Text Plain Text + Integrity Algorithm Integrity Check Value (ICV)

  36. Clear Text Clear Text Encrypted 4 bytes 4 bytes WEP Frame Frame Header IV Header Frame Body ICV Trailer FCS

  37. WEP - Decryption Secret Key Pseudo-Random Number Generator Key Sequence Plain Text Bitwise XOR Integrity Algorithm Cipher Text Integrity Check Value (ICV)

  38. MAC Layer • MAC Layer operation • Contention & contention-free • Priority frame transmission • MAC frame structure/Types • MAC management, control, and data frame • Basic process revisit MAC frame structure/Types

  39. 2 bytes 2 bytes 6 bytes 6 bytes 6 bytes 2 bytes 6 bytes 0-2312 bytes 4 bytes Frame Control Duration /ID Address 1 Address 2 Address 3 Seq Control Address 4 Frame Body FCS MAC Header MAC Frame Structure

  40. 2 bytes 2 bytes 6 bytes 6 bytes 6 bytes 2 bytes 6 bytes 0-2312 bytes 4 bytes Frame Control Duration /ID Address 1 Address 2 Address 3 Seq Control Address 4 Frame Body FCS CRC Payload Sequence and fragment numbers Different types of Addresses Duration of waiting before the next frame (Ack/Data Period) Control information being sent from station to station MAC Frame Structure

  41. 2 bytes 2 bytes 6 bytes 6 bytes 6 bytes 2 bytes 6 bytes 0-2312 bytes 4 bytes Frame Control Frame control Duration /ID Address 1 Address 2 Address 3 Seq Control Address 4 Frame Body FCS 2 Bits 2 Bits 4bits 1 Bit 1 Bit 1 Bit 1 Bit 1 Bit 1 Bit 1 Bit 1 Bit Proto. Ver Type SubType To DS From DS More Frag Retry PWR Mgmt More Data WEP Order Frame Control Fields

  42. 2 bytes 2 bytes 6 bytes 6 bytes 6 bytes 2 bytes 6 bytes 0-2312 bytes 4 bytes Frame Control Frame control Duration /ID Address 1 Address 2 Address 3 Seq Control Address 4 Frame Body FCS 2 Bits 2 Bits 4bits 1 Bit 1 Bit 1 Bit 1 Bit 1 Bit 1 Bit 1 Bit 1 Bit Proto. Ver Type Type SubType SubType To DS From DS More Frag Retry PWR Mgmt More Data WEP Order 00 Mgmt • 0000 Association Request • 0001 Association Response • Beacon • 1011 Authentication 00 Mgmt 01 Control Frame 10 Data Frame 11 Reserved Frame Control – Type/subtype

  43. Basic Service Set Cell Boundary Independent Basic Service Set (IBSS) • Stand-alone BSS • No backbone infrastructure • At least 2 stations • Ad hoc Network • Small area

  44. Distributed System BSS2 BSS1 Extended Service Set (ESS) • Extending range • Arbitrary size • Multiple cells interconnect • Need Access Point and Distributed system

  45. 2 bytes 2 bytes 6 bytes 6 bytes 6 bytes 2 bytes 6 bytes 0-2312 bytes 4 bytes Frame control Frame Control Duration /ID Address 1 Address 2 Address 3 Seq Control Address 4 Frame Body FCS 2 Bits 2 Bits 4bits 1 Bit 1 Bit 1 Bit 1 Bit 1 Bit 1 Bit 1 Bit 1 Bit Proto. Ver Type SubType To DS To DS From DS From DS More Frag Retry PWR Mgmt More Data WEP Order Frame Control – Address Fields DS: Distribution System DA: Destination Addr SA: Source Addr BSSID: BSS ID same as AP TA: Transmitter Addr RA: Receiver Addr

  46. 2 bytes 2 bytes 6 bytes 6 bytes 6 bytes 2 bytes 6 bytes 0-2312 bytes 4 bytes Frame control Frame Control Duration /ID Address 1 Address 2 Address 3 Seq Control Address 4 Frame Body FCS 2 Bits 2 Bits 4bits 1 Bit 1 Bit 1 Bit 1 Bit 1 Bit 1 Bit 1 Bit 1 Bit Proto. Ver Type SubType To DS From DS More Frag Retry PWR Mgmt More Data WEP Order 1 = retransmit 0 = regular 1=Data encrypted 0=Other Tx Sender gonna be 1=Sleep (power saving) mode 0=Full active mode Frame Control Fields

  47. MAC Layer • MAC Layer operation • Contention & contention-free • Priority frame transmission • MAC frame structure/Types • MAC management, control, and data frame • Basic process revisit Basic process revisit

  48. IEEE 802.11 Basic process • Authentication • Association • Starting an IBSS • One station is configured to be “initiating station’’ • Starter send beacons

  49. Frame Control – Address Fields To DS From DS 00: All management/control frames 01: Data Frames from AP 10: Data Frames to AP 11: Data Frames on a wireless bridge S = source T = transmitter D = destination R = receiver

  50. Traffic Flow MAC filters frames based on “Addr1” • In IBSS: Traffic is sent directly to the destination in BSS Add1 = MAC add of the destination station Add2 = MAC add of the source station Add3 = BSSID (= MAC add of the initiator of the IBSS) • In ESS: Outgoing traffic is sent to Access-Point in BSS Add1 = MAC add of the Access-Point Add2 = MAC add of the source station Add3 = MAC add of the destination station

More Related