Professional Documents
Culture Documents
Wireless Mac Layer
Wireless Mac Layer
2009.04
Lecture 3
l
2.1 Introduction 2.2 Important Issues and the Need 2.3 Classification of MAC Protocols 2.4 Summary
MAC layer
l
The data-link layer l involves the functions and procedures necessary to transfer data between two or more nodes of the network. l error correction, framing, physical addressing, and flow and error controls. MAC sub-layer l is responsible for resolving conflicts among different nodes for channel access. l the MAC layer has a direct bearing on how reliably and efficiently data can be transmitted between two nodes, it affects the quality of service (QoS) of the network.
Wireless Ad hoc network Lecture 3
l l
Each node can only be a transmitter (TX) or a receiver (RX) at a time, share the same frequency domain to communicate Communication among mobile nodes is limited within a certain transmission range. Within such a range,only one transmission channel is used, covering the entire bandwidth. Additional delay introduced in wireless senarcio, packet delay is caused by the traffic load at the neighboring nodes, which is called traffic interference.
Wireless Ad hoc network Lecture 3
Wireless MAC
l
A MAC protocol
l
defines how each mobile unit can share the limited wireless bandwidth resource in an efficient manner to provide an orderly and efficient use of the common spectrum
l
Design objective
l
to increase the overall network throughput while maintaining low energy consumption for packet processing and communications
Wireless Ad hoc network Lecture 3
Performance Metrics - 1
l
Throughput and delay: l Throughput is generally measured as the percentage of successfully transmitted radio-link level frames per unit time. l Transmission delay is defined as the interval between the frame arrival time at the MAC layer of a transmitter and the time at which the transmitter realizes that the transmitted frame has been successfully received by the receiver. Fairness: l Generally, fairness measures how fair the channel allocation is among the flows in the different mobile nodes. l The node mobility and the unreliability of radio channels are the two main factors that impact fairness.
Wireless Ad hoc network Lecture 3
Performance Metrics - 2
l
Energy efficiency: l Generally, energy efficiency is measured as the fraction of the useful energy consumption (for successful frame transmission) to the total energy spent. Multimedia support: l This is the ability of a MAC protocol to accommodate traffic with different service requirements, such as throughput, delay, and frame loss rate.
Lecture 3
l
l l
Industrial, Scientific and Medical (ISM) band a limited channel bandwidth much smaller than that of wirednetworks an unreliable time-varying channe multiple access, signalfading,and noise and interference the effective throughput in wireless networks is significantly lower MAC dealswith unidirectional links nodes are mostly rely on batteries, which requre energy conservation design open media upon attacks
Wireless Ad hoc network Lecture 3
Security
l
ALOHA
l l
Pure ALOHA, max channel utilization 18.4% Slotted ALOHA, double max channel utilization
CSMA
l l l
Review: CSMA
l
Every station senses the carrier before transmitting If channel appears free
l
l l
Otherwise, wait for some time and try again Different CSMA protocols:
l l
Hardware capable of sensing whether transmission taking place in vicinity Hardware capable of detecting collisions Protocol for avoiding collisions When collision detection not possible, link-layer mechanism for identifying failed transmissions Method for estimating contention and deferring transmissions
Wireless Ad hoc network Lecture 3
l l l
Acknowledgments
l
Backoff mechanism
l
Node Model
l
nodes in the carrier sensing zone can sense a transmission, but cannot decode packet correctly nodes in transmission range can receive and decode packet correctly.
Transmission range
l
In CSMA, sender decides to transmit based on carrier strength in its vicinity Collisions occur at the receiver Carrier strengths at sender and receiver may be different:
l l l l
Node B can communicate with A and C both A and C cannot hear each other When A transmits to B, C cannot detect the transmission using the carrier sense mechanism If C transmits, collision will occur at node B
Hidden Terminal A B C
In CSMA, sender decides to transmit based on carrier strength in its vicinity Collisions occur at the receiver Carrier strengths at sender and receiver may be different:
l l l l
Node B can communicate with A and C both A and C cannot hear each other When A transmits to B, C cannot detect the transmission using the carrier sense mechanism If C transmits, collision will occur at node B
Exposed Terminal A B C D
Lecture 3
l
2.1 Introduction 2.2 Important Issues and the Need 2.3 Classification of MAC Protocols
l l
l l l
2.3.1 Contention-Based MAC Protocols 2.3.2 Contention-Based MAC Protocols with Reservation Mechanisms 2.3.3 MAC Protocols Using Directional Antennas 2.3.4 Multiple-Channel MAC Protocols 2.3.5 Power-Aware or Energy-Efficient MAC Protocols
Other Classifications
l l l l l
Energy-efficient Qos-aware Equiped With directional antennas Support unidirectional links Support multiple channels
l
Lecture 3
l
2.1 Introduction 2.2 Important Issues and the Need 2.3 Classification of MAC Protocols
l l
l l l
2.3.1 Contention-Based MAC Protocols 2.3.2 Contention-Based MAC Protocols with Reservation Mechanisms 2.3.3 MAC Protocols Using Directional Antennas 2.3.4 Multiple-Channel MAC Protocols 2.3.5 Power-Aware or Energy-Efficient MAC Protocols
Wireless Ad hoc network Lecture 3
2.4 Summary
Random Access Protocols l ALOHA l a node may access the channel as soon as it is ready l ALOHA is more suitable under low system loads with a large number of potential senders
l
Slotted ALOHA l introduces synchronized transmission time slots similar to TDMA l nodes can transmit only at the beginning of a time slot, doubles the throughput as compared to the pure ALOHA scheme CSMA-based schemes further l reduce the possibility of packet collisions and improve the throughput.
Wireless Ad hoc network Lecture 3
Lecture 3
l
2.1 Introduction 2.2 Important Issues and the Need 2.3 Classification of MAC Protocols
l l
l l l
2.3.1 Contention-Based MAC Protocols 2.3.2 Contention-Based MAC Protocols with Reservation Mechanisms 2.3.3 MAC Protocols Using Directional Antennas 2.3.4 Multiple-Channel MAC Protocols 2.3.5 Power-Aware or Energy-Efficient MAC Protocols
Wireless Ad hoc network Lecture 3
2.4 Summary
Motivation
l l
To solve the hidden and exposed-terminal problems in CSMA use the request-to-send/clear-to-send (RTS/CTS) control packets to prevent collisions
Dynamic Reservation
l
The dynamic reservation approach involves setting up some sort of a reservation prior to data transmission. sender-initiated protocol: a node that wants to send data takes the initiative of setting up this reservation receiver-initiated protocol: the receiving node polls a potential transmitting node for data
When node A wants to send a packet to node B, node A first sends a Request-to-Send (RTS) to B On receiving RTS, node B responds by sending Clear-to-Send (CTS), provided node B is able to receive the packet When a node (such as C) overhears a CTS, it keeps quiet for the duration of the transfer
l
MACA in Action
l
RTS
MACA in Action
l
CTS
MACA in Action
l
DATA
MACA in Action
l
RTS
MACA in Action
l
CTS
MACA in Action
l
DATA
MACA in Action
l
DATA
C
RTS
MACA in Action
l
DATA
C
CTS
802.11 refers to a set of WLANs that was approved by IEEE in 1997. Specifies the lowest two layers of the OSI model.
Standard 802.11 802.11b 802.11a 802.11g Data rate 1-2 Mbps 11 Mpbs Max. 54 Mbps Max. 54 Mbps Max. Physical Layer FHSS/DSSS DSSS/HRDSSS OFDM OFDM Operating Frequency 2.4 GHz 2.4 GHz 5.5 GHz 2.4 GHz
Modes of operation
1. Infrastructure-based:
l l l
The main most mature technology for WLANs Most commonly used to construct Wi-Fi hotspots Costly for dynamic environments
2. Infrastructurelessbased:
l l
Also called Ad Hoc mode Stations form an Independent Basic Service Set (IBSS) Any stations within the same transmission range can communicate
Physical Layer:
infrared, FHSS, or DSSS in 1997 OFDM and HR-DSSS were added in 1999
l
1.
MAC Layer:
Distributed Coordination Function (DCF): l Provides the basic access method to the 802.11 MAC protocol l Based on CSMA/CA l Uses random backoff time following a busy signal Point Coordination Function (PCF): l Based on polling scheme l Only used in infrastructure-based
Wireless Ad hoc network Lecture 3
2.
IEEE 802.11
l
IEEE 802.11 was first designed for wireless fixed networks Many problems occur when building ad hoc networks with the IEEE 802.11 standard as the lowest two layers Solutions for different problems were studied Until now, IEEE 802.11 doesnt function well in wireless ad hoc netwroks
Wireless Ad hoc network Lecture 3
l l
DCF is suitable for multi-hop ad hoc networking DCF is a Carrier Sense Multiple Access/Collision Avoidance (CSMA/CA) protocol
Uses CSMA/CA mechanism to check if medium is idle or busy. If idle -> wait for Distributed InterFrame Space (DIFS), then send If busy -> use the random backoff time Backoff timer is decreased if the channel is idle and reactivated if busy
Any node overhearing a CTS cannot transmit for the duration of the transfer
Any node receiving the RTS cannot transmit for the duration of the transfer
l l
To prevent collision with ACK when it arrives at the sender When B is sending data to C, node A will keep quite
A B C
Wireless links are prone to errors. High packet loss rate detrimental to transport-layer performance. Mechanisms are needed to reduce packet loss rate experienced by upper layers When node B receives a data packet from node A, node B sends an Acknowledgement (Ack). This approach adopted in many protocols If node A fails to receive an Ack, it will retransmit the packet
A B C
Collision Avoidance
l
With half-duplex radios, collision detection is not possible CSMA/CA: Wireless MAC protocols often use collision avoidance techniques, in conjunction with a (physical or virtual) carrier sense mechanism Carrier sense: When a node wishes to transmit a packet, it first waits until the channel is idle. Collision avoidance: Nodes hearing RTS or CTS stay silent for the duration of the corresponding transmission. Once channel becomes idle, the node waits for a randomly chosen duration before attempting to transmit.
Wireless Ad hoc network Lecture 3
l l
access of data frames: avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets to BS using CSMA l RTSs may still collide with each other (but theyre short) BS broadcasts clear-to-send CTS in response to RTS CTS heard by all nodes l sender transmits data frame l other stations defer transmissions
avoid data frame collisions completely using small reservation packets!
reservation collision
DATA (A)
defer
time
IEEE 802.11
RTS = Request-to-Send
RTS A B C D E F
IEEE 802.11
RTS = Request-to-Send
RTS A B
NAV = 10
IEEE 802.11
CTS = Clear-to-Send
CTS A B C D E F
IEEE 802.11
CTS = Clear-to-Send
CTS A B C D E
NAV = 8
IEEE 802.11
DATA packet follows CTS. Successful data reception acknowledged using ACK.
DATA A B C D E F
IEEE 802.11
ACK A B C D E F
IEEE 802.11
Reserved area
ACK A B C D E F
IEEE 802.11
Interference range
DATA A B C D E F
Transmit range
Wireless Ad hoc network Lecture 3
CSMA/CA
l l
Physical carrier sense, and Virtual carrier sense using Network Allocation Vector (NAV), a counter NAV is updated based on overheard RTS/CTS/DATA/ACK packets, each of which specified duration of a pending transmission Nodes stay silent when carrier sensed (physical/virtual) Backoff intervals used to reduce collision probability
CSMA/CA
l
Add carrier sense; C will sense Bs transmission and refrain from sending RTS
DATA
Backoff Interval
l
cw is contention window
DCF Example
B1 = 25 wait data B2 = 20
B1 = 5 data wait B2 = 15 B2 = 10
cw = 31
Protocol Overhead
l
The time spent counting down backoff intervals is a part of MAC overhead Choosing a large cw leads to large backoff intervals and can result in larger overhead Choosing a small cw leads to a larger number of collisions (when two nodes count down to 0 simultaneously)
IEEE 802.11 DCF: contention window cw is chosen dynamically depending on collision occurrence When a node fails to receive CTS in response to its RTS, it increases the contention window
l
When a node successfully completes a data transfer, it restores cw to Cwmin cw follows a sawtooth curve
Wireless Ad hoc network Lecture 3
MACAW (Medium Access Collision Avoidance Wireless) When a node successfully completes a transfer, reduces cw by 1
l l l
In 802.11 cw is restored to cwmin In 802.11, cw reduces much faster than it increases MACAW: cw reduces slower than it increases Exponential Increase Linear Decrease
Nodes choose random backoff interval from [0, CW] Count down for this interval before transmission
Data Transmission/ACK
Backoff interval should be chosen appropriately for efficiency Backoff interval with 802.11 far from optimum
Observation
l
Unproductive
Random backoff
RTS/CTS
Data Transmission/ACK
Homework
l
Reading paper
l
Performance Issues with IEEE 802.11 in Ad hoc Networking, IEEE Communication Magazine, July 2005 Explain the working procedures of IEEE 802.11 protocol operation in Figure. 1 What are the shortages of IEEE 802.11 performance, and how does the author prove them in the simulation results? What are the possible solutions?
Wireless Ad hoc network Lecture 3
Question
l
Thank you!
LIU Wei, Ph.d Associate Professor
ITEC Center, EI@HUST Mobile: 13986224922 Email: liuwei@hust.edu.cn Homepage: http://itec.hust.edu.cn