Generating the barriers that protect our inner surfaces from bacteria and other challenges requires large glycoproteins called mucins. These come in two types, gel-forming and transmembrane, all characterized by large, highly O-glycosylated mucin domains that are diversely decorated by Golgi glycosyltransferases to become extended rodlike structures. The general functions of mucins on internal epithelial surfaces are to wash away microorganisms and, even more importantly, to build protective barriers. The latter function is most evident in the large intestine, where the inner mucus layer separates the numerous commensal bacteria from the epithelial cells. The host's conversion of MUC2 to the outer mucus layer allows bacteria to degrade the mucin glycans and recover the energy content that is then shared with the host. The molecular nature of the mucins is complex, and how they construct the extracellular complex glycocalyx and mucus is poorly understood and a future biochemical challenge.