12

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?

  • 7
    Different LAN's are not different subnets per definition. A LAN is an ethernet construct in the first place. A subnet is a higher level (IP) construct. YOu can easily have multiple LAN - like on 2 floors - that share one subnet. – TomTom Feb 3 '15 at 11:11
  • 3
    A practical application for a bridge: Media conversion. I've encountered that situation a few times so far: you got a smartphone that should provide ad hoc internet access to a device that only has an Ethernet port. Connect the smartphone to a device that has either an USB port or Wifi and an Ethernet port. The smartphone creates a LAN network between itself and the laptop or whatever you use as a software bridge. Connect that laptop on the Ethernet port to the target device. These two have another LAN together. Bridge the two LANs on the laptop and you'll have connection on the target device. – Dakkaron Feb 3 '15 at 12:46
30

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.

  • 13
    In simple words, a regular switch can be called a multiport bridge – Hagen von Eitzen Feb 2 '15 at 17:47
20

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.

  1. The bridge maintains a list of MAC addresses and the corresponding interface on which the host is reachable.
  2. 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.

  • arent bridges also replaced by routers then? besides the physical part on a switch/L2 device – Koen van der Rijt Feb 3 '15 at 10:59
  • 2
    No. Bridges are SWITCHES. A router works on a higher level - above the physical protocol, which is where bridges and switches live. – TomTom Feb 3 '15 at 11:10
  • 1
    It's probably a bit more accurate to say switches are bridges since bridges existed before switches came into widespread use. – I say Reinstate Monica Feb 3 '15 at 12:51
4

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.

4

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.

  • What makes you assert that "CSMA/CD...isn't used by 99% of Ethernet devices"? – I say Reinstate Monica Feb 3 '15 at 20:20
  • 2
    Full-duplex point-to-point links with switches don't have collisions. So the /CD part isn't relevant, even though in theory every modern ethernet device would work fine if used with a hub, or a half-duplex link partner. So he means "isn't used in practice in their installed configuration". – Peter Cordes Feb 3 '15 at 21:28
  • Got it. I had to do some research to see that modern devices still support CSMA/CD for backwards compatibility, but as you rightly stated, it's unnecessary with FD links. – I say Reinstate Monica Feb 5 '15 at 2:11
2

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.)

0

No, different LANs != different subnets. LANs are layer two concepts, not layer three. You can join lots of LANs together with bridges and put them all in the same IP subnet.

However, bridges aren't much used any more, because switches do the same job better, and other jobs as well.

protected by HopelessN00b Feb 2 '15 at 19:09

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.