Catalyzes the interconversion of L-alanine and D-alanine. Likely plays an important role in supplying D-alanine, which is an indispensable constituent in the biosynthesis of bacterial cell-wall peptidoglycan. To a lesser extent, is also able to racemize L-serine and D-serine. Does not act on other proteinogenic amino-acids. L-alanine = D-alanine L-serine = D-serine kcat is 1.42 sec(-1) with L-alanine as substrate. kcat is 1.16 sec(-1) with L-serine as substrate. Amino-acid biosynthesis; D-alanine biosynthesis; D-alanine from L-alanine: step 1/1. Belongs to the alanine racemase family.