For a computer to communicate with another computer, various processes must occur to make the communication possible.
There are two official models we use to describe how computers actually communicate with each other. They are:
- The OSI Model
- The TCP/IP Model
The OSI Model
The OSI Model stands for the Open Systems Interconnect model. It is one of two models that describe how computers should communicate with each other. The model was first developed in 1977 by a Dutchman named Alex van den Heuvel and later refined by a committee. Since then, the OSI model has been adopted by many major telecommunications companies.
The OSI model comprises 7 layers that describe the flow of data between computers over a network:
- Application Layer
- Presentation Layer
- Session Layer
- Transport Layer
- Network Layer
- Data-Link Layer
- Physical Layer
These layers describe the process that happens before data is sent over a network. However, on the receiving end, data that is received also goes through the 7 layers of the OSI model, but this happens in reverse.
TCP/IP Model/Protocol
TCP stands for Transmission Control Protocol. This protocol was first designed in the 1970s by two DARPA scientists—Vinton Cerf and Bob Kahn. This protocol shares very similar ideologies with the OSI Model, but it has its differences. This protocol has its own layers considered to be most important. The TCP/IP protocol layers are:
- Application Layer
- Transport Layer
- Internet Layer
- Network Access Layer
Unlike the OSI model, the TCP/IP protocol considers the “Presentation” and “Session” layers of the OSI model to become only the Application layer. They combine them to form one major layer. The same goes for the “Data Link” and “Physical” layers, which are combined into one layer called the Network Access layer.
Although the TCP/IP protocol has been adopted by all telecoms and all networking-related companies, we as IT professionals still prefer to use the OSI model even though it has been superseded by the TCP/IP protocol.
How Computers Actually Communicate
Based on the two communication models we’ve discussed, we can understand how computers communicate with each other.
Using the OSI Model Layers, we’ll see how computers communicate.
The Application Layer
If you want to visit a website from your device, you’ll need to open your browser to search for the name of the website. This layer deals with the application or program being used to communicate on a network. Another example may be that you want to remotely access a server somewhere. A program that’s best for that would be OpenSSH.
The Presentation Layer
At this layer, what you have typed in your browser after pressing search is taken to the presentation layer. This layer takes your search term and places it in the right format (e.g., HTML), which can be read by the server you’ll be trying to communicate with. This layer, in some cases, encrypts your data using SSL so that it can’t be opened by cyber criminals.
The Session Layer
This layer makes sure that our communication with the server keeps going.
The Transport Layer
Consider this thought: you want to send over a package to another country or city. Which shipping method will you use to send that package? This is the same idea when it comes to the transport layer. There are only two modes of transport in computers: TCP and UDP. Both of them are very important and have their own situations where either or both of them can be used. We will go more in-depth in another post, but just know that there are only two modes of transport. TCP or UDP is used based on the type of data you’ve requested. TCP is much more reliable and is usually used when sending over files, downloading, or even loading up a website. UDP is not reliable and is typically used when streaming videos or making phone calls.
TCP always waits for an acknowledgement from the receiver; if not, then it resend the data, hence its reliability. UDP, on the other hand, just keeps sending the data. These will be further explained in another post.
The Network Layer
The Network Layer: At this layer, the data is now called a packet. This is where the source and destination IP addresses are added to your data or, in our scenario, your search query. Every device that connects to the internet has an IP address. This is usually handled by powerful devices called routers.
The Data Link Layer
The Data Link Layer: At this layer, port numbers are added to our packet from the network layer. Based on our scenario, when accessing a web server, you’ll either be using port 443 or port 80. Port 443 is for HTTPS communication, and port 80 is for HTTP communication. Also, MAC addresses are associated with network interface cards (NICs) and are used by devices like switches to forward data. These devices are called switches.
Physical Layer
This determines the physical medium through which our data is transferred (e.g., Ethernet cables, Fiber Optics, or Electromagnetic waves).
Conclusion
That’s it. This process also happens on the receiving end of the web server. All this happens in milliseconds, which is really fast.
There are very complicated parts to this topic, but essentially, this is how computers actually communicate on the internet on a local network.