Computer Networking

Computer Networking

(Introduction)

ยท

12 min read

C- COMMON

O-OPERATING

M-MACHINE

P-PURPOSELY

U-USED FOR

T-TECHNOLOGICAL

E-EDUCATIONAL

R-RESEARCH

What is networking?

Networking? Computers connected together is called Networking.

Internet? It is the collection of computers network. One computer is connected to another and so on. The entire connection on a global scale is called the Internet.

How we (computers) connected is going to be focused on in this blog.


How did it start? (Short Story)

The cold war going on between the United States and Sobiyat Union. They were battling with one another over who is going to be the first to launch the world's first Satellite. Sobiyat Union won the battle by launching Sputnik in 1957. Now US govt. be we want to be the first, etc. So the US govt created an ARPA (Advance Research Project Agency). Now ARPA wants some ways to connect because they have too much infrastructure/Buildings over the US. They develop something called ARPA.net. Places where this works- the University of California at Los Angeles (UCLA), Scientific Research Institute (SRI) at Stanford, University of California at Santa Barbara (UCSB), and the University of Utah Only were connected at that time. At that time they were using TCP to connect.

In simple terms, You are sending an email to someone that may require some steps, You may want to send some videos/files etc. So for every particular thing you have to be different rule. Rules were set by the people, How the particular data is transferred over the internet is called Protocols. Protocols like - TCP, UDP

After the years went on more and more locations were added to the ARPA net. still, we use TCP/IP, But it changes a lot.

One problem arises after then that was as still they are not able to share documents/ research paper stuff over the internet. Then TIM BERNER LEE comes into the picture. He develops the WWW(world wide web). WWW is a project that stores documents. You can store and access the files by WWW. Many links are interlinked in a webpage by hyperlink & they are accessible over the internet called WWW.

Why do we need protocols?

Let's imagine you are making an application & someone in a different country also making an application. You have different rules for how your application communicates with other devices. The other person has another rule for how their application communicates with devices. So these two applications can communicate with each other? -No. So that's why there have to be some rules and regulations,

If I want to send an email, So every single person who sends the email from one person to another across the world have some set of rules & regulation. But who writes these rules? The Internet Society.

Internet society- Handles all these rules & regulations and also sets new rules. Only they are responsible for all the things. How we make submissions for the changes in the rules or set new rules, all can be done by the RFC(Request For Comments). You can send them suggestions In document type. Anyone can submit their ideas about the internet for better management in internetsociety.org


Client Server Architecture -

Client and Server Model - Fast Tech Skills - YouTube

Server? Client?

Let's assume you have a machine & you visit 'google.com'. It sends the request to the 'server' & then google sends it back to the 'response' to your computer.

NOTE: The Internet is not in the Cloud. It's actually under the sea. Various countries, and various continents across the world all are connected by wires. These wires are laid under the ocean. That's how we all connected.

When we visit google.com, Computer sends a request to the Google server & the server sends the response & back to the webpage & bunch of other things to happen in between. Response means sends back to you. So it doesn't mean that you cannot be the server yourself/your computer cannot be the server yourself? It can be. That's called manual /work on a local host etc. So your computer can be the Client and Server also.


Protocols -

There are the rules defined by the Internet Society.

TCP(Transmission Control Protocol) - It will ensure the data will reach its destination without any corruption. If you want to send files completely without any data loss you should use TCP in your application.

UDP(User Datagram Protocol) - When you don't care about the data loss /means data is not transferred 100% and it is fine no issue if data is lost. For e.g - Video call

HTTP(Hyper Text Transfer Protocol) - This is being used by the web browser(www). This defines the format of data being transferred between your web client & server. The client sends a request to the server & server sends a response to the client all these things happen inside HTTP. HTTP transfers data from one machine to another.


How data is transferred? IP Address -

You know everything in a computer is 0 & 1. So it doesn't make sense to send the entire data at once. Suppose you want to send large files over the Internet. The data is sent over the internet in chunks. The same things happen with web pages/when you watch movies online etc. Data you will be getting in packets. Packets will be covered later on.

