The chemical reactions and pathways involving enterobacterial common antigen, an acidic polysaccharide containing N-acetyl-D-glucosamine, N-acetyl-D-mannosaminouronic acid, and 4-acetamido-4,6-dideoxy-D-galactose. A major component of the cell wall outer membrane of Gram-negative bacteria.