Catalyzes the interconversion of L-alanine and D-alanine. Provides the D-alanine required for cell wall biosynthesis (By similarity). L-alanine = D-alanine Amino-acid biosynthesis; D-alanine biosynthesis; D-alanine from L-alanine: step 1/1. Cell wall biogenesis; peptidoglycan biosynthesis. Belongs to the alanine racemase family.