How computers communicate with each other

StuffOfThings
3 min readMay 14, 2021
How computers communicate with each other

How do computers really communicate with each other?

I’ve always wandered how computers communicate with each other. Ever since the creation of the internet by Tim Berners Lee, a global standard of communication was established, that enabled static content to be served and broadcasted to other devices (for the purpose of this article we will refer to them as devices) that also has access to the internet.

We come back to question of how computers are able to send data to each other. The simple way of understanding this is to think of communication in the same way as trying to speak a language. For instance, the English language contains thousands of words that we use to speak to each other, if we both speak English, we have no problem understanding each other, however if I speak Spanish and the other person I’m communicating with does not speak Spanish, we have a problem!

Protocols were developed and adopted for this very reason, different devices had different architecture, frameworks, operating systems etc… There needed to be some standard that could be followed so that regardless of the device they could all still send data to one another.

Protocols, Protocols and more Protocols

As aforementioned, the process we just described can be inferred to as a protocol. There are thousands of protocols that devices use that are critical for carrying out tasks that can also be recognised by other devices. There are two main protocols; TCP (Transmission communication protocol) and IP (Internet protocol. You probably already heard of both of these, any device connected to the internet is assigned with an IP address, and communicate using TCP.

The TCP is critical for communication, without it, there is no other known communication protocol that is universally adopted for the internet. Of course, its always possible there is some secret technology out there that uses its own unique protocols for communication, but let us know if you find one!

There are two models that can be used to describe how this process works; the OSI model and the TCP model. We will simplify this by using the TCP model.

The TCP Model

Application layer

The application layer is the entry point of the model. This is layer concerned with the higher level protocols; like FTP, PNG, JPEG etc… Once the data has been received by the transport layer, it can be interpreted in a meaningful way by the application. For example if I was awaiting an email to be sent to me, it would be done using the STMP (Simple mail transfer protocol). The application layer also uses the same protocols for sending data as well.

Transport layer

The transport layer is responsible for exactly what the name entails; transporting data. The data received by the transport layer needs to encode this data into a stream of bits (called packets). The packet contains the size, and the address of the source and destination (target machine). The transport layer is needed not just to transport data, but to simplify the encoding process. Many networking technologies are incompatible with each other in terms of encoding (which is why we need protocols!). The Internet Protocol handles all of this.

Internet/Network layer

The internet/network layer is responsible of forwarding the packets to the target destination. This layer mostly forward packets using routing; this can consist of complex algorithms that are designed to forward the packet to its target destination by taking the shortest route.

Network Interface layer

This is where the data that is either being received from another device or data requested to be sent is converted into electrical signals to be transported. The application layer interacts with the transport layer and vice versa. The main purpose of the application layer is to convert data into a format that can be interpreted by the machine (or the target machine).

Phew… That was quite a lot, those are the basics of communication, in the future we will explore communication between devices in more depth.

--

--