In this article, we will discuss OSI Network Model Layers. We use 7 networking layers of the OSI Model (Open System Interconnected Model) to understand how one computer transfers data to another in a computer network.
Networking 7 layers or Open Systems Interconnect (OSI) model is a conceptual framework that describes networking or telecommunications systems as seven layers (i.e., OSI network model layers), each with its function.
The layers help network pros visualize what is going on within their networks. They can help network managers narrow down problems (is it a physical issue or something with the application?), as well as computer programmers (when developing an application, which other layers does it need to work with?). Tech vendors selling new products will often refer to the OSI model to help customers understand which layer their products work with or whether it works across the stack.
In the most basic form, two computers connect with LAN cable and connectors and share data with the help of network interface cards form a network. But if one computer is based on MS Windows and the other has Mac OS installed, how will these computers communicate with each other? The 7 networking layers and OSI model or open system interconnected model was introduced by the International Organization for Standardization in 1984. It was to accomplish successful communication between computers and networks of different architectures. There are the following OSI Network Model Layers;
- Application Layer
- Presentation Layer
- Session Layer
- Transport Layer
- Network Layer
- Data Link Layer
- Physical Layer
Note that each layer is a package of protocols.
Protocols and Devices used at various layers of the OSI Model
An application layer of OSI is an abstraction layer that specifies the shared communications, protocols, and interface methods used by hosts in a communications network. However, the Internet Protocol Suite (TCP/IP) and the OSI model specify an application layer abstraction. Although both models use the same term for their highest-level layers, the detailed definitions and purposes differ.
Application layer does not mean that it includes computer applications like Chrome, Firefox, etc. But it provides application layer protocols to make these applications work correctly in a network or the internet.
The Application Layer is the top layer of networking. Network applications use the Application layer.
“Network application means computer applications that use the internet like Chrome, Firefox, Skype, etc.”
The web browser is a network application running on your PC, it does not reside in the application layer, but it uses application protocols like “HTTP” or “HTTPS” to do web surfing. Web browsers and all network applications, including outlook, skype, etc., depend on application layer protocols to function.
Dozens of application layer protocols enable various functions at this layer. However, all these protocols collectively form an application layer. These protocols form the basis for network services like file transfer, web surfing, email, and virtual terminals. For Examples: HTTP, HTTPS, FTP, NFS, FMTP, DHCP, SNMP, TELNET, POP3, IRC & NNTP etc.
A machine does file transfer with ‘FTP’ protocol, surfs the web with the help of ‘HTTP or HTTPs’ protocol, and uses telnet for virtual terminals. So the application layer provides services for network applications with the help of protocols to perform user activities.
Most commonly, a question arises, which application layer protocol is used by electronic mail? Simple Mail Transfer Protocol (SMTP) is an application layer protocol to transmit electronic mail.
The presentation layer description is that; this layer is also known as the Translation layer, which serves as a data translator for the network. This layer receives the data from the Application Layer and extracts and manipulates it here as the required format to transmit over the web. The primary responsibility of this layer is to provide or define the data format and encryption. The presentation layer is also called the Syntax layer since it is responsible for maintaining the proper syntax of the data it receives or transmits to other layers.
The presentation layer functions as follows;
- It serves network security and confidentiality management, text compression and packaging, and virtual terminal protocol (VTP).
- Syntax conversion – The abstract syntax is converted to the transfer syntax. The other side achieves the opposite transformation (It converts transfer syntax to abstract syntax). It is involved in the contents of the code conversion, character conversion, data format modification, data structure operation adaptation, data compression, encryption, and so on.
- Grammar negotiation: According to the application’s requirements, layer to negotiate the appropriate choice of context, that is, to determine the transmission syntax and transmission.
- Connection management – Including the use of the session layer service to establish a connection, manage data transport and synchronization control over this connection (using the related services at the session level), and terminate the connection either normally or absently.
The presentation layer of the OSI model receives data from the ‘Application Layer.’ This data is in the form of characters and numbers. It converts these characters and numbers to machine-understandable binary format. For Example, conversion of ASCII to FCD code. This function of the presentation layer is called ‘translation.’
Before data transmission, the presentation layer reduces the number of bits used to represent the original data. This bit reduction process is called ‘data compression and can be lossy and lossless.
Data compression reduces the amount of space that a device uses to store the original file since it reduces the size of the file. It can be received at the destination in less time so that data transmission can be done faster. Thus, data compression is beneficial in real-time video and audio streaming.
Encryption enhances the security of sensitive data. A network uses “SSL Protocol or Secure Socket Layer Protocol” in the presentation layer for encryption and decryption. This layer encrypts the data to maintain its integrity of data before transmission. On the sender side, data is encrypted, and on the receiver side, it is decrypted.
So the Presentation layer Performs three primary functions, i.e., Translation, Compression, and Encryption & Decryption.
Presentation layer protocols are as follows;
- Apple Filing Protocol (AFP)
- Independent Computing Architecture (ICA), the Citrix system core protocol
- Lightweight Presentation Protocol (LPP)
- NetWare Core Protocol (NCP)
- Network Data Representation (NDR)
- Telnet (a remote terminal access protocol)
- Tox, The Tox protocol is sometimes regarded as part of the presentation and application layer.
- eXternal Data Representation (XDR)
- 25 Packet Assembler/Disassembler Protocol (PAD)
The answer to this question is Session Layer is the layer of the ISO Open Systems Interconnection (OSI) model that controls the dialogues (connections) between computers. It establishes, manages, and terminates the connections between the local and remote applications. Moreover, it provides full-duplex, half-duplex, or simplex operation and establishes check-pointing, adjournment, termination, and restart procedures. The OSI model made this layer responsible for:
- graceful close of sessions, a property of the Transmission Control Protocol,
- Session check-pointing and recovery are not usually used in the Internet Protocol Suite.
The session layer is commonly implemented explicitly in application environments that use remote procedure calls.
Suppose you have planned a party and hired a few helpers, ensuring that each activity runs smoothly. Helpers will help you set up, assist, clean, and close the party. The same is the case with the Session layer.
Session layers help set up and manage connections, enabling sending and receiving of data followed by termination of connections or sessions like you hired some helpers for your party.
The session layer has helpers called ‘APIs or Application Programming Interfaces. NETBIOS (Network Basic Input and Output System) is an example of APIs. It allows applications on different computers to communicate with each other just before a session or a connection establishes with the server. The server performs a function called authentication.
Authentication is a process of verifying who you are. This server uses a username and password. Once entered, the username and password match a session. Then a connection gets established between your computer and the server.
After authenticating, the system checks the user authorization. Authorization is a server’s process to determine if you have permission to access a file. If you don’t have accessibility, you will get a message saying, “You are not authorized to access this page”.
The session layer performs both these functions, i.e., authorization and authentication.
The session layer keeps track of files that we are downloading. For Example, a webpage contains texts, images, etc. It stores these texts and images as separate files on the web server. When you request a website in your web browser and open a different session to the webserver to download each text and image file separately, you receive these files as data packets. The session layer keeps track of which data packet belongs to which file, either a text or an image file, and tracks where the received data packet goes.
In this case, it goes to the web browser, a session layer that helps in session management. Your web browser performs all functions of the session, presentation, and application layer. So the session layer helps in session management authentication and management.
An example of a session layer protocol is the OSI protocol suite session-layer protocol, also known as X. 225 or ISO 8327
Transport Layer controls the reliability of communication through
- Segmentation,
- Flow control and
- Error control.
In segmentation, the transport layer receives the data from the session layer and divides it into small data units called segments. Each segment contains a source and destination port number and a sequence number.
Port Number helps direct each segment to the correct application, and Sequence Number helps reassemble pieces to form the right message at the receiver.
In Flow Control, the transport layer controls the amount of data transmitted. Consider our mobile connects to a server. Suppose the server can send data maximum at 100 Mbps, and our mobile can process data maximum at 10 Mbps.
Let’s suppose we are downloading a file from the server, but the server starts data at 50 Mbps, which is greater than the rate our mobile can process. So a mobile phone, with the help of a transport layer, can tell the server to slow down the data transmission rate up to 10 Mbps so that no data gets lost. Similarly, if the server sends data at 5 Mbps, the mobile phone tells the server to send the data up to 10 Mbps to maintain system performance.
The transport layer also helps in error control if some data does not arrive at the destination. It uses automatic repeat request schemes to re-transmit the lost, corrupted data. The transport layer adds a group of bits called “checksum” to each segment. It is to find out whether received corrupted segment protocols of transport layers are transmission control protocols (TCP) and user datagram protocols (UDP).
The transport layer performs two types of services, i.e., connection-oriented transmission and connectionless transmission.
- Connection-oriented transmission is done via TCP.
- Connectionless transmission is done via UDP.
UDP works faster than TCP. It does not provide feedback on whether data gets delivered, whereas TCP offers input. Therefore, we can re-transmit the lost data in TCP. We use UDP, where it does not matter whether we have received all data. For Example, Online streaming of movies, songs, games voice-over, IP, TFTP, DNS, etc.
On the other hand, we use TCP, where entire data delivery is a must—for Example, the world wide web, email, FTP, etc. So Transport layer performs the following functions;
- Segmentation
- Flow Control
- Error Control
- Connection-Oriented And
- Connectionless Transmission
The transport layer of the OSI model Passes the data segments to the network layer. The network layer works to transmit the received data segments from one computer to another located in different networks.
Data units in the network layer are called Packets. It is the layer where the router recites.
“IP Addressing done in a logical layer is called logical addressing.”
Every computer on a network has a unique IP Address. Moreover, the network layer assigns the sender and receiver’s IP addresses to each segment to form IP Packet.
A network assigns IP addresses to every device to ensure that each data packet can reach the correct destination.
Routing is a method of moving data packets from source to destination based on the logical address format of IPV4 or IPV6.
For Example: Suppose that computer A connects to network no. 1 and computer B connects to network no. 2. From computer B, we have requested to access facebook.com. And now, there is a reply from the Facebook server for computer B in the form of a packet. This packet needs to be delivered to computer B only since, in a network, each device has a unique IP address. The network layer of the Facebook server has already added the sender and receiver’s IP addresses in the packet. So both these computers have unique IP addresses as well.
Suppose the mask used is 225.225.225.0. This mask tells that the first three combinations represent a network while the last combination represents a host or computer b. So based on the IP address format, the received data packet will move first to the second network and then to computer B. So based on IP address and mask, we make routing decisions in a computer network.
There are several ways to connect a computer to an internet server. Path determination is the best path for data delivery from source to destination. Layer 3 devices use protocols such as open shortest path first, border gateway protocol, and intermediate system to intermediate system to determine the best possible data delivery method.
Data Link Layer is the second layer among the OSI network model layers. This layer is one of the most complicated and has complex functionalities and liabilities. Moreover, the data link layer hides underlying hardware details and represents itself to the upper layer as the communication medium.
The data link layer works between two hosts, which directly connect in some sense. This direct connection could be point-to-point or broadcast. Systems on a broadcast network are said to be on the same link. The work of the data link layer tends to get more complex when dealing with multiple hosts on a single collision domain.
The data link layer is responsible for converting the data stream to signals bit by bit and sending that over to the underlying hardware. Furthermore, at the receiving end, the Data link layer picks up data from hardware in the form of electrical signals, assembles them in a recognizable frame format, and hands them over to the upper layer.
The data link layer has two sub-layers:
Logical Link Control: It deals with protocols, flow control, and error control.
Media Access Control: It deals with the actual control of media.
The data link layer does many tasks on behalf of the upper layer. These are:
Data-link layer takes packets from Network Layer and encapsulates them into Frames. Then, it sends each frame bit-by-bit on the hardware. At the receiver’s end, the data link layer picks up signals from hardware and assembles them into frames.
Data-link layer provides a layer to the hardware addressing mechanism. However, it assumes that the hardware address is unique on the link. At the time of manufacturing, it encodes into hardware.
Both machines must be synchronized for transfer when data frames are sent on the link.
Sometimes signals may encounter problems in transition, and the bits get flipped. Therefore we have to detect these errors and attempt to recover actual data bits. It also provides an error reporting mechanism to the sender.
Stations on the same link may have different speeds or capacities. Data-link layer ensures flow control that enables both machines to exchange data at the same rate.
When a host on the shared link tries to transfer the data, it has a high probability of collision. Data-link layer provides a mechanism such as CSMA/CD to equip the capability of accessing a shared media among multiple Systems.
The physical layer is the bottom-most layer in the OSI network model layers, a physical and electrical representation of the system. It consists of various network components such as power plugs, connectors, receivers, cable types, etc. The physical layer sends data bits from one device(s) (like a computer) to another device(s). It defines the encoding types (that is, how the 0’s and 1’s are encoded in a signal). The physical layer is responsible for communicating the unstructured raw data streams over a physical medium.
The essential and basic functions of the Physical Layer of the OSI Model are as follows:
- The physical layer maintains the data rate (how many bits a sender can send per second).
- It performs Synchronization of bits.
- It helps in the Transmission Medium decision (direction of data transfer).
- Moreover, it helps in the Physical Topology (Mesh, Star, Bus, Ring) decision (Topology through which we can connect the devices).
- It helps in providing Physical Medium and Interface decisions.
- It offers two types of configuration: Point to Point configuration and Multi-Point configuration.
- It provides an interface between devices (like PCs or computers) and the transmission medium.
- It has a protocol data unit in bits.
- The instruments used in this layer are Hubs, Ethernet, etc.
- This layer comes under the category of Hardware Layers (since the hardware layer is responsible for all the physical connection establishment and processing too).
- It provides an important aspect called Modulation, which converts the data into radio waves by adding the information to an electrical or optical nerve signal.
- It also provides a Switching mechanism wherein one can forward data packets from one port (sender port) to the leading destination port.
We have discussed all 7 networking layers, i.e., OSI network model layers. Now, we will talk about network topologies that fall under the physical layer domain of OSI Network Model Layers. Physical Topology of Network Topology is the Geographical Representation of Linking devices. Following are the four types of physical topology:
Mesh Topology is challenging to install because it is more complex. Each device should have a dedicated point-to-point connection with another device in the network in a mesh topology. Here there is more data security because there is a reliable point-to-point connection between two devices.
Mesh Topology
Star Topology is easy to install and reconnect as compared to Mesh Topology. In star topology, the device should have a dedicated point-to-point connection with a central controller or hub. Star Topology doesn’t have a Fault Tolerance Technique.
Star Topology
In a bus topology, multiple devices connect through a single cable known as the backbone cable with the help of tap and drop lines. It is less costly as compared to Mesh Topology and Star Topology. Re-connection and Re-installation are difficult.
Bus Topology
Each device connects with repeaters in a circle-like ring in this topology. Therefore, we call it Ring Topology. In-Ring topology, a device can only send the data with a token. No machine can send the data without a permit, and Monitor places a token in Ring Topology.
Ring Topology
We have done all about OSI Network Model Layers. Moreover, you may read about the Modes of Communication in Computer networks.