- OSI Model Explained: 7 Layers of Networking
- What is OSI full form, and what OSI means?
- What is the purpose of OSI model?
- What are the advantages and disadvantages of the OSI reference model?
- How many layers in OSI model? or What are the 7 layers of networking?
- What is the Physical Layer in OSI model?
- What is the Data Link Layer in OSI model?
- What is the Network Layer in OSI model?
- What is the Transport Layer in OSI model?
- What is the Session layer in OSI model?
- What is the Presentation layer in OSI model?
- What is the Application layer in OSI model?
- How do OSI layers work with each other and pass information?
OSI Model Explained: 7 Layers of Networking
Have you ever wondered how data travels across the globe in the blink of an eye? The answer lies in 7 layers of the OSI model, which governs how data is transmitted between devices. These layers represent 7 layers of networking used to describe the different tasks at each layer. The OSI model is also helpful in identifying and troubleshooting networking problems. In this blog post, we will discuss the OSI model in depth. Let us get started.
What is OSI full form, and what OSI means?
OSI stands for Open System Interconnection and is a hierarchical model that divides computer network architecture into seven distinct layers. The model logically represents data flow between two devices, with each layer providing a specific function.
In other words, it is a way of thinking about networking and software applications that allows us to see the big picture. OSI reference model is concerned with everything from physical cabling to software applications attempting to communicate with other devices and software programs on a network. It attempts to provide a common language for discussing networking issues and software products to be more easily understood and interoperated.
History of OSI model
OSI was created in 1983 by representatives from the biggest computer and telecom companies of that time. It was adopted as an international standard by ISO in 1984, and now it is used all over the world.
What is the purpose of OSI model?
The main purpose of the OSI model is to provide a standard for computer networking that allows different devices from different manufacturers to communicate with each other. It is a conceptual model for understanding how data is transmitted between two devices in a network.
It also provides a standard framework for designing networked systems.
Most vendors involved in telecommunications try to describe their products and services with the OSI model. The OSI model is intended to help technology vendors and developers create interoperable network devices and software programs. It serves as a reference model for how applications communicate with one another over a network.
What are the advantages and disadvantages of the OSI reference model?
Advantages of the OSI reference model include:-
- It provides a clear and standard way to discuss communication between two systems.
- The OSI layer allows for modular development of communications systems. By breaking down the internal functions of a communication system into seven distinct layers, the OSI model enables developers to create interoperable communications solutions by working on one layer at a time.
- The OSI model also provides a clear and concise framework that can be used to troubleshoot communications problems. By identifying which layer of the OSI model is experiencing difficulties, network engineers and software developers can more easily pinpoint the root cause of the issue and develop a solution.
- OSI model is flexible and can be used as a guide when designing or redesigning a network.
- The Open Systems Interconnection model is vendor-neutral. This means that any manufacturer can create a product that conforms to the OSI model, regardless of the company’s affiliation with a specific network or telecommunication provider.
Disadvantages of the OSI reference model include:-
- It can be hard to understand and visualize the OSI model, leading to confusion and making it difficult for newcomers to grasp.
- The OSI model is not always compatible with different types of networking equipment, which can create interoperability issues.
- Because the model is abstract, it is often seen in real-world scenarios that there is no standardization of the model, so different organizations may have slightly different implementations.
- OSI model is so comprehensive that it can be slow and cumbersome to implement and challenging to troubleshoot and pinpoint where problems lie when things go wrong.
- OSI model has been criticized for being overly general and not providing enough guidance for specific situations.
How many layers in OSI model? or What are the 7 layers of networking?
The OSI (Open Systems Interconnection) model consists of seven layers:
- Physical layer
- Data Link Layer
- Network Layer
- Transport Layer
- Session Layer
- Presentation Layer
- Application Layer
What is the Physical Layer in OSI model?
The physical layer is the first layer in an OSI model and represents the physical medium carrying traffic between two nodes. Cables, Repeaters, and Hubs operate at this layer. The data unit of the physical layer is bits(1s and 0s), and protocols are RS232, ISDN, etc.
There are two types of physical mediums: wired and wireless. Wired media uses copper or fiber cables to transfer data, whereas wireless media uses airwaves to transmit signals between devices.
Wi-Fi is considered a Layer 1 protocol despite having no physical presence. This is because WiFi operates at the same frequency as radio waves and thus can be received by devices without any wires connecting them.
What are the functions of the Physical layer in OSI model?
- Convert a stream of bits into electrical signals, light pulses, or radio waves (depending on the physical medium) to be sent to the receiving node.
- Receive electrical signals, light pulses, or radio waves (depending on the physical medium in use) and convert them into a stream of bits to be passed to the Data Link layer.
- Transmit and receive data with the appropriate timing, synchronizing the sending and receiving nodes.
- This layer is responsible for detecting and, if necessary, correcting errors in the physical layer.
- Provide a means for identifying and establishing the availability of communication resources (e.g., use of the network) between nodes.
- Provide a means of connecting to the physical medium (e.g., using a particular connector).
What is the Data Link Layer in OSI model?
The second layer is the Data Link layer, and it ensures error-free data transmission between nodes within a subnet/network. Switches & Bridges are devices used in this layer. The data unit of the Data Link layer is Frame, and protocols are Ethernet, ATM, PPP, etc.
The Data Link Layer handles the packet, referred to as a frame. NICs and device drivers deal with the Data Link Layer on host machines. First, the DLL receives packets from the Network layer, which are then further broken down into frames depending on the frame size of NICs (Network Interface Cards).
The Data link layer has two sublayers: Logical Link Control (LLC) and Media Access Control (MAC).
The Logical Link Control (LLC) sublayer is responsible for dividing the packet (from the network layer) into frames, maintaining the link between two nodes across a logical link, and for flow control and error control.
The Media Access Control (MAC) sublayer is responsible for providing mac address and channel access control mechanisms that enable multiple stations to share the same physical link.
What are the functions of the Data Link Layer in OSI model?
- It is also responsible for providing reliable data transfer between two nodes.
- It is responsible for providing error and flow control within a subnet/network.
- It is responsible for providing token management and media access control.
- The data link layer is responsible for framing. It enables senders to send meaningful bits to receivers.
- The Data link layer adds the physical mac address of the sender and receiver to each Frame. In addition, the Data Link layer detects and retransmits damaged or lost frames.
- Flow control makes sure that a device port can send only a certain amount of data before getting an acknowledgment from the other end.
What is the Network Layer in OSI model?
The third layer of the OSI model is the Network layer responsible for Routing, Congestion Control, Quality of Service, and Security. Routers are used on this layer. The data unit of the Network layer is Packets, and protocols include IP, ICMP, etc.
In addition, the Network Layer determines the best path for data to take across a network, and it also works with the transport layer to ensure that the QoS (Quality of Service) requested is maintained, and packets travel through the network properly. The network layer also allows for different types of networking, such as point-to-point or multipoint connections.
What are the functions of the Network layer in OSI model?
- The network layer is responsible for routing the packets from source to destination.
- The Network layer uses a 32-bit (4-byte) IP (Internet Protocol) address to ensure that each device on the internetwork is unique. For example, 192.168.100.1/24 is an IP address.
- Routers then check the packet’s source and destination IP addresses and route them accordingly.
- The source or sender’s IP address is used to identify the packet’s origin, and the destination IP address is used to determine the intended recipient.
- The Network layer is also responsible for end-to-end error recovery and flow control between multiple networks/subnets.
What is the Transport Layer in OSI model?
The fourth layer is the Transport layer which ensures that data is delivered error-free, in sequence, and with no losses or duplications between applications. Firewalls are used on this layer. The data unit of the Transport layer is Segment, and protocols are TCP and UDP.
The Transport layer is responsible for distinguishing network streams by ports. For example, at any given time on a user’s computer, an Internet browser might open while music is being streamed and a chat app is simultaneously running. Layer 4 accomplishes this by using an addressing scheme known as Port Numbers.
TCP and UDP are the two methods of distinguishing network streams for Layer 4. There are 65,536 ports in Layer 4. Each port number has a unique application stream identified by both a Source and Destination port and their Source and Destination IP address (in combination with one another).
TCP and UDP employ different strategies in how data streams are transferred. TCP or Transmission Control Protocol is connection-oriented, meaning that it establishes a connection between the client and server before any data is sent. This guarantees that all packets will be delivered in the correct order and without errors.
In contrast, UDP or User Datagram Protocol is connectionless, which means that packets will be fast but can be lost or arrive out of order without affecting the application’s functionality.
What are the functions of the Transport layer in OSI model?
- The transport layer provides applications with end-to-end communication services.
- It also provides multiplexing.
- It manages the sequencing of data in a network connection.
- It handles the reliability of a link through flow control, segmentation/de-segmentation, and error control.
- It is responsible for process-to-process communication.
- It has a port number to distinguish the application.
What is the Session layer in OSI model?
The fifth layer of OSI is the Session layer used to establish, maintain and terminate a session between applications. Gateways are used on this layer. The data unit of the Session layer is Message, and protocols are NFS, NetBios names, RPC, SQL, etc.
To put it simply, the session layer acts as a dialog controller that creates a dialog between two processes. It allows the network communication between two processes, which can be half-duplex or full-duplex.
This layer adds checkpoints to transmissions when errors occur and resumes them at those points if they are missed. In addition, you can use the session layer for authentication and to recover lost connections or re-open unused ones.
What are the functions of the Session layer in OSI model?
- To establish, maintain and terminate connections between processes.
- To provide a dialogue control between communicating processes.
- To provide token management in token-passing networks.
- To detect and synchronize the loss or duplication of data in the network.
- To provide checkpointing and recovery services.
- To provide group communication services.
- To provide the means for the establishment of logical connections between processes.
What is the Presentation layer in OSI model?
The Presentation layer is the sixth layer responsible for transforming data into a format that the application layer can understand. No specific devices are used on this layer. The data unit of the Presentation layer is Message, and protocols are JPEG, SSL, TLS, etc.
Transforming data may involve encryption, decryption, compression, and decompression. The presentation layer also ensures compatibility between different applications and networks.
The presentation layer is the intermediate step of communication between application and network. It is responsible for formatting and encrypting data sent across a network, providing freedom from compatibility problems. This layer also converts a text file EBCDIC-coded into an ASCII-coded file. Without the presentation layer, two systems would not be able to communicate with each other because they use different encoding methods and formats.
A few examples of the presentation layer are encryption, ASCII code, EBCDIC code, TIFF code, GIF type I/II/III/IV codes, JPEG types 1 to 9, and MIDI codes. In addition, the presentation layer keeps personal information private by using the encryption layer.
What are the functions of the Presentation Layer in OSI model?
- Conversion of data from the application format to the network format and vice versa.
- Encryption and decryption of data.
- Compression and decompression of data.
- Translation between character sets.
What is the Application layer in OSI model?
The Application layer is the seventh layer and is the closest to the end-user and directly interacts with the software applications. Web browsers, email clients, etc., are used on this layer. The data unit of this layer is Message, and protocols are HTTP, FTP, SMTP, DNS, etc.
What are the functions of the Application layer in OSI model?
- The application layer provides a user interface and support for file transfers, email, and other network services.
- Typical functions include locating communication partners, determining the availability of resources, and synchronizing communication.
- It is up to the application layer to figure out which communication partners an application can use to send data. First, the application layer looks at the identity and availability of the communication partners.
- It is up to the application layer to check resource availability and figure out if there are enough network and transport resources for the communication.
- When synchronizing communication, the application layer establishes an agreement between the communication partners on procedures for controlling the data exchange.
How do OSI layers work with each other and pass information?
Layers in the OSI model interact with each other by passing data and the control information between them. Data is passed down the layers from higher to lower layers, and control information is passed up from lower to higher layers.
The interaction between the layers occurs through a process known as encapsulation. Encapsulation is the process of packaging data within a layer so that it can be sent to another layer. This process includes adding a header to the data and a trailer to the end of the data. The header and trailer contain information used by the receiving layer to process the data.
Each layer in the OSI model communicates with three layers: the layer above it, the layer below it, and then the layer with the same peer layer on the other side of the connection.
For example, the Network layer is responsible for talking to the Transport layer (above it), the Data link layer (below it), and the Network layer on the other side of the connection, as shown in the diagram.
This article discussed the OSI model and its 7 layers of networking. It is a conceptual model that describes how communication should happen between a pair of end stations. We started the article by explaining the OSI model, and then we discussed various layers of the model, how they work, and their functions. I hope you liked the article. Please share it and subscribe to the mailing list to receive networking tips, tricks, and articles like this.
Read about the TCP/IP model in my next article.