*1.2. Scope of Routing Protocols in Sensor Networks*

Most of the nodes in a sensor network have a limited power supply and do not have the ability to generate their own energy. Therefore, the design of energy efficient protocols is critical for the longevity of the network. A protocol for sensor networks must be configured in such a way that its operation does not require human attention. The IEEE 802.15.4 standard is used by virtually all wireless sensor devices today. Since a direct link between any node in the network and the coordinating node cannot necessarily be established, a multi-hop network topology and an algorithm are required to determine the route the messages follow. These are dynamic topologies with nodes that can stop operating due to physical failures or lack of batteries, with bandwidth restrictions, links with variable capacities, and equipment that can operate with energy restrictions. All these factors result in reconfigurations or unpredictable changes in the topology that handles the routing protocol. On the basis that many routes can communicate to a node with the base station or coordinating node, the objective of an energy-aware algorithm is the selection of those routes that maximize the lifetime of the network. In consequence, those routes composed of nodes that have greater autonomy are marked as preferred. Presently, some of the hierarchical protocols widely used in sensor networks are: LEACH (Low Energy

Adaptive Clustering Hierarchy) [26,27], PEGASIS (Power-Efficient Gathering in Sensor Information Systems) [28], TEEN (Threshold-sensitive Energy Efficient Protocols) [29], and PAMAS (Power-Aware Multi-access protocol with signaling) [30], among others.

LEACH is a cluster-based protocol that randomly selects a few nodes and treats them as master nodes. Its objective is to distribute the energy load evenly throughout the network. PEGASIS is an improvement of the LEACH protocol. Its main idea is to extend the life of the network by restricting node communication only to the closest neighbors and taking turns for communicating with the coordinating node. PEGASIS assumes that each node must be able to communicate with the base station directly. The TEEN protocol is used in applications where a rapid response is required against sudden changes in the parameters to be measured in the network. In TEEN, the nodes monitor the medium permanently, but the data transmission is sporadic. Since the transmission of messages consumes more energy than their capture, the consumption is lower than in proactive networks. PAMAS is a containment-based protocol where one of the main objectives is related to efficiency in energy consumption. This protocol adds separate channels for the control of RTS/CTS packets and data packets. "A busy tone" is attached to the signaling channel so that the nodes that do not participate in the communication turn their radio transceivers off. This way, PAMAS tries to avoid over-listening between neighboring nodes and does so by adding a second low power radio in their devices.

In communication networks, depending on the way the source creates a route to the destination, the routing protocols are classified into three groups: proactive routing protocols, reactive routing protocols, and hybrid protocols.

When nodes are under a reactive protocol, they ask for a single route as required. This implies a high latency for the first packet and some independence between the routes. Two common examples are the AODV and DSR protocols. These routing protocols are characterized by their reactive nature. That is, they both begin their search activity on demand routes. The difference between them is that DSR uses source routing, while AODV uses hop-by-hop routing by maintaining tables and sequence numbers in the destination nodes.

The AODV routing protocol is based on the routing efficiency of ad hoc wireless networks with a large number of nodes and uses a mechanism for route discovery in broadcast mode. AODV can transmit in unicast or multicast mode, uses bandwidth efficiently, and quickly responds to network changes avoiding network loops [5]. Each node in the network has a sequence number and a unique identifier in the network. This guarantees the absence of loops and avoids counting packets to infinity. To maintain and track routes to the neighbors, nodes periodically send *HELLO* messages. The nodes have a lifetime each time a node receives a packet from a neighbor. At this time, the neighbor's entry is updated in the routing table. If no entry has been defined for this neighbor, the node creates a new entry in the routing table. Therefore, information from the *HELLO* packet is used by neighbors to notify other nodes that the node itself is still active. This information is used by the neighbors to update the timers associated with that node or, alternatively, to disable the entries that are not responding. In fact, AODV maintains time-based states in each node's routing tables. A routing table entry expires if it has not been used recently. The timer function prevents using links which status has been marked as unknown for a long time. Some advantages of AODV are high reliability and low bandwidth costs. However, there are some disadvantages such as high complexity, additional calculations required, extra memory costs, and the fact that this protocol was designed to work in a network where there are no malicious nodes. In sum, it is not a secure protocol.

The DSR protocol is also a reactive protocol. This protocol routes from the source node including a header in the packets. This header indicates which nodes may need to be crossed to arrive at a destination since the originating node is responsible for calculating the complete route to the destination node. This process is called **Source Routing**. DSR does not require any periodic message. In this way, it reduces message overload. For this, when the origin node moves or the topology of the network changes, the algorithm perceives the modifications and adapts accordingly. In addition, DSR handles unidirectional links and asymmetric routes. Each node in the network has a cache memory that stores

all the routes obtained through the discovery processes from the node itself, which may consume slightly additional processing. If there is no current route to a specific destination, the node starts a reactive route discovery just like AODV.

The route table or route cache is constantly monitored to detect invalid routes and repairs them as the network topology changes. This process is called **Route Maintenance**. DSR features some advantages such as that nodes can obtain multiple routes to a specific destination but requesting only one route. DSR allows the network to be completely self-configurable, without a specific architecture or topology. In addition, it is a good choice in scenarios where the number of mobility nodes is reduced. This protocol adapts quickly to routing changes when a node is frequently moving and decreases network overload.

Next, we study a hybrid (proactive and reactive) routing protocol previously proposed, called MPH, which creates a hierarchical network logical topology where node hierarchy is proactively given by its location in the tree. Basically, the root hierarchy (sink or collector node) has the highest hierarchy. When a node has a hierarchy level, it can only have links from parents or children, directly connected. The hierarchical topology minimizes the number of hops and optimizes the routes to the coordinating node. The advantage of this protocol is that it combines features of both proactive and reactive nature and presents redundancy without losing simplicity in the algorithm. The coordinator can also send packets to the network nodes. An origin routing approach is adopted so that traffic is sent from the collector to any node, because the coordinator node has more resources and capacity than the rest. This means that information may be easily collected from the network, such as sensor-generated data, link quality metrics, neighbor node tables, and other variables that may be used to locate routes and for performance analysis and network optimization. If a node sends a packet to the destination or collector node, it searches for its parents in its Neighbor Table, selects a route, and sends the message. This process is repeated hop by hop until the destination. The sink node knows the complete topology of the network through frequent query packets at times previously established in the network nodes. These packets are sent through the hierarchical branches and request each node to send its information to the coordinator node. This protocol takes advantage of the proactive controlled route maintenance but combines the agility of having more than one route per node. This makes it more versatile and adaptable to other topologies.

ZTR is a simple protocol that establishes parent-child links with the nodes always carrying information to their parent. This protocol features a tree topology, is easy to implement, fast, and is proactive. ZigBee networks require at least one full-function device. That is, a robust device acting as a network coordinator, but the final nodes of the star may have low specifications to reduce costs. Before transmitting to a channel, the node must measure the energy level in a specific channel. This measurement only indicates if the channel is busy, but the node is not able to identify whether that energy corresponds to another device under the IEEE 802.15.4 standard. Here, the child node would be the one that most recently entered the network. The parent node is the node that has given the child access to the network. In this way, parent-child links are created, but each child can only have one parent. Some of the advantages of ZTR are balance between cost per unit, battery expenditure, and implementation complexity to achieve an appropriate cost-performance ratio for the application.
