A Layer 2 bridge, also known simply as a bridge, is a network device that operates at the data link layer (Layer 2) of the OSI (Open Systems Interconnection) model.
Its primary function is to connect and forward traffic between two or more separate but similar network segments, such as Ethernet LANs (Local Area Networks). The bridge makes forwarding decisions based on the MAC (Media Access Control) addresses of the devices on the network.
Here are key aspects of how a Layer 2 bridge operates:
-
MAC Address Learning: When a bridge receives a frame from a device on one of its connected segments, it examines the source MAC address of the frame and associates it with the port on which it was received. This process allows the bridge to build a table of MAC addresses and their corresponding port locations.
-
Filtering and Forwarding: When a frame is received, the bridge checks the destination MAC address against its MAC address table. If the destination address is known and located on the same segment as the source, the bridge filters the frame and does not forward it. If the destination address is on a different segment, the bridge forwards the frame only to the appropriate segment.
-
Segment Isolation: Bridges help in segmenting a network into smaller collision domains. In traditional Ethernet networks, all devices on the same segment share the available bandwidth, and collisions can occur. By dividing a network into multiple segments connected by bridges, collisions are reduced, improving overall network performance.
-
Loop Prevention: One significant challenge in bridged networks is the potential for loops. Loops can cause broadcast storms and negatively impact network performance. To prevent loops, many bridges implement the Spanning Tree Protocol (STP), which dynamically detects and eliminates redundant paths.
-
Transparent Operation: Bridges operate transparently to connected devices. Devices on the network are unaware that a bridge is present, as the bridge operates at a lower layer of the OSI model and does not impact the network’s IP addressing or higher-layer protocols.
Layer 2 bridges have evolved into more advanced devices, such as switches, which are essentially multi-port bridges with additional features and capabilities. However, the fundamental principles of MAC address learning, filtering, and forwarding remain consistent in both bridges and switches.