Fundamental of Networking For Beginner: How Data Flows on the Internet. Part-1
Tags: networking, networkingdevices, softwaredevelopment, fundamentalofnetworking
Published: 2024-05-08 20:09:20

We all use the Internet. Right? But do you know when we send or receive any data through internet then how it's works? Don't worry. You will learn about the basics of networking and how data flows on the internet by reading this article step by step. Be ready and prepare for this smooth journey.

> **Table of Contents:**

We will learn the networking in some steep. Let's see the step: 

1. _Learn about Network devices._
2. _Learn OSI Model._
3. _Learn how multiple devices (host) are communicate in a network._
4. _Learn how switch and router are work in a network._
5. _Learn how data flows from one device to another through internet with practical example._

In this Part we will discuss only the **Network Devices**.

> **Network Devices:**

To understand networks, we must first learn about network devices. Here are key devices and terms to know:

- Host,
- IP Address,
- Network,
- Repeter,
- Hub,
- Bridge,
- Switch,
- Router

**_Host:_** A host is a device, such as a _computer_, _mobile phone_, or _printer_, that connects to and communicates within a network. 
For instance, consider a scenario where you have a PDF document on your computer that you want to print. When you connect your computer to a printer and send the print command, both your computer and the printer act as host within this network.

**_IP Address:_** IP Address is the address or the identity of each Host. To identify each host we need IP Address. 
An IP Address is composed of _32 bits_ and is typically represented in four **octets**. For instance, **192.168.0.1** is an example of an IP Address. 
In our example the computer have an IP Address and Printer also have an IP Address.

**_Network:_** Let's say we connect our Printer with our Computer through a cable, and it's communicating each other with this cable and build a connection. This is a network.
 
According to AWS:

[_Computer networking refers to interconnected computing devices that can exchange data and share resources with each other._](https://aws.amazon.com/what-is/computer-networking/)

It's means when we connect multiple host together and they are share data with each other it's called network.

![networkImg](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/15vni80dv52n8pplux1f.png)

_**Repeter:**_ When hosts are connected in a small network then it can communicate easily but in a larger network, data can't reach its destination and loss the data before reach the destination. So we need a device to regenerate data and make the signal strong enough to reach its destination. Repeter dose the same. 

![repeter](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4aymtv1e0c3wvgtgm7to.png)

**_Hub:_** Let's say we have a network which has two host connected each others.

![hub1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8kkwcrsbt4nb8ar1vnuo.png)

Now i want to add another two host in this network. so I have to connect those 4 host with each others. and if i want to add more then it would be very much complicated. 

![hub2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r71ic1kyzf02a3c73r4g.png)

What if we have a device to connect every host of the network with this device to communicate each others easily. Hub dose the same thing. It remains in the center of the network and all host is connected with the hub to communicate with others. And when any host share any data in a hub then the hub shared the data with all the connected host of the hub.

![hub3](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bg8yi7jablzy4tru3iyl.png)

Now if i want to add more host in this network i have to connect the host with the hub and that's it. 

_**Bridge:**_ Now Let's say I have one network with two hub connected each others. Like this:

![Bridge](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7h2e0rmq3a0znq6fb7h4.png)

Here **Host 1.1** send data in **Hub 1** and **Host 1.1** don't want to share the data with **Hub 2** . In that case when **Host 1.1** will send the data in **Hub 1** then the data will also flow in **Hub 2** because it's connected each other. To keep this two Hub separated in a single network we need to add a device called Bridge. 

![Bridge2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jj51re5geo8ekwxpsq29.png)

**_Switch:_** Switch is the combination of both **_Hub_** and **_Bridge_**. When a Host send data in a hub then it share the data with all connected Host of the hub. But if any host want to send some data to another host without sharing the data with others then how it will do? Here we need Switch. 

![_Switch](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hlm1pknfz1lrqzjoytsh.png)

Here we connect host with a switch in a network. now if the Host 1.1  send the data to Host 1.3 in the network then Switch will send the data to Host 1.3 only. others host will not receive the data.

**_Router:_** All the devices we discuss above is used to communicate each host in a single network. But we didn't discuss how a network build a connection with other network. For learning that we can imagine a scenario.

![_Router](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0i3rhemci9yr8swyjd5t.png)

Let's say we have a network in Dhaka and the IP Address is **162.150.1.x** and we have another network in Cox's Bazar and the IP Address is **162.150.2.x.** 
If any host want to communicate with each other inside the network of Dhaka then they can communicate with switch. But if any host of Dhaka want to communicate with any host of Cox's Bazar network then the network of Dhaka **(162.150.1.x)** need to connect with the network of Cox's Bazar **(162.150.2.x)** through the router and internet.
 Router connect one network with other network. Router have a default get way to connect with other network. for the network of Dhaka **(162.150.1.x)** default gateway is 162.150.1.1 and for the network of Cox's Bazar **(162.150.2.x)** default gateway is **162.150.2.1**.
When any host send data in a switch and if the switch can't find the destination IP Address in the network then it send the data through the default gateway of the router and it reach its destination through internet. 

> **Conclusion:**

In this part we learn about the devices of Network. in next part we will learn about OSI Model. Keep flowing to learn Software development with me. 

Reference : https://youtube.com/playlist?list=PLIFyRwBY_4bRLmKfP1KnZA6rZbRHtxmXi&si=nDpQn3Be7713Hbrf

**_Follow me on:_**

- [LinkedIn.](https://www.linkedin.com/in/abulbashar5403/)
- [Twitter](https://twitter.com/basarofficial54)
- [Medium](https://medium.com/@abulbasarofficial5403).

Thanks of Reading.