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?
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.
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.
Depends on what kind of bridge you are referring. I suppose a wireless AP can be looked at as a bridge between wired and wireless network.
Now that we are using network switches (as opposed to hubs, like we did 20+ years ago), the switch acts like a multiport bridge.
Nowadays things like bridging firewalls are used - a bridge which has firewall rules that controll what traffic is bridged between the segments it connects. Because sometimes you don't want to change the network topology at layer3.
When teaching about Ethernet, often people describe the original way Ethernet used to work in the 80's, and the terms aren't always useful to describe how things work today. For example, they often discuss CSMA/CD at some length, whereas in practice, it isn't used by 99% of Ethernet devices.
In the original Ethernet, a LAN was a thick coaxial cable with multiple systems connected to it. If you had two such thickwire spines, you could connect them together with a bridge. Why not a router? Well, you probably couldn't afford to buy a whole minicomputer just to forward traffic from point A to point B. Such a setup was called an extended LAN.
Now, roll forward a few decades. Pretty much every system on a network of any size is plugged into a bridge (switch) with a point-to-point connection, and we tend to drop the word 'extended'.
So, to answer your question, the thing that has gone away is the idea that you can build a LAN without bridges: i.e. individual subnets are connected internally with bridges and not with dasiy-chains, repeaters, or any other 80's style technology.
As others have pointed out, switches are bridges. Bridges are really simple to set up. If you want some more computers connected, run a cable to a switch in the next room. Or bridge over wireless.
The point is, these days bridges are the default minimal-planning way to grow a network, especially a simple one.
If you exclude the special case of switches as bridges, then these days it's probably mostly things like connecting wireless to wired, instead of needing a different gateway for the wired network and the wireless. (e.g. You need multiple network ports in your router if you want to keep wifi from being able to directly see and snoop on your wired network. But for home use, that's not essential, so it's a lot easier to put your wireless AP on the same network. If your router IS your wireless AP, it might be configurable whether it bridges wifi to its ethernet switch, but it's always the default for home routers to bridge.)