Understanding Network Devices :
If we need to transfer data from a computer to a mobile device, it can be done directly using a data cable. But when we need to transfer data between two computers, a direct cable connection does not work. In this situation, we use network devices for transferring data and communication with each other.
Network Devices work like a Road/bridge that allows two computers to easily communicate without any security risk .We can use network Devices for communication or interaction between two or more computers.

If Both Computers want to connect with each other, then both computer’s cables should be in network device.
Data Transferring Flow :
Computer sends (0,1,0) data → Using Blue cable → The data reaches at Network Device.
Network Devices receive those data and then decide where to send next.
Network Devices forward the data → in yellow cable → computer 02 receives the data
This flow can be opposite also (Computer 02 - to - Computer 01 )
Commonly used Networking Devices :
There are a lot of Networking Devices but most commonly used devices are as follows.

Switch :
Just Suppose , If you are working in a industry/company and there are 100 computers connected with switch , and you want to send data to a specific computer in those 100 computers , then what will you do ?
In this case switch helps to transfer data to a specific computer using mac address.
The Complete workFlow :
Computer 01 will send data in switch with mac address of the specific computer (where the computer 01 wants to send data)
Switch will check all 100 computers mac addresses (each computer contains unique and only one mac address)
Once the switch found the specific Computer, it will forward whole data on those specific computer.
Switch can be connected through wired connection and wireless , but on large scale, it mostly used wireless because connacting 100 computers with wired can be confusing so wireless also used.


Hub :
It is one of the oldest and simplest network device which transfer data directly everywhere instead of specific computer.
Just suppose computer 01 want to send data to a specific computer,
First of all , computer 01 will send data to Hub .
Hub will receive and transfer data in whole 100 computers instead of specific computer.
This can cause more bandwidth and sends unnecassory data in all computers.


Switch vs Hub :
Switch forwards data to specific computer using mac address.
Hub forwards data to all connected computers instead of one.

Router :
As we discussed earlier that switch is use to send or receive data through LANs( local wires),
But what happened if you want to share or access data from a network which is not accessible locally to you?
Like using google.com, which is not available offline near you.
Therefore you need a device that connects you to different online network servers. A router uses ip address (address on internet) instead of mac address (local offline address).
Router requests to server and give us server response.

Modem :
Modem is use to convert data signals given by ISP (fiberr, PTCL etc) ,
How it works :
- ISP gives you internet or wifi , but it contains analog signals , and modem converts these signals into digital (0,1) and computer connect to internet and wifi.
ISP (Analog Signals) → Modem (Converter) → Digital Signals → Your Computer → Internet Access.
without modem , ISP will gives you analog signals but your computer cannot understand and proceed it , and you will be unable to connect with internet.

Firewall :
A firewall is a security device or software that checks and controls incoming and outgoing network traffic.
It is exact like a security guard who checks everyone before entering in the house from outside.
A firewall decides which data packets are allowed to enter your network and which ones should be blocked.
This all done on firewall by predefined security rules.
Load Balanacer :
Load balancer is used to manage clients request. If the client requests a website,
The request goes to load balancer first.
Load balancer check all available servers and response the minimal traffic server .
Large websites like Google, Facebook, and YouTube use multiple load balancers to handle billions of requests every day.

These all Network Devices , internal devices , external devices, ISP etc works combine to run the whole world of the network known as Networking .