The performance of a leak detection and location algorithm depends on the set of measurements that are available in the network. This work presents an optimization strategy that maximizes the leak diagnosability performance of the network. The goal is to characterize and determine a sensor configuration that guarantees a maximum degree of diagnosability while the sensor configuration cost satisfies a budgetary constraint. To efficiently handle the complexity of the distribution network an efficient branch and bound search strategy based on a structural model is used. However, in order to reduce even more the size and the complexity of the problem the present work proposes to combine this methodology with clustering techniques. The strategy developed in this work is successfully applied to determine the optimal set of pressure sensors that should be installed in a District Metered Area in the Barcelona water distribution network.