## 5 Network Management Architecture of the Proposed Topology
### Fault Detection  
Fault detection is the process by which the network manager identifies a node that is malfunctioning or almost dead and unable to sense or transmit data. If a normal sensor node dies, it does not create much of a problem except decreasing reliability. However, if a chain leader dies, the data of that chain are lost, and in the worst case, such a failure introduces network partition in the system.  
Figure 21: Different entities of the network management scheme for the proposed topology.  
In traditional IP networks, the usual way to determine whether a node is working properly is to receive periodic _keepalive_ messages from that node. However, for sensor network such message exchange is very costly. Therefore, fault detection operation in WSNs should be lightweight, and performed using passive information as much as possible.  
The fault of normal sensors is detected by the sub-manager (_i.e._, by the lower-level leaders). If the sensors are supposed to send data periodically, then by analyzing the packets, the lower-level leader can identify the sensor node that is not responding. The lower-level leaders can also miss packets from member nodes caused by collisions. Inside the chain, each sensor maintains the state of its neighbours. If a sensor does not hear from any of its neighbour for a certain period of time, the node informs the lower-level leader about that particular sensor. The lower-level leader and the neighbours maintain a timer \(T\) for each of the neighbour sensors. If the lower-level leader or the neighbours hear a transmission from that sensor, then they reset the timer. If the timer of the lower-level leader expires, then it waits before declaring the alarm. If the timer of the neighbour expires, it piggybacks that information in the next data packet. If the lower-level leader receives packets from any of the neighbours of that node without any negative result, the leader waits for another random time. If there is no positive response before the timer expires, or random delay is extended three times, then the leader node generates an alarm, and decides that the node is dead. The leader then informs the manager about the dead node. For event-driven sensor networks, the sensor sends a periodic _keepalive_ message to the sink in the absence of an event.  
Lower-level leaders use timer \(T\) and reset it when fault detection of lower-level leaders is more important than that of a chain member node. In cases of periodic traffic, the central manager analyzes the packets received by the sink. As the central manager knows the topology of the network, it knows the path of each chain leader to the BS. It maintains two timers (\(T_{1}\) and \(T_{2}\)) for each chain leader and for gateway nodes. When the sink receives a packet from that node or through that node, the central manager restarts the timer. If the timer expires, then the central manager suspects that node is dead. As the fault should be detected immediately, the value of \(T_{1}\) should not be very high. When the timer expires, the chain leader sends a query packet to the node and waits for another time \(T_{2}\). If no response is received, it decides that the node is dead.  
In event-driven sensor networks, in the absence of events, the chain leaders or gateway nodes send periodic message and the chain leader uses the same timer mechanism to detect faults.