  We explore the possibility of redshift-dependent deviations in the
contribution of relativistic degrees of freedom to the radiation budget of the
cosmos, conventionally parameterized by the effective number of neutrinos
$N_{\rm eff}$, from the predictions of the standard model. We expand the
deviations $\Delta N_{\rm eff}(z)$ in terms of top-hat functions and treat
their amplitudes as the free parameters of the theory to be measured alongside
the standard cosmological parameters by the Planck measurements of the cosmic
microwave background (CMB) anisotropies and Baryonic Acoustic Oscillations, as
well as performing forecasts for futuristic CMB surveys such as PICO and
CMB-S4. We reconstruct the history of $\Delta N_{\rm eff}$ and find that with
the current data the history is consistent with the standard scenario.
Inclusion of the new degrees of freedom in the analysis increases $H_0$ to
$68.71\pm 0.44$, slightly reducing the Hubble tension. With the smaller
forecasted errors on the $\Delta N_{\rm eff}(z)$ parametrization modes from
future CMB surveys, very accurate bounds are expected within the possible range
of dark radiation models.
