![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJO2JnDY5_PmYVP1ZyiWHTbAiosEFwrHPJJ8mjGOut1cEHAjh6gN-yxkjCuI2r2w3GpVikB2abF-sl7QIXnHFok4CGWyxGqAQE59O9HSHXp_Jv5kghdMZgmdbwK5IpfHgp3NZakOBoQ2E/s400/OSI-Communica.gif)
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.