«Carles Gómez Josep Paradells José E. Caballero Edita: Fundación Vodafone España Autores: Carles Gómez Montenegro* Universitat Politècnica de ...»
Finally, Section 7.3 is devoted to the routing protocol work carried out within the IETF, specifically for WSNs and similar networks. The reader may note that, with regard to ZigBee routing, part of its functionality is described in Section 7.2, while more details about the routing solutions
that ZigBee offers can be found in Chapter 11. However, the formation of multi-hop networks composed of BT-LE links is beyond the scope of the technology specification.
7.1. Routing protocols designed for WSNs This section presents some of the most relevant routing protocols specifically designed for WSNs. Depending on the underlying structure of the network, these can be classified into flat, hierarchical and geographic routing protocols.
7.1.1. Flat routing In flat routing, all devices essentially play the same role and collaborate in the tasks carried out by the WSN. Flat routing protocols are essentially data centric, which means that in contrast to the address centric communication paradigm that exists for example in the Internet (whereby pairs of devices communicate with each other), the main goal is to obtain some data at a sink node, irrespective of the sensor nodes involved in the collection of those data.
126.96.36.199. Directed Diffusion and its variants
Directed Diffusion  was one of the first routing paradigms developed for WSNs. In this protocol, a sink node broadcasts interests (i.e. requests) for certain data. As interests are propagated through the network, gradients (i.e.
routes) towards the sink node are set up. Data is then transmitted to the sink node and a limited number of paths (e.g. one path) are reinforced (i.e. selected) based on certain rules (e.g. delivery delay). Fig. 7.1 illustrates this procedure.
During the process of data transmission from the sensor nodes to the sink node, intermediate nodes may aggregate information. This scheme reduces energy consumption when compared with transmitting a packet from each individual sensor node involved in a given sensing task.
Fig. 7.1. Basic operation of Directed Diffusion: a) Interest propagation, b) initial gradients set up, c) data delivery along reinforced path
A number of Directed Diffusion variants have been proposed:
• Rumour Routing  aims at reducing the energy consumption of Directed Diffusion due to request broadcasts. When the number of events is small and the number of requests is large, the queries can be routed to the nodes that have observed an event, instead of flooding the whole network. This is achieved by means of the transmission of special packets called agents, which are generated by the nodes that detect an event. Agents flood the network, which allows distant nodes to know the route towards the nodes that have detected an event.
Hence, in this way request flooding can be avoided.
• Constrained Anisotropic Diffusion Routing (CADR)  aims at maximizing the information gain while minimizing latency and bandwidth consumption. To do so, CADR uses information criteria which allow the selection of sensors that can obtain the data of interest. Only the sensors that are close to a particular event are activated, and routes are adjusted accordingly. Each node evaluates an information/cost objective, and routing is carried out based on this objective and end-user requirements.
• Energy Aware Routing (EAR)  is based on Directed Diffusion, but in contrast to the latter it maintains a set of paths. These paths are selected for communication depending on a probability, which is calculated from the energy consumption of each path. In this way, energy consumption is balanced among various paths, which increases network survivability. EAR uses flooding for finding all routes between each source and destination pair. Forwarding tables are then created and paths with a high cost are discarded. Non-discarded paths are used to send data to a destination with a probability which depends inversely on their energy cost.
Sensor Protocols for Information via Negotiation (SPIN) constitute a family of protocols that disseminate the information collected at each node to the whole network. This allows a user to query any node in the network and obtain a fast response. SPIN was designed to address
• Implosion: in classical network flooding, all the nodes transmit the data to their neighbours, which may have already received this information from another node.
• Overlapping: sensor nodes whose coverage ranges overlap will transmit packets that contain overlapping information.
• Unnecessary waste of energy and bandwidth, due to the implosion and overlapping problems.
The problems presented above are solved in SPIN by a negotiation procedure, by which a node advertises that it has new data (including appropriate metadata about it) and only the neighbours of this node that have not already received the data will receive the corresponding data packet.
Fig. 7.2 illustrates the basic operation of SPIN. In Fig. 7.2.a), node A has data to send and advertises this fact by broadcasting an Advertise (ADV) message. In Fig. 7.2.b), node B, which is a neighbour of node A, replies to this message with a Request (REQ) message, which indicates that it is interested in the data. It is assumed that these negotiation packets are smaller than data packets themselves. In Fig. 7.2.c), node A transmits the DATA packet, which contains the actual data to node B. In Fig. 7.2.d) the process starts again, but in this case node B broadcasts an ADV message to let its neighbours know that it has new data to transmit. In Fig. 7.2.e), only three of these neighbours require the data. For this reason, in Fig. 7.2.f), the DATA packet is only transmitted to them.
COUGAR  and ACtive QUery forwarding In sensoR nEtworks (ACQUIRE)  are two routing protocols that view the WSN as a distributed database.
COUGAR defines a query layer between the network and application layers. In COUGAR, the sensor nodes select a leader node that is in charge of aggregating and transmitting data to the sink node. The sink node creates a query plan that indicates the information needed plus the required in-network computation for the query, and sends it to the relevant nodes. The query plan
also includes the method for leader selection. COUGAR requires the use of a synchronization mechanism for transmission of data to the leader.
In ACQUIRE, the sink node sends a query, which is forwarded by the sensor nodes that receive the query. Sensor nodes attempt to reply to this query by using cached information. If the query cannot be resolved completely, then it is forwarded to another sensor node (including any partial information obtained from the last sensor node). Sensor nodes may also obtain information from their d-hop neighbours in order to update their cached information. Hence, d is a relevant parameter for optimizing performance of ACQUIRE. When the query is fully resolved, it is then transmitted back to the sink. The choice of the next node for forwarding the query can either be made randomly or based on maximum potential of query satisfaction.
7.1.2. Hierarchical routing In a hierarchical network, nodes play different roles depending on their category. The assignment of different tasks for different roles helps to limit the scope of certain operations and has benefits in terms of scalability and energy consumption.
The LEACH protocol  was already introduced in Chapters 4 and 6, where its MAC and topology control mechanisms were described. In addition to that functionality, LEACH includes a multi-hop transmission functionality. In LEACH, the transmission from sensor nodes to a sink node takes place in a two-hop communication. First, the sensor node transmits the collected data to its cluster head. Secondly, the cluster head (after aggregating data from the sensor nodes of its cluster) transmits the data to the sink node.
the nodes that are closest to each other and constitute a path towards the sink node. In fact, the nodes adjust their transmission power so as to have a single neighbour (which minimizes the amount of energy consumed for transmitting to its nearest neighbour). The nodes in the chain take turns for directly transmitting the data to the sink node. In this way, the network lifetime is increased, and, since clusters are not formed, the related cluster formation and maintenance overhead are avoided. However, PEGASIS may incur long end-to-end delays for nodes distant from the base station in the chain, and the protocol only assumes that the sensor nodes are static. Fig.
7.3 illustrates an example of the PEGASIS approach.
The Threshold-sensitive Energy Efficient sensor Network protocol (TEEN)  follows a hierarchical clustered scheme. A cluster head informs the members of its cluster about two thresholds: a hard threshold and a soft threshold. The first is the absolute value of the attribute being sensed, that is, the value beyond which the node sensing this value must report it to the cluster head. The second is a small change of the value being sensed that triggers the node to transmit the value. These two thresholds control the trade-off between energy efficiency and data accuracy. The TEEN protocol is well suited for time critical applications, as the sensors can immediately
reply to the messages transmitted by their cluster heads as long as the sensed values are within the range of interest.
7.1.3. Geographic routing In geographic routing, data is transmitted to a geographic region and the routing decisions are essentially carried out based on distance criteria.
These protocols take advantage of the knowledge of the relative or absolute locations of nodes. In the first case, the positions can be estimated according to RSSI of received messages. In the second, the node locations can be obtained from positioning systems such as GPS, or can be preconfigured in the sensor nodes prior to deployment. Various geographic routing protocols have not been specifically developed for WSNs, but they are suitable for these scenarios given their scalability properties and potential benefits in energy conservation.
188.8.131.52. GFG and GPSR
Greedy-Face-Greedy (GFG)  and Greedy Perimeter Stateless Routing (GPSR)  are very similar geographic routing protocols which are widely accepted for WSNs. In GFG/GPSR, the packets sent by a source node include the location of the intended destination. If a node knows the location of its neighbours, then it can forward the packet to the node which is geographically closer to the destination. This process, which is known as greedy forwarding, is repeated until the packet reaches the destination.
In GPSR, all nodes know the positions of their one-hop neighbours by means of a simple beaconing mechanism. Each node periodically transmits beacons which include their own position (hence, in GPSR, it is assumed that all nodes are aware of their own position).
One of the major advantages of greedy forwarding is the fact that the routing state (i.e. the information a node has to store to enable routing) depends only on the number of neighbours of a node. Hence, this approach scales well with the number of nodes of the network.
Chapter 7. Routing
However, greedy forwarding fails in some situations when voids (i.e.
regions without intermediate nodes) are present between a node and its destination. An example is shown in Fig. 7.4. A path between node A and node D exists (the path is ABCD). However, because node B is further from node D than node A, node A will not forward the data to node B, and consequently node D cannot be accessed from node A with this routing protocol.
Fig. 7.4. Example of a greedy forwarding failure. The dotted line indicates the coverage range of node A The problem described above can be solved with the application of the right-hand rule. According to this rule, a node that receives a packet forwards it to its first neighbour counter-clockwise about itself. Intuitively, the packet routes around the void. Greedy forwarding can be used again once a node whose distance to the destination is smaller than the distance between the destination and the greedy failure node is found. Other possibilities exist in this regard .
Simulation results show that GFG/GPSR approximates shortest-path routing in dense networks (where voids are infrequent).
184.108.40.206. Other protocols The Geographic Adaptive Fidelity (GAF) protocol  divides the area where sensor nodes are deployed into zones by defining a virtual grid. This grid is defined in such a way that the nodes within a zone are equivalent for routing. Under such a condition, a single node within a zone can remain awake to carry out the routing tasks on behalf of the others, which may be sleeping to conserve energy. The control message overhead of the GAF protocol is comprised of discovery messages, which are broadcast by each node to find other nodes within the same zone.
The Geographic and Energy Aware Routing (GEAR) protocol  is essentially an improvement over Directed Diffusion, whereby the interests are transmitted to a certain geographic region instead of flooding the whole network. In consequence, the energy consumption of the network is reduced. In addition, all nodes maintain the cost of reaching the destination through their neighbours, which also takes into account the residual energy of the neighbours. In GEAR, it is assumed that the nodes are aware of their location.
7.2. MANET routing protocols adapted for WSNs