The Open System Interconnection (OSI) model classifies the networking framework for protocols. The classification is defined in seven (7) layers that are distinct from one another, but following a hierarchy that makes up internet traffic.
Application
(Layer 7)
This layer supports application and end-user processes. The application layer is the one that is used by network applications. These programs are what actually implement the functions performed by users to accomplish various tasks over the network. Tiered application architectures are part of this layer.
Presentation (Layer 6)
Layer 6 presents the data where data sent from one system needs to be viewed in a different way by the other system. It also takes care of any special processing that must be done to data from the time an application tries to send it until the time it is sent over the network such as translation, compression or encryption. It is sometimes called the syntax layer.
Session
(Layer 5)
This layer establishes, manages and terminates sessions. The layer sets up, coordinates, and terminates conversations, exchanges, and dialogues between the applications at each end. It deals with session and connection coordination.
Transport
(Layer 4)
The transport layer acts as a liaison between the higher layers and the concrete functions of the lower layers. It ensures complete data transfer. This layer provides transparent transfer of data between end systems, or hosts, and is responsible for end-to-end error recovery and flow control.
Network
(Layer 3)
The network layer defines how interconnected networks function.
This layer provides switching and routing technologies, creating logical paths, known as virtual circuits, for transmitting data from node to node.
Data Link
(Layer 2)
At this layer, data packets are encoded and decoded into bits. The data link layer, also sometimes just called the link layer, is where many wired and wireless local area networking (LAN) technologies primarily function. It furnishes transmission protocol knowledge and management and handles errors in the physical layer, flow control and frame synchronization. The data link layer is divided into two sub layers: The Media Access Control (MAC) layer and the Logical Link Control (LLC) layer.
Physical
(Layer 1)
The physical layer is special compared to the other layers of the model, because it is the only one where data is physically moved across the network interface. All of the other layers perform useful functions to create messages to be sent, but they must all be transmitted down the protocol stack to the physical layer, where they are actually sent out over the network.