Unit 1
Unit 1
NETWORK DESIGN
UNIT II
2
1. MAC protocols – fundamentals
Requirements and design constraints for wireless
MAC protocols
∙ Recall
∙ Transmissions are costly
∙ Receiving about as expensive as transmitting
∙ Idling can be cheaper but is still expensive
3
∙ Energy problems
∙ Collisions – wasted effort when two packets collide
∙ Overhearing – waste effort in receiving a packet destined for
another node
∙ Idle listening – sitting idly and trying to receive when nobody is
sending
∙ Protocol overhead
4
Introduction to MAC
Protocols
• The MAC protocol determines the points in time to transmit a data, control or
manage packet to another node (unicast) or to a set of nodes (multicast,
broadcast).
5
• Theimportant performance requirements for MAC protocols are
throughput efficiency, stability, fairness, low access, low transmission delay
and low overhead.
• Collisions can happen if MAC protocol allows two or more nodes to send
packets at the same time.
8
Exposed Terminal Scenario
B has a long packet to send to A, checks the air is clear and starts sending
C has a short packet to send to D, checks the air, ignores that it is busy
and starts sending anyway
Centralized
Distributed
Schedule- Contention-
based based Schedule- Contention-
based based
Fixed Demand
assignment assignment Fixed Demand
assignment assignment
11
Centralized medium
access
∙ Idea: Have a central station control when a node may access the medium
∙ Example: Polling, centralized computation of TDMA schedules
∙ Advantage: Simple, quite efficient (e.g., no collisions), burdens the
central station
14
Classes of MAC
1.Protocols
Fixed Assignment Protocols:
•The availableresources are divided between the nodessuch that
assignment is long term without the risk of collisions. resource
• Long term means that the assignment is for durations of minutes, hours, or
even longer.
• To account for changes in topology due to nodes dying or new 9nodes being
deployed, signaling mechanisms are needed in fixed assignment protocols to
rectify the assignment of resources to nodes.
•Typical protocols of this class are TDMA, FDMA, CDMA, and SDMA.
15
2. Demand Assignment Protocols
requesting
•In case node along withallocation,
of successful a description of the allocatedis transmitted back
a confirmation 16
3. Random Access Protocols
17
Main options to shut up senders
20
MAC Problem: Idle listening
∙ Need to sense carrier for RTS or CTS packets
∙ In some form shared by many CSMA variants; but e.g. not by busy tones
∙ Simple sleeping will break the protocol
∙ Basic idea: Nodes that have data buffered for receivers send
traffic indicators at pre-arranged points in time
∙ Receivers need to wake up at these points, but can sleep otherwise
❖ In an ideal case, the sleep state is left only when a node is about to transmit
or receive packets. A concept for achieving this is the wakeup radio.
❖ In this approach, nodes spend most of their time in the sleep mode and
wake
up periodically to receive packets from other 22
• By choosing a small duty cycle, the transceiver is in sleep mode most of the
time, avoiding idle listening and conserving energy.
• By choosing a small duty cycle, the traffic directed from neighboring nodes to
a given node concentrates on a small listen period and in heavy load
situations significant competition can occur.
• Sleep phases should not be too short, otherwise the start-up costs outweigh the
benefits.
23
2.1 Sparse topology and energy management (STEM)
❖ Does not cover all aspects of a MAC protocol but provides a solution for the
idle listening problem.
❖ From the perspective of a single sensor, most of the time there are no elephants
and the sensor has nothing to report.
❖ However, once an elephant appears, thesensor reports its readings
periodically. 24
❖ More abstractly, the network has a monitor state, where the nodes idle and do
nothing, and also a transfer state, where the nodes exhibit significant sensing
and communication activity.
❖ STEM tries to eliminate idle listening in the monitor state and to provide a
fast transition into the transfer state, if required.
❖ The term “topology” in STEMs name comes from the observation that as
nodes enter and leave the sleep mode network topology changes.
❖ Two different channels are used, requiring two transceivers in each node: the
wakeup channel and the data 25
❖ The data channel is always in sleep mode, except when
transmitting or receiving data packets.
❖ On the wakeup channel the time is divided into fixed-length wakeup periods
of length T.
26
❖ A wakeup period is subdivided into a listen period of length TRx << T and a
sleep period, where the wakeup channel transceiver enters sleep mode, too.
❖ If nothing is received during time TRx, the node returns into sleep mode.
❖ There aretwo different variants for the transmitter to acquire the receiver’s
attention:
❖ In STEM-T, the transmitter sends out a simple busy tone on the control
channel for a time long enough to hit the receiver’s listen period.
❖ Since the busy tone carries no address information, all the transmitter’s
neighbors will sense the busy tone and switch on their data channel, without
sending an acknowledgment packet.
28
2.2 The mediation device
protocol
❖ The mediation device protocol is compatible with thepeer-to-peer
communication mode of the IEEE 802.15.4 low-rate WPAN standard.
❖ If no packet is received during this window, the node goes to sleep mode.
❖ The mediation device can receive the query beacons from all nodes in its
vicinity and learn their wakeup periods.
❖ Node A sends its RTS packets instead of its query beacons and thus they have
the same period.
❖ Again, there is a short answer after RTS packets, where A listens for
31
❖ After the MD has received A’s RTS packet, it waits for B’s next query beacon.
❖ The MD answers this with a query response packet, indicating A’s address and
a timing offset, which lets B know when to send the answering clear to send
(CTS) to A such that the CTS packet hits the short answer window after A’s
next RTS packet.
❖ Therefore, B has learned A’s period. After A has received the CTS packet, it
can send its data packet and wait for B’s immediate acknowledgment.
❖ After the transaction has finished, A restores its periodic wakeup cycle and
starts to emit query beacons again.
❖ Node B also restores its own periodic cycle and thus decouples
period.A’s
from 32
Advantages:
❑ It does not require any time synchronization between the nodes, only the
mediation device has to learn the periods of the nodes.
❑ The protocol is asymmetric in the sense that most of the energy burden is
shifted to the mediation device, which so far is assumed to be power
unconstrained.
Drawbacks:
❑ The nodes transmit their query beacons without checking for ongoing
transmissions and, thus, the beacons of different nodes may collide repeatedly
when nodes have the same period and their wakeup periods overlap.
33
Wakeup radio concepts
The ideal situation would be if a node were always in the receiving state when
a packet is transmitted to it, in the transmitting state when it transmits a packet,
and in the sleep state at all other times; the idle state should be avoided.
The wakeup radio concept strives to achieve this goal by a simple, “powerless”
receiver that can trigger a main receiver if necessary.
Drawbacks.
38
❖ The S-MAC protocol allows neighboring nodes to agree on the
same schedule and to create virtual clusters.
❖ All thepackets (data, ack, RTS, CTS) have a duration field and
neighboring
a node C is required to set its NAV field 39
40
Key features of the S-MAC protocol include:
Low Duty Cycle: S-MAC introduces the concept of duty cycling, where sensor
nodes alternate between active and sleep modes. During the active period,
nodes can transmit and receive data. During the sleep period, nodes turn off their
radio to conserve energy.
41
Neighbor Discovery: S-MAC employs periodic "beacon" messages to help
nodes discover their neighbors and establish a communication schedule.
Advantages S-MAC
Disadvantages S-MAC
❖ Its effectiveness depends on factors like the network's traffic patterns, the
density of nodes, and the desired trade-off between energy efficiency and
latency.
43
4. B-Mac (Berkeley
❖MAC)
B-MAC is a widely used WSN MAC protocol. It is a part TinyOS.
of
Key features of the B-MAC protocol include:
46
Preamble
✔Length
Preamble must be at least as long as duty cycle for reliable data
reception
47
❖ If a node wants to send a message, it first preamble for thesleep
sends a period for all nodes to detect it.
❖ After the preamble, it sends the data packet.
❖ There are optional acknowledgments also.
❖ After the data packet exchange, the nodes go back to
sleep.
48
Advantages
It does not use RTS, CTS, ACK, or any other controlframe by default, but
they can be added.
It is one of the few specialized MAC protocols whose implementation was
tested in hardware.
No synchronization is required and the protocol performance can be
tuned by higher layers to meet the needs of various applications.
Disadvantages
49
5. Traffic-adaptive medium access protocol
❖(TRAMA)
The Traffic-Adaptive Medium Access (TRAMA) protocol creates
schedules
allowing nodes to access a single channel in a collision-free manner.
❖ The protocol assumes that all nodes are time synchronized and divides time
into random access periods and scheduled-access periods.
p = h(x ⊕ t)
where x ⊕ t is the concatenation of x’s node identification with the current time t.
52
✔ To compute the schedule, a node looks ahead for a certain number of time
slots, called its schedule interval (say:100 slots) and for each of these slots
computes its own priority and the priority of all its two-hop neighbors.
✔ The slots for which x has the highest priority value can be used by x to
transmit its packets. These are called winning slots.
53
54
Disadvantages
55
6. Routing Protocols
❖ Routing protocols in wireless sensor networks (WSNs) define the rules and
mechanisms that guide how data packets are transmitted from a source node
to a destination node through a network of interconnected sensor nodes.
❖ These protocols are crucial for achieving efficient and reliable data
communication while considering the resource constraints and dynamic
nature of sensor nodes.
❖ The process of finding suitable path from source node to destination node
is called routing and this is the primary responsibility of the network layer.
6.1 Requirements
❖ Routing protocols in wireless sensor networks (WSNs) are designed to meet
specific requirements to ensure efficient and reliable data transmission in a
resource-constrained environment.
3. Adaptability to Node Failures: WSN nodes may fail due to battery depletion
or environmental factors. Protocols should be resilient to node failures
by dynamically rerouting traffic.
9. Support for Different Traffic Types: Routing protocols may need to handle
traffic. QoS differentiation
various types of data may be
traffic, such as periodic, event-driven, or 59
10. Security: Protecting data confidentiality and preventing unauthorized access
is important, especially for sensitive applications.
quickly
19. to these to Network Dynamics: WSNs experience changes in network
Adaptability 61
20. Application-Specific Optimization: Depending on the application (e.g.,
environmental monitoring, surveillance, healthcare), routing protocols may need
to be optimized for specific requirements, such as data accuracy or event
detection.
6.3 Classification
Routing protocols can be classified into different categories
67
7. SPIN (Sensor Protocol for Information via Negotiation)
❖ SPIN aims to improve the energy efficiency of communication in such
networks by minimizing unnecessary data transmission and reducing power
consumption.
SPIN Concepts:
SPIN Messages
69
ADV - new data advertisement. When a SPIN node has data to
share, it can advertise this fact by transmitting an ADV message containing
meta-data.
REQ - request for data. A SPIN node sends an REQ message when it wishes to
receive some actual data.
DATA - data message. DATA messages contain actual sensor data with a meta-
data header.
Because ADV and REQ messages contain only meta- data, they are smaller, and
cheaper to send and receive, than their corresponding DATA messages
70
SPIN-1: A 3-Stage Handshake
Protocol
❖ It works in three stages (ADV-REQ-DATA), with each stage corresponding
to one of the messages described above.
❖ Upon receiving an ADV packet from node A, node B checks to see whether
it possesses all of the advertised data
(a) If not, node B sends an REQ message back to A, listing all of the data that it
would like to acquire
(b) When node A receives the REQ packet, it retrieves the requested data and
sends it back to node B as a DATA message
(c) Node B, in turn, sends ADV messages advertising the new data it received
from node A to all of its neighbors.
72
(d) It does not send an advertisement back to node A, because it knows that
node A already has the data.
SPIN solves the problem of Implosion, Overlap and thus achieve a lot of energy
efficiency.
1.Implosion
Node A starts by flooding the data to its two neighbours i.e B and C. These nodes
store the data received from A and send a copy of it to their neighbor D. The
protocol thus wastes energy and bandwidth by sending one extra copy of A to
2. Overlap
The sensor area of node A and node B are overlapping and the neighbour node
of A and B are same therefore node C receives 2 copies of Y and energy is
wasted.
74
Disadvantages
1. The sending of data towards the sink node from the source node takes very
long time.
2. If a node has more computation power then it will consume more energy
as compared to other node in the network.
3. If a node is used many times then it will lose energy early then the other nodes
in the network.
4. If a node is sitting idle then its energy will be reduced without transmission of
data.
75
8. Directed Diffusion
❖ Directed Diffusion is a data-centric routing protocol designed for wireless
sensor networks (WSNs) that focuses on efficiently delivering sensor data to
designated sinks (base stations) while conserving energy.
76
Key Features
78
Phases of directed diffusion
❑ In the beginning of the interest dissemination phase, node 1 (the interested
sink) broadcasts a message to all nodes.
❑ Each node saves at most K neighbors (in this case, K = 2) from which it first
received the interest and re-broadcasts the message.
❑ At the end of this phase each node has a queue of neighbors, ordered by the
time of arrival of interest.
79
❑ At this point, the slow data delivery can begin, in which the source sends
data over all neighbors in its queue.
80
❑ Once the first packet arrives at the sink, the sink reinforces the link of
arrival and the reinforcement phase begins.
❑ Here, each reinforced node reinforces its own fastest link to the source.
81
❑ After the source is reinforced, the fast data delivery phase can begin.
❑ Note that the neighbor lists get shorter for the reinforced nodes and are empty
for non-reinforced nodes.
❑ This is done for optimization, as theinformation is notupdated later in
the routing process and becomes old fast.
82
Advantages
Energy Efficiency,
Reduced Network Overhead,
Data Aggregation etc.,
Disadvantages
Interest Specification,
Efficient sink placement is important to ensure proper data
collection,
Overhead in Interest Propagation
83
9. COUGAR
❖ COUGAR operates on the principle of data-centric query processing.
❖ Instead of transmitting raw data to a central server for processing, queries are
expressed in terms of desired data characteristics.
❖ Sensor nodes organize and index data based on attributes, enabling efficient
processing of queries without transferring unnecessary information.
Mechanisms
Data-Centric Storage:
86
Energy Efficiency and Optimization:
Example:
Assuming that the query Q is the only query that is running in the network,
the query optimizer will generate a new query plan QP.
The query plan QP specifies how to determine the leader of this query, a
designated node where the computation of the average temperature will take
place.
The leader could be a fixed sensor with more remaining power and energy,
or a randomly selected node by some distributed leader election
algorithm. 88
Two computation plans are produced, one for the leader node, and a second
plan for the remaining nodes in the query region.
Figure 3 shows the query plan for a non-leader node that participates in the
query.
Non-leader nodes have a scan operator to read sensor values periodically and
to send them to the leader node.
Figure 4 shows the query plan for the leader node, which contains an AVG
operator to compute the average value over all sensor readings received in
the last round of the query, and a SELECT operator that checks if the result
is above the threshold.
90
Benefits and Applications:
❑ Energy Savings
❑ Scalability
❑ Adaptability
91
10. ACQUIRE (Active Query Forwarding in Sensor
Networks)
❖ ACQUIRE is a routing protocol on optimizing query processing by actively
forwarding queries to relevant sensor nodes.
(a) Flooding of interest query from querier (b) Response to query in system without
node (sink x) 94
aggregation
(c) Response to query in system with (d) Sample trajectory of active query (solid)
aggregation and response (dashed) in a basic ACQUIRE
(zero look-ahead).
95
Illustration of ACQUIRE with a one-hop look-ahead (d = 1).
❑ At each step of the active query propagation, the node carrying the active query
employs knowledge gained due to the triggered updates from all nodes within
d hops in order to partially resolve the query.
96
❑ As d becomes larger, the active query has to travel fewer steps on average,
but this also raises the update costs.
Forward: After answering the query based on the information obtained, x then
forwards the remaining query to a node that is chosen randomly from those d hops
away.
97
Advantages:
Energy Efficiency
Real-Time Responses
Dynamic Adaptation
Limitations: