A bridge is very similar in functionality to a repeater, but operates at Layer 2 of the OSI model. Therefore, a bridge actually filters traffic transmitted over the network based on the Layer 2, or MAC, address. Bridges dynamically update their routing tables with source addresses as they receive packet traffic. They determine the MAC address for each machine on the basis of the contents of packets (the MAC addresses of both the source and destination hosts) sent over the network. The destination MAC address of each packet is then used to selectively filter traffic packets in the following manner:
- Packets with unidentified destinations are sent on to every network segment to which the bridge is connected.
- Packets with identified destinations on other network segments to which the bridge is connected are sent on to the segment on which the destination machine resides.
- Packets in which the source and destination address are both within the same network segment are not sent to any other network segment.
Bridges are both good and bad in terms of their contribution to the problem of managing networks. An advantage of bridges (at least compared to repeaters) is that the former are not as passive; they can at least send traffic to other network segments or, if appropriate, keep traffic within a particular local segment. They can also selectively filter traffic on the basis of each packet’s destination MAC address. A disadvantage is that bridges cannot filter broadcasts (transmissions from hosts that are intended to reach other computers independently of the computers’ addresses).