This paper presents consensus-based distributed control strategies for voltage regulation and power flow control of dc microgrid (MG) clusters. In the proposed strategy, primary level of control is used to regulate the common bus voltage inside each MG locally. An SOC-based adaptive droop method is introduced for this level which determines droop coefficient automatically, thus equalizing SOC of batteries inside each MG. In the secondary level, a distributed consensus based voltage control strategy is proposed to eliminate the average voltage deviation while guaranteeing proper regulation of power flow among the MGs. Using the consensus protocol, the global information can be accurately shared in a distributed way. This allows the power flow control to be achieved at the same time as it can be accomplished only at the cost of having the voltage differences inside the system. Similarly, a consensus-based cooperative algorithm is employed at this stage to define appropriate reference for power flow between MGs according to their local SOCs. The effectiveness of proposed control scheme is verified through detailed hardware-in-the-loop (HIL) simulations.