Switches and Routers in Networking

Samhith Vasikarla
3 min readAug 8, 2021

Have you wondered what happens behind in the background when you click on the link?

If you are curious about the background details then this blog would try to make understand the background details

The Internet is just cables spread all over the world.

Problem Statement:

Problem:Let’s take a scenario where you are a network administrator for a small company. The boss of the company gives you a task such that each computer in an office should communicate with each other.

Let’s say we have 3 computers in the office: PC1,PC2,PC3. PC1 should communicate with PC2 and PC3 ,PC3 communicates with PC2 and PC1.

Ans:To accomplish this task switch devices are used to accomplish this task. So one might get what is a switch ?.

Switch is a networking device which is used to communicate one computer with other computers which are present in the same office or same house or the computers which are located near to each other geographically.

So for the above problem switch is an ideal networking device to accomplish this task.

Before communicating between different computers all the computers need to communicate with the switch. From the switch we can send one computer information to another computer.

So now we have a question: how do we communicate with the switch from the computer?

The answer is we put cable from the computer to switch.

LAN communication

The cables can be fiber optic cables or copper cables. Switches cannot use wireless technology.

If we want to use wireless technology instead of a switch we can use an Access point.

These computers can communicate with each other because there are cables from the computer to switch. This means it forms a network of computers in the same house or work. This kind of network is called Local Area Network(LAN).

We cannot create LAN between the computers which are geographically large distance

How Communication established in switches:

Suppose Computer A wants to send a message to Computer C. We call these messages as packets in the networking concept . Computer A is called source computer and computer C is called destination computer.

First Computer A sends the packet to the switch. Switch inspects the packet and learns the destination computer. The switch sends the packet to the destination computer.

Switch contains ports. Different switches have different numbers of ports. Switch ports are generally called as LAN ports

Until now we discussed how computers can communicate within the LAN. We have never talked about how these computers are connected to the Internet.

Now we increase the complexity of above Problem Statement

Your small company boss is happy as you connected all the computers in his office through switches. Now he has assigned a task to give internet access to all the computers in his office.

For this scenario a router comes into the picture.

Here the task of the router is to connect LAN to the Internet. Now we see when the switch comes into play and when the router comes into play . Suppose we want to communicate with PC1 and PC3 we use the switch for communication between the devices.

In this scenario router does not come into play. If PC1 wants to communicate to the internet then PC1 sends the packet to the switch and from the switch it goes to the router. From the router to the internet.

--

--