The OSI model is the universally adopted reference model for networking. Networking is essentially the communication between electronic devices governed by certain protocols. All the layers in the model are imaginary or abstract and they depict the functions carried out by the system grouped at a particular level of abstraction. The OSI model is made of 7 layers as follows
The Physical layer is the bottom layer in the protocol stack and it governs the physical and electrical characteristics of the devices and the medium of communication. Modulation, line coding and the medium characteristics are some of the functions performed by this layer.
The Datalink layer is second layer above the Physical layer which is responsible for hop-to-hop or node-to-node delivery. Medium access, flow control and error control are performed by this layer.
The Network layer above the Datalink layer is responsible for addressing and and routing mechanisms. IP is the most popular protocol used in this layer.
The Transport layer provides end-to-end delivery between the source and destination. It also performs error control, flow control and congestion control besides segmentation and reassembly.
The Session layer establishment,management and termination of the dialogue/connection between two parties.
The Presentation layer decides the presentation of information and performs encryption and decryption.
The topmost layer is the Application layer which acts as the user interface to provide services to the user.