Today you can make a network bridge in software. Get a Linux box and compile the ethernet bridging support into the kernel. Then you get network devices like br0
which can be connected to interfaces like eth0
and eth1
and will propagate raw, low level packets from one to the other. There is even filter support similar to iptables, as well as a user space tool called ebtables
(Ethernet bridging tables) using which you can define rules to filter packets by MACs and other fields or bytes, so your bridge does not have to forward everything.
Ethernet was not switched once upon a time. The original Ethernet consisted of a long cable shared among the stations. Each station tapped into the cable. This is why we still talk abut a "network segment". Today a "network segment" is a logical segment only, but actually looks like a star (or bunch of stars) centered around switches, but once upon a time, it really was like a straight line with stations hanging off it.
If you wanted to connect two such networks, there were two choices: a repeater, or a bridge. A repeater is an analog amplifier device which listens on one wire, buffers the signal electronically and drives the same signal on the other wire (and in the case of networking, vice versa: bidirectionally). A bridge is a computer or embedded system which receives the actual packets, and then sends them to the other side.
Unlike a repeater, a bridge can be smart in that as it passes traffic, it builds a table of known addresses in memory. It knows which station is on which side of the bridge, so it can avoid bridging whenever a station on one side of the bridge addresses a station that lives on the same side. Only broadcast packets have to be bridged, and packets which address across the bridge.