Catalyzes the interconversion of L-alanine and D-alanine. Also weakly active on serine. L-alanine = D-alanine Inhibited by acetate and propionate. Irreversibly inhibited by cycloserine. Amino-acid biosynthesis; D-alanine biosynthesis; D-alanine from L-alanine: step 1/1. Homodimer. Belongs to the alanine racemase family.