Download - Wireless Mac Layer
-
7/29/2019 Wireless Mac Layer
1/63
Wireless Ad hoc NetworkWireless Ad hoc Network
Associate Prof. Wei Liu ( )
Dept. of Electronics and Information Eng.Huazhong University of Science and Technology
2009.04
-
7/29/2019 Wireless Mac Layer
2/63
Wireless Ad hoc network Lecture 3
Lecture 3Lecture 3
l Chapter 2. MAC Layer Protocolsl 2.1 Introduction
l 2.2 Important Issues and the Need
l 2.3 Classification of MAC Protocols
l 2.4 Summary
-
7/29/2019 Wireless Mac Layer
3/63
Wireless Ad hoc network Lecture 3
Layering in Ad hoc networkLayering in Ad hoc network
Application Layer
Presentation Layer
Session Layer
Transport Layer
Network Layer
Data link layer
Physical Layer
Logical Link Control
Medium Access Control
Medium access control subMedium access control sub--layer deals with how tolayer deals with how tocontrol access to the shared mediumcontrol access to the shared medium
-
7/29/2019 Wireless Mac Layer
4/63
Wireless Ad hoc network Lecture 3
MAC layerMAC layer
l The data-link layer
l involves the functions and procedures necessary totransfer data between two or more nodes of thenetwork.
l error correction, framing, physical addressing, andflow and error controls.
l MAC sub-layer
l is responsible for resolving conflicts among differentnodes for channel access.
l the MAC layer has a direct bearing on how reliablyand efficiently data can be transmitted between twonodes, it affects the quality of service (QoS) of thenetwork.
-
7/29/2019 Wireless Mac Layer
5/63
Wireless Ad hoc network Lecture 3
Shared wireless mediaShared wireless media
l
Shared wireless media in ad hoc networksl Each node can only be a transmitter (TX) or a
receiver (RX) at a time, share the same frequencydomain to communicate
l Communication among mobile nodes is limited
within a certain transmission range.l Within such a range,only one transmission
channel is used, covering the entire bandwidth.
l Additional delay introduced in wireless senarcio,
packet delay is caused by the traffic load at theneighboring nodes, which is calledtrafficinterference.
-
7/29/2019 Wireless Mac Layer
6/63
Wireless Ad hoc network Lecture 3
Wireless MACWireless MAC
l A MAC protocoll defines how each mobile unit can share the
limited wireless bandwidth resource in an efficient
manner
l
Design objectivel to provide an orderly and efficient use of the
common spectrum
l per-link connection establishment and per-link
connection cancellation
l to increase the overall network throughput whilemaintaining low energy consumption for packet
processing and communications
-
7/29/2019 Wireless Mac Layer
7/63
Wireless Ad hoc network Lecture 3
Performance MetricsPerformance Metrics -- 11l Throughput and delay:
l Throughput is generally measured as the percentageof successfully transmitted radio-link level frames perunit time.
l Transmission delay is defined as the interval betweenthe frame arrival time at the MAC layer of a transmitterand the time at which the transmitter realizes that thetransmitted frame has been successfully received bythe receiver.
l Fairness:
l Generally, fairness measures how fair the channel
allocation is among the flows in the different mobilenodes.
l The node mobility and the unreliability of radiochannels are the two main factors that impact fairness.
-
7/29/2019 Wireless Mac Layer
8/63
Wireless Ad hoc network Lecture 3
Performance MetricsPerformance Metrics -- 22
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.
l 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.
-
7/29/2019 Wireless Mac Layer
9/63
Wireless Ad hoc network Lecture 3
Lecture 3Lecture 3
l Chapter 2. MAC Layer Protocolsl 2.1 Introduction
l 2.2 Important Issues and the Need
l 2.2.1 Need for Special MAC Protocols
l 2.3 Classification of MAC Protocols
l 2.4 Summary
-
7/29/2019 Wireless Mac Layer
10/63
Wireless Ad hoc network Lecture 3
Several important issuesSeveral important issues
l Controlled wireless medium
l Industrial, Scientific and Medical (ISM) band
l a limited channel bandwidth much smaller than that of
wirednetworks
l Error prone channel
l an unreliable time-varying channe
l multiple access, signalfading,and noise and interference
l the effective throughput in wireless networks is significantly lower
l Mobile network topology
l MAC dealswith unidirectional links
l nodes are mostly rely on batteries, which requre energy
conservation design
l Security
l open media upon attacks
-
7/29/2019 Wireless Mac Layer
11/63
Wireless Ad hoc network Lecture 3
Review: Typical MAC protocolsReview: Typical MAC protocols
l
ALOHAl Pure ALOHA, max channel utilization 18.4%
l Slotted ALOHA, double max channel utilization
l CSMA
l Carrier Sense Multiple Accessl Listen Before Talk, LBT
l CSMA-series
-
7/29/2019 Wireless Mac Layer
12/63
Wireless Ad hoc network Lecture 3
Review:Review:CSMACSMA
l Carrier Sense Multiple Accessl Every station senses the carrier before
transmitting
l If channel appears free
l Transmit (with a certain probability)l Otherwise, wait for some time and try again
l Different CSMA protocols:
l Sending probabilities
l Retransmission mechanisms
-
7/29/2019 Wireless Mac Layer
13/63
Wireless Ad hoc network Lecture 3
Review: Ingredients of CSMAReview: Ingredients of CSMA
l Carrier sense (CS)l Hardware capable of sensing whether transmission taking
place in vicinity
l Collision detection (CD)l Hardware capable of detecting collisions
l Collision avoidance (CA)l Protocol for avoiding collisions
l Acknowledgmentsl When collision detection not possible, link-layer
mechanism for identifying failed transmissions
l
Backoff mechanisml Method for estimating contention and deferring
transmissions
-
7/29/2019 Wireless Mac Layer
14/63
Wireless Ad hoc network Lecture 3
Node ModelNode Model
l
Carrier sensing rangel nodes in the carrier sensing zone can sense a transmission, but
cannot decode packet correctly
l Transmission range
l nodes in transmission range can receive and decode packet
correctly.
-
7/29/2019 Wireless Mac Layer
15/63
Wireless Ad hoc network Lecture 3
Hidden Terminal ProblemHidden Terminal Probleml CSMA for Ad Hoc Networks
l In CSMA, sender decides to transmit based on carrier strength in its vicinityl Collisions occur at the receiver
l Carrier strengths at sender and receiver may be different:
l Node B can communicate with A and C both
l A and C cannot hear each other
l When A transmits to B, C cannot detect the transmission using the
carrier sensemechanisml If C transmits, collision will occur at node B
A B C
Hidden Terminal
-
7/29/2019 Wireless Mac Layer
16/63
Wireless Ad hoc network Lecture 3
Exposed Terminal ProblemExposed Terminal Problem
A B C
Exposed Terminal
D
l CSMA for Ad Hoc Networks
l In CSMA, sender decides to transmit based on carrier strength inits vicinity
l Collisions occur at the receiver
l Carrier strengths at sender and receiver may be different:
l Node B can communicate with A and C both
l
A and C cannot hear each otherl When A transmits to B, C cannot detect the transmission using
the carrier sensemechanism
l If C transmits, collision will occur at node B
-
7/29/2019 Wireless Mac Layer
17/63
Wireless Ad hoc network Lecture 3
Lecture 3Lecture 3
l Chapter 2. MAC Layer Protocolsl 2.1 Introduction
l 2.2 Important Issues and the Need
l 2.3 Classification of MAC Protocols
l 2.3.1 Contention-Based MAC Protocols
l 2.3.2 Contention-Based MAC Protocols with
Reservation Mechanisms
l 2.3.3 MAC Protocols Using Directional Antennas
l 2.3.4 Multiple-Channel MAC Protocolsl 2.3.5 Power-Aware or Energy-Efficient MAC
Protocols
l 2.4 Summary
-
7/29/2019 Wireless Mac Layer
18/63
Wireless Ad hoc network Lecture 3
Classification of MAC ProtocolsClassification of MAC Protocols
-
7/29/2019 Wireless Mac Layer
19/63
Wireless Ad hoc network Lecture 3
Other ClassificationsOther Classifications
l
Energy-efficientl Qos-aware
l Equiped With directional antennas
l Support unidirectional links
l Support multiple channels
l single channel vs. multiple channels
-
7/29/2019 Wireless Mac Layer
20/63
Wireless Ad hoc network Lecture 3
Lecture 3Lecture 3
l
Chapter 2. MAC Layer Protocolsl 2.1 Introduction
l 2.2 Important Issues and the Need
l 2.3 Classification of MAC Protocols
l 2.3.1 Contention-Based MAC Protocolsl 2.3.2 Contention-Based MAC Protocols with
Reservation Mechanisms
l 2.3.3 MAC Protocols Using Directional Antennas
l 2.3.4 Multiple-Channel MAC Protocols
l 2.3.5 Power-Aware or Energy-Efficient MAC
Protocols
l 2.4 Summary
-
7/29/2019 Wireless Mac Layer
21/63
Wireless Ad hoc network Lecture 3
2.3.1 Contention2.3.1 Contention--Based MACBased MACl Random Access Protocols
l ALOHAl a node may access the channel as soon as it is ready
l ALOHA is more suitable under low system loads with alarge number of potential senders
l Slotted ALOHA
l introduces synchronized transmission time slots similarto TDMA
l nodes can transmit only at the beginning of a time slot,doubles the throughput as compared to the pure ALOHAscheme
l CSMA-based schemes furtherl reduce the possibility of packet collisions and improve
the throughput.
-
7/29/2019 Wireless Mac Layer
22/63
Wireless Ad hoc network Lecture 3
Lecture 3Lecture 3
l
Chapter 2. MAC Layer Protocolsl 2.1 Introduction
l 2.2 Important Issues and the Need
l 2.3 Classification of MAC Protocols
l 2.3.1 Contention-Based MAC Protocolsl 2.3.2 Contention-Based MAC Protocols with
Reservation Mechanisms
l 2.3.3 MAC Protocols Using Directional Antennas
l 2.3.4 Multiple-Channel MAC Protocols
l 2.3.5 Power-Aware or Energy-Efficient MAC
Protocols
l 2.4 Summary
-
7/29/2019 Wireless Mac Layer
23/63
Wireless Ad hoc network Lecture 3
2.3.2 Contention2.3.2 Contention--Based MAC ProtocolsBased MAC Protocolswith Reservation Mechanismswith Reservation Mechanisms
l Motivation
l To solve the hidden and exposed-terminal problems in CSMA
l use the request-to-send/clear-to-send (RTS/CTS) control packets
to prevent collisions
l Dynamic Reservationl The dynamic reservation approach involves setting up some sort
of a reservation prior to data transmission.
l sender-initiated protocol: a node that wants to send data takes
the initiative of setting up this reservation
l receiver-initiated protocol: the receiving node polls a potentialtransmitting node for data
-
7/29/2019 Wireless Mac Layer
24/63
Wireless Ad hoc network Lecture 3
Multiple Access Collision AvoidanceMultiple Access Collision Avoidance
l
MACA (Multiple Access Collision Avoidance )l When node A wants to send a packet to node B,
node A first sends a Request-to-Send (RTS) to B
l On receiving RTS, node B responds by sending
Clear-to-Send (CTS), provided node B is able to
receive the packet
l When a node (such as C) overhears a CTS, it
keeps quiet for the duration of the transfer
l Transfer duration is included in RTS and CTS both
-
7/29/2019 Wireless Mac Layer
25/63
Wireless Ad hoc network Lecture 3
MACA in ActionMACA in Action
l
If C also transmits RTS, collision at B
A B CRTS
-
7/29/2019 Wireless Mac Layer
26/63
Wireless Ad hoc network Lecture 3
MACA in ActionMACA in Action
l
C knows the expected DATA length fromCTS
A B CCTS
Defers until DATA
completion
-
7/29/2019 Wireless Mac Layer
27/63
Wireless Ad hoc network Lecture 3
MACA in ActionMACA in Action
l
Avoids the hidden terminal problem
A B CDATA
-
7/29/2019 Wireless Mac Layer
28/63
Wireless Ad hoc network Lecture 3
MACA in ActionMACA in Action
l
CTS packets have fixed size
A B C DRTS
Defers until CTS
-
7/29/2019 Wireless Mac Layer
29/63
Wireless Ad hoc network Lecture 3
MACA in ActionMACA in Action
l
C does not hear a CTS
A B C DCTS
-
7/29/2019 Wireless Mac Layer
30/63
Wireless Ad hoc network Lecture 3
MACA in ActionMACA in Action
l
C is free to send to D; no exposed terminal
A B C DDATA
-
7/29/2019 Wireless Mac Layer
31/63
Wireless Ad hoc network Lecture 3
MACA in ActionMACA in Action
l
Is C really free to send to D?
A B C DDATA RTS
-
7/29/2019 Wireless Mac Layer
32/63
Wireless Ad hoc network Lecture 3
MACA in ActionMACA in Action
l
In fact, C increases its backoff counter!
A B C DDATA CTS
-
7/29/2019 Wireless Mac Layer
33/63
Wireless Ad hoc network Lecture 3
IEEE 802.11 standardIEEE 802.11 standard
l 802.11 refers to a set of WLANs that was approved
by IEEE in 1997.
l Specifies the lowest two layers of the OSI model.
Standard Data ratePhysical
LayerOperatingFrequency
802.11 1-2 Mbps FHSS/DSSS 2.4 GHz
802.11b
11 Mpbs
Max.
DSSS/HR-
DSSS 2.4 GHz
802.11a
54 Mbps
Max. OFDM 5.5 GHz
802.11g 54 MbpsMax. OFDM 2.4 GHz
-
7/29/2019 Wireless Mac Layer
34/63
Wireless Ad hoc network Lecture 3
Modes of operationModes of operation
1. Infrastructure-based:l The main most mature
technology for WLANs
l Most commonly used toconstruct Wi-Fi hotspots
l Costly for dynamicenvironments
2. Infrastructureless-based:l Also called Ad Hoc
mode
l Stations form anIndependent BasicService Set (IBSS)
l
Any stations within thesame transmissionrange can communicate
-
7/29/2019 Wireless Mac Layer
35/63
Wireless Ad hoc network Lecture 3
IEEE 802.11 ArchitectureIEEE 802.11 Architecturel Physical Layer:
l infrared, FHSS, or DSSS in 1997l OFDM and HR-DSSS were added
in 1999
l MAC Layer:
1. 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 timefollowing a busy signal
2. Point Coordination Function (PCF):
l Based on polling scheme
l Only used in infrastructure-based
-
7/29/2019 Wireless Mac Layer
36/63
Wireless Ad hoc network Lecture 3
IEEE 802.11IEEE 802.11
l IEEE 802.11 was first designed for wirelessfixed networks
l Many problems occur when building ad hocnetworks with the IEEE 802.11 standard asthe lowest two layers
l Solutions for different problems were studied
l Until now, IEEE 802.11 doesnt functionwell in wireless ad hoc netwroks
-
7/29/2019 Wireless Mac Layer
37/63
Wireless Ad hoc network Lecture 3
IEEE 802.11 Wireless MACIEEE 802.11 Wireless MAC
l Distributed and centralized MAC components
l Distributed Coordination Function (DCF)
l Point Coordination Function (PCF)
l DCF is suitable for multi-hop ad hoc networking
l DCF is a Carrier Sense Multiple Access/Collision
Avoidance (CSMA/CA) protocol
-
7/29/2019 Wireless Mac Layer
38/63
Wireless Ad hoc network Lecture 3
DCF Basic Access MechanismDCF Basic Access Mechanism
l Uses CSMA/CA mechanism to check if medium is idle or busy.
l If idle -> wait forDistributed InterFrame Space(DIFS), then send
l If busy -> use the random backoff time
l Backoff timer is decreased if the channel is idle and reactivated if
busy
-
7/29/2019 Wireless Mac Layer
39/63
Wireless Ad hoc network Lecture 3
Uses RTSUses RTS--CTSCTS
l Uses RTS-CTS exchange to avoid hidden terminal
problem
l Any node overhearing a CTS cannot transmit for the
duration of the transfer
l Any node receiving the RTS cannot transmit for theduration of the transfer
l To prevent collision with ACK when it arrives at the sender
l When B is sending data to C, node A will keep quite
A B C
-
7/29/2019 Wireless Mac Layer
40/63
Wireless Ad hoc network Lecture 3
Uses ACK to achieve reliabilityUses ACK to achieve reliabilityl Wireless links are prone to errors. High packet loss rate
detrimental to transport-layer performance.
l Mechanisms are needed to reduce packet loss rateexperienced by upper layers
l
When node B receives a data packet from node A, node Bsends an Acknowledgement (Ack). This approach adopted inmany protocols
l If node A fails to receive an Ack, it will retransmit the packet
A B C
-
7/29/2019 Wireless Mac Layer
41/63
Wireless Ad hoc network Lecture 3
Collision AvoidanceCollision Avoidance
l With half-duplex radios, collision detection is not possible
l CSMA/CA: Wireless MAC protocols often use collisionavoidancetechniques, in conjunction with a (physical orvirtual) carrier sensemechanism
l Carrier sense: When a node wishes to transmit a packet,it first waits until the channel is idle.
l Collision avoidance: Nodes hearing RTS or CTS staysilent for the duration of the corresponding transmission.
Once channel becomes idle, the node waits for arandomly chosen duration before attempting to transmit.
-
7/29/2019 Wireless Mac Layer
42/63
Avoiding collisions (more)
idea: allow sender toreserve channel rather than randomaccess of data frames: avoid collisions of long data frames
l sender first transmits smallrequest-to-send (RTS) packets to BS
using CSMA
l RTSs may still collide with each other (but theyre short)
l BS broadcasts clear-to-send CTS in response to RTSl CTS heard by all nodes
l sender transmits data frame
l other stations defer transmissions
avoid dat a f r ame coll isions complet ely
using small r eser vat ion packet s!
-
7/29/2019 Wireless Mac Layer
43/63
Collision Avoidance: RTS-CTS exchange
AP
A B
t ime
DATA (A)
reservation collision
def er
-
7/29/2019 Wireless Mac Layer
44/63
Wireless Ad hoc network Lecture 3
IEEE 802.11IEEE 802.11
C FA B ED
RTS
Pretending a circular range
RTS = Request-to-Send
-
7/29/2019 Wireless Mac Layer
45/63
Wireless Ad hoc network Lecture 3
IEEE 802.11IEEE 802.11
C FA B ED
RTS
NAV = 10
RTS = Request-to-Send
NAV = Network Allocation Vector,
remaining duration to keep quiet
-
7/29/2019 Wireless Mac Layer
46/63
Wireless Ad hoc network Lecture 3
IEEE 802.11IEEE 802.11
C FA B ED
CTS
CTS = Clear-to-Send
-
7/29/2019 Wireless Mac Layer
47/63
Wireless Ad hoc network Lecture 3
IEEE 802.11IEEE 802.11
C FA B ED
CTS
NAV = 8
CTS = Clear-to-Send
-
7/29/2019 Wireless Mac Layer
48/63
Wireless Ad hoc network Lecture 3
IEEE 802.11IEEE 802.11
DATA packet follows CTS. Successful data
reception acknowledged usingACK.
C FA B ED
DATA
-
7/29/2019 Wireless Mac Layer
49/63
Wireless Ad hoc network Lecture 3
IEEE 802.11IEEE 802.11
C FA B ED
ACK
-
7/29/2019 Wireless Mac Layer
50/63
Wireless Ad hoc network Lecture 3
IEEE 802.11IEEE 802.11
C FA B ED
ACK
Reserved area
-
7/29/2019 Wireless Mac Layer
51/63
Wireless Ad hoc network Lecture 3
IEEE 802.11IEEE 802.11
C FA B ED
DATA
Transmit range
Interference
range
Carrier senserange
FA
-
7/29/2019 Wireless Mac Layer
52/63
Wireless Ad hoc network Lecture 3
CSMA/CACSMA/CA
l Physical carrier sense, and
l Virtual carrier sense using Network Allocation Vector
(NAV), a counter
l NAV is updated based on overheard
RTS/CTS/DATA/ACK packets, each of which
specified duration of a pending transmissionl Nodes stay silent when carrier sensed
(physical/virtual)
l Backoff intervalsused to reduce collision probability
-
7/29/2019 Wireless Mac Layer
53/63
Wireless Ad hoc network Lecture 3
CSMA/CACSMA/CA
l Add carrier sense; C will sense Bs
transmission and refrain from sending RTS
A B C DDATA
-
7/29/2019 Wireless Mac Layer
54/63
Wireless Ad hoc network Lecture 3
Backoff IntervalBackoff Interval
l When transmitting a packet, choose a backoffinterval in the range [0,cw]l cw is contention window
l Count down the backoff interval when
medium is idlel Count-down is suspended if medium becomes
busy
l When backoff interval reaches 0, transmitRTS
-
7/29/2019 Wireless Mac Layer
55/63
Wireless Ad hoc network Lecture 3
DCF ExampleDCF Example
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/29/2019 Wireless Mac Layer
56/63
Wireless Ad hoc network Lecture 3
Protocol OverheadProtocol Overhead
l The time spent counting down backoff
intervals is a part of MAC overhead
l Choosing a large cwleads to large backoff
intervals and can result in larger overhead
l Choosing a small cwleads to a largernumber of collisions (when two nodes count
down to 0 simultaneously)
-
7/29/2019 Wireless Mac Layer
57/63
Wireless Ad hoc network Lecture 3
Binary Exponential Backoff in DCFBinary Exponential Backoff in DCF
l IEEE 802.11 DCF: contention window cwis chosen
dynamically depending on collision occurrence
l When a node fails to receive CTS in response to its
RTS, it increases the contention window
l cwis doubled (up to an upper bound)
l When a node successfully completes a data transfer,
it restores cwto Cwmin
l cwfollows a sawtooth curve
-
7/29/2019 Wireless Mac Layer
58/63
Wireless Ad hoc network Lecture 3
MILD Algorithm in MACAWMILD Algorithm in MACAW
l MACAW (Medium Access Collision Avoidance
Wireless)
l When a node successfully completes a transfer,
reduces cwby 1
l In 802.11 cw is restored to cwmin
l In 802.11, cw reduces much faster than it increases
l MACAW: cw reduces slower than it increases
Exponential Increase Linear Decrease
l MACAW can avoid wild oscillations of cw when largenumber of nodes contend for the channel
-
7/29/2019 Wireless Mac Layer
59/63
Wireless Ad hoc network Lecture 3
Contention Resolution OverheadContention Resolution Overhead
l Channel contention resolved using backoff
l Nodes choose random backoff interval from [0,
CW]
l Count down for this interval before transmission
l Backoff and (optional) RTS/CTS handshake
before transmission of data packet
Randombackoff Data Transmission/ACKRTS/CTS
-
7/29/2019 Wireless Mac Layer
60/63
Wireless Ad hoc network Lecture 3
Inefficiency of IEEE 802.11Inefficiency of IEEE 802.11
l Backoff interval should be chosen
appropriately for efficiency
l Backoff interval with 802.11 far from optimum
-
7/29/2019 Wireless Mac Layer
61/63
Wireless Ad hoc network Lecture 3
ObservationObservation
l Backoff and RTS/CTS handshake are
unproductive:
l Do not contribute to throughput
Random
backoffData Transmission/ACKRTS/CTS
Unproductive
-
7/29/2019 Wireless Mac Layer
62/63
Wireless Ad hoc network Lecture 3
HomeworkHomework
l Reading paper
l Performance Issues with IEEE 802.11 in Ad hoc
Networking, IEEE Communication Magazine, July
2005
l Question
l Explain the working procedures of IEEE 802.11
protocol operation in Figure. 1
l What are the shortages of IEEE 802.11
performance, and how does the author prove
them in the simulation results?l What are the possible solutions?
-
7/29/2019 Wireless Mac Layer
63/63
Thank you!Thank you!
LIU Wei, Ph.dAssociate Professor
ITEC Center, EI@HUSTMobile: 13986224922
Email: [email protected]
Homepage: http://itec.hust.edu.cn
mailto:[email protected]://itec.hust.edu.cn/http://itec.hust.edu.cn/mailto:[email protected]