Magnetic monopoles have eluded experimental detection since their prediction nearly a century ago by Dirac. It was recently shown that classical analogues of these enigmatic particles can occur as excitations out of the topological ground state of a model magnetic system, dipolar spin ice. These quasi-particle excitations do not require a modification of Maxwell's equations, but they do interact through Coulomb's law and are of magnetic origin. Here, we present an experimentally measurable signature of monopole dynamics. In particular, we show that previous magnetic relaxation measurements in the spin-ice material Dy2Ti2O7 (ref. 3) can be interpreted entirely in terms of the diffusive motion of monopoles in the grand canonical ensemble, constrained by a network of `Dirac strings' filling the quasi-particle vacuum. In a magnetic field, the topology of the network prevents charge flow in the steady state. Nevertheless, we demonstrate the existence of a monopole density gradient near the surface of an open system.