A bridge is a hardware device for linking two networks that work with the same protocol. Unlike a repeater, which works at the physical level, a bridge works at the logical level (on layer 2 in the OSI model), which means that it can filter frames so that it only lets past data whose destination address corresponds to a machine located on the other side of the bridge.
The bridge is used to segment a network, holding back the frames intended for the local area network while transmitting those meant for other networks. This reduces traffic (and especially collisions) on all networks, and increases the level of privacy, as information intended for one network cannot be listened to on the other end.
On the other hand, the filtering carried out by the bridge can cause a slight delay when going from one network to another, and this is why bridges must be carefully placed within a network.
A bridge's normal role is to send packets between two networks of the same type.
A bridge has two connections to two distinct networks. When the bridge receives a frame on one of its interfaces, it analyzes the MAC address of both the sender and recipient. If a bridge doesn't recognise the sender, it stores its address in a table in order to "remember" which side of the network the sender was on. This way, the bridge can find out if the sender and receiver are found on the same side or opposite sides of the bridge. If it's the former, the bridge ignores the message; if it's the latter, the bridge sends the frame along to the other network.
How a bridge works
A bridge works at the data link layer of the OSI model, meaning that it operates using the physical addresses of the machines. In reality, the bridge is linked to several local area networks, called segments. The bridge creates a function table with the machines' addresses and the segments they belong to, and "listens" to the data running through the segments.
When data is transmitted, the bridge checks the function table for the segment the sending and receiving computers belong to (using their physical address, called the MAC address, and not their IP address). If they belong to the same segment, the bridge does nothing; otherwise, it switches the data over to the destination computer's segment.
What use is a bridge?
The bridge is used to segment a network, meaning that in the diagram shown above, communication between the three computers on top will not obstruct the lines running between the three computers on the bottom. The information will only pass through when a computer on one side of the bridge sends data to a computer on the other side.
What's more, these bridges can be linked to a modem, so they can work with a remote local area network as well.
Here is a diagram of a bridge: