What is OSI Model | 7 Layers Explained with Examples
What is the OSI Model?
- The OSI (Open Systems Interconnection) Model is a fundamental framework in computer networking.
- It was developed by ISO the (International Organization for Standardization) in the late 1970s.
- The OSI Model breaks down the complex process of network communication into 7 layers, each with its specific role and functions.
OSI Model 7 Layers Explained
Let's delve deeper into each of the seven layers of the OSI Model,
- Application Layer (Layer 7)
- Presentation Layer (Layer 6)
- Session Layer (Layer 5)
- Transport Layer (Layer 4)
- Network Layer (Layer 3):
- Data Link Layer (Layer 2)
- Physical Layer (Layer 1)
Application Layer (Layer 7)
- The Application Layer serves as the topmost layer and is closest to the end-users.
- It is responsible for providing a platform-independent interface for applications and services to interact with the network.
Functions
- User Interface: It provides a means for users to interact with network services and applications, such as web browsers and email clients.
- Data Conversion: It translates data between application-specific formats and network-compatible formats.
Protocols
- HTTP (Hypertext Transfer Protocol): Used for transferring web pages and other resources on the World Wide Web.
- HTTPS (Hypertext Transfer Protocol Secure): An encrypted version of HTTP, used for secure web browsing.
- FTP (File Transfer Protocol): Used for transferring files over a network.
Example:
Consider a web browser (e.g., Google Chrome). When you enter a website's URL, the Application Layer uses protocols like HTTP or HTTPS to request and display the webpage content.
Presentation Layer (Layer 6)
- The Presentation Layer focuses on data translation, ensuring that data exchanged between applications on different devices can be understood.
- It handles tasks like data encryption, compression, and character set conversion.
Functions
- Data Translation: It converts data from one format to another, making sure that data is presented consistently.
- Data Encryption/Decryption: It secures data during transmission, ensuring confidentiality.
Protocols
- SSL/TLS (Secure Sockets Layer/Transport Layer Security): Used to secure data transmission over the internet, such as in HTTPS.
- JPEG (Joint Photographic Experts Group): A standard for compressing image files.
- ASCII: A character encoding standard.
Example:
When you send an email attachment, this layer ensures that the file format remains intact for the recipient, regardless of the operating systems or software used.
Session Layer (Layer 5)
- The Session Layer manages communication sessions between two devices.
- It handles session establishment, maintenance, and termination, ensuring that data is exchanged reliably.
Functions
- Session Control: It establishes, manages, and terminates communication sessions between devices.
- Checkpointing: It enables the recovery of a session in case of disruptions.
Protocols
- NetBIOS (Network Basic Input/Output System): Used for session control and naming in early Windows networking.
- RPC (Remote Procedure Call): Allows programs to execute code on a remote server.
- PPTP (Point-to-Point Tunneling Protocol): Used for setting up virtual private network (VPN) connections.
Example:
Suppose you're in a video conference call. The Session Layer is responsible for establishing and maintaining the connection, ensuring uninterrupted communication.
Transport Layer (Layer 4)
- The Transport Layer is responsible for end-to-end communication.
- It segments, delivers, and verifies the data's integrity, ensuring that data reaches its destination reliably.
Functions
- Data Segmentation: It divides large messages into smaller segments for efficient transmission.
- Error Detection and Correction: It checks for errors and ensures data integrity.
Protocols
- TCP (Transmission Control Protocol): Provides reliable, connection-oriented communication.
- UDP (User Datagram Protocol): Provides connectionless communication with minimal overhead.
Example:
When you stream a video over the internet, the Transport Layer (e.g., TCP) ensures that the video data arrives in the correct order, without errors or missing parts.
Network Layer (Layer 3)
- The Network Layer deals with logical addressing and routing.
- It figures out the most efficient route for data to move from where it starts to where it needs to go.
Functions
- Logical Addressing: It assigns unique IP addresses to devices for identification.
- Routing: It makes decisions about the optimal path for data to reach its destination.
Protocols
- IP (Internet Protocol): Responsible for addressing and routing packets across networks. IPv4 and IPv6 are two versions of IP.
- ICMP (Internet Control Message Protocol): Used for error reporting and diagnostics within IP networks.
Example:
In the context of the Internet, the Network Layer (IP) is responsible for routing data packets across different routers and networks to ensure they reach their intended destinations.
Data Link Layer (Layer 2)
- The Data Link Layer establishes and maintains a reliable link between directly connected nodes within the same network segment.
- It ensures data integrity and controls access to the physical medium.
Functions:
- Frame Creation and Detection: It encapsulates data into frames for transmission and detects errors.
- Media Access Control (MAC): It manages access to the physical transmission medium.
Protocols
- Ethernet: Defines how data packets should be formatted, addressed, and received on a local area network (LAN).
- MAC (Media Access Control): Specifies the rules for accessing the physical transmission medium, such as Ethernet MAC addresses.
Example:
Ethernet, which governs how data is transmitted over wired LANs, operates at the Data Link Layer.
When you connect your computer to a local network via Ethernet, it uses MAC addresses to identify devices on the same network.
Physical Layer (Layer 1)
The Physical Layer deals with the actual transmission of raw binary data over the physical medium, whether it's electrical signals over copper cables or light signals in optical fibers.
Functions
- Physical Transmission Medium: It defines the characteristics of cables, connectors, and signaling methods.
- Bit Encoding/Decoding: It represents digital data as electrical or optical signals.
Protocols
- Ethernet Cabling Standards: Defines the physical characteristics and properties of Ethernet cables.
- Fiber Optic Standards: Specifies how data is transmitted using light signals in fiber optic cables.
Example:
When you plug an Ethernet cable into your computer and router, the Physical Layer handles the electrical signals that transmit your data between devices.
Conclusion
The OSI Model, created by ISO in the late 1970s, is a core framework in computer networking, dividing network communication into 7 layers in the OSI Model.