This chapter discusses layer-2 switching and the Spanning Tree Protocol. Layer-2 switching provides hardware-based bridging to break up collision domains and learn hosts' locations via MAC tables, but can cause switching loops without STP. STP solves switching loops by selecting a root bridge and designating ports to block or forward traffic, putting ports into blocking, listening, forwarding, or disabled states.