The OSI model network model or reference model is a conceptual model that describes how communication across a network will take place. The OSI model is a communication reference model for two network users. OSI full form is Open Systems Interconnect.
The OSI model explains how data and information are sent and received over the internet. All of the layer in this architecture serve diverse purposes, allowing data to flow seamlessly from one system to the next.
The OSI reference model divides communication between computing systems into seven abstraction levels: physical, data link layer, network, transport, session, presentation, and application.
Table of Contents
The 7 layers of OSI model
|1||Physical layer||Ethernet (electronics)|
|2||Data link layer||Ethernet (protocols)|
|3||Network layer||IP internet protocol|
|4||Transport layer||Tcp or Udp|
|5||Session layer||RPC / sockets|
|6||Presentation layer||XDR or user routines|
|7||Application layer||Program which sends data|
Physical layer in OSI model
Physical layer handles the physical cable or wireless connections between network nodes. It defines the physical connection between two or more devices. The physical layer of the OSI layer includes cables, hubs, switches, modems, bridges, wireless, etc.
The physical layer determines whether two devices on the network are communicating in simplex, half-duplex, or full-duplex mode.
Physical layer keeps the bits of information. This layer gets signals when receiving data and then turns the data to 0s and 1s and transmits it to the Data Link layer.
Functions of Physical Layer
- The physical layer establishes the hierarchy of network devices.
- The physical layer defines the device’s operation and procedure.
- The physical layer defines how a physical signal, such as an electrical voltage or a light pulse, is encoded.
Data Link layer in OSI model
The data link layer verifies that data delivered from one end of the cable to the other has arrived in good condition. It is also referred to as a handshake.
The data packets delivered by the network layer are decoded and encoded in this layer, which also guarantees that the packets are error-free.
The “Media Access Control” sublayer and the “Logical Link Control” sublayer are two sublayers of the data link layer.
Functions of the Data Link Layer
- Data link layer performs a function of framing in which it transmit a meaningful set of bits to the receiver.
- After the framing function, the data link layer provides the physical address of the sender or receiver in each frame.
- The data link layer controls error, which means it has a mechanism for detecting and retransmitting damaged or lost frames.
- The data link layer manages the flow control of data on both sides.
- It provides access control when data is shared across multiple devices. The data link layer prepares the MAC sub layer to determine which device controls which data is accessed at a given time.
Network layer in OSI model
The network layer establishes the data transfer mode between two different networks. Network layer works when two devices communicate on different networks otherwise network layer is redundant. The network layer breaks the segment received by the transport layer into smaller units, these smaller units are called packets and these packets are also assembled but in the receiving device.
Functions of Network Layer
- The network layer finds the best physical path for data transmission which is called routing.
- The network layer defines a unique addressing system. The header shows the IP address of the sender and receiver.
Transport Layer in OSI model
The transport layer is the level 4 layer. The transport layer is responsible for end-to-end communication between the source and the destination. It takes data from the session layer and sends it to the network layer. The data transport layer breaks the data into segments before sending it. The transport layer organizes the segments in a sequencing manner and reassembles them. The transport layer uses TCP (Transfer Control Protocol) and UDP (User Datagram Protocol).
Functions of Transport Layer
- The transport layer breaks the data into smaller units called segments. Each segment has a header. It resembles the data at the destination point.
- In the segments there is a type of header. This header is used as an address called the service point address or port address. The port address helps the transport layer to confirm whether the data is delivered to the correct place.
Session Layer in OSI model
The time when the communication starts and stops is known as the session. So the session layer is responsible for starting and stopping the communication between the two devices. It also ensures security.
Functions of Session Layer
- Session layer allows to establish and end a connection between two devices.
- The communication uses half duplex or full duplex to establish the session layer.
- The session layer synchronizes data transfer by connecting check points. For example if trying to transfer 50MB file than session layer can set checkpoint at every 10MB. If the transfer process will disconnect after 30mb data. So the session will be resumed from the last checkpoint i.e. only 30MB more data needs to be transferred. With the help of checkpoints there is no need to transfer the entire file after disconnection.
Presentation Layer in OSI model
Presentation layer in OSI model makes the data presentable to the application layer. This layer prepares the data. Presentation layer is also known as translation layer because it translates encoding messages.
Functions of Presentation Layer
- The presentation layer translates the incoming data and presents it to the receiving device of the application layer.
- It compresses the data. It helps in improving the speed and efficiency of communication.
- The presentation layer uses encryption and decryption process to receive and send data. Encrypted data is known as cipher text and decrypted data is known as plain text.
Application Layer in OSI model
Application Layer is the first layer of OSI model because the user interacts with this layer directly. Web browsers and other Internet-connected apps use application layer protocols such as http and SMTP.
Functions of Application Layer
- The application layer allows the user to access, transfer, retrieve and manage files in a remote computer.
- The mail service uses Application layer protocol SMTP (Simple Mail Transfer Protocol).
- Provides distributed database source to give such global knowledge about multiple objects and application layer.
Advantages of OSI model
- OSI model supports both service, connection oriented as well as connectionless.
- OSI model transforms complex tasks into simpler ones.
- Each layer of the OSI model defines a set of functions in data communication so troubleshooting is easy.
- If any change occurs in any layer of the OSI model it does not affect the other layer.
- The protocols used in the OSI model are hidden so new protocols can easily replace it.
Disadvantages of OSI model
- Duplication of services in different layers occurs in OSI model like flow control, error control, addressing etc.
- The OSI model is very complex and slow.
- OSI model layers do not operate in parallel mode so one layer has to wait for another layer.
- The complexity in the architecture of the OSI model is greater than that of TCP/IP.
- The practical implementation of the OSI model is not effective. It is mostly theory based.
- TCP/IP Layers and Their Functions
- TCP vs UDP protocol with examples
- What exactly is a network? Learn in hindi
- What is computer in details?
- Key Differences between Internet vs Intranet
- IPv4 vs IPv6: What are the differences?