A bridge connects two or more local area networks (LANs) or network segments. It operates at the data link layer and uses MAC addresses to forward packets. Bridges filter traffic so that network traffic intended for one segment does not congest other segments. There are two types of bridges: local bridges for physically close segments, and remote bridges used in pairs for remotely segmented networks. Transparent bridging allows bridges to learn network locations without configuration by maintaining a forwarding database of MAC addresses and interfaces. The spanning tree protocol prevents network loops by negotiating a loop-free path and forcing redundant paths to blocked states.