Skip to main content

Hub vs Switch

In simple terms, both hubs and switches are used to connect devices, as shown below.



However, hubs work differently from switches in their operations (that is in how they send packets). 


How does a hub work?


When a hub is connected as shown above to all computers, then data is broadcast to all the devices connected. For example, consider the diagram below.


Suppose that computer A needs to send data to computer C. 


Then it first sends data to the hub, where all the devices are connected, and then the hub will send this data to all the devices. Simply, a hub does not filter the addresses and sends a packet it receives to all the devices connected to it as shown below.


Every computer checks the destination address of the packet and if the destination address of the packet match with that of the computer, the packet is accepted. Therefore, this is not an efficient approach of exchanging data. Furthermore, this nature of data sharing leads to sharing the bandwidth available among the connected devices and if there is a heavy exchange of data takes place between two computers compared to others, then other computers will be subjected to a low usage of the remaining bandwidth.


How does a switch work ?

A switch works initially in the same way as that of a hub but a switch learns where to send data after consecutive exchanges. 

For example, consider the same exchange between computer A and computer C above.


Initially the switch also sends data packets to all the devices available as shown below.


Then the switch learns which computer accepted data packets and now learns that any packet whose destination is to a specific computer (in this case computer C), should be directed on that specific path. Therefore, next if computer B wants to send packets to C, then packets will be directed only to C.

This is an efficient method of data exchange as data is not sent to all the devices.

However, implementing switches is somewhat complex as compared to setting up a hub. Moreover, hubs operate in the physical layer of the OSI model (discussed in another blog post) while switches operate in the data link layer. 

Therefore, hubs are easy to implement and economical but are less intelligent compared to switches.

Comments

Popular posts from this blog

Mesh / Fully connected topology

In the last blog posts we discussed about the star topology and bus topology . This is the third of the series of blog posts on network topologies. This blog post will explain about the mesh/fully connected topology, its pros and cons and the typical usage of its architecture. Mesh or Fully connected topology -  In a mesh or fully connected topology all the nodes are interconnected with each other without the use of a common media. In this blog post: Advantages of Mesh / Fully connected Topology Disadvantages of Mesh / Fully connected topology Usages of Mesh / Fully connected topology For example, as we discussed, in a star topology , all the networking devices were interconnected using a switch or a hub and in the bus topology , all the devices were interconnected using a bus line. More topologies to discover: Bus Topology Ring topology Star topology However, in mesh or fully connected topology, as the name implies, all the devices are inter

Bus topology

In the last blog post , we discussed about a brief introduction to network topologies and focused particularly on the ">star topology . In this blog post we will discuss about the features, pros and cons and the usage of bus topology. In this blog post- Advantages of using bus topologies Disadvantages of using bus topologies Usage Bus topology -  In a bus topology, all the devices are connected to a central cable (called the bus), through interface connectors (BNC connectors), as shown below: More topologies to discover: Star Topology Mesh or Fully Connected topology Ring topology In a bus topology, terminators are added, as shown by the red squares in the above figure at the ends, to prevent reflection of signals. In a bus topology, only one device may communicate at a time. To avoid collision of packets, all other devices should wait until the bus line is free for them to communicate. A protocol called Distribute Access Protocol (DAP)

Ring topology

We have already discussed about the introduction to topologies , star topology , bus topology and mesh or fully connected topology . This is the last of a series of blog posts on network topologies. In this blog post we will discuss about the ring topology, its pros and cons and the typical usage of its architecture.  Ring topology -  In ring topology all the nodes are connected to make a closed loop as shown in the diagram below :  However, data can travel in a ring network only in one direction with the help of a token. A token contains some information and along with this information data is sent throughout the network.  In this blog post: Advantages of Ring Topology Disadvantages of Ring Topology Usages For example, suppose A wants to send data to C and let us assume that the token is moving along the loop counter clockwise. Then first E receives the token and since the addresses do not match E passes further. Then D receives it and similar

Introduction and Star topology

Network topologies are all about how the networking devices are connected. Suppose you are provided with a switch and 4 computers, there are numerous ways that these can be connected. The following diagram illustrates some ways of connecting them : Therefore, network topologies is about studying and connecting such computers in different patterns. When we connect in different orientations,we have to particularly pay attention to the pros and cons of each method rather than just using a particular topology randomly. Therefore, this blog post will discuss about the different topologies, their pros and cons and where each of these topologies are typically used. Star topology- A star topology, as shown below, is a topology where all the computers are connected to one centralized hub or switch. Therefore, each of these equipment are given the same opportunity (direct) to contact the switch and all devices radially span out from the centralized hub or switch. In this

How emails are sent [the action of the SMTP servers]

What is SMTP? SMTP stands for Simple Mail Transfer Protocol and is used by email carriers to send and receive emails. SMTP uses the store and forward technique to send emails between two connections. [Actually, there are two different servers running on a server machine : the SMTP server and the POP3 or IMAP server. We will focus only on the SMTP and the functionality of the SMTP server in this blogpost]. How does SMTP work [or how emails use SMTP?] ? Consider the following expected communication between John and Brendon: Fig 1 : Expected communication between John and Brendon Suppose John is going to send his email using Outlook express. First, Outlook express should connect to John's network and then to the SMTP server using Port 25 (SMTP usually uses TCP port 25 for connections). Then Outlook express should notify the server the message to be sent, the address of the sender and that of the recipient. Suppose Brendon's address is Brendon@pqr.com. Fig 2
DMCA.com Protection Status