Networking: A Basic Talk

Prakhar gupta
The Techie Trio
Published in
8 min readMay 29, 2020

This Article is Contributed and Reviewed by Akanksha Verma, Ishan Rawat, and Prakhar Gupta.

Ever admired how your beloved laptop manages to serve you with your favorite websites or how it happens to send messages to your prof or that very-special-person (as the case may be😛).

Well, dear, this happens through many computers interacting with each other giving birth to a separate branch of computer science popular on Earth as ‘Computer Networking’.

We won’t be going straight into this field, but now, it’s more than enough for you to know what a computer network is.

A computer network comprises many computers, routers, modems, and other devices connected to share and receive data and information.

Such networks are found everywhere in homes, offices, and every place where there is human reach.

Why should I bother?

Yeah! That’s a good question.

Here comes the most crucial part: The impact a network has in your life.

Let us list a few places impossible to imagine without a network.

  • Resource Sharing
  • Gaming
  • Data Sharing
  • Client and Server Model
  • Cost-efficient and so on

Hmm….now it makes some sense to study this field😁.

But, for clarification, let us declare (in full consciousness and under no pressure) that this article is only for giving you an insight into networking and some of its ubiquitous aspects.

Let’s Start!

The most basic need for networking is to communicate, and for that, a language is a must. For that, we introduce you to the first term- a protocol. But, sadly(read luckily) in a generic network, a single protocol doesn’t make things happen.

So, can I never understand this world of weirdos without some decent research?

Don’t worry. We got your back!😎

Refer to a network model to understand any networking process in the world.

DISCLAIMER- The following lines may look boring to a completely normal Homosapien.

A model is a general outline of the whole process. It serves as a common explanation for several typical examples. The best thing about a model is that it simplifies the working of the whole process without you having to bother about any specific detail to learn beforehand.

There are two very famous models in the market: the OSI model and the TCP/IP model. Both the models are lovely, and there’s no point saying which would be the better.

  • The OSI model is theoretically beautiful and is a generic model applying to every single networking process.
  • The TCP/IP model is relatively new and quite practical.

Anyways, going a bit out of the topic, we suppose you as a person who landed on this page (by mistake? Seriously not!) in an attempt to satisfy your curiosity about how possibly the internet works.

Taking this as our hypothesis, we will follow the TCP/IP model in our article.

Anyways, returning to our topic, this model has a layered structure where every possible component of the network gets its place in one or the other layer. Also, an exciting aspect of these layers is that each layer interacts with the layer above and below it and is independent of the rest!

So, those layers are:

  1. Application
  2. Transport
  3. Network
  4. Data Link
  5. Physical

Enough talks about things in the air, we need to get a hold on some real-life things, man!

So, with that in mind, let’s move on!

Please note that the disclaimer may still hold.

Physical Components of Network

Okay, to cut the ribbon, we can think of a network as a connection of your device to other devices and services.

So, this connection has got three essential elements.

Number One

The dreaded places where we beings get access points to communicate in such a fashion a.k.a endpoints,

for example- computers, laptops, printers, our mobile phones, etc.

Number Two

Now you need something to make the connection between these endpoints happen.

Here at your service come, wired(using cables) and wireless technologies.

Number Three

Now all you need is to join Number One and Two.

This task gets accomplished with the help of connectors.

Hubs and switches connect devices on a network while, on the other hand, routers connect different networks.

Whenever you share data via a hub, it gets sent to every connected device. In contrast, the mighty switch is intelligent enough to only share data by identifying the IP address of the intended device.

And lastly, our routers are excellent matchmakers; they connect different networks and bind them in a relationship💙.

We go through a diagram (only a diagram since this topic looks a bit boring to us) which is about the physical structure of a network i.e network topology.

Network Topology(structure of network):

Just to summarize, we are done with the physical set up of networks!

Now, we come to the exciting part-THE INSIDE STORY.

Hopefully, the disclaimer’s reign ends here.

Internet

We start off our inside story with the best example of a wide area network(interpret the meaning of this term yourself :P): THE INTERNET.

It is a global wide area network(see the embedded definition if you still don’t get the word) that connects computer systems across the whole world (well, that’s huge). This is the place where our article is living!

