The OSI Model


The Open Systems Interconnection (OSI) model consists 7 layers which computers use to communicate over a network. The modern Internet functions on a simpler model called TCP/IP. However, the OSI model is still widely used to understand and visualize computer networks.

The 7 Layers#


Application Layer#

This layer is used by browsers and email clients to send/receive information. Protocols at this layer include HTTP, FTP, POP, SMTP, DNS.

Presentation Layer#

This layer prepares the data for the application layer. It defines how devices should encode, encrypt and compress data to be received correctly. It also takes any data transmitted by the application layer and prepares it for transmission over the session layer.

Session Layer#

This layer creates communication channels (sessions) and ensures they are open while data is being transferred and closed once done. There can also be checkpoints which are used to resume data transfer in the event of interruption.

Transport Layer#

This layer takes the data transferred in the session layer and breaks it into segments on the transmitting side. It also reassembles the segments on receiving side for use by the session layer.

Transport layer performs flow control to send data at the optimal level which matches the connection speed of the receiving side. It also checks for errors and if present, it requests for re-sending of data.

Network Layer#

The network layer helps to break up segments into network packets and reassembles the packets on receiving side. This layer also helps to route packets by discovering the best path across the physical network. It uses network addresses (IP address) to route packets to a destination node.

Data Link Layer#

This layer establishes and terminates connection between two physically connected nodes on a network.

This layer is composed of Logical Link Control (LLC) which identifies network protocols, performs error checks and synchronizes frames.

It also comprises the Media Access Control (MAC) which uses MAC addresses to connect devices and define permissions to transmit/receive data.

Physical Layer#

This layer is responsible for the physical cable/wireless connection between network nodes. It is responsible for the transmission of raw data in bits and performs bit rate control.