DEV Community

Cover image for Building networks from A to Z - Part 1 : the basics
Nicolas Kirchhoffer
Nicolas Kirchhoffer

Posted on • Edited on

Building networks from A to Z - Part 1 : the basics

Welcome to my first series about networks !

From my experience as a Network technician, I know for a fact that some developers lack competence in networking and can sometimes be stuck on those aspects.

I would like to do a complete review of all the networking knowledge I have acquired and I will try to guide you through those notions with illustrations and schemes !

Firstly, I will present to you the several architecture concepts that we use in networks and how this works, then, we will browse each layer one by one and speak about the technologies used !

Introductory speech about networks

What exactly is a network ? How does it work ? Why was it built that way ? What is the Internet ?

Basically, in Computer Science, a network is a group of computers that communicate with each other. A network is managed and configured by a Network administrator, and besides of being composed from computers, most of the time, if you want more than 2 computers communicating, this network will have several network devices that we will talk about later.

Nota bene : When the notion of network was created, the IoT really wasn't even a thing, so when I speak about "computers", really I am talking about all kinds of devices that have a Network connectivity.

A basic network

A basic network composed of a switch and 4 PCs

The Internet is actually an aggregator network. It is not much than all the networks on the world connected together. Internet Service Providers (ISPs) are the ones that connect the networks together. If you have an Internet connection in your house, then it is a whole separated network, that would perfectly work on its own, except that most of websites aren't hosted in your house, so you have to go explore the world !

The Internet is often described as "the network of networks", it has been founded in 1969 to make its predecessor, ARPAnet, accessible to universities and laboratories in the US first, then around the world.

But before travelling on the Internet, let's return to your homes and discover concepts on their basic level !

Introducing the OSI model

How to talk about networks if we don't talk about the OSI model ?

The OSI model has been created to standardize all communications in the IT world. It is composed of 7 layers that each has a well-determined role to play in the delivery of data.

Starting from the bottom, we have :

  • Layer 1 : Physical

The cables, connectors, everything that is used to physically connect devices together.

  • Layer 2 : Data link

Used to address devices on a local scope, we give physical devices an address to know how to talk to them.

  • Layer 3 : Network

This layer is used to address devices as network entities. The address is built so that every segment of it redirects us to a specific part of the network. This is the Internet Protocol (IP) layer, on which we will be talking a lot on another article.

  • Layer 4 : Transport

Used to encapsulate data from program to program. This layer is primarily used to locate source/destination inside of a communicating device.

  • Layer 5 : Session

Session layer will be holding informations on hosts, its role is to enable the communication between hosts. It is also called "Inter-host communication".

  • Layer 6 : Presentation

This is used to format data in particular ways. It is, for example, at this layer that SSL/TLS (for communication ciphering) intervenes.

  • Layer 7 : Application

The most abstract layer, the one on which the data is displayed to the end-user, and the interaction is enabled. Most common application protocols are HTTP (the web), FTP (for file sharing between hosts) or DNS (for domain name resolution).

Don't be afraid of it ! It is a purely theoretical representation. It only helps developers of the protocols to know their environment, where it happens and for what it is used.

For more convenient understanding, and also to have a more "field" approach, we will mainly be using the TCP/IP model, which is easier.

The TCP/IP model is an emerging concept that is used to represent the communications that the Software developers face, or even Sys/Net admins.

As far as this series, we will be discussing layers 1, 2, 3, 4 and 7.

TCP/IP simplifies the OSI model by merging layers 1 and 2 together, and that is TCP/IP layer 1 (called Network access or MAC), then layer 2 which is OSI layer 3, called Internet or also Network. Layer 4 stays the same as TCP/IP layer 3, Transport, and layer 5, 6 and 7 are merged together as Application layer, which is TCP/IP layer 4.

4 layers for TCP/IP that represent the exact same architecture as the OSI model, but not with the same focuses as far as working on it. Usually, the TCP/IP model is the one that talks more to the less "network-technical" people, because we hear a lot about IP and TCP/UDP.

Here is a brief view of what we just talked about :

OSI compared to TCP/IP models

Brief comparison scheme of the two models

Now you have the basic concepts we will be using in the next articles ! As said before, we will be browsing through the layers to understand how networks work and what have been their needs through time. Sit back and relax for some anecdotes and, I hope, a quite complete review of basic networking knowledges.

Stay tuned and don't hesitate to tell me if you didn't get something in this article, or if you think I said something wrong.

You will have all resources used to write these articles at the end of the series, it is easier for me to compile everything once I have finished writing them.

Top comments (2)

Collapse
 
nkirchhoffer profile image
Nicolas Kirchhoffer

As commented on the other parts, sorry for the networks diagrams, forgot that Light theme existed... I will be fixing the designs tomorrow, I am so sorry for that.

Collapse
 
nkirchhoffer profile image
Nicolas Kirchhoffer

I just released part 3 here for those of you who want to continue reading this series !