3 - Wireless Medium Access

download 3 - Wireless Medium Access

of 42

Transcript of 3 - Wireless Medium Access

  • 7/31/2019 3 - Wireless Medium Access

    1/42

    Applications of Wireless

    Communication

    Student Presentations and

    Research Papers

    Wireless Communication

    TechnologiesWireless Networking and

    Mobile IPWireless Local Area

    Networks

    Wireless Communication and Networks

    Wireless Medium Access

    http://web.uettaxila.edu.pk/CMS/AUT2012/teWCNms/

  • 7/31/2019 3 - Wireless Medium Access

    2/42

    Medium Access Control CSMA

    CSMA-CD

    CSMA-CA

    Random Contention Access

    802.11 Multiple Access schemes PCF

    DCF HCF

    BA and WMM

    Virtual Carrier Sense

    Physical Carrier Sense

    Multiple Access Problems

    Outline

  • 7/31/2019 3 - Wireless Medium Access

    3/42

    Similar to multi-path or noise

    Two transmitting stations will

    constructively/destructively interfere with each other atthe receiver

    Receiver will hear the sum of the two signals (which

    usually means garbage)

    Multi-transmitter Interference

    Problem

  • 7/31/2019 3 - Wireless Medium Access

    4/42

    Medium Access Control

    Protocol required to coordinate access

    i.e. transmitters must take turns

    Similar to talking in a crowded room

    Also similar to hub based Ethernet

  • 7/31/2019 3 - Wireless Medium Access

    5/42

    Carrier Sense Multiple Access

    (CSMA)

    Procedure Listen to medium and wait until it is free

    (no one else is talking)

    Wait a random back off time then start talking Advantages

    Fairly simple to implement

    Functional scheme that works

    Disadvantages Can not recover from a collision

    (inefficient waste of medium time)

  • 7/31/2019 3 - Wireless Medium Access

    6/42

    Medium Access Control

    Media Access Control (MAC) describes how the

    media (wired or wireless) is used

    Polling, token passing, contention based

    CSMA/CD is for ethernet wired networks

    CSMA/CA for wireless 802.11

    Stations using either access method must first

    listen to see whether any other device is

    transmitting. If another device is transmitting, the

    station must wait until the medium is available.

  • 7/31/2019 3 - Wireless Medium Access

    7/42

  • 7/31/2019 3 - Wireless Medium Access

    8/42

    Collision Detection Problem

    Transmit signal is MUCH stronger thanreceived signal

    Due to high path loss in the wirelessenvironment (up to 100dB)

    Impossible to listen while transmittingbecause you will drown out anything you hear

    Also transmitter may not even have much of asignal to detect due to geometry

  • 7/31/2019 3 - Wireless Medium Access

    9/42

    Carrier Sense Multiple Access

    with Collision Avoidance

    CSMA-CA Procedure

    Similar to CSMA but instead of sending packetscontrol frames are exchanged

    RTS = request to send

    CTS = clear to send

    DATA = actual packet

    ACK = acknowledgement

  • 7/31/2019 3 - Wireless Medium Access

    10/42

    Carrier Sense Multiple Access

    with Collision Avoidance

    Advantages

    Small control frames lessen the cost of collisions(when data is large)

    RTS + CTS provide virtual carrier sense whichprotects against hidden terminal collisions (where Acant hear B)

    A B

  • 7/31/2019 3 - Wireless Medium Access

    11/42

    Carrier Sense Multiple Access

    with Collision Avoidance

    Disadvantages

    Not as efficient as CSMA-CD

    Doesnt solve all the problems of MAC inwireless networks

  • 7/31/2019 3 - Wireless Medium Access

    12/42

    CSMA-CD vs CSMA-CA

    The difference is when the coast is clear

    CSMA/CD node can immediately begintransmitting. If a collision occurs while a CSMA/CD node is

    transmitting, the collision will be detected and thenode will temporarily stop transmitting.

    802.11 wireless stations are not capable of

    transmitting and receiving at the same time, sothey are not capable of detecting a collisionduring their transmission. 802.11 wireless networking uses CSMA/CA instead of

    CSMA/CD to try to avoid collisions.

  • 7/31/2019 3 - Wireless Medium Access

    13/42

    CSMA-CA

    IF CSMA/CA station sees no

    transmissions it will wait a random

    interval

    Keep watching the medium

    If still clear after interval, transmit

    If not, start over

    Because only 1 station can use the

    frequency at a time

    Half duplex

  • 7/31/2019 3 - Wireless Medium Access

    14/42

    CSMA-CA

    Standard Distributed Coordination

    Function (DCF) is defined to allow access

    of multiple stations Checks and balances to keep the line clear

    Minimize chances of collision

  • 7/31/2019 3 - Wireless Medium Access

    15/42

    CSMA-CA

    Since 802.11 stations cannot detect collisions,

    how do they know when they happen?

    Every unicast frame requires an

    acknowledgement

    Broadcast and multicast dontACK Frame

    When ACK Frame is received, original

    station knows the frame is received

  • 7/31/2019 3 - Wireless Medium Access

    16/42

    Collision Detection

    Receiving device will also check the CRC

    If frame is corrupt, no ACK frame

    IF no ACK frame, sender assumes deliveryfailure

  • 7/31/2019 3 - Wireless Medium Access

    17/42

    Random Contention Access

    Slotted contention period

    Used by all carrier sense variants

    Provides random access to the channel

    Operation

    Each node selects a random back off number

    Waits that number of slots monitoring the

    channel If channel stays idle and reaches zero then

    transmit

    If channel becomes active wait until

    transmission is over then start counting again

  • 7/31/2019 3 - Wireless Medium Access

    18/42

    Distributed Coordination Function (DCF)

    Fundamental method of 802.11 communication

    Mandatory access method Point Coordination Functions (PCF) is optional 802.11 also has Hybrid Coordination Function (HCF)

    Four Main parts

    Interframe Space

    Virtual Carrier Sense

    Physical Carrier Sense

    Random back-off timer

    Pg 254

  • 7/31/2019 3 - Wireless Medium Access

    19/42

    Interframe Space (IFS)

    The amount of time between transmissions

    Actual length of time depends on network speed

    Short interframe space (SIFS), highest priority

    PCF interframe space (PIFS), middle priority

    DCF interframe space (DIFS), lowest priority

    Arbitration interframe space (AIFS), used by

    QoS stations

    Extended interframe space (EIFS), used with

    retransmissions Pg 254

  • 7/31/2019 3 - Wireless Medium Access

    20/42

    Interframe Space (IFS)

    Only certain types of frames are sent after

    certain interframe spaces

    Only ACK and CTS after SIFS

    Pg 254

  • 7/31/2019 3 - Wireless Medium Access

    21/42

    802.11 DCF Example

    B1 and B2 are backoff intervals

    at nodes 1 and 2cw = 31

    data

    wait

    B1 = 5

    B2 = 15

    B1 = 25

    B2 = 20

    data

    wait

    B1 and B2 are backoff intervals

    at nodes 1 and 2cw = 31

    B2 = 10

  • 7/31/2019 3 - Wireless Medium Access

    22/42

    802.11 Contention Window

    Random number selected from [0,cw]

    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 difficultto estimate and can be VERY dynamic

  • 7/31/2019 3 - Wireless Medium Access

    23/42

    802.11 Adaptive Contention

    Window

    802.11 adaptively sets cw Starts with cw = 31

    If no CTS or ACK then increase to 2*cw+1 (63, 127, 255)

    Reset to 31 on successful transmission

    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 (better for high congestion too)

  • 7/31/2019 3 - Wireless Medium Access

    24/42

    802.11 PCF (CSMA-CA)

    Optional access control method Polling

    AP is point coordinator Only work in a BSS

    Not in ad-hoc/IBSS

    Both AP and client station must support PCF

    AP will switch between DCF and PCF PCF time is contention free period (CFP)

    DCF is contention period (CP)

  • 7/31/2019 3 - Wireless Medium Access

    25/42

    802.11 DCF (CSMA-CA)

    B

    Full exchange with virtual carrier sense

    (called the Network Allocation Vector)

    RTS

    CTS

    DATA

    ACK

    Sender

    Receiver

    Sender Receiver

    A B

    A

    B

    NAV (RTS)

    NAV (CTS)

  • 7/31/2019 3 - Wireless Medium Access

    26/42

    Hybrid Coordination Function (HCF)

    Added in 802.11e

    Enhanced Distributed Channel Access (EDCA)

    HCF Controlled Channel Access (HCCA) DCF and PCF require contention for each frame

    HCF defines ability to send multiple frames

    Transmit Opportunity (TXOP)

    During TXOP period, client station can send a frameburst Uses Short Interframe Space (SIFS)

    Pg 259

  • 7/31/2019 3 - Wireless Medium Access

    27/42

    Enhanced Distributed Channel Access (EDCA)

    Provides differentiated access using eight user

    priority levels

    Extension of DCF

    Uses frame tags similar to 802.1D standard QoS standard at MAC (layer 2) level

    Define priority values

    With priority queuing

    Data waiting in higher priority queues transmitsbefore lower priority queues

    Pg 259

  • 7/31/2019 3 - Wireless Medium Access

    28/42

    Enhanced Distributed Channel Access (EDCA)

    Pg 259

  • 7/31/2019 3 - Wireless Medium Access

    29/42

    Enhanced Distributed Channel Access (EDCA)

    Defines four access categories base on UserPriority level

    From lowest to highest priority access category: AC_BK (Background)

    AC_BE (Best Effort)

    AC_VI (Video)

    AC_VO (Voice

    For each category, Enhanced DistributedCannel Access Function (EDCAF) is used Frames with higher category have lower back off

    values and are more likely to get a TXOPPg 259

  • 7/31/2019 3 - Wireless Medium Access

    30/42

    Block Acknowledgement (BA)

    Part of 802.11e

    Allows for a single acknowledgement for

    multiple frames

    Reduces overhead

    Two Types Immediate

    For low latency traffic

    Delayed

    For latency tolerant traffic Pg 261

  • 7/31/2019 3 - Wireless Medium Access

    31/42

    Block Acknowledgement (BA)-Immediate

    Originator sends a block of QoS data

    frames to station

    Originator requests acknowledgement of

    all outstanding QoS data

    Block AckReq frame Recipient can send a single ack frame for allreceived frames

    Can request a single frame from block beretransmitter

    Pg 261

  • 7/31/2019 3 - Wireless Medium Access

    32/42

    Block Acknowledgement (BA)-Immediate

    Pg 261

  • 7/31/2019 3 - Wireless Medium Access

    33/42

    W i-Fi Multimedia (WMM)

    For latency sensitive data Real time voice and video

    Voice, video, audio, have less tolerance of

    latency (cumulative delay) 802.11e had layer 2 MAC methods to meet QoS

    requirements WiFi Alliance created WMM

    Because WMM is based on EDCA mechanisms,802.1D priority tags from the Ethernet side areused to direct traffic to four access-category

    priority queues. The WMM certificationprovides for traffic prioritization via four accesscategories Pg 262

  • 7/31/2019 3 - Wireless Medium Access

    34/42

    W i-Fi Multimedia (WMM)

    Pg 262

  • 7/31/2019 3 - Wireless Medium Access

    35/42

    Virtual Carrier Sense

    Provided by RTS & CTS

    Designed to protect against hidden terminal collisions

    (when C cant receive from A and might start transmitting) However this is unnecessary most of the time due to

    physical carrier sense

    A B C

    RTS CTS

    Physical Carrier Sense

  • 7/31/2019 3 - Wireless Medium Access

    36/42

    Physical Carrier SenseMechanisms

    Energy detection threshold Monitors channel during idle times between packets to

    measure the noise floor

    Energy levels above the noise floor by a threshold trigger carriersense

    DSSS correlation threshold Monitors the channel for Direct Sequence Spread Spectrum

    (DSSS) coded signal

    Triggers carrier sense if the correlation peak is above athreshold

    More sensitive than energy detection (but only works for 802.11transmissions)

    High BER disrupts transmission but not detection

  • 7/31/2019 3 - Wireless Medium Access

    37/42

    Physical Carrier Sense Range

    Carrier can be sensed at lower

    levels than packets can be

    received Results in larger carrier sense

    range than transmission range More than double the range in

    NS2 802.11 simulations

    Long carrier sense range helps

    protect from interferenceReceive Range

    Carrier Sense Range

  • 7/31/2019 3 - Wireless Medium Access

    38/42

    Hidden Terminal Revisited

    Virtual carrier sense no longer needed in

    this situation

    A B C

    RTS CTS

    RTS CTS Still Useful

  • 7/31/2019 3 - Wireless Medium Access

    39/42

    RTS CTS Still UsefulSometimes

    Obstructed hidden terminal situation

    Fast collision resolution for long data

    packets

    A B

  • 7/31/2019 3 - Wireless Medium Access

    40/42

    Exposed Terminal Problem

    Hidden terminal is not the only challenge for a

    distributed wireless MAC protocol

    A blocks B, and C doesnt know what is happening (B isexposed)

    A B CD

  • 7/31/2019 3 - Wireless Medium Access

    41/42

  • 7/31/2019 3 - Wireless Medium Access

    42/42

    Q&A

    ?