The Open Systems Interconnection (OSI) model is a reference model which was developed by the ISO (International Organisation for Standardisation) in 1984, as a conceptual framework of standards for communication in the network across different equipment and applications. It has now been considered the primary architectural model for inter-computing and inter-networking communications.
The OSI model defines the communication process across the network into 7 different layers, dividing the tasks involved with moving information between networked computers into seven smaller and more manageable task groups. Each layer has clear characteristics and functions. Basically, layers 7 through 4 deal with end-to-end communications between data source and destinations, while layers 3 to 1 deal with communications between network devices.
Moreover, the seven layers of the OSI model can be divided into two groups: upper layers (layers 7, 6 & 5) and the lower layers (layers 4, 3, 2, 1). The upper layers of the OSI model deal with application issues and generally are implemented only in software. The highest layer, the application layer r layer 1, is closest to the end user whereas the lower layers of the OSI model handle data transport issues. The lowest layer, the physical layer or layer 7, is closest to the physical network medium and is responsible for placing data on the medium.

The Different Layers of the OSI Model
Application Layer
The application layer or layer 7, works closest to the end user and provides functions such as file transmission, message exchanges, terminal sessions, etc. However, this layer does not include the actual applications, but rather the protocols that support the applications. When an application needs to send data over the network, it will pass the instructions and the data to the protocols that support the application. This layer processes and properly formats the data and further passes the same down to the next layer within the OSI model. Some examples of the protocols working at this layer are the Simple Mail Transfer Protocol (SMTP), Hypertext Transfer Protocol (HTTP), File Transfer Protocol (FTP), Telnet, etc.
Presentation Layer
The presentation layer, layer 6, receives information from the application layer protocols and is not concerned with the meaning of the data but rather the format and puts the it in a format which all computers following the OSI model can understand. It therefore works as a translator, which translates the application into a standard format used for passing messages over a network. This layer also handles data compression and encryption issues by providing the information to the receiving end on how the file was encrypted and/or compressed so that the receiving system knows what software and processes are necessary to decrypt and decompress the file. There are no protocols that work at the presentation layer.
Session Layer
The session layer, layer 5, is responsible for establishing a connection between the two applications, maintaining it during the transfer of data, and controlling the release of this connection. It also provides session restart and recovery and provides the overall maintenance of the session. When the conversation is over, dialog management takes place wherein, the path used for the connection is broken down and all parameters are set back to their original settings. Some protocols that work at this layer are Structured Query Language (SQL), NetBIOS, and remote procedure call (RPC). The session layer protocol supports three different modes:
Simplex Communication takes place in one direction.
Half-duplex Communication takes place in both directions, but only one application can send information at a time.
Full-duplex Communication takes place in both directions, and both applications can send information at the same time.
Transport Layer
The transport layer, Layer 4, provides end-to-end data transport services and establishes the logical connection between two communicating computers. The communication may either be connection-oriented or connectionless. When two computers are going to communicate through a connection-oriented protocol, they will first agree on how much information each computer will send at a time, how to verify the integrity of the data once received, and how to determine whether a packet was lost along the way. These parameters are decided through a handshaking process at the transport layer. The transport layer receives data from many different applications and assembles the data into a stream to be properly transmitted over the network. The main protocols that work at this layer are Transmission Control Protocol (TCP) and User Datagram Protocol (UDP).
Network Layer
The main responsibilities of the network layer, layer 3, are to insert information into the data packet’s header so it can be properly addressed and routed, and then to actually route the packets to their proper destination. The protocols at the network layer build and maintain the routing tables which contain maps of the network. Therefore when a packet must be sent from computer A to computer B, the protocols check the routing table, add the necessary information to the packet’s header, and send it on the best path to the destination. The protocols of this layer, however, do not ensure the delivery of the packets. But rather depend on the protocols at the transport layer for this purpose. Internet Protocol (IP) is a common protocol working at the network layer. Some of the other protocols are the Internet Control Message Protocol (ICMP), Routing Information Protocol (RIP), Open Shortest Path First (OSPF), Border Gateway Protocol (BGP), and Internet Group Management Protocol (IGMP).
Data Link Layer
The data link layer or layer 2 changes the outer format of the data packet and translates it into the Local area network (LAN) or wide area network (WAN) technology binary format for proper line transmission. The data link layer is also responsible for proper communication within the network components and for reordering frames that are received out of sequence, and notifying upper-layer protocols when there are transmission error conditions. The data link layer is divided into two functional sublayers: the Logical Link Control (LLC) and the Media Access Control (MAC). Some of the protocols that work at the data link layer are the Point-to-Point Protocol (PPP), ATM, Layer 2 Tunneling Protocol (L2TP), etc.
Physical Layer
The physical layer or layer 1, converts bits into voltage for transmission in the physical medium. This layer controls synchronisation, data rates, line noise, and transmission techniques. Specifications for the physical layer include the timing of voltage changes, voltage levels, and the physical connectors for electrical, optical, and mechanical transmission.
How it works ?
Information being transferred from a software application in one computer to an application in another proceeds through the OSI layers. For example, if a software application in computer A has information to pass to a software application in computer B, the application program in computer A needs to pass the information to the application layer (Layer 7) of computer A, which then passes the information to the presentation layer (Layer 6), which relays the data to the session layer (Layer 5), and so on all the way down to the physical layer (Layer 1). At the physical layer, the data is placed on the physical network medium and is sent across the medium to computer B. The physical layer of computer B receives the data from the physical medium, and then its physical layer passes the information up to the data link layer (Layer 2), which relays it to the network layer (Layer 3), and so on, until it reaches the application layer (Layer 7) of computer B. Finally, the application layer of computer B passes the information to the recipient application program to complete the communication process.

Each layer may add a Header and a Trailer to its Data, which consists of the upper layer’s Header, Trailer and Data as it proceeds through the layers. This is known as encapsulation. The Headers contain information that specifically addresses layer-to-layer communication. For example, the Transport Header (TH) contains information that only the Transport layer sees. Each layer performs the same actions: The layer reads the header and trailer from its peer layer, strips it off, and passes the remaining information unit to the next higher layer. This is known as decapsulation. After the application layer performs these actions, the data is passed to the recipient software application in computer B, in exactly the form in which it was transmitted by the application in computer A.
Leave a Reply