Catalyzes the interconversion of L-alanine and D-alanine. D-alanine plays a key role in peptidoglycan cross-linking. L-alanine = D-alanine Inhibited by the antituberculous drug D-cycloserine (DCS), which is a structural analog of D-alanine. Amino-acid biosynthesis; D-alanine biosynthesis; D-alanine from L-alanine: step 1/1. Homodimer. Belongs to the alanine racemase family. Extended N-terminus.