You are on page 1of 126

Network Layer

Prof. Yeshudas Muttu


Assistant Professor
Don Bosco College of Engineering, Goa
Prof. Yeshudas Muttu

Roadmap
 Routing basics
 Data-centric routing
 Proactive routing
 On-demand routing
 Hierarchical routing
 Location-based routing
 QoS-based routing
Prof. Yeshudas Muttu

Network Layer Responsibility

 Direct communication model: every sensor communicates


directly (single-hop) with the sink device (base station)
 often not feasible due to lack of energy, scale of network, lack of
unobstructed communication links between sensors and sink
 Multi-hop communication model: sensors cooperate in
propagating sensor data towards the sink
 Routing is a key responsibility of the network layer
 Routing protocol is responsible for finding and maintaining
path from sensor to sink
Prof. Yeshudas Muttu

Terminology
 Data source. The node in the network, which produces the
required data and is able to send it out to other nodes in the
network.
 Data destination. The node in the network, which requires
the data and is able to receive it from other nodes in the
network.
 Data forwarder. Any node in the network, which is not the
source or the destination of the data, which is able to receive it
from another node and to send it further in the network.
 Data sink. A dedicated node(s) in the network, which is the
implicit destination of any data in this network.
Prof. Yeshudas Muttu

Terminology
 Full-network broadcast. There is a single source of the data and
all nodes in the network are implicit destinations of the data.
 Unicast. There is a single source and a single destination of the
data, which could be any nodes in the network.
Prof. Yeshudas Muttu

Terminology
 Multicast. There is a single source, but multiple destinations of the
data. Again, both the source and the destinations can be any nodes
in the network.
 Convergecast. All nodes in the network are sources, while a
single node (typically the sink) is the destination
Prof. Yeshudas Muttu

Terminology
 Routing is the process of selecting a sequence of nodes in the
network, beginning from the data source(s) and ending at the
data destination(s). This sequence of nodes is also called the
routing path.
 A valid routing path consists of a finite number of nodes and it
does not contain loops.
Prof. Yeshudas Muttu

Classification of Routing Protocols


Prof. Yeshudas Muttu

Classification of Routing Protocols


I. Network organization
 Most routing protocols fit into one of three classes.
1. Flat-based routing protocols consider all nodes of equal
functionality or role.
2. In hierarchical-based routing protocols, different nodes may
assume different roles in the routing process, that is, some nodes
may forward data on behalf of others, while other nodes only
generate and propagate their own sensor data.
3. Location-based routing protocols rely on the location
information from nodes to make routing decisions.
Prof. Yeshudas Muttu

Classification of Routing Protocols


II. Route Discovery
 Routing protocols are responsible for identifying or discovering routes
from a source or sender to the intended receiver. It can also be used to
distinguish between different types of routing protocols.
 Reactive protocols discover routes on-demand, that is, whenever a
source wants to send data to a receiver and does not already have a
route established.
 While reactive route discovery incurs delays before actual data
transmission can occur, proactive routing protocols establish routes
before they are actually needed.
 This category of protocols is also often described as table-driven, because
local forwarding decisions are based on the contents of a routing table
that contains a list of destinations, combined with one or more next-hop
neighbors that lead toward these destinations and costs associated with
each next hop option.
Prof. Yeshudas Muttu

Classification of Routing Protocols


II. Route Discovery
 While table-driven protocols eliminate the route discovery delays,
they may be overly aggressive in that routes are established that
may never be needed.
 Further, the time interval between route discovery and actual use of
the route can be very large, potentially leading to outdated routes
(e.g., a link along the route may have broken in the meantime).
 Finally, the cost of establishing a routing table can be significant, for
example, in some protocols it involves propagating a node’s local
information (such as its list of neighbors) to all other nodes in the
network.
 Some protocols exhibit characteristics of both reactive and proactive
protocols and belong to the category of hybrid routing
protocols.
Prof. Yeshudas Muttu

Classification of Routing Protocols


III. Protocol Operation
 Routing protocols also differ in their operation, for example,
negotiation-based protocols aim to reduce redundant data
transmissions by relying on the exchange of negotiation messages
between neighboring sensor nodes before actual data transfers
occur.
 The SPIN family of protocols belongs to this category. Multipath-
based protocols use multiple routes simultaneously to achieve
higher performance or fault tolerance.
 Query-based routing protocols are receiver-initiated, that is,
sensor nodes send data in response to queries issued by the
destination node.
Prof. Yeshudas Muttu

Classification of Routing Protocols


III. Protocol Operation
 The goal of QoS-based routing protocols is to satisfy a certain
Quality-of-Service (QoS) metric (or a combination of multiple
metrics), such as low latency, low energy consumption, or low packet
loss.
 Finally, routing protocols also differ in the way they support in-
network data processing.
 Coherent-based protocols perform only a minimum amount of
processing (e.g., eliminating duplicates, time-stamping) before sensor
data is sent to receivers and data aggregators.
 However, in non-coherent based protocols, nodes may perform
significant local processing of the raw data before it is sent to other
nodes for further processing.
Prof. Yeshudas Muttu

Classification of Routing Protocols


 When sensor data is explicitly sent to one or more receivers, routing
