Differences between a switch and a bridge
Switches are basically multiport bridges. Although both types of devices perform a similar function, segmenting a LAN into separate collision domains, there are some differences between them:
- most bridges have only 2 or 4 ports. A switch can have hundreds of ports.
- bridges are software based. Switches are hardware-based and use chips (ASICs) when making forwarding decisions, which makes them much faster than bridges.
- switches can have multiple spanning-tree instances. Bridges can have only one.
- switches can have multiple broadcast domains (one per VLAN).
To better understand the difference between a bridge and a switch, consider the following example. Let’s say that we have a network of four computers. First, we will connect them together using a two-port bridge:
Because the bridge has only two ports, we need to use hubs in order to connect all computers together. Only two collision domains are created. If Host A wants to send a frame to Host C, all computers on the network will receive the frame, since hubs forward the frames out all ports.
Now consider what happens if we replace the bridge with a switch. Since the switch has plenty of ports, no hubs are necessary. Each port is a separate collision domain and four collision domains are created. If Host A wants to send a frame to Host C, the switch will forward the frame only to Host C. Other hosts on the network will not receive the frame: