Constructing the Overlay Network by Tuning Link Weights