Catalyzes the epimerization of D-Ala-D-Ala to D-Ala-L-Ala. Has broad substrate specificity and catalyzes the epimerization of a variety of dipeptides containing an N-terminal Ala followed by Ser, Thr, Val, Met, His, Phe or Trp (in vitro). Binds 1 Mg(2+) ion per subunit. Part of a large, functionally divergent protein family. Protein modeling and substrate docking were used to predict the substrate specificity, prior to biochemical analysis. Belongs to the mandelate racemase/muconate lactonizing enzyme family.