router vs hub vs switch vs bridge

By Shop Manager electronics No Comments

what are the differences between these common devices? In this article we are going to explain some common “concepts and words” in networks world and then make a bright discussion about: “router vs switch vs hub vs bridge ”

to understand the differences between these devices better, first you must get familiar with some words and concepts:

Network:

a group of computers that are linked together.

LAN:

Or “local-area network” is a network that contains computers that are geographically close together. (For example: linked computers in an organization or in a building or etc. )

Port:

ports are those physical areas in or out of a device that are used to connect other devices to it via a wire or cable. (Like inner or outer ports in a PC which are being used to connect keyboard, mice, printer, RAM, modem or etc.)

Packet switching:

packet switching is the term that is used to refer to protocols in which data (messages) are divided into packets before they are sent.

Each of these packets can be transmitted through different routers.

Packets (or as called in IP networks: datagrams):

as you’ve read above, packets are piece of data that contains the data as well as the destination address and are used in packet switching protocol in networks.

Segments:

Usually, networks are divided into different sections (called segments) due to security issues and traffic flow improvement by filtering out packets that are not meant to be received by them.

These segments are being created by bridge, router or switch in a LAN network.

Network protocols:

the term that refers to rules and conventions for communication among devices in a network. There are lots of available network protocols like :  WiFi, HTTP, Bluetooth and LTE.

router vs hub vs switch vs bridge

All of these devices are being used in networks to connect different devices to each other. But what is each of them? Or better to say: what are the differences between them?

Hub:

router vs hub vs switch vs bridge

Hum is the simplest device that can be used in a network to connect devices to each other.

They have ports to connect segments of a LAN.

How does hub work?

When a packet (sent by a device that is connected to the hub) arrives at one of a hub ports, it copies the data (packet) to all other ports and send the arrived data to all other systems in the LAN.

Key features of Hubs:

Hubs are not able to filter the packets (data). Therefore it sends the arrived data to all other systems in the LAN and the devices themselves must decide on whether they need the data or not.

When to use a Hub?

They cannot find out the best path for data transmission so they are generally common in smaller networks where data transmission is not very high.

Bridge:

Bridges are another common device for connecting two LANs together or two segments of the same LAN (in which they have and use same protocol of data transmission).

Bridges have a little more complexity than hubs.

It has a single incoming and outgoing port.

Bridges, unlike hubs, identify the destination of the packet before forwarding the data in the LAN.

If Bridge can’t find the destination, It will restrict the transmission on the other segment of the LAN

A bridge maintains a MAC address table for both LAN segments that are connected to it and filters traffic by it.

When to use a Bridge?

If there are parts of a network that do not need to communicate regularly but need to be connected, then a bridge can be used to separate these parts from each other while they are all present in the network and somehow connected to each other.

In better words, Bridges are made for limiting the access and separating the segments of a LAN.

Switch

router vs hub vs switch vs bridge

Switches are for filtering and forwarding data (packets) in a network too.

Switches have multiple ports.

As they can verify errors by their error checking ability, they will not forward the error-ed out packets, they are so efficient.

They can select the destination devices correctly.

When to use a Switch?

Usually in large networks, switches are preferred than a hub to connect computers that are in the same subnet.

Router

router vs hub vs switch vs bridge

Router is just like switch and forwards packets based on their addresses. However, there are some little differences between a Router and a Switch:

Routers forward packets based on software while, switches forward data using hardware. (Like ASIC)

They use IP address to forward packets; this allows the network to go across different protocols.

Also, routers support varieties of WAN technologies (while switches don’t) and have Access Point built in.

When to use Routers?

Most popular use of routers is sharing a broadband internet connection.

The router has a public IP address and that address is shared with the network. When a router receives data, it shares and forwards it to the correct computer or systems in the network.