Okay, so if this is a network, shall we identify each endpoint by a name? Umm….such a herculean task can be done only by some few gifted people.

The rest of us normal humans prefer to use something called the IP address to refer to any endpoint.

It is a unique identifier assigned to every device on the internet.

Its different kinds are Ipv4(like 170.10.250.7) and Ipv6(like 2007:0ab7:82b1:0000:0000:8a1d:0210:7843) which are 32 and 128 bits in size.

Two essential things to be noted here are the client-server meaning.

The client is simply the one who receives the service provided by Server, which is simply the one providing the service that could range from processing, storage to hosting.

Great! Now we can ask from a server to send us the data we need! (Are you a client, by the way? Yes!)

That transfer takes place in the form of cute little packets of information traveling from the source IP address to the destination IP address.

The router gives the route to go.

And what are routers! Ah, they are simple machines that pave paths to the packets to reach their destination, starting from the source. There may be a no. of routers involved in this task.

You may say that the journey has ended here(but that’s a hoax!).

Now, we can send data, isn’t that enough? But what if two applications want to play data-data at the same time with two different servers?

Their packets may get jumbled up, and that’s a big cheat to them.

The player port helps us here.

A port helps to differentiate between each service/program on a device in a network by assigning a port number to each.

Now, your packets know their respective applications to go!

Just a shot of random information that all this addressing stuff to make packets go comes under the Internet Protocol, a.k.a. IP. (Oops, you didn’t ask for the full form of that IP address before!)🤓

Network Socket

A Socket sets communication between two applications that run on the same machine or different machines. They allow processes to communicate with each other ​using a file descriptor (it is a number that uniquely identifies an open file in an operating system) and finds its uses in server-client applications allowing ​communication between multiple applications.

To be more precise the start of the conversation is marked by opening a socket (the gate for the flow of information) whose address is the combined

IP address + port number.[A has both the source’s and destination’s full address inside it]

Cool fact- There exists a topic called socket programming which is damn interesting. (Sounds good, go for it!)

After all this technical description(Wait, was it that technical?), let us look at the processing part.

Suppose we want to request a webpage. What we do is enter the URL of the webpage and get it.

Pretty simple, huh?

But wait, aren’t webpages recognized by their IPs addresses?

Well, yes.

So, for this, the browser goes to a DNS server (domain name server), which (magically) tells the IP address corresponding to the URL.

Got it! Now, there’s nothing stopping me on Earth to get that webpage!

Apologies, but the story doesn’t end here.

The TCP protocol

Once we are done with getting the destination IP address to get the packets, we need to open a socket to start the conversation!

Here we open a TCP port, which is named so due to the protocol it follows, i.e., TCP protocol.

But what’s that special about this protocol to name a port for it?

It is that through the TCP protocol, all the information reaches its destination even if some packets are lost or sent in the wrong order.

Okay, let’s start then!

First, the connection gets established with the occurrence of the TCP handshake 🤝 WOAH!

In simple words, this is what the handshake is: the client sends a ‘synchronize’ signal [SYN], the server responds with an ‘acknowledge-synchronize’ signal [ACK-SYN], and finally, the client responds with the ‘acknowledge’ [ACK] signal completing the handshake! [a.k.a. SYN, ACK-SYN, ACK ]

The need for this handshake is to check the connection so that further proceedings take place without any discomfort.

Next what? Tons and tons of packets are sent (our primary aim!).

But when will that extraordinary power get unleashed of whose triumphs were sung? Okay then, have it. When you get TCP data, you acknowledge it, and if the server doesn’t get acknowledgment for a packet, it will again be sent.

Quite clever.

Got the packets, done with TCP. Pretty simple, huh?

Now what, a request to the server and the whole internet at your fingertips (FINALLY!).

Sending a Request

Maybe, you may have never recognized it when you open a webpage after all that setting-up shit; you use the HTTP protocol to do so (HTTPS in some cases).

WHAT, again, a protocol!

Hold on, young lad, this time it’s pretty simple :)

HTTP is a simple plain text protocol. All it does is ask for the web page (in simple English) with something called headers and get a response in something again called headers.

It looks like we have won this battle!

Umm….yes, but no. Because remember, “Only the dead have seen the end of the war.😛”

--

--