DEV Community

Cover image for Internet - A Basic Overview
Ankith Deegoju
Ankith Deegoju

Posted on • Edited on

Internet - A Basic Overview

What is a network?

In the context of Internet, network can be a group of devices which are connected with each other.

What do you mean by inter? That is among the devices. The network which is among all the devices can be roughly termed as Internet. Okay, extending this definition, Internet can be called as a network of networks which is providing capability to connect with everyone around the world.

We have another term called Intranet. Internet has two terms, intra and net. Net again here refers to network. Intra means within a group or which is limited to a small area or within people. For example, a network which is within a campus or within an institution or within an office can be termed as an intranet.

These are just fun to have definitions and are not completely correct.

If we deep dive into the technical aspect of Internet, especially for CS grads or engineers, we can think of Internet as a hybrid distributed system. I'll explain you why.

Hybrid in the sense it's not completely centralized/controlled by a central authority, neither is it completely decentralized.

Distributed. Why is it distributed? Because Internet is not operating from a single central server or something like that. It is controlled by many individual organizations which are distributed across the world.

Firstly to understand Internet better, I think we should answer the question, how and why did we build it? Let's go into the background of how Internet was in the first place.

Background-

Internet was a project started by DARPA . DARPA stands for Defense Advanced Research Project Agency started during the Cold War ensuring development in terms of technologies by USA as a consequence of the launch of Sputnik 1 by Russia. [This is not the exact history, a rough idea is assumed for simplicity]

Initially, an organization called ARPA, Advanced Research Project Agency, has developed a network called as ARPANET.

Why was this developed? This was developed to provide/enable communication systems for universities, research organizations, defense forces.

United States Defense Agency has funded the project and it has eventually evolved into Internet. We will understand what were the requirements of the network which they wanted to develop. The requirements were simple.

Decentralization - There should be no single point of control over the communication architecture.

Interoperability - Any device should be capable to operate/connect within the network. There should be no constraint of devices or hardware, something like that.

Survivability - In case of any failure within the network or a small component within the network has been compromised or failed, the network should survive/it should work.

Scalability - The network should be scalable. It should scale to many, many number of devices.

We have developed entire architecture based on the mechanisms that met our requirements.

Architecture

Initially an architecture to implement the Internet was OSI model. We can read about it, but it's a theoretical model which was presented. Now we will deep dive into practical model, TCP/IP model which is used by us right now.

TCP|IP model follows a layered approach in which we have allocated specific functionalities associated with each layer so that we can ensure the functionality of the internet to be more robust.

Each layer is beautifully designed/made up so that it deals only with a particular component of the infrastructure. Each layer is agnostic of the above layer i.e. considers entire above layer data as payload.

Application layer is used to enable communication between applications/software which are built into the devices. Some of the protocols which application layer uses are HTTP, SMTP. HTTP is generally used by web applications, SMTP itโ€™s used for mailing services.

Transport layer is used for process-to-process communication, it's mostly handled by operating system, and there are two main protocols within transport layer which the processes use to communicate, TCP and UDP. TCP stands for Transport Control Protocol, UDP stands for User Datagram Protocol.

The next layer which we have is network layer. It is also known as, IP layer as IP [ Internet Protocol ] protocol is and it deals with the routing of information between two devices within the network. It's the protocol which is used by all the data packets within the network. It is implemented by OS and partially by routers.

IP is not a single protocol, it's a protocol suite. It is sued to provision each device within the network a unique IP address to identify the device in the network.

We use IP addresses to navigate the device in Internet, but data is transferred form one device to another using MAC address of the device.

MAC layer is used to communicate with the very next device/ hop-to-hop delivery [ I will explain this part in later section ] within a network or within a network among switches, bridges to reach. This layer involves used by intermediate hardware devices for forwarding data packets. There are many protocols within MAC layer, such as we have CSMA-CA for wireless transfer of data, other protocols such as FDM, TDM, token passing protocols etc. We need to understand MAC a bit in a different sense. This is useful for communication between hardware devices within a network/intranet. This layer functionality is implemented by NIC [ Network Interface Card ] within the device.

Physical layer, it deals with modulation, demodulation, converting the data into electrical signals or waves. In physical layer, we have wires, fiber optics, etc.

If you observe we have divided our architecture into these layers based on the specific functionality associated with each layer. Each layer is very much different from one another. This gives us modularity / feel of loose-coupling where components and functionality of a layer are neither constrained nor are attached together with other layers. Even if there is an issue with one part of the system, you can just get into that layer and fix the issues at that layer without interrupting the entire system.

Each layer works with the help of protocols of the layer. What are protocols? Protocols can be considered as a system of rules which are followed by devices to enable communication between them.

We have HTTP, an application layer protocol to transfer HTML files or images, text, everything else among applications. We have TCP protocol to communicate with the other process running on the other device and many more.

Working part -

Letโ€™s see how the system works from end to end? We'll explain using a small diagram. You can get a better idea/feel of what these layers are and how are they communicating with one another.

An illustration of how data is transferred from one layer to another in the Internet architecture

Few important concpets to understand the diagrams below -

How IP's are allocated to a system within a network.
Whenever your device is connected to WIFI | LAN it will be dynamically allocated a IP address via ARP | DHCP by a router. [Try to learn about subnetting and Classless Interdoamin Routing [CIDR].]

Port - Number associated with a process assigned by OS to uniquely identify the process among other running processes.

Whever a router receives a MAC packet from a device it processes the IP address within it, perform pattern matching with all routes available in its routing table and chooses the closest route matched to the dest IP of the packet and forwards it to the device in the matched route by attaching its own MAC header.This process is called hop - hop delivery.

I have run a experiment where I have used one of the systems within my college LAN that behaves as an client and other system behaves as an server.

Excalidraw Whiteboard

Excalidraw is a virtual collaborative whiteboard tool that lets you easily sketch diagrams that have a hand-drawn feel to them.

favicon excalidraw.com

Device - A Server - Acting as a Server - Campus Wifi connected Laptop
IP Address - 172.24.135.46 [ Assigned by Router to my device]

Device - B Client - LAN Connected System
IP Address - 10.9.68.25 [Private IP]

Here we did not use any application layer protocol like HTTP, SMTP as we configured our own simple format to communicate with each other using simple commands.

TCP Layer uses ports and configures socket connection at both ends using socket data structure formed by src port, src IP address, dest port, dest IP address.

Conclusion-

Internet is a system involving entire ecosystem of multiple devices and multiple applications within it. It's not a single thing or a single entity. That is the major idea what I wanted to drive or derive out of this blog/video.

Top comments (0)