0% found this document useful (0 votes)
10 views28 pages

Lect2 MAC

The document discusses Medium Access Control (MAC) protocols, highlighting their necessity for efficient sharing of wireless mediums among multiple nodes to prevent collisions. It outlines design goals, challenges, and classifications of MAC protocols into contention-based and contention-free types, detailing various protocols such as ALOHA, CSMA, and IEEE 802.11. Additionally, it covers the implementation of these protocols, including their mechanisms for collision avoidance and acknowledgment schemes.

Uploaded by

rana tamoor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views28 pages

Lect2 MAC

The document discusses Medium Access Control (MAC) protocols, highlighting their necessity for efficient sharing of wireless mediums among multiple nodes to prevent collisions. It outlines design goals, challenges, and classifications of MAC protocols into contention-based and contention-free types, detailing various protocols such as ALOHA, CSMA, and IEEE 802.11. Additionally, it covers the implementation of these protocols, including their mechanisms for collision avoidance and acknowledgment schemes.

Uploaded by

rana tamoor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 28

Medium Access Control

MAC protocols:
design goals, challenges,
contention-based
and contention-free protocols

1
Why do we need MAC protocols?
• Wireless medium is shared
• Many nodes may need to access the wireless medium to send
or receive messages
• Concurrent message transmissions may interfere with each
other => collisions => message drops
• A MAC protocol is needed to allow the efficient sharing of the
wireless medium by multiple nodes

2
Design goals
• To ensure reliable communication across wireless links
(not end-to-end reliability, only 1-hop reliability)
• To maximize the use of available bandwidth
(keep control overhead as low as possible)
• To ensure fair bandwidth allocation to contending nodes
• To minimize delay of sending/receiving messages
• To minimize energy-consumption of sending/receiving
messages

3
Challenges
• Error-prone channel
• Limited bandwidth
• Limited communication range
• Limited energy (for remote battery-powered nodes)
• Node mobility
• Lack of central coordination
• Lack of tight time synchronisation

4
Protocol classification
• Contention-based MAC protocols
– Contention arises when two or more nodes attempt to transmit at the
same time over a shared channel.
– A contention-based protocol assumes that packet collisions may
occur, and tries to detect, avoid or deal with them.
• Contention-free MAC protocols
– A contention-free protocol tries to divide the wireless channel into
logical channels that do not interfere with each other (e.g. TDMA,
FDMA, CDMA).
– Nodes transmit packets using different logical channels, and as a
result, there is no contention in the network.
– Contention-free schemes are more applicable to fixed networks or
networks with centralized control.
• In this course, we focus on contention-based MAC protocols

5
Some contention-based protocols
• ALOHA, slotted-ALOHA
• CSMA
• MACA
• MACAW
• IEEE 802.11 (DCF)
• …

6
ALOHA, slotted-ALOHA
• Pure ALOHA
– Nodes access the channel when they have data to transmit.
– If a transmission is unsuccessful (e.g. no ACK is sent from
the destination node), the source node retransmits after a
random amount of time.

• Slotted-ALOHA
– Time is divided into equal size slots
– A node transmission always starts at the beginning of a slot
– If a transmission is unsuccessful, the source node
retransmits at a future slot with a certain probability.

7
ALOHA slotted-ALOHA

Node 1
Node 2
Node 3
Node 4
Node 5
Node 6
Node 7

time time

successful packet
8
unsuccessful packet
CSMA - physical sensing

• CSMA (Carrier Sense Multiple Access)


– The sender first senses the wireless channel
– If the channel is idle, the sender starts transmitting
– If the channel is in use the sender refrains itself from
transmission until the channel is idle.

• CSMA/CA (CSMA with Collision Avoidance)


– If the channel is busy before transmission then the
transmission is deferred for a "random" interval.
– This reduces the probability of collisions on the channel.

9
CSMA/CA implementation
• Before transmitting a frame, a node senses the channel
• If the channel is idle for longer than DIFS (Distributed Interframe
Space), the node continues with its transmission.
• Otherwise, if the medium is busy, the transmission is deferred until the
end of the ongoing transmission. Then a backoff procedure is started.

FRAME Node 1 finds the channel idle and transmits


Node 1

Node 2 finds the channel busy and defers transmission


Node 2

Node 3 finds the channel busy and defers transmission


Node 3
10
DIFS
CSMA/CA implementation - backoff
• A random interval - backoff time - is selected and used to initialize the
backoff timer.
• The backoff timer is
– decreased as long as the channel is idle,
– paused when a transmission is detected, and
– reactivated when the channel is sensed as idle again for more than DIFS
• When the backoff timer reaches 0, the node retries to send its frame.
FRAME
Node 1
backoff backoff backoff backoff
started paused resumed ended
FRAME
Node 2

backoff backoff
started ended
FRAME
Node 3
11
DIFS DIFS DIFS
CSMA/CA implementation - backoff
• Binary Exponential Backoff (BEB)

– The backoff time is an integer number of slots uniformly chosen in


the interval (0,CW-1), where CW is the Contention Window.

– At the first transmission attempt, CW=CWmin and it is doubled at


each retransmission up to CWmax

– After a successful transmission, CW is reset to CWmin

12
CSMA/CA with ACK
• Acknowledgement scheme:
– The destination node waits for SIFS (Short Interframe Space) after
receiving a frame. Typically, SIFS is shorter than DIFS.
– The destination node sends an ACK to the source node.

FRAME
Source

ACK
Destination
DIFS SIFS

• If the source node does not get an ACK, it considers the


