We study the problem of designing motionplanning and sensor assignment strategies for tracking multiple targets with a mobile sensor network. We focus on triangulation based tracking where two sensors merge their measurements in order to estimate the position of a target. We present an iterative and distributed algorithm for the tracking problem. An iteration starts with an initialization phase where targets are assigned to sensor pairs. Afterwards, assigned sensors relocate to improve their estimates. We refer to the problem of computing new locations for sensors (for given target assignments) as one-step tracking. After observing that one-step tracking is computationally hard, we show how it can be formulated as an energy-minimization problem. This allows us to adapt well-studied distributed algorithms for energy minimization. We present simulations to compare the performance of two such algorithms and conclude the paper with a description of the full tracking strategy. The utility of the presented strategy is demonstrated with simulations and experiments on a sensor network platform.