  We propose a gauged $B-L$ extension of the standard model (SM) where light
neutrinos are of Dirac type by virtue of tiny Yukawa couplings with the SM
Higgs. To achieve leptogenesis, we include additional heavy Majorana fermions
without introducing any $B-L$ violation by two units. An additional scalar
doublet with appropriate $B-L$ charge can allow heavy fermion coupling with the
SM leptons so that out of equilibrium decay of the former can lead to
generation of lepton asymmetry. Due to the $B-L$ gauge interactions of the
decaying fermion, the criteria of successful Dirac leptogenesis can also
constrain the gauge sector couplings so as to keep the corresponding washout
processes under control. The same $B-L$ gauge sector parameter space can also
be constrained from dark matter requirements if the latter is assumed to be a
SM singlet particle with non-zero $B-L$ charge. The same $B-L$ gauge
interactions also lead to additional thermalised relativistic degrees of
freedom $\Delta N_{\rm eff}$ from light Dirac neutrinos which are tightly
constrained by Planck 2018 data. While there exists parameter space from the
criteria of successful low scale Dirac leptogenesis, dark matter and $\Delta
N_{\rm eff}$ even after incorporating the latest collider bounds, all the
currently allowed parameters can be probed by future measurements of $\Delta
N_{\rm eff}$.
