Network bridging - what's the point?
I'm having hard time trying to understand how bridges work. What's the idea behind them? Most sources say their main role as connecting two LANs. They are layer two devices. But wait a second, how can a L2 device connect two different LANs? Different LANs = differnet subnets, thus PCs from LAN1 cannot communicate with PCs from LAN2 (if the destination IP doesn't match the subnet of source PC, then ARP request is sent to default gateway). Are they still being used anyway?
Solution 1:
You are forgetting your history. Nowadays, almost everything is a bridge, and your collision domain is just a cable, which only has traffic from one source on any given pair (and thus, no collisions).
20 years ago, you had large collision domains, and used bridges to break them up, both to allow larger networks and to increase performance.
Subnets are a higher level thing, so the gateway and such would be the same. It is all one broadcast domain.
Solution 2:
Modern network switches are essentially multi-port bridges.
A network bridge (aka a transparent bridge) has the following characteristics:
- It operates at the Data Link layer (OSI model Layer 2)
- It has only one incoming and one outgoing port (Source)
- It connects two similar network segments together
According to the Network+ Study Guide, Fourth Edition:
The primary function of a bridge is to keep traffic separated on both sides of the bridge. Traffic is allowed to pass through the bridge only if the transmission is intended for a station on the opposite side.
Source: Network+ Study Guide, Fourth Edition. Groth & Skandier. p. 33
Bridges and Collision Domains
By virtue of how a bridge decides whether or not to forward a packet, each connected network segment becomes its own layer 2 collision domain.
- The bridge maintains a list of MAC addresses and the corresponding interface on which the host is reachable.
- When a packet arrives on an interface, the bridge inspects the destination MAC address and takes the following action:
- The packet is dropped if the destination MAC address is on the same interface on which the packet arrived.
- The packet is forwarded If the the destination MAC address is A) reachable on the bridge's other interface OR B) the bridge doesn't know where the destination host is located.
Note that bridges always forward (layer 2) broadcast packets because the destination MAC address in such packets is destined for all nodes.