In order to unveil the value of network connectivity, we formalize the construction of ecological networks in forest environments as an optimal control dynamic graph-theoretic problem. The network is based on a set of bioreserves and patches linked by ecological corridors. The node dynamics, built upon the consensus protocol, form a time evolutive Mahalanobis distance weighted by the opportunity costs of timber production. We consider a case of complete graph, where the ecological network is fully connected, and a case of incomplete graph, where the ecological network is partially connected. The results show that the network equilibrium depends on the size of the reception zone, while the network connectivity depends on the environmental compatibility between the ecological areas. Through shadow prices, we find that securing connectivity in partially connected networks is more expensive than in fully connected networks, but should be undertaken when the opportunity costs are significant.