Understanding Network Devices: Hubs, Switches, and Routers

Hub, switch or router? Network devices explained

Estimated read time: 1:20

    Learn to use AI like a Pro

    Get the latest AI workflows to boost your productivity and business performance, delivered weekly by expert consultants. Enjoy step-by-step guides, weekly Q&A sessions, and full access to our AI workflow archive.

    Canva Logo
    Claude AI Logo
    Google Gemini Logo
    HeyGen Logo
    Hugging Face Logo
    Microsoft Logo
    OpenAI Logo
    Zapier Logo
    Canva Logo
    Claude AI Logo
    Google Gemini Logo
    HeyGen Logo
    Hugging Face Logo
    Microsoft Logo
    OpenAI Logo
    Zapier Logo

    Summary

    In this video, PieterExplainsTech clarifies the differences among three common network devices: hubs, switches, and routers. Starting with hubs, they are described as low-cost yet inefficient devices that send data indiscriminately, wasting bandwidth as every incoming bit is mirrored on all other ports. Switches improve on this by learning device MAC addresses, enabling targeted data delivery to specific destinations, which reduces unnecessary traffic. Finally, routers, operating on the network layer, facilitate communication between networks, handling IP addresses and enabling internet connectivity, often incorporating additional functions like network address translation and DHCP services.

      Highlights

      • Hubs are simple, affordable devices but are inefficient by broadcasting data to all connected devices regardless of the intended recipient. 📡
      • Switches mitigate bandwidth wastage by learning device locations and directing data specifically to its destination using MAC addresses. 💌
      • Routers play a crucial role in inter-network communication, utilizing IPs to guide packets across networks until they reach the right endpoint. 🚀
      • Passed internet packets between the search engine and user laptops are chiefly managed by routers, ensuring proper routing and delivery. 🖧
      • While hubs are largely outdated for practical network use, they can still be beneficial for specific purposes like traffic analysis. 🧩

      Key Takeaways

      • Hubs replicate incoming data to all ports, making them inefficient bandwidth users. 🚦
      • Switches store MAC addresses, allowing precise data routing within a network. 🎯
      • Routers connect different networks, manage IP addresses, and often include additional functions. 🔀
      • Modern routers can also act as Wi-Fi access points and perform tasks like DHCP or network address translation. 🌐
      • For most purposes, switches are preferred over hubs due to their efficiency. 💡

      Overview

      In Pieter's comprehensive guide, the journey begins with hubs, which are basic and cost-effective devices perfect for connecting multiple computers but notorious for their clumsy use of bandwidth. Hubs flood all connected devices with data irrespective of their need, a relic of old networking technology, better avoided if network efficiency is a priority.

        Switches revolutionize this scenario by bridging the gap in communication smarter. By maintaining a table of MAC addresses, they smartly direct data to its intended recipient, ensuring smoother and more efficient network operation. This capacity to direct traffic using MAC addresses places switches in the link layer of network operations, making them integral for handling data within a local network.

          Routers, being the network strategists, take on the role of connecting these local networks to the outside world. They operate at the network layer, using IP addresses to transport packets across various networks until they reach their internet targets. Modern routers are multifunctional, often supporting NAT and DHCP, securing their place as indispensable tools in the broadband age.

            Chapters

            • 00:00 - 01:30: Introduction and Hub Explanation In this chapter, Peter introduces and explains the differences between three common network devices: hubs, switches, and routers. He begins by discussing hubs, which are described as affordable and straightforward devices that connect multiple computers. However, hubs are inefficient with bandwidth as they replicate data across all connected interfaces.
            • 01:30 - 04:00: Switch Explanation This chapter explains the concept of network hubs and how they handle data packets. A hub is described as a basic device that rebroadcasts incoming data to all its ports without any intelligence to determine the appropriate recipient. The explanation likens the hub to a 'bit cloning machine' that indiscriminately forwards every incoming bit to all connected devices, relying on the receivers to determine the relevance of the received data based on matching address fields.
            • 04:00 - 06:30: Router Explanation This chapter explains the limitations of using hubs in network setups. Hubs replicate data across all interfaces, leading to significant network inefficiency through unnecessary traffic. In a scenario with multiple hosts, hubs broadcast packets to all, even those uninterested, wasting bandwidth. Furthermore, due to this replication, network traffic can be easily intercepted and viewed by others using network analysis tools like Wireshark, raising privacy concerns.
            • 06:30 - 08:30: Comparison and Buying Advice The chapter discusses a more efficient method for data packet routing within a network, specifically using switches to reduce network congestion. Instead of flooding the network with data packets in search of their destination, switches maintain a list of available hosts. When data packets are sent, they use this list to go directly to the intended recipient, exemplified by computers connected to specific ports, such as computer A on port 1 and computer B on port 6.
            • 08:30 - 10:00: Conclusion The chapter on Conclusion discusses MAC addresses and their role in networking. Each network interface card has a unique MAC address that switches utilize to identify a computer. This is applicable not only to Ethernet connections but also to Wi-Fi connections. The chapter explains with an example scenario where computer A has a MAC address of 6xAA, allowing the switch to route it to the appropriate interface, such as interface one. Similarly, computer B with MAC address 6xBB can be efficiently located within the network.

            Hub, switch or router? Network devices explained Transcription

            • 00:00 - 00:30 hi I'm Peter in this video I'll explain the difference between three popular types of network devices hubs switches and routers let's start with the hub hubs are cheap and simple devices that can connect a bunch of computers to each other but they're a little wasteful with bandwidth here's how they work when a computer sends information to a hub it replicates the data on all other interfaces it works like this that comes
            • 00:30 - 01:00 in clones come out it comes in clones come out you get the general idea a hub doesn't know anything about packets and it doesn't bother figuring out who is supposed to receive the data no it just spams everyone the receiver will get the message and the other hosts will ignore packets if the receiver field doesn't match their own address not bad for a glorified bit cloning machine alright so every incoming bit is
            • 01:00 - 01:30 replicated on all other interfaces that's a fairly simple and cheap way to create a network however it does cause a lot of unnecessary traffic if you have five hosts in your network hubs unnecessarily send every packet to three hosts that aren't interested that's a huge waste of bandwidth also keep in mind that other people in the network can see your traffic if they use free software like Winer shark if you're
            • 01:30 - 02:00 embarrassed about your addiction to funny cat videos maybe hops aren't your best choice now wait a minute there's a better way to do this if our hop kept a list of where every host can be reached then it would be able to send every packet straight to its destination without spamming the entire network that's what switches do in this example we've plugged in computer a to port 1 and computer B to port 6 each network
            • 02:00 - 02:30 card has a unique address that switches can use to identify a computer they're called MAC addresses they're not only used for Ethernet connections Wi-Fi uses it too if computer a has a MAC address of six times AAA then the switch will know that the computer with that MAC address can be reached on interface one in addition we know that computer B which has a MAC address of six times B B can be found on
            • 02:30 - 03:00 interface sex all this information will go into the switch table now for this example I will add two more computers computer C is hooked up to port three and computer D is hooked up to port four we have our network now let's see how it works in practice we always start with an empty switch table because the switch has to learn where everything is and in this example we will send a packet from computer a to computers C at this point
            • 03:00 - 03:30 the switch does not know where C is so it will just behave like a hub and flood everything but it's learning by checking the MAC address in the packets center field it learns that computer a can be found on port one it will store this information in its switch table now watch what happens when we send a packet from computer C to computer a since the switch knows that computer a can be
            • 03:30 - 04:00 reached on port one it doesn't have to flood the entire network it only has to send the packet to port one the switch now knows where computer see us and adds new entry to its switch table hubs and switches our devices that can be used to create networks but what if we want to send packets between those networks that's where routers come in say you want to send a packet to your search engine from your home laptop once you send your packet to the Internet how
            • 04:00 - 04:30 does it find its way to the search engine server that's the work of routers once you sent the packets your internet provider routers make sure that your packet is passed on from network to network so that it eventually reaches its destination if all goes well that is you probably have your own router at home too it forms a bridge between your own prime network and the network of your internet provider through the network of your
            • 04:30 - 05:00 internet provider you can reach the rest of the Internet modern routers also carry out other tasks for example they often do network address translation or they can hand out IP addresses to hosts using DHCP we have videos on both of those topics so just click the thumbnails if you want to watch him additionally many routers can also act as an access point for Wi-Fi now that we've gone over all three devices let's compare them it is worth
            • 05:00 - 05:30 pointing out that hubs switches and routers each operate on a different layer you may recall from other videos that every packet traveling over the Internet consists of five layers the physical layer is just raw ones and zeros since hubs just replicate bits they operate on the physical layer the link layer is specific to the medium over which the packet is traveling such as Ethernet MAC addresses are part of this layer since switches rely on MAC
            • 05:30 - 06:00 addresses to get packets to the right destination they operate on the link layer the network layer is where the IP protocol does its job a packet source and destination IP addresses are stored here among other things since routers work with IP addresses they operate on the network layer right so when should you buy a hub generally speaking don't waste your money on them as we've discussed they're huge
            • 06:00 - 06:30 bandwidth wasters and although it used to be that switches were a little more expensive than hubs that's no longer the case so if you're gonna buy a hub just by a switch there are some special use cases for hubs though for example they can be used to tap Internet traffic for analysis the main advantage of switches / routers is that they're cheaper if you need to connect to other networks you can still connect the uplink port of your switch to a router in fact you can
            • 06:30 - 07:00 connect multiple switches to the same router to save money switches are less complex in router so they can handle traffic faster than routers can this is great if you want to minimize latency perhaps during a LAN party with your friends however routers often have a built-in Ethernet switch to handle internal traffic so switches aren't necessarily faster the main purpose of routers is to connect networks to one another routers often support network address
            • 07:00 - 07:30 translation which is necessary if you want to give computers with a private IP address access to the Internet unlike your average switch routers often have a DHCP server onboard thanks to DHCP you don't have to manually configure IP addresses for all hosts in your network well I seem to be out of slides again so I guess I'm gonna stop talking in a few seconds if there's anything you'd like to see explained on this channel drop your suggestions in
            • 07:30 - 08:00 the comments or you know that's your local carrier pigeon you'll know where to find me thanks for watching see you next time