Hub Vs Switch Vs Router

When planning a network, you need to work out topology and then you have to decide which equipment to buy.

Apart from the cable, the most important elements on a network are the devices that join links together. Your options are hubs, switches, and routers.

Network administrators talk about network devices without fully understanding the difference between them. They certainly have different prices and there are also big price differences for equipment within each category. You might be spending too much on your network devices if you don’t properly assess the network’s needs.

We examine hubs, switches, and routers to help you to decide how you can best deploy your budget to get a fully functioning network for your offices.

Hub vs Switch vs Router overview

If you prefer to think of networking technology in terms of layers in a stack, the following diagram should help you understand the difference between a hub, a switch, and a router.

Difference between a hub, a switch, and a router

This diagram makes it clear that routers have the most functionality and hubs have the least.

  • A hub is a Physical Layer device (Layer 1)

Hub

  • A switch is a Data Link Layer device (Layer 2)

Switch

  • A router is a Network Layer device (Layer 3)

Router

What is a hub?

A hub links lengths of network cable. Rather than joining two lengths of cable, the hub is a box with an array of network cable sockets on it. Each cable plugs into a socket on the hub. Any signal passing down one of those cables enters the hub. The hub then copies that signal onto all of the other cables plugged into it.

Hubs are also known as Ethernet hubs and multiport repeaters, which gives you some idea of the level of activity that they provide. Hubs don’t offer any processing power. They just copy any incoming data onto all the other connected cables.

Hubs, also known as Ethernet hubs and multiport repeaters

As it doesn’t perform any processing, the hub has no need to look at any information in the header of any incoming packets or data frames. It doesn’t make any decisions over what destination the data is intended for.

Why use a hub?

Hubs cut costs because they don’t need any complicated on-board computing power or operating system. However, they also create a lot of traffic. Every cable receives all of the data sent by all of the other cables connected to the switch, whether it can use that data or not. That large amount of traffic isn’t much of a problem for the endpoints on the network because network cards are programmed to only pay attention to transmissions that have the right MAC address in their headers.

The main problem with a hub is that it can slow down traffic if it has a lot of cables connected to it. This is because it can only process one incoming data stream at a time and copying that incoming data is inevitably going to take a little time. The more endpoints that are connected to the hub, the more likely it is that several of them will want to send data at the same time. To head off this performance limit, manufacturers usually produce hubs with only four or five ports.

Where to use a hub

Hubs offer value for money for small networks. They can link to larger networks that have more complicated network devices. Traffic volume handling means that it is unlikely that you would have a hub close to a major originator or destination for data. You wouldn’t have a hub feeding data through to a router and then on to endpoints. Rather, a hub could play a part in a larger network by supplying a small segment that doesn’t have much traffic.

Types of hubs

Hubs come in a range of capacities. Very cheap hubs don’t have much capacity. Hubs that offer fast throughput for larger volumes of data can be more expensive than switches and they don’t offer more ports than cheaper hubs.

Here are a few examples of hub models that are currently on the market and what you can expect to pay for them.

Cisco-Linksys EFAH05W EtherFast 10/100 5-Port Workgroup Hub

Cisco Linksys EFAH05W

  • Number of ports: 5
  • Throughput speed: 10 or 100 Mbps (autosensing)
  • Price: $149.99

Dynex DX-EHB4 Hub

Dynex DX EHB4 Hub

  • Number of ports: 4
  • Throughput speed: 10 Mbps
  • Price: $49.99

Netgear EN104TP 4-Port 10 Mbps Ethernet Hub

Netgear EN104TP 4-Port 10 Mbps Ethernet Hub

  • Number of ports: 4
  • Throughput speed: 10 Mbps
  • Price: $119.99

Alternatives to hubs

One big problem when considering a hub for a network is that they aren’t so easy to buy anymore. Switches have been around for so long that, through mass production and development cost write-off, they have become as cheap as hubs or even cheaper. When considering a hub, it is just as cost-effective to look at unmanaged switches as well and you may find that a switch offers better features at a lower price.

