MAC Protocols
MAC Protocols
• Synchronization
• Mobility of nodes
Design Goals of a MAC Protocol (AHWN)
• The operation of the protocol should be distributed, with QoS support for real-time traffic.
• The protocol should minimize the effects of hidden and exposed terminal problems.
• Power control mechanisms in order to efficiently manage energy consumption of the nodes.
• It should try to use adaptive data rate control and directional antennas.
• For bandwidth reservations, the protocol should provide time synchronization among nodes.
Classification of MAC Protocols
• MAC protocols are classified into several categories based on various criteria such as
initiation approach, time synchronization, and reservation approaches.
• Ad hoc network MAC protocols can be classified into three basic types:
Contention-based protocols
• Whenever it receives a packet to be transmitted, it contends with its neighbor nodes for
access to the shared channel.
• It cannot provide QoS guarantees to sessions since nodes are not guaranteed regular access to
the channel.
Receiver-initiated protocols: The receiver node initiates the contention resolution protocol.
• SIP: single channel sender-initiated protocol & Multi-channel sender initiated protocols
Cont..
Contention-Based Protocols with Reservation Mechanism: They have mechanisms for
reserving bandwidth a priori.
• Ad hoc wireless networks sometimes may need to support real-time traffic, which requires QoS
guarantees to be provided.
• In contention-based protocols, nodes are not guaranteed periodic access to the channel (don’t
support real-time traffic).
• Synchronous Protocols: They require time synchronization among all nodes in the network, so
that reservations made by a node are known to other nodes in its neighborhood.
• Asynchronous Protocols: They do not require any synchronization among nodes in the network.
These protocols usually use relative time information for effecting reservations.
Cont..
Contention-Based Protocols with Scheduling Mechanism: These protocols focus on packet
scheduling at nodes, and also scheduling nodes for access to the channel.
• Scheduling-based schemes are also used for enforcing priorities among flows whose packets are
queued at nodes.
• Remaining battery power may also be used while scheduling nodes for access to the channel.
Multiple Access with Collision Avoidance (MACA) Protocol
RTS: Request-to-send
CTS: Clear-to-send
Multiple Access with Collision Avoidance of Wireless (MACAW)
RTS: Request-to-send
CTS: Clear-to-send
Distributed Packet Reservation Multiple Access (D-PRMA) Protocol
• All nodes having packets ready for transmission contend for the first minislot of each slot.
• The remaining (m−1) minislots are granted to the node that wins the contention.
• Also, the same slot in each subsequent frame can be reserved for this winning terminal until it completes its packet
transmission session.
MAC Protocols for Sensor Networks
• Avoid collisions and ensure reliable communication but may not efficiently handle dynamic traffic loads.
• Code Division Multiple Access (CDMA): Each node gets a unique code to transmit simultaneously without
interference. (Complex processing)
• Works well in predictable traffic, collision free, and energy efficient (TDMA)
• Poor performance in dynamic traffic; wastage of resources in low-traffic conditions; bounded delay for
each node
Cont..
Demand-based MAC Protocols: Allocate channel access dynamically based on the actual
communication needs of sensor nodes.
• These protocols adjust access based on traffic load, node requests, or event-driven
transmissions.
• Variable rate traffic can be efficiently transmitted using demand-based MAC protocols.
• They are suitable for bursty traffic, but there is a possibility of collisions.
• No delay guarantees
• SMACS and EAR are two protocols which handle network initialization and mobility support, respectively.
• In SMACS, neighbor discovery, channel assignment, and link organization take place simultaneously in a
completely distributed manner.
• A communication link between two nodes consists of a pair of time slots, at a fixed frequency.
• Power is conserved by turning off the transceiver during idle slots, and using a random wake-up schedule
during the network start-up phase.
• The EAR protocol enables seamless connection of nodes under mobile and stationary conditions.
• Mobile nodes eavesdrop on the control signals and maintain neighbor information.
• The mobile nodes assume full control over connections and can drop connections when they move away.
• A pure TDMA scheme minimizes the time for which a node has to be kept on, but the associated
time synchronization costs are very high.
• A pure FDMA scheme allots the minimum required bandwidth for each connection.
• The hybrid TDMA/FDMA scheme uses an optimum number of channels, which gives minimum
overall power consumption.
• If the transmitter consumes more power, a TDMA scheme is favored, since it can be switched off
in idle slots to save power.
• The scheme favors FDMA when the receiver consumes greater power since the receiver need not
expend power for time synchronization by receiving during the guard band between slots.
S-MAC Protocol
• A sensor network–specific MAC from the University of California.
• The goal of the S-MAC protocol is to reduce energy waste caused by idle listening, collisions, overhearing, and
control overhead.
• Collisions: When a transmitted packet is corrupted it has to be discarded, and the re-transmissions increase
energy consumption.
• Control packet overhead: Sending and receiving control packets consumes energy too.
• This is especially true in many sensor network applications. If nothing is sensed, nodes are in idle mode for most
of the time.
• Many measurements have shown that idle listening consumes 50–100% of the energy required for receiving.
Cont..
• S-MAC tries to reduce the waste of energy from all the previously-discussed sources. In exchange it
accepts some reduction in both per-hop fairness and latency.
• Unlike traditional voice and data networks, a WSN node may have dramatically more data to send
than some other nodes.
• In this case fairness is not important as long as application-level performance is not degraded.
• MACAW is widely used in ad hoc wireless networks because of its simplicity and robustness to the
hidden terminal problem.
• The energy consumption using MACAW is very high when nodes are in idle mode. This is mainly due
to the idle listening
Cont..
Message passing
Cont..
Periodic Listen and Sleep:
• In many sensor networks, nodes are in idle for a long time if no sensing event happens.
• Given the fact that the data rate during this period is very low, it is not necessary to keep nodes
listening all the time.
• Each node goes to sleep for some time, and then wakes up and listens to see if any other node
wants to talk to it.
• During sleep, the node turns off its radio, and sets a timer to awake itself later.
• The duration of time for listening and sleeping can be selected according to different
application scenarios.
Cont..
• If in each second a node sleeps for half second and listens for the other half, its duty cycle is reduced to
50%. So we can achieve close to 50% energy savings.
• S-MAC scheme requires periodic synchronization among neighboring nodes to remedy their clock drift.
• To reduce control overhead, we prefer neighboring nodes to synchronize together, i.e., they listen at the
same time and go to sleep at the same time.
• As a fact, not all neighboring nodes can synchronize together in a multi-hop network.
• Two neighboring nodes A and B may have different schedules if they each in turn must synchronize with
different nodes, C and D, respectively.
Cont..
• Nodes exchange their schedules by broadcasting it to all its immediate neighbors. This ensures
that all neighboring nodes can talk to each other even if they have different schedules.
• If multiple neighbors want to talk to a node, they need to contend for the medium when the
node is listening.
• The node who first sends out the RTS packet wins the medium, and the receiver will reply with
a CTS packet.
Cont..
Choosing and Maintaining Schedule: Before each node starts its periodic listen and sleep, it needs to
choose a schedule and exchange it with its neighbors. Each node maintains a schedule table.
• Synchronizer: The node first listens for a certain amount of time. If it does not hear a schedule from
another node, it randomly chooses a time to go to sleep and immediately broadcasts its schedule in a
• Follower: If the node receives a schedule from a neighbor before choosing its own schedule, it follows
that schedule by setting its schedule to be the same. We call such a node a follower. It then waits for a
random delay td and rebroadcasts this schedule, indicating that it will sleep in t−td seconds.
• If a node receives a schedule after it selects and broadcasts its own schedule, it adopts both schedules.
Cont..
• Maintaining Synchronization: The listen/sleep scheme requires synchronization.
• The SYNC packet is very short, and includes the address of the sender and the time of its next sleep.
• It is common that any packet transmitted by a node is received by all its neighbors even though
only one of them is the intended receiver.
• Since multiple senders may want to send to a receiver at the same time, they need to contend for
the medium to avoid collisions.
• There is a duration field in a transmitted packet that indicates how long the remaining
transmission will be.
• So if a node receives a packet destined to another node, it knows how long it has to keep silent.
Cont..
• All senders perform carrier sense before initiating a transmission.
• If a node fails to get the medium, it goes to sleep and wakes up when the receiver is free and
listening again.
• Overhearing: S-MAC tries to avoid overhearing by letting interfering nodes go to sleep after they
hear an RTS or CTS packet.
• Since DATA packets are normally much longer than control packets, the approach prevents
neighboring nodes from overhearing long DATA packets and the following ACKs.
Cont..
Message Passing:
• Usually the receiver needs to obtain all the data units before it can perform in-network data processing or
aggregation.
• The disadvantages of transmitting a long message as a single packet is the high cost of re-transmitting the
long packet if only a few bits have been corrupted in the first transmission.
• If we fragment long message into small packets, it leads to large control overhead and longer delay.
• S-MAC: fragment the long message into many small fragments, and transmit them in burst.
• The message passing tries to put nodes into sleep state as long as possible, reducing switching overhead.
• Each data fragment and ACK packet also has the duration field. If a node wakes up or a new node joins in the
middle, it can properly go to sleep no matter if it is the neighbor of the sender or the receiver.