DEV Community

Cover image for Why your data is not secure in public WIFI?-The OSI Model
Ishan Mishra
Ishan Mishra

Posted on

Why your data is not secure in public WIFI?-The OSI Model

Backend Essentials-1 [The OSI Model]

1. Overview

This article gives basic information of the OSI(Open Systems Interconnection) Model. OSI model is conceptual framework used to describe the functions of a networking system, it consists of 7 layers. It was published in 1984 and is still used today as a means to describe Network Architecture.

2. The 7 Layers of OSI Model

To understand the layers of OSI model lets take an example of sending a simple get request to the server.

Layer-7 Application:

This layer contains bunch of strings like header, cookies..., prepared by the network application. It also receives stuff for application to process and display.

Layer-6 Presentation

Alt Text

If using HTTPS, this layer encrypts/decrypts the above data.

Layer-5 Session

Alt Text

Controls connection between different computers. Like for HTTP we require a TCP connection. Assigns a tag which is send with the data.

Layer-4 Transport

Alt Text

On receiving the data from above layers, this layer performs segmentation, i.e. breaks the data into smaller units attaches the target and source port(mostly auto generated by application). It also implements error control.

Layer-3 Network

Alt Text

This layer handles the transmission of data. It doesnot checks for any error, its job is to just send the data to destination IP address.

Layer-2 Data Link

Alt Text

This layers performs node-to-node transmission. It devides data into frames and attaches the MAC address to the frames. It also performs error correction.

Layer-1 Physical

Alt Text

This layer contains information in the form of "bits" and transmits individual bits from one node to another in from of electrical/light/wifi... signals.

Now at receivers end data is processed from Layer-1 to Layer-7.

3. Why Public WIFI is Unsafe?

Alt Text

Frames sent by the client connected to WIFI network goes to every user connected to that network, network card rejects the frames which are not meant to be received by it, but a hacker can design an application to receive all the frames which are coming and if the data is not encrypted(site is not having HTTPS connection for example) the hacker can read all the data. This method is known as "network sniffing".

4. Conclusion

This was an overview of The OSI model in software engineering perspective.

[1]: The OSI Model-Explained by Example[Hussein Nasser]

[2]: Layers of OSI Model

[3]: What is the OSI Model?

Discussion (0)