We propose a consensus protocol to solve the assignment problem in a completely distributed manner without any central management or global knowledge. Our protocol is based on the auction algorithm and ensures convergence to an assignment that is within n∈ of being optimal where n is the number of agents and ∈ is a design parameter. We then apply the proposed protocol to the mobile sensor dispatch problem to let each mobile sensor determines, in a completely distributed manner, the failed static sensor it should recover so that the total distance traveled by all the mobile sensors is minimized.