is considered node-centric.
 Most routing protocols focus on unicast routing, that is, forwarding of
sensor data to exactly one receiver.
 Multicast and broadcast routing approaches, disseminate data to
multiple or all nodes, respectively.
 Data-centric routing is used when nodes are not explicitly
addressed, but instead receivers are implicitly described by certain
attributes.
 For example, a query issued by the gateway device may request
temperature readings and only sensors that can collect such
information respond to the query.
Prof. Yeshudas Muttu

Need for Routing Metrics


 Sensor networks do not use an addressing scheme to identify
individual nodes.
How do you know where the destination is?
 The answer is that the destination typically informs the other nodes
in the network where it is via a full-network broadcast
How do you know which neighboring nodes are closer to the
destination?
 The general answer is, you use routing metrics.
 The routing metric is the driving force behind routing. It represents a
way to compare different sensor nodes in terms of their vicinity to
the destination.
 This vicinity can be a precise or approximated geographic vicinity,
but it can also be a communication based vicinity such as least
delay.
Prof. Yeshudas Muttu

Need for Routing Metrics


 In time-driven schemes (e.g., environmental monitoring), nodes
propagate their collected sensor data periodically to a sink or
gateway device.
 In event-driven schemes (e.g., wildfire detection), nodes only
report their collected information when events of interest
occur.
 Finally, in query-driven schemes, it is the responsibility of the
sink to request data from sensors when needed.
Prof. Yeshudas Muttu

Routing Metrics
Minimum hop (shortest hop)
 The most common metric used in routing protocols is
minimum hop (or shortest hop), that is, the routing protocol
attempts to find the path from the sender to the destination
that requires the smallest number of relay nodes (hops).
 In this simple technique, every link has the same cost and a
minimum-hop routing protocol selects the path that minimizes
the total cost of data propagation from source to destination.
Advantage:
 using the shortest path will result in low end-to-end delays and
low resource consumptions, because the smallest possible
number of forwarding nodes will be involved.
Prof. Yeshudas Muttu

Routing Metrics
Energy
 minimum energy consumed per packet
The goal is to minimize the total amount of energy expended for the
propagation of a single packet from the source to the destination.
The total energy is then the sum of the energy consumed by each
node along a route for receiving and transmitting the packet.
Prof. Yeshudas Muttu

Routing Metrics
Energy
 minimum energy consumed per packet
A source node wishes to transmit a packet to a destination node using
a route that minimizes the packet’s energy overheads.
The number on each link indicates the cost of propagating the packet
over this link.
As a consequence, the packet will travel via nodes A–D–G (with a total
cost of 5). Note that this is different from the minimum-hop route (B–
G).
Prof. Yeshudas Muttu

Routing Metrics
Energy
 maximum time to network partition
 A network partitions into several smaller subnetworks when the last node
that links two parts of the network expires or fails. Hence, a subnetwork
may not be reachable, rendering the sensor nodes within the subnetwork
useless.
 Therefore, the challenge is to reduce the energy consumption on nodes
that are crucial to maintaining a network where every sensor node can be
reached via at least one route.
 For example, a minimal set of nodes, whose removal will cause a network
to partition, can be found using the max-flow–min-cut theorem.
 Once a routing protocol has identified these critical nodes, it can attempt
to balance the traffic load such that premature expiration of these nodes
is prevented.
Prof. Yeshudas Muttu

Routing Metrics
Energy
 maximum time to network partition
 In Figure, node D is such a node, for example, if node D’s battery
becomes depleted, nodes F, I, and J would not be reachable from any
other node in the network.
Prof. Yeshudas Muttu

Routing Metrics
Energy
 minimize variance in node power levels
 all nodes within the network are considered equally important and
the challenge is to distribute the energy consumption across all
nodes in the network as equally as possible.
 The goal of such an approach could be to maximize the lifetime of
the entire network, for example, instead of some nodes expiring
sooner than others and thereby continuously decreasing the
network size, one could aim at keeping as many nodes alive as long
as possible.
 In the ideal case, all nodes would expire at exactly the same time.
Prof. Yeshudas Muttu

Routing Metrics
Energy
 maximum (average) energy capacity
 Here, the focus is less on the energy cost of packet propagation, but
instead on the energy capacity (i.e., the current battery charge level)
of the nodes.
 A routing protocol that uses this metric would then favor routes that
have the largest total energy capacity from source to destination.

• In Figure, the numbers in


parentheses below the nodes
indicate the nodes’ remaining
energy capacity.
• In this example, a routing protocol
could select path C–E–G, which has
the largest total capacity (i.e., 8).
Prof. Yeshudas Muttu

Routing Metrics
Energy
 maximum minimum energy capacity
 Instead of maximizing the energy capacities of the entire path, the
primary routing goal could be to select the path with the largest
minimum energy capacity.
 This technique also favors routes with larger energy reserves, but
also protects low-capacity nodes from premature expiration.

 In Figure, a protocol using this


metric would choose B–G, since
the minimum capacity along this
route is 2, which is larger than
the minimum capacities of all
other possible routes.
Prof. Yeshudas Muttu

