We give a classification of real solvable Lie algebras whose non-trivial coadjoint orbits of corresponding to simply connected Lie groups are all of codimension 2. These Lie algebras belong to a well-known class, called the class of MD-algebras.