Another piece of hardware that has made Ethernet hubs almost completely obsolete is the WiFi hub. Most small business situations that might have once been ideal environments for a network hub now opt for a WiFi system instead.

Typically, a small business would need to link several computers on a network together with a printer and a point-of-sale device. Almost all of the devices on the network would need internet access. Most internet service providers (ISPs) supply a WiFi hub free of charge. That fulfills all of the functions previously required from an Ethernet hub, while also supplying the internet gateway and eradicating the need for network cables.

Hub pros

  • Low cost
  • Good for small businesses
  • Suitable for networks with few endpoints
  • Low traffic

Hub cons

  • High volume hubs can be as expensive as switches
  • Typical hubs will slow traffic if used for more than a few endpoints
  • Don’t offer any monitoring feedback
  • Made obsolete by WiFi hubs

What is a switch?

Switches are the most widely encountered devices on networks. This is because they were originally designed to connect together links on private networks while routers are meant to connect networks together.

You have already seen how a hub works. A switch operates in the same way but with one important difference – it only copies incoming data onto one connected cable. This straightforward difference drastically cuts down on network traffic.

Switch operation diagram

The switch associates an address with each of its ports. Switches manage data frames, which have headers that contain source and destination addresses. Those addresses relate to the network card on the other end of each cable that is plugged into the switch. Each network card is embedded into an endpoint, such as a PC or a printer. The addresses are called MAC addresses – MAC stands for “media access controller.”

So, when a data frame arrives at one port, the switch reads the destination address in its header and copies the frame onto the port that is associated with that MAC address.

Why use a switch?

Switches are efficient. They produce much less network traffic than hubs and they specialize in linking together devices rather than connecting whole networks, like routers. The tasks of each individual switch are very simple, but when working in concert, a number of switches can easily transmit data around a relatively complicated and extensive network.

In order to build up a network, engineers connect switches together. So one port on the switch will relate to many addresses. Switches teach themselves what address lies at the other end of each cable that is plugged into it so they are very easy to install. Although switches don’t require much processing power, the on-board chips of these devices are capable of managing traffic through queuing algorithms, compiling statistics, and copying data for analysis (acting as a splitter).

Most switches are pre-installed with an SNMP agent. This works along the rules of the Simple Network Management Protocol to provide regular status reports and notify a central controller when problems arise.

Where to use a switch

The lowering cost of switches helped this device to encroach on the small network market, making them more attractive than hubs. However, the dominance of WiFi hubs in the small business network market has reduced the marketability of switches to those customers.

Switches are deployed in large numbers for medium-sized and large networks. The devices are very scaleable and can extend a network infinitely. So, there is no limit to the size of the network on which you will encounter switches.

Types of switches

There is a great difference of opinion over how many types of switches there are – some say two, others say four, while others contend that there are ten types of switches. Cisco Systems is the world’s largest manufacturer of switches and that company lists five types:

  • Modular switches – These switches are almost like kits because they can have features added on to them, both physically, and logically, The types of add ons that this switch will take include firewall functions, WiFi connectivity, extra power supplies, or fans. These units are very flexible but expensive.
  • Fixed-configuration switches – These are the classic switches that are shipped as an enclosed box with a fixed number of ports. This is really a superset of smart, managed, and unmanaged switches.
  • Smart switches – This type of switch provides traffic shaping capabilities, performance reporting, and is often sold in combination with software as part of a platform.
  • Managed switches – This is what could be regarded as the standard switch. It includes capabilities for traffic shaping and status reporting. A small network would be made up of just a few of these switches. Larger networks could have managed switches around the periphery and less expensive unmanaged switches at the core.
  • Unmanaged switches – These are the workhorse switches. These switches are usually shipped with SNMP agents pre-installed but they don’t have sophisticated capabilities such as traffic shaping measures.

As a rule of thumb, those categories are listed above in price order from the most expensive down to the cheapest type of switch.

