3.1.6.4 Maintenance Timer

When the Maintenance timer expires, the node MUST employ a maintenance algorithm to ensure that it has a useful set of connections to the mesh. The algorithm MUST prefer to remain connected to neighbors that have a higher utility to the mesh as computed through the LinkUtilityIndex calculation.

The algorithm MUST ensure that the node has at least IdealNeighborCount neighbors where possible, and no more than MaxNeighborCount.

The Maintenance algorithm MUST prune excess connections by sending a Disconnect message. The Reason element MUST be set to "NotUsefulNeighbor".

When new connections are required, the node SHOULD<8> discover nodes to connect to by examining the Referral cache returned from previous connection attempts. If the Referral Sharing mode is turned OFF or if the local Referral cache is empty, it MUST use the discovery service to locate nodes.