# Energy-Aware Wireless Sensor Networks for Smart Buildings: A Review
## 6 Networking Layer
### The Network Layer Protocols
It has the following assumptions: The network is composed of densely distributed nodes where Links are bi-directional, and the distance of transmissions is short. This protocol floods the events with a small number but with a large number of queries. The query is forwarded to the particular node that belongs to the interested region. To flood events, the protocol uses packets (agents) that have a long lifetime. When a node detects an event, it adds it to its local table (events table) and generates an agent. The agent goes through the network with that event information. When a node needs to initiate a query, it routes the query to the initial source. If it gets some nodes on the path before its TTL expires, it will be routed to the event; else, the node will need to retransmit, give up, or flood the request. Rumor Routing only maintains one path between source and destination. It performs well if the number of events is small. In the case of many events, preserving agents and event tables in each node is costly if there is not enough interest in these events from the base station. In addition, the overhead associated with this routing protocol is controlled by different parameters such as TTL for agents and queries [63]. Geographical Energy-Aware Routing (GEAR)  
Routing location-based protocols need location information of all the WSN nodes in the network to calculate the distance between each pair of nodes. GEAR [64] is a location-based routing protocol that aims to locate nodes in the WSN. Each node stores two costs to reach the destination in this protocol: the estimated cost and learned cost. First, the estimated cost combines residual energy and the distance to the destination. Second, the learned cost is a modified estimated cost. When a node does not have any nearby neighbors towards the destination, we say there is a hole. When no holes exist, then the estimated cost equals the learned cost. The GEAR protocol only considers a certain region instead of sending the interests to the WSN; therefore, it restricts the number of interests. The protocol goes through two phases. In Phase-I, packets are forwarded towards the target region. When receiving a packet, the sensor node searches for a neighbor close to the targeted region. If there are many suitable nodes, one node is picked as the next hop to forward the packet based on the learned cost function. In phase-II, the packets are forwarded within the region. When the packet reaches the region, it is diffused by recursive geographic forwarding or restricted flooding, depending on the density of nodes. Geographic Adaptive Fidelity (GAF)  
GAF is an energy-efficient routing protocol that is location based [65]. It was conceived for mobile ad hoc networks, but it can also be applied to fixed sensor networks. However, GAF is a location-based protocol; it can also be implemented as a hierarchical protocol where clusters are based on geographic location. The area of interest is split into fixed zones where each node uses its GPS location to locate itself within the zone. Nodes of the same zone are considered equivalent in routing cost. Hence, GAF keeps nodes located in the same area in a sleeping state, which increases the WSN lifetime. Energy-Aware Routing Protocol (EARP)  
It is a distributed energy-aware routing protocol. In this routing protocol, the network is divided into clusters [66]. Each cluster elects the head that will be directly connected to each node in its cluster. This election is based on node energy, where the selected node's energy ratio must be higher than the average energy ratio of the other nodes in the cluster. This way, the routing process will involve only the nodes that have high energy, as a result, extending the lifetime of the network. Many energy-aware routing protocols have been proposed, such as AESC, ODYSSE, and GBR, [67, 68, 69].