Explore OSI Model
Exploring the 7 Layers of the OSI Model
Understanding the concept of the Seven Layers.
Introduction to OSI model
The International Organisation for Standardisation (ISO) created the OSI Model, a conceptual framework that divides network communication into seven separate layers and acts as a common language for computer networking. Each layer handles a specific function, facilitating communication with the layers directly above and below it, making the OSI Model crucial for understanding and troubleshooting network issues.
Regarded as a foundational element in modern networking, the OSI Model's layered approach not only aids professionals in isolating and solving network problems but also simplifies networking concepts for a broader audience, making it a key part of networking protocols and communication between various parties.
Credit to the source: the following image depicting: https://blogs.cisco.com/cloud/an-osi-model-for-cloud
Physical Layer (Layer 1)
The foundation of the OSI model, the Physical Layer, is responsible for the physical connections between devices. It defines the electrical and mechanical specifications for activating, maintaining, and deactivating the physical link between systems. This layer ensures the transmission of raw data streams over a physical medium, including network mediums (copper, fibre cables) with pinout formats and cabling standards. We can divide this layer into two main categories: hardware and topology. The hardware is about the medium used to transfer an electrical signal. Layer 1 defines the voltage used on a given medium and the frequency at which the signal is carried. These electrical characteristics dictate the speed and bandwidth of a given medium, as well as the maximum distance the medium can be used.
The second aspect of the physical layer is the topology, which plays a crucial role in determining the network parameters and has an influence on its performance. Network topology refers to a set of node arrangements and how they are linked in a single structure.
Data Link Layer (Layer 2)
Operating directly above the Physical Layer, the Data Link Layer handles the node-to-node transfer of data. The data link layer is responsible for getting the data to the physical layer, so the data can be transmitted physically over the network.
It establishes and terminates connections between two physically connected nodes and manages error detection and flow control. This layer is divided into two sublayers: the Logical Link Control (LLC) and the Media Access Control (MAC), which coordinate functions necessary for data communication between nodes. The Logical Link Control (LLC), as mentioned above, is responsible for the error and flow-control mechanisms of the data link layer. The MAC address defined on this layer 2 is a hardware address burnt on each network interface card (NIC). So, the MAC sublayer controls access to the network media.
Communication on layer 2 is called communication at the switch level, where the data is delivered from node to node.
It is important to know that the Data Link Layer (Layer 2) of the OSI model includes two protocols that are used to control access to a shared communication medium, such as Ethernet: CSMA/CD (Carrier Sense Multiple Access with Collision Detection) and CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance). I will write more about CSMA at a later time.
Network Layer (Layer 3)
The network layer is crucial for routing data across different networks. It selects the best paths for data transfer and manages packet forwarding, including routing through intermediate routers. This layer is responsible for addressing and sequencing packets to ensure correct reassembly from end-to-end (source/destination) across the network. The packets are transferred via a logical network path using protocols as a vehicle. The network layer regulates the order in which the packets are transferred. Because the destination and source IP addresses are assigned to the IP packet, the best logical path can be efficiently managed when data is transferred between nodes.
It is worth noting that routing is the process on layer 3 of selecting the faster path from the source to the destination.
Encapsulation and de-encapsulation procedures are part of the routing process. The de-encapsulation procedure is when the router de-encapsulates (disassembles) the layer 2 frame header and trailer to expose the layer 3 packet. The router needs this in order to read the destination IP address and choose the optimum route.
The packet gets encapsulated into a new layer 2 frame and forwarded if the router determines that the best path is listed in its route table. Layer 3 IP addresses remain the same while a packet moves from its source to its destination. Every router that processes data de-encapsulates and then re-encapsulates it into a new frame, replacing old frames with a few with each hop.
Transport Layer (Layer 4)
The transport layer ensures that data is transferred between systems reliably and error-free. It segments data from the system and reassembles it at the destination host. To be more specific, the data on layer 4 is segmented (split into small units) and transferred in sequential order, ensuring that it will arrive correctly at the destination.
How the data will be processed depends on the functionality of the transport layer.
The transport layer is called a true end-to-end layer, which refers to the complete and direct communications between the source and destination hosts. It defines Layer 4 as providing end-to-end communication without any intermediate processing or modification by network devices like routers or switches. The transport layer is responsible for functions like port addressing, data segmentation, connection control, flow control, and error control.
One of the main functions of the transport layer is service port addressing, enabling this option on the service or application at the source and destination nodes. It makes clear which application requests the data and where they are going.
A distinct service address is assigned to the majority of active programmes.
As previously stated, segmentation and reassembly are the focus of the transport layer. Every split segment has a sequential number, ensuring that data can be correctly reassembled at the destination. If re-transmission is required, only missed or damaged protocols will be re-sent.
Two main protocols operate on the transport layer: connection-oriented (TCP) and connectionless (UPD). Both protocols behave differently.
Connection-orientated protocol (TCP) ensures reliable delivery of the data from sender to receiver. When TCP protocol is established, a special procedure is performed called the “three-way handshake.”
Handshaking takes place at the beginning of a communication session. During the handshake, the two nodes determine the rules of the communication, like the transmission speed and which port to use.
The handshake process ensures that sessions are properly terminated and data flow is in proper order. The handshake is the reliable procedure between both nodes staying in a reliable session. Until the two nodes cease talking, this session will continue.
In addition to establishing a connection between two nodes, the handshaking procedure facilitates the segmentation process.
The UPD protocol is mostly used to apply connectionless services. Connectionless communication is a form of communication when the sending data host does not introduce itself by a procedure like TCP using a handshake. Therefore, this type of connection is unreliable without a delivery guarantee.
Due to the lack of session management overhead and the need for no additional steps after information is received from the communicating node, connectionless communication can occur more quickly. In this protocol, each segment is considered an independent packet when it is delivered to the destination host.
I will go over flow control, error control, and shakehand mechanisms in separate articles.
Session Layer (Layer 5)
This layer establishes, manages, and terminates connections between applications. The session layer sets up, coordinates, and terminates conversations, exchanges, and dialogues between the applications at each end. It deals with session and connection coordination.
Alright, let me explain more clearly. The layer responsible for sessions starts, takes in new sessions, and ends old ones. Thus, the session layer (layer 5) manages the dialogue between hosts and terminates the communication between them.
When the session is established, three distinct phases are involved: dialogue control, token management, and synchronisation. I will write about it more in the future.
Presentation Layer (Layer 6)
The presentation Layer acts as a translator for the network. This layer formats or translates data to be sent across a network. It provides independence from differences in data representation (e.g., encryption) by translating between application and network formats.
It is fairly straightforward; information is moved from the lower layer into a format suitable for the presentation, and vice versa. The presentation layer's main objective is to handle the grammar and semantics of the data that is transferred between the nodes.
Presenting data in a way that the recipient can comprehend and utilise is the responsibility of the presentation layer. The presentation layer performs three primary functions: compression-decompression, encryption-decryption, and translation-coding-encoding.
Information that is represented by characters and numbers should be converted to bit streams before transmission. Since different computers use different encoding methods, the presentation layer is in charge of ensuring that the methods are compatible. It converts data between the formats needed by the computer and those required by the network.
As previously stated, the presentation encrypts and decrypts the data that is transmitted to the recipient.
To save bandwidth when transmitting data, the presentation layer performs compression.
Application Layer (Layer 7)
The topmost layer, the application layer, provides services for an application's software. This layer identifies communication partners, determines resource availability, and synchronises communication. It supports application, email, and network software; it is the window where users and application processes can access network services.
The Significance of the OSI Model in Modern Networking
Enhancing Network Understanding and Troubleshooting
The OSI model serves as a crucial framework for network engineers and information security practitioners, facilitating a deeper understanding of networking and efficient troubleshooting of issues. It aids in categorising physical assets, enhancing data protection, and optimising application performance.
Understanding the OSI model is vital for adopting a security-first approach. It helps in recognising specific data security risks associated with designing appropriate mitigation strategies.
Standardisation, Industry Relevance and Educational Purposes
The OSI model is instrumental in enabling interoperability among diverse computer systems. By standardising communication protocols, it simplifies the troubleshooting of communication issues, making network management more efficient.
As a theoretical framework, the OSI model provides a structured way to understand the complex world of networking. Although not all networking protocols perfectly align with its layers, it offers a valuable perspective for conceptualising network interactions.
The model standardises communication protocols, which assists in ensuring interoperability between various networking devices and systems.
The OSI model helps network engineers understand, manage, and troubleshoot network operations more effectively. Despite its theoretical nature, the OSI model is widely taught and utilised in networking courses and professional practices. It offers a detailed description of every networking concept, function, and protocol, which is invaluable for educational purposes.
Also, the OSI model assists network device manufacturers and networking software vendors in creating products that are compatible across different platforms. This compatibility is essential for achieving open interoperability in the networking industry. The OSI model supports both connectionless and connection-orientated services, as mentioned at layer 4.
Comparing OSI and TCP/IP Models
Layer Structure and Protocol Orientation
The OSI model is structured into seven distinct layers, each with specific functions, whereas the TCP/IP model consists of four layers. The OSI model separates functions like data links and physical operations into different layers, enhancing specificity and modularity. Conversely, the TCP/IP model often combines multiple functions within single layers, such as the network access layer, which includes both physical and data link functions.
The OSI model is protocol-independent, providing a generic framework applicable to various network communications. This contrasts with the TCP/IP model, which is specifically designed around existing protocols and is primarily used to govern internet communications.
Header Size, Model Flexibility and Practical Usage
The OSI model utilises a smaller header size of 5 bytes compared to the TCP/IP model's 20-byte header, impacting data transmission efficiency and overhead.
The OSI model is noted for its flexibility due to its ability to easily replace tools and changes within its structure. However, it is considered less reliable than the TCP/IP model, which is seen as more robust due to its widespread practical application and specific design to address communication issues.
The OSI model was developed by the International Organisation for Standardisation (ISO) in 1984, aiming to be a universal communication model. On the other hand, Vint Cerf and Bob Kahn created the TCP/IP model earlier, in the 1970s, with the express purpose of supporting the rapidly expanding internet.
Despite its comprehensive and structured nature, the OSI model is less utilised in practical applications compared to the TCP/IP model, which dominates internet communications and networking practices.
The OSI model employs a vertical approach to networking, theoretically covering all aspects of network communications through its layered architecture. The TCP/IP model adopts a horizontal approach, focusing on practical, real-world application scenarios.
The OSI model, while comprehensive, faces challenges with internet compatibility and adaptability due to its rigid layer structure and the theoretical nature of its design. The TCP/IP model, with fewer layers and more focused rules, is better suited to dynamic internet environments and scalable applications.
Conclusion
Through the detailed exploration of the OSI Model, this article underscores its foundational role in the fabric of modern networking, clarifying its intricacies across all seven layers and highlighting its pivotal contributions to network comprehension, troubleshooting, and cybersecurity practices. The journey from the physical layer to the application layer has illustrated not only the segregated responsibilities and mechanisms at play but also how each layer cohesively contributes to the effective and secure transmission of data. The OSI model, with its structured partitioning, serves as a crucial educational tool and a lens through which network professionals can dissect and manage the complexities of network communication.
Furthermore, despite TCP/IP's widespread use in real-world scenarios, the comparison with the OSI model has highlighted the theoretical and practical differences between the two, highlighting the OSI model's importance for standardisation, interoperability, and the theoretical framework it provides. This discussion underscores the enduring relevance of the OSI model in understanding networking principles, even as it suggests areas for continued learning and adaptation in the ever-evolving landscape of network technology. The implications of this understanding are vast, influencing how future networks are designed, secured, and optimised, highlighting the need for ongoing research and adaptive strategies in networking practices.