The type of switch you choose and the number of ports it has will dictate the price you should expect to pay. Here are three examples.

NETGEAR 8-Port Gigabit Ethernet Unmanaged Switch (GS308)

NETGEAR GS308 Unmanaged Switch

  • Number of ports: 8
  • Throughput speed: 1000 Mbps
  • Price: $27.99

Cisco Catalyst 9300 24 Port C9300-24T-E Managed Switch

Cisco Catalyst 9300

  • Number of ports: 24
  • Throughput speed: 1000 Mbps
  • Price: $5,300

Juniper Networks EX4300 48-T

Juniper Networks EX4300

  • Number of ports: 48
  • Throughput speed: 960 Gbps
  • Price: $7,995

Alternatives to switches

If you are building a LAN, you will be buying switches – there aren’t really any serious alternatives. However, you will certainly also have at least one router on your network.

Switch pros

  • Essential network equipment
  • A range of types
  • A wide price range
  • Self-calibrating

Switch cons

  • Can get overloaded
  • Advanced switches with traffic shaping capabilities are expensive

What is a router?

Routers are specialized at sending data between networks. That doesn’t necessarily mean that they only work with transmissions off-site because some office networks are made up of a series of interconnected LANs. Routers are needed to power the internet – there are no switches involved in getting data across the internet.

How a router works

While hubs don’t really pay any attention to addresses and switches work with MAC addresses, routers operate with IP addresses.

Routers are particularly useful as gateways to networks, standing at the exchange point with the internet. The operating area of a router defines an address space, so concepts such as the Dynamic Host Configuration Protocol (DHCP), the Domain Name Service (DNS), and IP address management all pertain to one physical router on a network. A router is able to translate between address spaces. It enables a business to be represented by one public IP address while managing many addresses on the private LAN.

The router is able to track interactions between devices on the LAN and the outside world by managing a Network Address Translation (NAT) system.

Why use a router?

Routers aren’t essential in order to create a network. All of the internal communications on a LAN can be carried out without the existence of a router. However, there are very few isolated LANs in the world, most of them connect to the internet. Routers connect two networks together and the internet is a network, so if your LAN needs to connect to the internet, it needs a router.

Where to use a router

All businesses that need a connection to the internet need a router. As discussed above, small businesses can get by with the WiFi hub that is provided by an ISP. This “hub” is actually a router because it distributes addresses to all devices within the business’s premises and represents that business with one public IP address on the internet.

Types of router

There is only one type of router for wireless networks. You will see some reference to two types of routers but this just refers to wired and wireless routers. You will also see references to the core or edge routers. These are the same devices placed in different locations on a network. A core router is only able to manage traffic within one network because it doesn’t have a connection through to a neighboring network – if it had, it would be an edge router.

The network manager with an internal router can experiment with routing algorithms. However, any router connected to the internet has to implement the Border Gateway Protocol – the only routing method that operates on the internet.

Here are three examples of routers.

Cisco C3945-CME-SRST/K9 Router-Switch

Cisco C3945-CME-SRST/K9 Router-Switch

  • Number of ports: 5
  • Throughput speed: 1000 Mbps per port
  • Price: $14,795

TP-Link Safestream Multi WAN VPN Router

TP Link Safestream Router

  • Number of ports: 5
  • Throughput speed: 1000 Mbps
  • Price: $59.99

Juniper Networks J2350 Router

Juniper Networks J2350 Router

  • Number of ports: 20
  • Throughput speed: 1000 Mbps per port
  • Price: $2,499.99

Alternatives to routers

If you need to connect your LAN to the internet, there is no alternative to a router. There are devices that combine switch and router functions. Typically, WiFi hubs include four switch ports. These devices combine switch, router, and wireless access point (AP) functions.

Router pros

  • The only way to connect to the internet.
  • Connects two networks together
  • Manages IP addresses
  • Includes network address translation between LAN and internet IP addresses

Router cons

  • Failure isolates the network
  • Vulnerable to a hacker attack