Routing Metrics
Quality-of-Service
 The term Quality-of-Service (QoS) refers to defined measures of
 Performance in networks, including
 end-to-end latency (or delay) and
 throughput, but also
 jitter (variation in latency) and
 packet loss (or error rate).
 Sensor networks performing target detection and tracking will require
 low end-to-end transmission delays for their time-sensitive sensor data,
 while data-intensive networks (e.g., multimedia sensor networks) may require
high throughput.
Prof. Yeshudas Muttu

Routing Metrics
Quality-of-Service
 The Expected Transmission Time (ETT) is a common metric to express
latency and is defined as

 where S is the average size of a packet and B is a link’s bandwidth. It


expresses the expected time necessary to successfully transmit a packet
at the MAC layer.
 To capture packet loss as a routing metric, the Expected Transmission
Count (ETX) can be used, which is defined as the number of
transmissions necessary to successfully deliver a packet over a wireless
link.
 Very often multiple QoS metrics (e.g., end-to-end latency and packet loss
rate) are combined, for example, the bandwidth-delay product refers to
the product of a link’s bandwidth and its end-to-end delay.
Prof. Yeshudas Muttu

Flooding
 Every sensor node (re-)broadcasts sensor data to all of its
neighbors
 Simple and reliable technique
 Incurs large traffic overhead (maximum-hop counts and
sequence numbers can be used to limit broadcasts and
eliminate duplicates)
 However, flooding faces three more challenges:
Flooding
Prof. Yeshudas Muttu

1. Implosion:
 A node receiving a packet relays this packet to all its neighbors using
broadcasting, regardless of whether these neighbors have already
received this packet from other neighbors.
 This leads to resource waste due to unnecessary transmit-and-receive
operations.
 The left graph illustrates this problem. Node A broadcasts packet P1 to
both of its neighbors, B and C. B forwards this packet to its own
neighbor D and, finally, C also forwards this packet to node D.
 Even if D discards the duplicate packet, energy has been wasted on the
transmission of the packet from C to D.
Flooding Prof. Yeshudas Muttu

2. Overlap
 Sensors are often used to monitor overlapping geographic areas, as
illustrated in the right graph. Here, sensors A and B share the region
marked as Y.
 Therefore, these sensors gather overlapping data and both forward their
collected information to their neighbor C. Similar to the implosion problem,
this also leads to resource waste since the same information is sent twice
to the same receiver.
 Unlike the implosion problem, the overlap problem is more difficult to
address, because a solution to this problem must not only consider the
topology of the sensor network, but also the mapping of the collected
sensor information to sensor nodes.
Prof. Yeshudas Muttu

Flooding
3. Resource blindness:
 The simplicity of the protocol also means that flooding lacks
awareness of the resource constraints of individual nodes.
 As a consequence, flooding is not able to adapt its behavior
based on the amount of energy available to a specific node.
Prof. Yeshudas Muttu

Gossiping
 Gossiping is similar to flooding except that, a node receiving a
packet, instead of broadcasting, the node sends it to only one of its
randomly selected neighbor.
 The neighbor in turn sends the packet to one of its randomly
selected neighbor, this continues until the packet reaches its
destination.
 Gossiping reduces the number of packets in the network but the
delay to reach destination in some cases may be very large.
 A node does not necessarily broadcast data.
 Instead, it uses a probabilistic approach, where it decides to forward
the data to its own neighbors with a probability p and to discard the
data with a probability 1 − p.
 It therefore can reduce the amount of traffic and achieve energy
conservation by randomization.
Prof. Yeshudas Muttu

Gossiping

 However, this only addresses the implosion problem of flooding, not


the overlapping and resource blindness problems.
 With gossiping, it is also possible that delivery of sensor data fails
when, for example, a node’s only neighbor decides not to forward
the data to this node.
 If a high probability for forwarding is chosen, the consequence is
that the message volume will be high (a probability of 1
corresponds to classic flooding), thereby limiting the benefits of
gossiping.
 On the other hand, if the probability is low, the overhead can be
significantly smaller, but the probability of unsuccessful data delivery
will increase.
Prof. Yeshudas Muttu

Discussion
3 challenges of flooding.
 A node receiving a packet forwards this packet to all neighbors
regardless of whether these neighbors have already received a
copy of this packet. This is known as the implosion problem.

 The redundancy in sensor data from sensors that monitor


similar physical environments is known as the overlap
problem.

 Finally, flooding does not consider the resources available on


all nodes, i.e. it is resourceblind.
Prof. Yeshudas Muttu

Discussion
Which one(s) of these are addressed by gossiping and
how are they addressed?
 Gossiping addresses only the implosion problem, i.e. it uses a
probabilistic approach to decide whether to forward data or
not.
Prof. Yeshudas Muttu

Discussion
How do sequence numbers contribute to reducing
unnecessary transmissions? Are sequence numbers
alone sufficient and if not, what other information is
needed to use them correctly?
 Sequence numbers allow nodes to distinguish packets from
each other, i.e. to identify new packets or duplicates.
 Sequence numbers alone are typically not enough, they need
to be combined with other information, such as the identity of
the sender.
 Only then can a packet be identified uniquely.
Prof. Yeshudas Muttu

Data Centric Routing

 In most sensor networks, the sensor nodes themselves


are less important than the information they generate.

 Here, the focus is on the retrieval and dissemination of


