P r e p r i n t 2 8 t h M a y 2 0 1 0 --1 5 : 3 6 In this paper we propose a decentralised algorithm for connectivity maintenance in a distributed sensor network. Our algorithm uses the dynamics of a consensus algorithm to estimate the connectivity of a network topology in a decentralised manner. These estimates are then used to inform a decentralised control algorithm that regulates the network connectivity to some desired level. Under certain realistic assumptions we show the closed loop dynamics can be described as a consensus algorithm with an input, and eventually reduces to a scalar system. Bounds are given to ensure the stability of the algorithm and examples are given to illustrate the efficacy of the proposed algorithm.