Abstract. Newman's measure for (dis)assortativity, the linear degree correlation coefficient ρD, is reformulated in terms of the total number N k of walks in the graph with k hops. This reformulation allows us to derive a new formula from which a degree-preserving rewiring algorithm is deduced, that, in each rewiring step, either increases or decreases ρD conform our desired objective. Spectral metrics (eigenvalues of graph-related matrices), especially, the largest eigenvalue λ1 of the adjacency matrix and the algebraic connectivity μN−1 (second-smallest eigenvalue of the Laplacian) are powerful characterizers of dynamic processes on networks such as virus spreading and synchronization processes. We present various lower bounds for the largest eigenvalue λ1 of the adjacency matrix and we show, apart from some classes of graphs such as regular graphs or bipartite graphs, that the lower bounds for λ1 increase with ρD. A new upper bound for the algebraic connectivity μN−1 decreases with ρD. Applying the degree-preserving rewiring algorithm to various real-world networks illustrates that (a) assortative degree-preserving rewiring increases λ1, but decreases μN−1, even leading to disconnectivity of the networks in many disjoint clusters and that (b) disassortative degree-preserving rewiring decreases λ1, but increases the algebraic connectivity, at least in the initial rewirings.