information of a particular type or described by certain
attributes, as opposed to the data collection from
particular sensors.
Prof. Yeshudas Muttu

Address Centric V/s Data Centric


 AC - Each Source sensor node with appropriate data
responds by sending the data to the sink node
irrespective of other sensor nodes.

 DC – When source sends data to sink, other nodes can


cluster the data generated from multiple sensors and
send it to the sink.
Prof. Yeshudas Muttu

SPIN Family of Protocols


 SPIN stands for Sensor Protocol for Information via
Negotiation. There is family of protocols called as SPIN; they
come in different flavors and features.
 These protocols are designed to address the deficiency of
flooding and gossiping.
 SPIN uses three types of messages, ADV, REQ and DATA.
 The ADV message is broadcasted by a node which has some
data. This message is broadcasted by the node. This message
will say about type of data contained by the advertising node.
 Interested nodes which got the ADV message send REQ
message requesting for the data. The node having the data
sends the data to the interested nodes.
 The nodes after receiving data send ADV message, and the
process continues.
Prof. Yeshudas Muttu

SPIN Family of Protocols


Prof. Yeshudas Muttu

SPIN Family of Protocols


 Node 1 sends ADV message to all its neighbors, 2 and 3.
 Node 3 requests for the data using REQ message, for which node 1
send data using message DATA to node 3.
 After receiving the data Node 3 sends ADV message to its
neighbors 4 and 5 and the process continues.
 It does not send to 1 because 3 knows that it received data from 1.
 The data is described in the ADV packet using high level data
descriptors, which are good enough to identify the data. These high
level data descriptors are called meta-data.
 The meta-data of two different data’s should be different and meta-
data of two similar data should be similar.
 The use of meta-data prevents, the actual data being flooded
through out the network.
 The actual data can be given to only the nodes which need the data.
This protocol also makes nodes more intelligent, every node will
have a resource manager, which will inform each node about the
amount various resources left in the node.
 Accordingly the node can make a decision regarding, whether it can
as forwarding node or not.
Prof. Yeshudas Muttu

SPIN Family of Protocols


 Sensor Protocols for Information via Negotiation (SPIN)
 Example of data-centric routing
 Uses negotiations to address all problems of flooding
 implosion: nodes negotiate before data transmission
 overlap: nodes negotiate before data transmission
 resource blindness: resource manager keeps track of actual resource
consumption and adapts routing and communication behavior

 SPIN uses meta-data to neatly and completely describe sensor data


 Requirements:
 if x describes the meta-data for some sensor data X, the size of x (in
bytes) must be less than the size of X
 if two pieces of sensor data differ, their meta-data representations
should differ too
Prof. Yeshudas Muttu

SPIN Family of Protocols


Prof. Yeshudas Muttu

SPIN-PP
 Optimized for networks using point-to-point transmission
media (two nodes communicate exclusively with each other
without interference)
 Flooding occurs using a 3-way handshake:
 node A advertises newly available data using ADV (advertisement)
message (containing data’s meta-data)
 neighbor nodes (B, C, D, E) check if advertised data needed and if so,
respond with REQ (request for data) message
 A sends DATA message to nodes that responded (i.e., B and D)
Prof. Yeshudas Muttu

SPIN (cont.)- Three-stage handshake


protocol
• SPIN-PP: A three-stage handshake protocol for point-
to-point media
– ADV – data advertisement
• Node that has data to share can advertise this by
transmitting an ADV with meta-data attached
– REQ – request for data
• Node sends a request when it wishes to receive some
actual data
– DATA – data message
• Contain actual sensor data with a meta-data header
• Usually much bigger than ADV or REQ messages

44
Prof. Yeshudas Muttu

SPIN-PP
 Only nodes that needs the ADV data respond
 Nodes can aggregate(combine) received data with their own and
advertise it.
 Nodes need to know their single-hop neighbors only
 Lost ADV messages: periodically re-advertise
 Lost REQ/DATA messages: re-request data of interest if data does
not arrive within certain timeout interval
 Protocol could also use explicit acknowledgments (e.g., REQ can
contain list of data a node wants or does not want and using this
list, a node can identify whether previous ADVs were received
successfully)
Prof. Yeshudas Muttu

SPIN-EC
 SPIN-EC:
 adds simple heuristic (learn something for themselves) to protocol to add
energy conservation
 as long as energy sufficient, node participates in 3-way handshake
 nodes does not participate if it believes that this will reduce its energy
below a certain low-energy threshold
 node replies to ADV only if sufficient energy for transmitting REQ and
receiving DATA
 node initiates handshake only if it has sufficient energy to send DATA to
all neighbors
Prof. Yeshudas Muttu

SPIN-BC
 SPIN-BC:
 This SPIN protocol is used in broadcast communication. SPIN-BC
improves upon SPIN-PP for broadcast networks by exclusively using
cheap, one-to-many communication.
 This means that all messages are sent to the broadcast address and
thus processed by all nodes that are within transmission range of the
sender.
 During broadcast transmission, the nodes communicate by a single,
shared channel. In this when a node sends a message, it is received
by every node in certain range of sender not bothering about the
message destination.
 If the channel is sensed busy by the destination node then it waits
