What is the OSI model? Example in real life

OSI Model TCP IP

Open system interconnection (OSI) is a model that describes how systems communicate with each other. OSI model divides network communication into seven layers, each of which perform a specific function and communicate to the adjacent layer.

Does modern internet communicate based on OSI model?

Answer is no, it follows a much simpler TCP IP model with 4 layers.

Fig 1: OSI Model vs TCP/IP Model

Why does the OSI model matter?

OSI model is very useful for network troubleshooting by identifying which network layer is causing an issue and focusing effort on that layer.

It’s also helping device manufacturers and networking software vendors to define the scope of their products; in which part of the network their product should work with. For example, if you choose AWS network load balancer (NLB) then it’s work at the layer. 4 on the other hand, if we choose AWS application load balancer (ALB) it works on the layer 7.

What is a protocol? How does it relate to OSI model?

In networking, protocol is a set of rules how data transmits between different devices. It allows connected devices to communicate, irrespective of any differences in internal processes. There are several protocols, but each is responsible for one of the following primary functions:

  • Communications
  • Security
  • Network management

In OSI model protocol connect layers. Data exchange at certain layer, always moves through lower layers at both sending and receiving end. The tasks that each layer performs is formalized by that layer’s protocol.

OSI model seven-layer Communication – Real life Scenario

Let’s take an example where Mr. John sends a file using a file sharing application to Mr. Phillip over ftp.

For Mr. John data flows from top application layer to bottom physical layer. For Mr. Philip process will be reverse. Data movement will be from bottom to top.

Fig 2: OSI Model data Communication (Click to enlarge)
  • Mr. John open the file sharing applications. Select the file and click upload button. File sharing application will pass the file to the application layer, which will then pick a protocol FTP and pass the data along to the presentation layer.
  • The presentation layer will then compress and encrypt (If connection is encrypted between sender and receiver) the file data and will move on to session layer.
  • Session layer will initialize the communication session. The data will hit senders’ transportation layer. This layer helps to synchronize data transfer with checkpoints. If there is disconnection during file upload, session will resume from last checkpoint to upload remaining part in-stead of new upload.
  • At Transport layer data will be segmented into smaller units. This also assigns sequence numbers and ports and manages flow control and error recovery for inter network communication.
  • Segments will further break into smaller packets at the network layer. If the two devices/system communicating are on the same network, then the network layer is not applicable.
  • Data link layer will further breakdown network packets into frames and deliver those to Physical layer. This facilitates data transfer between two devices on the same network.
  • Physical layer will convert the data into bits stream of zeros and one and send it through physical medium like cables.

Once Mr. Phillips mobile receives the bitstream through the physical medium such as Wi-Fi data will flow from the bottom layer to the top layer in a reverse order. And finally, Mr. Philip will receive the file in the file sharing application.

Takeaway 💡

Now we know all the seven layers in OSI model and how those functions, can you identify at which layers the DDoS attack can happen.

Leave a Reply

Your email address will not be published. Required fields are marked *