Litterally, both are right, similar meaning, which equivalence in English is "Do you understand?"
But "ming bai" is a little bit better. Because "dong ma?" sounds like you might doubt if his/her knowledge's eough.
In that case, I may give the comparison in this way(Only my understanding):
ni ming bai ma = have you got it?
ni dong ma = Do you understand?