  Random graph models are a recurring tool-of-the-trade for studying network
structural properties and benchmarking community detection and other network
algorithms. Moreover, they serve as test-bed generators for studying diffusion
and routing processes on networks. In this paper, we illustrate how to generate
large random graphs having a power-law degree distribution using the Chung--Lu
model. In particular, we are concerned with the fulfilment of a fundamental
hypothesis that must be placed on the model parameters, without which the
generated graphs lose all the theoretical properties of the model, notably, the
controllability of the expected node degrees and the absence of correlations
between the degrees of two nodes joined by an edge. We provide explicit
formulas for the model parameters to generate random graphs that have several
desirable properties, including a power-law degree distribution with any
exponent larger than $2$, a prescribed asymptotic behaviour of the largest and
average expected degrees, and the presence of a giant component.
