— We focus on efficient protocols that enhance a network with topology awareness. We discuss centralized algorithms with provable performance, and introduce decentralized asynchronous heuristics that use only local information and local computations. These algorithms are based on distributed solutions of convex programs expressing optimization of various spectral properties of the matrix associated with the graph of the network topology. For example, these algorithms assign special weights to links crossing or directed towards small cuts by minimizing the second eigenvalue. Our main technical ingredient is to perform the decentralized asynchronous computations is a manner that preserves critical invariants of the exact second eigenvalue of the adjacency matrix associated with the network topology. To further demonstrate the utility of our algorithms we show how their output can enhance the performance in the context of peer-to-peer networks.