In this Cisco CCNA tutorial, you’re going to learn about the basics of hubs and switches. I’ll also do a comparison between the two devices.
Cisco Switches vs Hubs Video Tutorial
Your course definitely deserves a 5 star rating . I have taken similar courses in the past and always struggled with subnetting, but after finishing your course I am able to answer all subnetting questions correctly.
Thanks again and please carry on doing an amazing job.
Hubs and Switches
The functions of hubs and switches are very similar. You take your end hosts in your Local Area Network (LAN), like your PCs, your servers, and your printers, and you plug them into a hub or a switch with an Ethernet cable. Those end hosts are then able to communicate with each other through the hub or the switch.
In the picture below, we've got a Cisco 2960 Catalyst switch. It's a 48-port model, so you could plug in a maximum of 48 hosts into that switch. But what if you've got more than 48 hosts in your campus, which you probably will have?
In that case, you're going to have multiple switches in your Local Area Network. Your switches will be connected to each other with Ethernet cables and that's your inter-switch links.
Hubs – Half-Duplex and Shared Collision Domain
Hubs always operate in half-duplex mode. That means that the attached hosts can either send or receive data. They can't do both at the same time. All of the hosts that are plugged into that hub share the same collision domain, meaning that only one device can transmit at a time.
If two devices do transmit at the same time, then they will detect that and they'll back off and they will then resend to make sure that there is not another collision again. The method that is used for detecting and recovering from collisions is CSMA/CD. That's the Carrier-Sense Multiple Access with Collision Detection.
Switches – Full-Duplex and Separate Collision Domains
With switches, on the other hand, they can operate in either full-duplex or half-duplex. In practice, they're always going to operate in full-duplex mode because that's much more efficient.
When they are operating in full-duplex the attached host can both send and receive data at the same time, using their receive and transmit wires. Also, all hosts have their own dedicated collision domain. Because of that, we're not going to have collisions. A collision detection mechanism is not required.
Cisco Device Functions
Looking at the OSI stack, switches operate at Layer 2. Our hubs operate at Layer 1.
Hubs Operate at OSI Layer 1
Hubs are not MAC address aware. Whenever a frame is received on a port, it's flooded out to all the other ports apart from the one that it was received on. Because of that, all hosts that are plugged in there are going to receive a frame, so they're going to have to process it at least as far as seeing that it's not for them.
Switches Operate at OSI Layer 2
Switches, however, operate at Layer 2 of the OSI model. They also operate at Layer 1, obviously. They've got physical ports on there. This means that switches are MAC address aware. Whenever a frame is received, the switch will look at the source MAC address in the layer two Ethernet header, and it will learn that MAC address.
It will then add that MAC address to its MAC address table, which is a mapping between the MAC address and the port that is reachable on. If a unicast frame is later received where that Mac address is the destination, the switch will only send out the relevant port, unlike a hub that floods it out everywhere.
This is better for performance and security, as frames only go where they are required. Whenever a frame is received for the broadcast address or an unknown unicast address (it would be unknown because the switch hasn't learned about it yet), it will be flooded out all ports apart from the one it was received on.
That was the basics of hubs and switches and the difference between them. Back in the day, hubs were commonly used because switches were very expensive. Switches have come down in price so much now though that you can't even buy hubs anymore. Switches are always used.
Types of Cisco Switches: https://www.ciscopress.com/articles/article.asp?p=2348265&seqNum=2
Hub vs Switch: What's the Difference?: https://www.guru99.com/hub-vs-switch.html
Text by Libby Teofilo, Technical Writer at www.flackbox.com
With a mission to spread network awareness through writing, Libby consistently immerses herself into the unrelenting process of knowledge acquisition and dissemination. If not engrossed in technology, you might see her with a book in one hand and a coffee in the other.