OSI stands for Open Systems Interconnection and is been developed by ISO(International Organization of Standardization) in the year 1984. The OSI reference model is a 7 layer architecture with each layer having its own specific function to perform.
The OSI model is a conceptual framework to better understand the complex interactions that are happening. The layers of the OSI model work collaboratively to transmit data from one person to another across the globe.
The first 4 layers are considered as the lower layers or hardware layers and are responsible for moving data around. The layers from 5-7 are called the upper layers of software layers and contain application-level data.
The 7 layers of the OSI model are:
The first and the lowest layer of the OSI reference model is the Physical layer. The physical layer is responsible for the physical connection between the devices.
The physical layer contains information in the form of bits and is responsible for transmitting individual bits from one node to the next. It basically provides the hardware means of sending and receiving data on a carrier.
Some of the physical layer devices are Hub, Repeaters, Cables, Modems.
Functions of Physical Layer are:
Synchronization of bits: The physical layer provides synchronization at the bit level. It deals with the synchronization of the transmitter and receiver.
Bit rate control: This layer also defines the rate of transmission which is the number of bits sent per second.
Physical topologies: This layer also specifies how the different devices or nodes in the network can be arranged i.e Bus, Star, Ring, or Mesh Topology.
Transmission mode: It also defines how the data flows between two connected devices. The various transmission mode used for data flow is simplex, half-duplex and full-duplex.
2.Data Link Layer
The data link layer is responsible for node to node delivery of the message. The data link layer makes sure that the transfer of data is error-free from one node to another. The data link layer combines bits into bytes and then further bytes into frames.
Frames are used at the Data Link layer to enclose packets handed down from the Network layer for transmission on a type of media access. The data-link layer consists of two sublayers:
Logical Link Control (LLC)
Media Access Control (MAC)
The LLC sublayer serves as an intermediary between the MAC sublayer and the network layer. The LLC sublayer also performs the task of error detection and flow control. The packets received from the network layer are further divided into frames depending on the frame size of NIC(Network Interface Card).
The MAC sublayer is responsible for moving data packets from one NIC to another across a shared transmission medium.
The devices used in the data link layer(layer 2) are Bridges, NIC (Network Interface Card), and Modem.
The network layer controls the inter-network communication i.e transmission of data from one host to another located in a different network. The network layer takes care of the packet routing which is the selection of the best and the shortest path for transmission of packets from the available routes.
Functions of Network Layer are:
Logical Addressing: For identifying each device uniquely the network layer provides a unique address using the addressing scheme. The IP addresses of the sender and receiver are placed in the header.
Routing: The network layer determines the best path to the destination network from the source and then routes accordingly.
The devices used in layer 3 are Routers and Brouters. The most commonly used network-layer protocols are IP(Internet Protocol) and IPX(Novell’s Inter-network Packet Exchange).
The transport layer provides services to the application layer and takes services from the network layer. The transport layer breaks the data into small blocks called segments. The transport layer is responsible for the end-to-end delivery of messages, error-free and in order.
The transport layer provides two types of communication:
Connection-Oriented: It is a three-step process that includes the establishment of a connection, data transfer, and then termination of the connection. In this type of transmission, the receiving device sends an acknowledgment, back to the source after a packet or group of packets is received. This is more reliable and secure as compared to connectionless.
Connectionless: It is a one-phase process and includes Data Transfer. In this type of transmission, the receiver does not acknowledge receipt of a packet. This approach allows for much faster communication between devices.
Data in the transport layer is called segments. The most commonly used layer 4 devices are gateways and firewalls.
This layer is responsible for the establishment of connection, maintenance of sessions, authentication, and also ensures security. If a session is broken it can attempt to re-establish the session.
Functions of session layer:
Session establishment, maintenance, and termination: The session layer allows two processes to establish a connection, use, and then terminate the connection.
Synchronization: This layer allows a process to add checkpoints considered as synchronization points into the data. These synchronization points help to identify the error so that the data is re-synchronized properly, and ends of the messages are not cut prematurely and data loss is avoided.
Dialog Controller: This layer also allows to start communication between two systems in half-duplex or full-duplex.
The presentation layer also called a Translation layer takes care that the data sent to the receiver is understandable and the receiver will be able to use the data.
Functions of Presentation layer are:
Translation: Before transmitting, the information in form of characters and numbers should be changed to bitstreams. For example conversion of ASCII to EBCDIC.
Encryption/Decryption: Encryption is carried out by the transmitter and decryption at the receiver. Here key-value is used for encrypting and decrypting the data.
Compression: This layer carries out data compression to reduce the bandwidth of data to be transmitted.
The application layer is the topmost layer of the OSI reference model. Services provided by the application layer are Email, transferring files, directory services, etc.
The application layer contains a variety of widely used protocols for example HTTP(HyperText Transfer Protocol), FTP(File Transfer Protocol), SMTP(Simple Mail Transfer Protocol), TELNET, etc.
Functions of application layer are:
Mail Services: This provides a basic email forwarding service.
Network Virtual Terminal: This is basically a virtual terminal that allows user to communicate with the host by logging onto the remote host.
FTAM(File transfer access and management): This layer allows to access file and also manage it. A user can manage files and also able to access them on a remote computer.
Directory Services: This layer provides access to global information about various services.