until the channel becomes idle and then attempt to send the
message.
Prof. Yeshudas Muttu

SPIN-BC
 SPIN-BC:
 Disadvantage: when a node sends data all other nodes within the
range of sender pay the price in terms of energy and time.
 Advantage: when a single node sends a message broadcast it is sent
to all of its neighbours using one transmission.
 One-to many network is 1/n times cheaper as compared to point to
point network where n is number of neighbours of each node.
Prof. Yeshudas Muttu

(1) Node A advertise data and its


SPIN-BC neighbors checks whether they have
received the advertised data or not

Three neighbors of A that are C, D,


and E, do not have A’s data, and
enter request suppression mode for
different, random amounts of time.

(2) In this example C’s timer expires


first, therefore C broadcasts a
request for A’s data which in turn
suppresses the duplicate request
from D.

(3) Though several nodes receive the


request, only A, the originator of ADV
packet, responds.

(4) After A sends out its data, E’s


request is suppressed, and all send
out advertisements for their new
data.
Prof. Yeshudas Muttu

SPIN-RL
 Reliable version of SPIN-BC
 First, each SPIN-RL node keeps track of which ADVs it hears
from which nodes.
 After REQ, If it does not receive the data within a reasonable
period of time, the node re-requests the data.
 Second, SPIN-RL nodes limit the frequency with which they will
resend data.
 If a SPIN-RL node sends out a DATA message corresponding to
a specific piece of data, it will wait a predetermined amount of
time before responding to any more requests for that piece of
data.
Prof. Yeshudas Muttu

Directed Diffusion
 Directed Diffusion (DD) is a routing protocol, which
enables communication between sink and source nodes in
random and mesh topology networks.
 This routing protocol is based on a data-centric approach,
where intermediate nodes can aggregate data and send it to a
sink node.
 Nodes request data by sending interests for named data
 data is named by attribute-value pairs
 Interest dissemination sets up gradients within network to
direct sensor data toward recipient
 Intermediate nodes along the paths can combine data from
different sources
 eliminates redundancy
 reduce number of transmissions
Prof. Yeshudas Muttu

Directed Diffusion: Attribute-Value Pairs


 Simple vehicle-tracking application
type = vehicle // detect vehicle location
interval = 20 ms // send data every 20 ms
duration = 10 s // perform task for 10 s
rect = [-100,-100,200,200] // from sensors within rectangle

A sensor field
Sources
Event

Directed
Diffusion

Sink Node
Prof. Yeshudas Muttu

Directed Diffusion

 Interested node (sink) periodically sends interest to neighbors,


which re-broadcast these messages (a)
 Each node establishes a gradient towards the sink, which is a
reply link toward the neighbor from which the interest was
received (b)
 Source can send data towards sink using these gradients (c)
Prof. Yeshudas Muttu
Prof. Yeshudas Muttu

Directed Diffusion
 Reinforcement:
 multiple paths from source to sink may exist
 sink can reinforce one particular neighbor based on some data-driven local rule
 Eg: Sink could reinforce neighbor from which it has received a previously
unseen event
 Sink resends original interest message to that neighbor, which in turn
reinforces one or more of its neighbors based on its own local rule

 Comparison to SPIN:
 interests (queries) are issued on demand by the sink (instead of source
advertisements)
 query-based approach may not be best solutions for networks with need for
continuous data transfers (e.g., environmental monitoring)
 communication is all neighbor-to-neighbor (removing the need for addressing
schemes and allowing nodes to perform aggregation and caching)
Prof. Yeshudas Muttu

Directed Diffusion : Summarized

• Directed diffusion consists of


– Interest - Query which specifies what a user wants
– Data - Collected information
– Gradient
• Direction and data-rate
• Events start flowing towards the originators of
interests
– Reinforcement
• After the sink starts receiving events, it reinforces at
least one neighbor to draw down higher quality events

56
Prof. Yeshudas Muttu

Rumor Routing
 Rumor routing is an agent-based path creation algorithm .
 Agents, or “ants,” are long-lived entities created at
random by nodes.
 These are basically packets which are circulated in the
network to establish shortest paths to events that they
encounter.
 They can also perform path optimizations at nodes that
they visit.
 When an agent finds a node whose path to an event
is longer than its own, it updates the node’s routing
table.
Prof. Yeshudas Muttu
Rumor Routing

In Figure (a), the agent has initially recorded a path of distance 2 to


event E1.
Prof. Yeshudas Muttu
Rumor Routing

Node A ’s table shows that it is at a distance 3 from event E 1 and a


distance 2 from E 2.
Prof. Yeshudas Muttu
Rumor Routing

When the agent visits node A , it updates its own path state information
to include the path to event E 2.
Prof. Yeshudas Muttu
Rumor Routing

The updating is with one hop greater distance than what it found in A ,
to account for the hop between any neighbor of A that the agent will
visit next, and A .
Prof. Yeshudas Muttu
Rumor Routing

It also optimizes the path to E 1 recorded at node A to the shorter path


through node B .
The updated status of the agent and node table is shown in Figure (b).
Prof. Yeshudas Muttu
Rumor Routing

When a query is generated at a sink, it is sent on a random walk with