transmission to be unsuccessful, waits for EIFS (Extended
Interframe Space) and activates the backoff algorithm.
13
The exposed node problem
CSMA may cause nodes to unnecessarily refrain from
accessing the medium.

A B C D

B transmits to A.
C hears the transmission from B to A.
C unnecessarily refrains from sending a message to D
even though no collision would occur.
14
The hidden node problem
CSMA does not avoid the hidden node problem.

B C B C

A A
A transmits to B. A tries to transmit to B.
B receives the message. C also tries to transmit to B.
C does not hear the transmission. Both messages are dropped at B.
15
MACA – virtual sensing

• MACA (Multiple Access with Collision Avoidance)


[Karn 1990]
• Nodes reserve the channel using control messages
(virtual sensing):
– The sender first expresses its wish to transmit by sending a
Request-To-Send (RTS) message
– The receiver allows this transmission by sending a Clear-To-
Send (CTS) message
– The sender then sends the Data message

16
RTS-CTS handshake
CTS

RTS CTS Data


B C B C B C

A A A

A sends RTS to B.
B sends a CTS to A (C overhears it).
A sends Data to B.

Both RTS and CTS carry information about the duration


of the Data transmission. 17
RTS-CTS handshake
• If control (RTS-CTS) messages collide with each other or with
data packets, a backoff procedure is activated (backoff is
binary exponential).

• RTS-CTS helps to avoid some cases of the hidden and


exposed node problems, because:
– All neighbors of the sender hear the RTS.
– All neighbors of the receiver hear the CTS.

• However, it does not always avoid these problems!

18
MACAW

• MACAW [Bharghavan et al. 1994] extends MACA


– RTS-CTS-DS-Data-ACK

RTS

CTS

DS

Data

ACK
19
MACAW

• MACAW extends MACA with


• acknowledgements
• an improved backoff mechanism
=> fair allocation of the medium to contending nodes
• DS (Data Sending) message:
– Say that a neighbor of the sender overhears an
RTS but not a CTS (from the receiver)
– In this case it can’t tell if RTS-CTS was successful
or not
– When it overhears the DS, it realizes that the RTS-
CTS was successful, and it defers its own
transmission

20
IEEE 802.11
• Standard MAC and physical protocol for wireless LANs
• The MAC layer offers two types of services:
– Distributed Coordination Function (DCF)
– Point Coordination Function (PCF)

contention-free
services contention
services
PCF
DCF

Physical Layer
• DCF combines
– physical sensing (CSMA/CA) and
– virtual sensing (RTS-CTS-Data-ACK)
21
IEEE 802.11 DCF - virtual sensing
• RTS and CTS include the busy channel duration
• Nodes that overhear RTS/CTS set timer NAV (Network
Allocation Vector) to the busy channel duration
• A node starts backoff after NAV becomes zero

RTS Frame
Source node

CTS ACK
Destin. node

NAV RTS Backoff Time


Another node
NAV CTS 22
DIFS SIFS SIFS
802.11 standards
• 802.11 (1997): First WLAN standard by IEEE
– 2.4GHz (unregulated)
– 2 Mbps – too slow for most applications
• 802.11b (1999)
– 2.4 GHz, interference from microwave ovens, cordless phones, etc.
– 11 Mbps
• 802.11g (2002-2003)
– 2.4 GHz, backwards compatible with 802.11b
– 54 Mbps
• 802.11n (2009)
– MIMO: multiple wireless antennas in tandem to transmit and receive
– +100 Mbps
• 802.11ac (2014)
– 5 GHz band, up to 7Gbps
– Multi user MIMO

23
Contention-free multiple access
• TDMA (Time Division Multiple Access)
– Time is divided into timeslots
– Nodes transmit one after the other using their own timeslot
– TDMA requires good time synchronization
• FDMA (Frequency Division Multiple Access)
– The available bandwidth is divided into multiple frequency channels /
bands.
– A transmitter-receiver pair uses a dedicated frequency channel for
communication
• CDMA (Code Division Multiple Access)
– Every transmitter uses the entire spectrum (not a specific frequency)
– The transmissions are differentiated through a unique code assigned
to each node (that is independent of the data being transmitted)

24
IEEE 802.11 PCF
• IEEE 802.11 PCF (Point Coordination Function)
• One node, called Access Point (AP), coordinates the
transmissions of its neighbors
• The AP polls neighbors one after the other, and allows them to
transmit in a round robin manner
• PCF is not suitable for large multi-hop networks

25
Bluetooth
• Piconet: One node, called the master can communicate with up
to 7 nodes called the slaves
• Bluetooth uses 79 channels (each 1 MHz wide) and changes
channels up to 1600 times per second
• Each channel is divided into time slots of 625 μsecs
• The master switches from slave to slave in a round-robin
fashion
– Time-Division Duplex (TDD): master (downlink) and slave (uplink)
transmissions occur in alternative slots
– Slaves can talk back to the master immediately after they are polled
by the master

26
Summary
Contention-based protocols
– Aloha, slotted-Aloha: no physical sensing
– CSMA: physical sensing
– CSMA/CA: physical sensing and backoff
– MACA and MACAW: virtual sensing using control packets
(RTS/CTS)
– IEEE 802.11 DCF: physical and virtual sensing

Contention-free protocols
– IEEE 802.11 PCF
– Bluetooth
– …

27
Related reading
• Standard textbook:
– Section 2.3
– Section 2.5
– Sections 6.1-6.5.1

• Internet sources:
– http://www.utdallas.edu/~mxw013200/MAC_ADHOC.html
– http://sss-mag.com/pdf/802_11tut.pdf
– http://attila.sdsu.edu/~kumar/MAC_Survey.pdf

28

You might also like