When you write google.com. How does it find to which server to connect? So these Computers & Servers all are identified by IP Address. For e.g As your phonebook, you have 200 contacts & if you want to call someone you just type their name like Abhii

Abhii ----> 9876543210

This is a link to a no., If you want to call Abhii, You just type Abhii. This is the same thing that happens with IP Addresses. All the devices are connected/if you watching Youtube, means you are connected to the Youtube server, and you are interacting with the Youtube server. So every simple device that is connected or talks to each other, they have something known as an IP address.

x x x x

Every single 'x' can have no. 0-255. If you visit 'GOOGLE.COM', It will resolve to a particular IP address. We will talk about the IP address later.

To check the IP address of your machine

curl ifconfig.me -s

All the devices connected to the modem/route/wifi can have the same IP address for everyone around the world. Modem/router gives IP addresses to devices that are connected to them as well & known as local IP addresses.

How does it do it? DHCP(Dynamic Host Control Protocol) has also some rules and regulations. We'll cover it later.

The modem assigns an IP address using the DHCP protocol. If you request google.com, google sees this global IP address. If devices 1,2,3 and 4 any of them request google.com to get the global IP address that is connected to these devices & when a request comes back from google.com, Your Internet Service Provider(ISP) sends a request to google.com it will return the request. Now router/modem will decide who was the one who had the request(It does that by using NAT(Network Transfer Protocol). It is like - Hey, Device 1 has opened google chrome and is requesting google.com. Modem and router be like - Ok, Device 1 made the request, but which application in Device 1 made that request, how do we figure out that?

For e.g - you chat to someone in a game that is installed on your computer, and You send the request to the Internet, and the Internet gives back the message to your friend, Now your router is like - Ok, I know it needs to send to Abhii device. But how do I know where I need to send this message? So IP address is very important. IP address decides which device to send the data to, But how do we decide which application to send the data to that device? So here 'PORT' comes into the picture, Because one single computer can be running many internet applications. When the internet sends the data to the computer, Computer has to decide, 'ok, I got the data but which application requested the data, Your computer has the same IP address, but how the application in your computer differs using port numbers?

So if you talking to your friend using some application/chat application like WhatsApp etc, you will have an IP address. IP address determines where your computer is located & port number determines which application you using or requesting data.

IP --> Identifies Computer, PORT --> Identifies application


Port Numbers -

Port Number

Ports are 16-bit numbers. A 16-bit integer can store 216 (or 65,535) distinct values. Web pages using HTTP protocols.

If you browse on the web 'google.com', A request is sent to Google. If Google sends the request back. Now the request is on your device, but it does not know where to send it. For that port is defined. So all the HTTP stuff you do will happen on port 80. It is defined by the people.

HTTP --------> 80

Ports from 0 - 1023, are reserved ports.

Reserved ports? This means if you created an application & then & you be like, hey I will host my application on port 80. You can't do that. It is already reserved for the HTTP stuff. Port Numbers from 1024-49152 are also registered, But they are registered for some applications like MongoDB, MySQL etc.

SQL = 1433 Port Number

And the remaining ports you can use them.

How do we measure the speed?

1mbps(megabits per second)

1 kbps = 1000 bits/sec

1 Mbps = 1000000 bits/sec

1 gbps = 109 bits/sec

You send the data from your computer over the Internet is called UPLOAD.

You Downloading the data from the internet is called DOWNLOAD.

How does Communication happen with Computers?

There are two ways by which communication happens between two computers

  1. Guided Way

  2. Unguided Way

Guided Way - This means there's a set of paths that are already defined. for e.g - Two computers connected through a wire.

Unguided Way - Communication happens but there's no single path. for e.g - Wifi, Bluetooth.


Submarine Cables Map (Optical Fibre Cables) -

When I am talking to someone else from the UK. I send the request to ISP & ISP sends the request to the UK, Then the UK gives it back, How are our countries connected?

There's a website over the Internet where you can see the map of the world connected to the wires Click Here To See

Submarine cables worldmap

Wires running under the ocean. The cables are heavily guarded under the ocean. So no animal, fish, etc can cut/destroy the wires.

Physically computers are connected through Optical fiber cables, coaxial cables, etc.

Wirelessly we connected through the Wifi, 3G, 4G (LTE), 5G, etc.

Why we don't use satellites why do we put cables under the ocean? Because cables are faster than Satellites.


LAN, MAN, WAN -

LAN(Local Area Network) Computers are connected under specific areas like 100 meters to 1000 meters. Computers connected via TCP/IP, Ethernet, Wifi, etc.

MAN(Metropolitan Area Network) - This means computers are connected across the city. A MAN is larger than a (LAN) but smaller than (WAN).

WAN(Wide Area Network) - Connected across the country via Optical fiber cables. The Internet is a collection of all things, A lot of LANs are connected using MAN & MAN is connected using the WAN.

--

SONET(Synchronous optical networking) - It carries the data using Optical fiber cables. So it covers a larger distance.

Frame Relay - It's a way to connect the LAN to the WAN. Frame Relay is a standardized wide area network (WAN).


Modem/Router -

Modem - It is used to convert the digital signal into an analog signal and vice versa. For e.g - The digital data you have in your computer Modem will convert it into an electrical signal. So that you can transfer it over like a telephone line or other modems at receiving side & that will receive the digital data like image etc.

Router - It is a device that routes the data packet based on the IP address. A router is a device that connects two or more computer networks within the same network.

ISP provides access to the internet. ISP is connected to the larger ISP. There are only a few top-level ISP, They are also known as Tier 1 ISP. In India TATA is the Tier 1 ISP and Tier 2 ISP is Airtel, Jio etc.


TOPOLOGIES (BUS, RING, STAR, TREE, MESH) -

BUS TOPOLOGY - In a bus topology, if the user wants to share the information with the last node, then the information will have to be passed through all the nodes between the sender and receiving node. An example of the Bus topology is the Ethernet Connection

Drawbacks - if the cable is damaged then the entire network will fail. Everything is transmitted by the cable, Only 1 person at a time can send the data.

RING TOPOLOGY - Devices connected in a ring. Every system can communicate with each other.

Difference Between Star and Ring Topology (with Comparison Chart) - Circuit  Globe

Drawbacks - Unnecessary calls are being used. If we have to go from Device 1 to Device 4, then we have to go through 2 and 3 also. If one of the cables is broken then you won't be able to transfer the data.

STAR TOPOLOGY - there's one controlling(Centralized) device that is connected to all the devices. If Computer 1 wants to send something to 4, Then it just communicates with a Centralized device.

Drawbacks - If the Centralized device fails then your network will go down. Highly depending on the Centralized device.

TREE TOPOLOGY - It is a combination of the Star and Bus Topology. In computer networking, tree topology is a type of network topology that resembles a tree.

MESH TOPOLOGY - Every single Computer is connected to every single Computer. Mesh topology is a type of network topology in which all devices in the network are interconnected. In a mesh topology, data can be transmitted by routing (sent the shortest distance) and flooding (sent to all devices).

Full Mesh Topology

Drawbacks - It is expensive because too many wires are used. Scalability issue(If you want to add one more computer then)


Structure Of The Network (OSI Model) -

osi-model-headers

This is the Internet.

Application layer - From which you interact e.g. - WhatsApp inbox


Congratulations !!! You reached the END ๐ŸŽŠ

Snl Cheers GIF - Snl Cheers Cheers To Me GIFs


Conclusion -

These are the basic things about Computer Networking. Here we discuss the basic things like - How the Internet started? , Protocols(TCP/IP), Why we need Protocols and Client-server architecture. , How does data transfer over the Internet?, Port numbers Then we discussed Cables that are under the Ocean after then LAN, MAN, WAN then Modem/Router and then various Toplogies and at Last structure of the Network.

Did you find this article valuable?

Support Abhishek by becoming a sponsor. Any amount is appreciated!

ย