OSI – Open Systems Interconnection model is a universal language for computer networking. It is based on the concept of splitting up a communication system into seven abstract layers, each one stacked upon the last.

7. Application Layer:

Only layer that directly interacts with data from the user. Software applications like web browsers and email clients rely on the application layer to initiate communications. Applications layer protocols include HTTP as well as SMTP. (This is like an API project that allows for our front end to communicate with db using HTTP requests)

6. Presentation Layer:

Primarily responsible for preparing data so that it can be used by the application layer. Things like translation, encryption and compression of data. 2 devices communicating may use different encoding methods, devices may be communicating over an encrypted connection, and data received may need to be compressed as it may be too large.

5. Session Layer:

Responsible for opening and closing communication between 2 devices. Ensures the session stays open long enough to transfer all the data being exchanged, and then promptly closes the session in order to avoid wasting resources. – Things like RESTful API requests or Websockets.

4. Transport Layer:

Responsible for end-to-end communication between the two devices. This includes taking data from the session layer and breaking it up into chunks called segments before sending it to layer 3. The transport layer on the receiving device is responsible for reassembling the segments into data the session layer can consume. It is also responsible for flow control – determines optimal speed of transmission to ensure that a sender with a fast connection does not overwhelm a receiver with a slow connection. Also error control on the receiving end – ensures data received is complete and requesting a retransmission if it isn’t. – TCP (Transmission Control Protocol) -> The three way handshake (the source sends a SYN initial request packet to the target server, the target server sends a SYN-ACK packet to agree to the process. Lastly, the sources sends an ACK packet to the target to confirm the process after which the message contents can be sent)

3. Network Layer:

Responsible for facilitating data transfer between 2 different networks. If the 2 devices communicating are on the same network, then the network layer is unnecessary. The network layer breaks up segments from the transport layer into smaller units called packets on the sender’s device and reassembling these packets on the receiving device. The network layer also finds the best physical path for the data to reach its destination; this is known as routing.

2. Data Link Layer:

Facilitates data transfer between 2 devices on the same network. Takes packets from the network layer and breaks them into smaller pieces called frames. Like the network layer, the data link layer is also responsible for flow control and error control in intra-network communication.

1. Physical Layer:

This layer includes physical equipment involved in the data transfer, such as cables and switches. This is also the layer where the data get converted into a bit stream, which is a string of 1s and 0s. The physical layer of both devices must also agree on a signal convention so that the 1s can be distinguished from the 0s on both devices.

Example given by cloudflare – https://www.cloudflare.com/learning/ddos/glossary/open-systems-interconnection-model-osi/:

For example: Mr. Cooper wants to send Ms. Palmer an email. Mr. Cooper composes his message in an email application on his laptop and then hits ‘send’. His email application will pass his email message over to the application layer, which will pick a protocol (SMTP) and pass the data along to the presentation layer. The presentation layer will then compress the data and then it will hit the session layer, which will initialize the communication session.

The data will then hit the sender’s transportation layer where it will be segmented, then those segments will be broken up into packets at the network layer, which will be broken down even further into frames at the data link layer. The data link layer will then deliver those frames to the physical layer, which will convert the data into a bitstream of 1s and 0s and send it through a physical medium, such as a cable.

Once Ms. Palmer’s computer receives the bit stream through a physical medium (such as her wifi), the data will flow through the same series of layers on her device, but in the opposite order. First the physical layer will convert the bitstream from 1s and 0s into frames that get passed to the data link layer. The data link layer will then reassemble the frames into packets for the network layer. The network layer will then make segments out of the packets for the transport layer, which will reassemble the segments into one piece of data.

The data will then flow into the receiver’s session layer, which will pass the data along to the presentation layer and then end the communication session. The presentation layer will then remove the compression and pass the raw data up to the application layer. The application layer will then feed the human-readable data along to Ms. Palmer’s email software, which will allow her to read Mr. Cooper’s email on her laptop screen.

Leave a Reply