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
I purchased your CCNA course at the beginning of this year and just wanted to thank you very much for the amount of effort and care you put into producing high quality content. Because of your efforts (and my own, of course) I have now achieved my CCNA qualification.
I am just so astounded and so grateful to have the opportunity to have access to spectacular instructors such as yourself. I began this journey knowing nothing about the Cisco world with not much IT experience and came out the other end confident and motivated thanks to your ability to teach so effectively.
I found you were spectacular at being able to explain the concepts in a concise, understandable manner while still being detailed. I really did find that your teaching style is easy to digest and I really appreciate your non-judgemental and authentic attitude to see the best in your students.
I always found myself coming back to your videos when I would come across some things that I couldn’t understand from other sources of study – time and time again, you were able to clear things up in a way that I found most other instructors couldn’t.
Anyways, I’d like to thank you again. It was tough for me at times and there was a lot of self doubt, but it is going to dramatically improve me in my job. And thank you for working so hard to put up such great quality content.
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.