the hope that it will find a path (pre-established by an agent) leading to
the required event.
Prof. Yeshudas Muttu
Rumor Routing

This is based on the high probability of two straight lines intersecting on a planar
graph, assuming the network topology is like a planar graph, and the paths
established can be approximated by straight lines owing to high density of the nodes.
Prof. Yeshudas Muttu
Rumor Routing

If a query does not find an event path, the sink times out and uses
flooding as a last resort to propagate the query. For instance, as in Fig.
(c), suppose a query for event E 1 is generated by node P .
Prof. Yeshudas Muttu
Rumor Routing

Through a random walk, it reaches A , where it finds the previously


established path to E 1. Hence, the query is directed to E 1 through
node B , as indicated by A ’s table.
Prof. Yeshudas Muttu

Rumor Routing
 Attempt to combine characteristics of event flooding
(classic flooding) and query flooding (directed diffusion)
 Nodes maintain two data structures:
 list of neighbors
 event table that contains forwarding information to all known
events
 once an event is witnessed, it is added to the table (including a
distance of 0) and an agent is generated with certain probability
 agent is a long-lived packet traveling the network to propagate
information about this new event (and other events encountered
along its route)
 once agent arrives at a node, the node can update its table
Prof. Yeshudas Muttu

Rumor Routing: Example


 Node E reports new event E1 using agent
 A receives agent via G and updates its table reflecting
shorter distance to E1 via G
Prof. Yeshudas Muttu

Rumor Routing: Queries


 When node wants to issue query for certain event:
 check if route towards event is in table
 if yes, forward query to next-hop neighbor indicated in
table
 if no, pass query to randomly selected neighbor
 process is continued on each forwarding node and query
collects list of recently seen nodes (to avoid revisiting them)
 TTL (time-to-live) counter is used to limit traveled distance
 if no response received after certain timeout value (i.e., the
query did not reach the target), a different technique (classic
flooding of the query) can be used
Prof. Yeshudas Muttu

Rumor Routing: Queries


 Summary: strikes balance between query and event flooding
 query flooding may be too expensive with large query/event
ratio
 event flooding may be too expensive when number of events
large
 rumor routing propagates queries directly to nodes that
seen event of interest
 latency secondary concern in rumor routing
 table can grow large with large number of events
Prof. Yeshudas Muttu

Gradient-Based Routing (GBR)


 Another variant of directed diffusion
 Gradient is determined on the basis of the number of hops to the sink
 a sink floods interest message
 each interest message records number of hops traveled
 therefore, a node can determine its distance (called height) to sink
 gradient is difference between a node’s height and height of neighbor
 packet is forwarded on the link with the largest gradient

 Nodes can establish a Data Combining Entity (DCE), which is responsible for data
compaction
 Nodes can use a traffic spreading technique to balance traffic over network
 stochastic scheme: node selects next hop randomly when there are two or more
with same gradient
 energy-based scheme: node increases its height when its energy level is low
 stream-based scheme: new streams are diverted away from nodes that already
serve other streams (e.g., by reporting increased heights)
Prof. Yeshudas Muttu

Proactive Routing
 Routes are established before they are actually needed
 Also called table-driven routing
 Main advantage: routes can be used immediately when
needed (table look up for next-hop neighbor)
 Main disadvantages:
 establishing and maintaining routes that are infrequently (or
never) needed
 routing tables can become very large
 stale information in tables can lead to routing errors
Prof. Yeshudas Muttu

Destination-Sequenced Distance Vector


 Concept of distance-vector algorithms:
 node i maintains a list of distances {dijx} for each destination x via
node j
 node i selects k as next-hop if dikx = min {dijx}

 distances stored in routing table, along with sequence number for


each entry (assigned by destination node)
 purpose of sequence number is to identify stale routes

 nodes broadcast their routing tables to their neighbors periodically


and whenever significant information is available
 full dump packet: contains entire routing table
 incremental packet: contains only changed table entries
 a receiving node updates its table if the received information has a more
recent sequence number or if sequence number is identical, but new
route is shorter
Prof. Yeshudas Muttu

DSDV: Example
Prof. Yeshudas Muttu

DSDV: Example
Prof. Yeshudas Muttu

DSDV: Example
Prof. Yeshudas Muttu

DSDV: Example
Prof. Yeshudas Muttu

DSDV: Example
Prof. Yeshudas Muttu

DSDV: Example
Prof. Yeshudas Muttu

DSDV: Example
Prof. Yeshudas Muttu

Optimized Link State Routing


Prof. Yeshudas Muttu

OLSR terminology
Prof. Yeshudas Muttu

OLSR terminology
Prof. Yeshudas Muttu

OLSR terminology
Prof. Yeshudas Muttu

OLSR terminology
Prof. Yeshudas Muttu

OLSR terminology
Prof. Yeshudas Muttu

OLSR terminology
Prof. Yeshudas Muttu

OLSR terminology
Prof. Yeshudas Muttu

OLSR terminology
Prof. Yeshudas Muttu

OLSR terminology
Prof. Yeshudas Muttu

Optimized Link State Routing


 OLSR is a protocol based on the link state algorithm
 nodes periodically broadcast topological information updates to all
other nodes in the network
 allows nodes to obtain complete topological map and to compute
