In computer networking, there are many different terms used for different devices that can be somewhat confusing if you don’t know what they mean. All of the devices unless otherwise specified are exclusively wired, for a wireless connection you need a wireless access point.
Hubs
An ethernet hub is a very simple device that takes any input on any of its network ports and replays it on all other ports. It can essentially be thought of as a cable splitter. In modern computer networking, hubs are almost never deployed any more as switches can perform the same task while offering superior network performance.
One of the few reasons to still use a network hub would be to run a network protocol analyser, as all network traffic would be forwarded to the analyser.
Switches
A network switch operates on a similar premise to the hub, however, instead of broadcasting any network traffic to all other devices, a switch tries to only send messages on to the intended recipient. During the course of normal operation, a switch listens to the network traffic that it receives and builds a network map using MAC addresses.
To do this, the source MAC address on all incoming network traffic is added to or updated in the switch’s network map. If a switch is asked to send traffic to a device whose location it is unaware of, it will flood the traffic across all network ports as if it was a network hub. If and when the unknown host responds, the switch will add its MAC address to its network map while forwarding the response to the correct host.
A switch’s network map works because it is aware of which physical network port requests came in on, it can then also send traffic out through the correct physical network port for the traffic to reach its destination. A switch appears transparently on the network, as far as any devices are concerned, they are directly connected to the destination device.
For home users, switches are generally only useful if you need more wired connections to devices that are available directly from your router. They are much more important in corporate networks where there are generally a lot more devices needing wired network connections.
Routers
A router is a combination of a variety of pieces of network hardware. Typically, routers include multiple ethernet ports and treat them as if they were a switch. Most home routers also work as a wireless access point, providing a Wi-Fi connection.
Some but not all routers include a built-in modem. A modem is a device that decodes and encodes the network connection to the ISP, providing a connection to the wider internet.
A router is the gateway device for a network and is used to provide a connection to other external networks such as the internet. It uses IP addresses to generate a network map of known devices and network blocks to determine where network traffic should be sent. A router often has a default gateway configured, any traffic for unknown IP addresses is sent through the default gateway, this is generally the internet.
Routers manage an entire network, whereas both switches and hubs are purely communication forwarding devices. Every network needs at least one router, although a network should only use a second router if it has another connection to a different external network.
Did this help? Let us know!