When discussing networking, you will come across the terms hubs and routers. These network devices continue to confuse many people because the terms are used interchangeably by many people. Additionally, these two network devices perform the same function of passing data to connected devices (albeit using different mechanisms). And with the technological advancement and increasing sophistication of routers, today's routers perform the work of hubs, diminishing functional differences.
This post will explore the differences between hubs and routers and noting each device's unique characteristics. The goal is to help you understand what each device does, why to use a particular network device over the other, and where to use each device.
What is a Hub?
Also known as a multiport repeater or an Ethernet hub, the hub is the least intelligent, least expensive, and least sophisticated network hardware of these two. Hubs are commonly used as connection points between computers and peripheral devices (such as printers). Its function is elementary; receiving data on one port and sending the messages to every other port.
To this end, when a hub receives a message in one port, it sends the message to all other ports. It is the function of the receiving devices to decide whether to respond to the message they receive or not. For instance, when a computer sends a signal to a printer, the hub will send the message it receives to all other ports regardless of whether a port connects to the printer or other devices.
When the printer receives the message, it performs the tasks as instructed by the computer. However, all other devices will ignore the message. In the same light, when the printer wants to send a message to the computer, the hub will receive the traffic and send it to all other ports.
In a nutshell, hubs do not provide packet filtering within the network.
What is a Router?
If the hub is the most unintelligent networking device, the router is the polar opposite; the most intelligent network device. A typical router is a small computer programmable to route network traffic. Routers usually connect two networks such as an ISP network and LAN, two WANs, two LANs. Routers are also used to connect two large network segments. Routers operate with IP addresses to route traffic.
Routers usually operate as the switch for routing in any network. A router will learn the computer's location using IP addresses and send traffic only relevant and necessary to that particular device. Besides routing traffic, consumer-grade routers take care of other tasks, including Dynamic Host Configuration Protocol and Network Address Translation.
Modern routers are also designed to perform the work of hubs, thereby eliminating the need for additional network devices at home or in small business environments. It is now commonplace for businesses to connect computers with peripheral devices such as scanners and printers using their router. Rather than investing in a router to connect devices to the internet and purchasing a hub to connect various devices in a network, a router can also serve as a hub.
Additionally, many routers have software that enables routers to perform tasks such as creating virtual private networks for all connected devices and creating network firewalls for improved security.
Why Use a Hub?
You would use hubs when you need a cheap network device to connect your computer with other devices. Given that hubs do not need any advanced computing power with a sophisticated operating system, they tend to be cheaper than routers.
You would also consider using a hub when your network of connected devices is relatively small. A network with many devices connected via a hub can end up being slow. Remember, every signal sent by one device via a port will be sent to all other ports in the network. Furthermore, hubs can only process one incoming data stream at any given time, hence the need to keep the network relatively small.
Where To Use a Hub
Since hubs are inexpensive, they poetically offer the highest value for use cases where a cheap network device is necessary. However, you can only accrue the benefits of using a hub when the network is small.
Another use case for hubs is in conjunction with other sophisticated network systems. For instance, you can use a hub to serve a small segment of a large network that does not face massive traffic, thereby lowering the overall cost of networking devices.
Types of Hubs
The main differentiating factor when buying hubs is the capacity a hub has. Some hubs are designed to serve a simple network and, therefore, can only handle a small volume of data. Such hubs tend to be the cheapest networking device on the market.
On the other hand, high-end hubs can handle much larger volumes of traffic. Owing to their faster throughput, they cost significantly more than cheap hubs.
Why Use a Router?
You need a router to connect two networks. In this regard, if the network in your home or business premises will connect to the ISP, you need a router. While you do not need a router to connect your devices, you need a router if you intend to access the internet using the devices in the network.
Where To Use a Router
The use case for routers is anywhere you need to connect to the internet. Businesses and households that need an internet connection will use a router to connect to their ISP. In most cases, the router will also create local Wi-Fi within the premises.
Types of Routers
Routers come in the form of wired and wireless routers. Wired routers are routers that connect devices, primarily computers, through Ethernet broadband. On the other hand, wireless routers connect devices to the internet through Wi-Fi networks. A wireless router allows more devices to connect over the air than a wired router that requires a physically connected wire to access the internet.
While hubs and routers perform similar tasks, their sophistication levels vary greatly. Hubs operate at the physical level in the ISO-OSI model, using electrical signals to connect devices. On the other hand, routers are smart network devices akin to small computers that operate at the network layer of the ISO-OSI model. Increasingly, consumer-grade routers are capable of handling the tasks of hubs, making legacy hub somewhat obsolete.
However, if your use case for connecting devices requires a cheap network device, a hub is an excellent choice.