paths
 Nodes use neighbor sensing using HELLO messages:
 allows nodes to identify neighbors and to detect changes in
neighborhood
 HELLO message contains node’s identity (address) and list of all
known neighbors
 if node A can receive node B’s HELLO messages, but is not in node B’s
list of known neighbors, the link B  A is asymmetric (otherwise
symmetric)
 instead of flooding HELLO messages to all nodes in network, OLSR
uses multipoint relays (MPRs)
Prof. Yeshudas Muttu

Optimized Link State Routing


 Multipoint relays:
 A node selects a set of symmetric neighbors as MPRs (MPR selector set); each
node can use different algorithm/heuristic for the selection process
 example: node determines its 2-hop neighbors (using HELLO messages) and
selects minimum set of 1-hop neighbors to reach all 2-hop neighbors
 only MPRs forward messages to other nodes
 HELLO messages contain addresses of MPRs, i.e., a node advertises its
reachability via MPRs only instead of all neighbors
Prof. Yeshudas Muttu

On-Demand (Reactive) Routing


 Routes are not established until actually needed
 Instead, a source node (knowing the identity/address of a
destination node) initiates a route discovery process which
completes when at least one route has been found or all
possible paths have been examined
 A newly discovered route is then maintained until it either
breaks or is no longer needed by the source
Prof. Yeshudas Muttu

Ad Hoc On-Demand Distance Vector


 Route discovery is similar to the DSR. RREQ packet is sent.
Once Destination receives it, it replies with RREP packet.
 Here, all routes are maintained in the form of table.
 Any entry made will have a timer involved stating, when to
remove it from the table.
 Destination sequence number is used to check if coming info is
fresh or stale.
Route discovery mechanism –
1. Every node maintains two counters

Seq. No. Broadcast ID


Time stamp - Every node maintains when it
sends RREQ
- It increments when source
issues a new RREQ
Prof. Yeshudas Muttu

Ad Hoc On-Demand Distance Vector


 2. Source broadcast RREQ to search the route.
 Source address
 Source sequence No.
 Broadcast ID
 Destination address
 Destination sequence
 Hop count

 3. Destination replies using RREP unicasting


 Source address
 Destination address
 Destination sequence
 Hop count
 Lifetime

 4. Intermediate node
 Discards duplicate packet
 If it has any updated info about the route, it will send RREP to the sender.

Reverse path is maintained


Prof. Yeshudas Muttu

Ad Hoc On-Demand Distance Vector


 AODV relies on broadcast route discovery mechanism, which
is used to dynamically establish route table entries at
intermediate nodes
 Path discovery process:
 initiated whenever a source needs to transmit data to a sink and the
source does not have an entry for the sink in its routing table
 source broadcasts route request (RREQ) packet containing:
 addresses of source and sink
 hop count value
 broadcast ID (incremented whenever source issues a new RREQ)
 two sequence numbers
 upon receiving RREQ, if a node knows a route to the destination,
responds by sending a unicast route reply (RREP) message back to
source
 otherwise RREQs are re-broadcast or duplicate RREQs (identified by
source address and broadcast ID) are discarded
Prof. Yeshudas Muttu

Dynamic Source Routing (DSR)


 Route discovery and maintenance similar to AODV
 Each node maintains route cache with entries that are continuously
updated when node learns new routes
 Similar to AODV, source first inspects cache and initiates route
discovery if no route found
 RREQ contains:
 addresses of source and destination
 unique request ID
 list of visited nodes
 Each forwarding node inserts its own address into list of visited
nodes
 When node finds its own address in RREQ, packet is discarded
 Nodes keep cache of recently forwarded RREQs (sender address
and request ID) to identify duplicates (which are discarded)
 Once RREQ reaches destination, it has recorded the entire route
Prof. Yeshudas Muttu

Dynamic Source Routing (DSR)


 Symmetric networks:
 destination can unicast response packet back to source
 packet contains entire route
 Asymmetric networks:
 destination can initiate own route discovery to the source
 request packet contains path from source to destination

 Route maintenance similar to AODV


 Advantages and disadvantages similar to AODV
 Route discovery packets larger (contain routes), but allow
intermediate nodes to add new routes to their caches
proactively
Prof. Yeshudas Muttu

Hierarchical Routing
 Sensor nodes communicate directly only with a cluster head
 Cluster head:
 responsible for propagating sensor data to sink
 sometimes more powerful than “regular” nodes
 experiences more traffic than “regular” nodes
 Challenges in cluster formation:
 selection (election) of cluster heads
 selection of cluster to join
 adaptation of clusters in response to topology changes, failures, etc.
 Advantages:
 potentially fewer collisions (compared to flat routing)
 easier duty cycling (energy efficiency)
 easier routing process (though routes may be longer)
 easier in-network data aggregation
Prof. Yeshudas Muttu

Variations of Hierarchical Routing


Prof. Yeshudas Muttu

Landmark Routing
 Landmark: node to which its neighbors within certain number
of hops know a route to that node
 Example:
 nodes 2..6 have routes to node 1
 node 1 is a landmark “visible” to all nodes within 2-hop distance, i.e.,
node 1 is a landmark of radius 2

 Node i for which nodes within n hops have routes toward is a


