What’s the Difference Between Hubs, Switches & Bridges?
The key difference between hubs, switches and bridges is that hubs operate at Layer 1 of the OSI model, while bridges and switches work with MAC addresses at Layer 2. Hubs broadcast incoming traffic on all ports, whereas bridges and switches only route traffic towards their addressed destinations.
What is a Hub?
Hubs provide a dedicated physical connection for every device, which helps reduce the possibility that a failure of one computer will cause all computers to lose connectivity. However, because a hub is still a shared bandwidth device, connectivity is limited to half-duplex. Collisions remain an issue as well, so hubs do not help improve the performance of the network.
Hubs are essentially multiport repeaters. They ignore the content of an Ethernet frame and simply resend every frame they receive out of every interface on the hub. The challenge is that the Ethernet frames will show up at every device attached to a hub, instead of just the intended destination (a security gap), and inbound frames often collide with outbound frames (a performance issue).
What is a Bridge?
In the physical world, a bridge connects roads on separate sides of a river or railroad tracks. In the technical world, bridges connect two physical network segments. Each network bridge keeps track of the MAC addresses on the network attached to each of its interfaces. When network traffic arrives at the bridge and its target address is local to that side of the bridge, the bridge filters that Ethernet frame, so it stays on the local side of the bridge only.
If the bridge is unable to find the target address on the side that received the traffic, it forwards the frame across the bridge, hoping the destination will be on the other network segment. At times, there are multiple bridges to cross to get to the destination system.
The big challenge is that broadcast and multicast traffic must be forwarded across each bridge, so every device has an opportunity to read those messages. If the network manager builds redundant circuits, it often results in a flood of broadcast or multicast traffic, preventing unicast traffic flow.
What is a Switch?
Switches play a vital role in moving data from one device to another. Specifically, switches greatly improve network performance compared to hubs, by providing dedicated bandwidth to each end device, supporting full-duplex connectivity, utilizing the MAC address table to make forwarding decisions, and utilizing ASICs and CAM tables to increase the rate at which frames can be processed.
Switches use the best of hubs and bridges while adding more abilities. They use the multi-port ability of the hub with the filtering of a bridge, allowing only the destination to see the unicast traffic. Switches allow redundant links and, thanks to Spanning Tree Protocol (STP) developed for bridges, broadcasts and multicasts run without causing storms.
Switches keep track of the MAC addresses in each interface so they can rapidly send the traffic only to the frame's destination.
Here are some of the benefits of using switches:
- Switches are plug-and-play devices. They begin learning the interface or port to reach the desired address as soon as the first packet arrives.
- Switches improve security by sending traffic only to the addressed device.
- Switches provide an easy way to connect segments that run at different speeds, such as 10 Mbps, 100 Mbps, 1 Gigabit, and 10 Gigabit networks.
- Switches use special chips to make their decisions in hardware making low processing delays and faster performance.
- Switches are replacing routers inside networks because they are more than 10 times faster at forwarding frames on Ethernet networks.
For comprehensive coverage of basic networking concepts, attend our hands-on Networking Fundamentals course.
- CEH v9 Question of the Week: Sniff a Switched Network
- CCNA R&S Question of the Week: Switch vs. Hub
- Cisco CCNA Routing and Switching Paths [Video]
- Switching Operations [Whitepaper]