In this paper a novel distributed control algorithm for current sharing and voltage regulation in Direct Current (DC) microgrids is proposed. The DC microgrid is composed of several Distributed Generation units (DGUs), including Buck converters and current loads. The considered model permits an arbitrary network topology and is affected by unknown load demand and modelling uncertainties. The proposed control strategy exploits a communication network to achieve proportional current sharing using a consensus-like algorithm. Voltage regulation is achieved by constraining the system to a suitable manifold. Two robust control strategies of Sliding Mode (SM) type are developed to reach the desired manifold in a finite time. The proposed control scheme is formally analyzed, proving the achievement of proportional current sharing, while guaranteeing that the weighted average voltage of the microgrid is identical to the weighted average of the voltage references.