landmark of radius n

 Hierarchy of landmarks: packet can be forwarded toward a


destination by choosing an appropriate sequence of landmarks
Prof. Yeshudas Muttu

Landmark Routing

 Example:
 landmark address of node LM0: LM2.LM1.LM0
 source has entry for LM2: packet travels towards LM2
 once packet reaches node within range of LM1: packet travels
towards LM1
 once packet reaches node within range of LM0: packet travels to
LM0
Prof. Yeshudas Muttu

Location-Based Routing
 Also referred to as geographic routing
 Used when nodes are able to determine their (approximate)
positions
 Nodes use location information to make routing decisions
 sender must know the locations of itself, the destination, and its
neighbors
 location information can be queried or obtained from a location
broker

 Types of geographic routing:


 unicast: single destination
 multicast: multiple destinations
 geocast: data is propagated to nodes within certain geographic area
Prof. Yeshudas Muttu

Unicast Location-Based Routing


 One single destination
 Each forwarding node makes localized decision based on
the location of the destination and the node’s neighbors
(greedy forwarding)
 Challenge: packet may arrive at a node without neighbors
that could bring packet closer to the destination (voids or
holes)
Prof. Yeshudas Muttu

Greedy Perimeter Stateless Routing


Prof. Yeshudas Muttu

GPSR basics
 Every node shares its location (IP address & Position)
with its neighbor periodically.
 IP , (X,Y)
 Every node saves the position of its one-hop neighbour
Prof. Yeshudas Muttu

GPSR: Greedy forwarding


Prof. Yeshudas Muttu

Greedy forwarding fails


Prof. Yeshudas Muttu

Greedy forwarding fails


Prof. Yeshudas Muttu

Perimeter Forwarding Right Hand Rule


Prof. Yeshudas Muttu

Perimeter Forwarding Right Hand Rule


Prof. Yeshudas Muttu

Perimeter Forwarding: Right Hand Rule

Packet is arriving at node U from X


Packet is made to move in a counter
clock-wise
Right Hand Rule result in the path/
tour: X – U – Z – D
This sequence is called Perimeter.
Prof. Yeshudas Muttu

Right Hand Rule:


doesn’t work with Cross - Edges

To Solve this Problem:


No cross Heuristic is used.
If two links are crossing, just remove the second one.
But this might partition the network at times. If this happens, Algorithm wont be able to
find the route to the destination. Hence, concept of planarized graph is used.
Prof. Yeshudas Muttu

Planarized Graph
 Graph in which no two edges cross.
 Here, two graphs are discussed for converting non –
planar to planar graphs:
 Relative Neighborhood Graph (RNG)
 Gabriel Graph (GG)

These two nodes are in


the range of each other
Prof. Yeshudas Muttu

Relative Neighborhood Graph


Prof. Yeshudas Muttu

Relative Neighborhood Graph


Prof. Yeshudas Muttu

Relative Neighborhood Graph

Edges crossing over are


with distances 7 & 12

So lets check the


existence of Edge 7.

Watch-out for nodes


connected to Z & W. We
find that only U is
connected.

Consider max distance


and compared with 7.
7<10. hence keep the
link.
Prof. Yeshudas Muttu

Relative Neighborhood Graph


Now consider node
common to X & U. i.e.
W.

12>10, hence remove


link between U & X.
Prof. Yeshudas Muttu

Gabriel Graph

Edge (u, v) exists?

How do we come to know w


lies within the circle?

Find midpoint of link


between u & v.

d(w, m) < d(u, m)


Hence node lies within blue
circle.

Therefore, Edge (u, v)


cannot exist.
Prof. Yeshudas Muttu

Forwarding Strategies
 Greedy: minimize distance to destination in each hop
 Nearest with Forwarding Progress (NFP): nearest of all
neighbors that make positive progress (in terms of
geographic distance) toward destination
Prof. Yeshudas Muttu

Forwarding Strategies
 Most Forwarding Progress within Radius (MFR): neighbor
that makes greatest positive progress (progress is
distance between source and its neighbor node projected
onto a line drawn from source to destination)
 Compass Routing: neighbor with smallest angle between a
line drawn from source to the neighbor and the line
connecting source and destination
Prof. Yeshudas Muttu

Problem Statement
Consider the topology in Figure. Node A wishes to forward
a packet toward destination L via one of its neighbors (its
communication range is indicated with the circle). Which
neighbor will A choose with each of the following
forwarding strategies:
(a) greedy forwarding
(b) nearest with forwarding progress
(c) most forwarding progress within radius
(d) compass routing
Prof. Yeshudas Muttu

Problem Statement

(a) greedy forwarding


G minimizes the distance to the destination L.
Prof. Yeshudas Muttu

Problem Statement

(b) nearest with forwarding progress


Node E makes positive progress towards L, but is also the
nearest neighbor.
Prof. Yeshudas Muttu

Problem Statement

(c) most forwarding progress within radius


G also makes the most forwarding progress within A’s
transmission radius.
Prof. Yeshudas Muttu

Problem Statement

(d) compass routing


F is A’s neighbor with the smallest angle between the line
connecting the source and the destination and the line
connecting the source with the neighbor.

You might also like