Open Systems Interconnection (OSI) reference model was created by the International Organization for Standardization (ISO) to overcome the problem in older days where computers could typically communicate only with computers from the same manufacturer.
A reference model defines how communications should take place. It defines all the processes required for effective communication and divides these processes into logical groupings called layers. When a communication system is designed in such a way, it is known as layered architecture.
The OSI model was created to allow interoperability across various platforms offered by vendors. The OSI reference model is a hierarchical structure of seven layers that describes how information from an application in one computer moves through a network medium to an application in another computer.
Open System Interconnection (OSI) reference model consists of the following seven layers.
Layer 7 - Application
Layer 6 - Presentation
Layer 5 - Session
Layer 4 - Transport
Layer 3 - Network
Layer 2 - Data link
Layer 1 - Physical
Application Layer:
The application layer is the seventh level of the seven-layer OSI model. The application layer is where users actually communicate to the computer. The Application layer acts as an interface between the users & the actual application program to interact with the application. Telnet, File Transfer Protocol (FTP), Simple Mail Transfer Protocol (SMTP) and Hypertext Transfer Protocol (HTTP) are some of the application layer protocols.
Presentation Layer:
The presentation layer is responsible for data translation and code formatting. The Presentation layer transforms the data to provide a standard interface for the Application layer. This is usually part of an operating system, that converts incoming and outgoing data from one presentation format to another eg. EBCDIC to ASCII conversion.
The Session layer controls the dialogues (sessions) between computers. The Session layer is responsible for setting up, managing, and then tearing down connections between the local and remote application. It provides for either full duplex or half-duplex operation. Session layer basically keeps different applications data separate from other applications data.
The Transport layer is responsible for the transfer of data between end users. This layer provides transparent transfer of data between end users, providing reliable data transfer while relieving the upper layers of it. The transport layer provides flow control, error detection & correction. Flow control manages data transmission between devices so that the transmitting device does not send more data than the receiving device can process. Error detection involves detecting transmission errors & error correction involves retransmitting data in case of transmission failures.
The Network layer prerforms routing functions necessary to transfer data from an originating system to the destination system. The network layer uses the network address for the route selection to transmit the data. The Network layer formats the message into packets and adds a customized header containing the destination and source IP address or network address.
The Data Link layer provides the physical transmission of the data. This layer handles physical addressing, error notification, network topology, and flow control. The Data Link layer formats the message into frame, and adds a customized header containing the destination and source MAC address or hardware address.
The Physical layer defines all electrical and physical specifications for devices. This includes the physical connectors, voltages levels, maximum transmission distances and cable specifications. It sends and receives streams of binary digits across a physical medium such as cable, optical fibre or a radio link.