Skip to content

Networking Communication

Open Systems Interconnection (OSI)

The OSI (Open Systems Interconnection) 7-layer model is a conceptual framework used to understand how different networking protocols interact in a communication system. Each layer in the OSI model represents a specific function within the data communication process.

The 7-Layer OSI Networking Hierarchy

  1. Physical Layer

    • Function: The Physical layer is responsible for the physical connection between devices. It deals with the transmission and reception of raw binary data (bits) over a communication medium such as cables, fiber optics, or radio waves.

    • Key Elements:

      • Transmission media (cables, wireless, etc.)

      • Data encoding and signal transmission

      • Bit rate control

      • Hardware components like network adapters, repeaters, hubs.

    • Example: Ethernet cables, Wi-Fi, Bluetooth.

  2. Data Link Layer

    • Function: The Data Link layer establishes, maintains, and decides how data is transferred between devices within the same network (local network). It packages raw bits from the Physical layer into frames and handles error detection, correction, and flow control.

    • Key Elements:

      • Framing (breaking data into packets or frames)

      • MAC (Media Access Control) addressing

      • Error detection (e.g., CRC) and correction

      • Flow control to manage the rate of data transmission.

    • Example: Ethernet, Wi-Fi, MAC addresses, PPP (Point-to-Point Protocol).

  3. Network Layer

    • Function: The Network layer is responsible for determining the best path for data to travel from the source to the destination across multiple networks. It manages logical addressing (IP addresses) and routing.

    • Key Elements:

      • IP addressing

      • Routing and forwarding data packets between different networks

      • Packet fragmentation and reassembly.

    • Example: IP (Internet Protocol), ICMP (Internet Control Message Protocol), routers.

  4. Transport Layer

    • Function: The Transport layer ensures reliable data transfer between devices, providing error recovery, flow control, and data integrity. It segments data into smaller units for easier transmission and reassembles them at the destination.

    • Key Elements:

      • End-to-end connection management

      • Error detection and recovery

      • Flow control (e.g., using TCP sliding windows)

      • Segmentation and reassembly of data.

    • Example: TCP (Transmission Control Protocol) for reliable communication, UDP (User Datagram Protocol) for faster, connectionless communication.

  5. Session Layer

    • Function: The Session layer establishes, manages, and terminates communication sessions between applications. It handles dialog control, allowing multiple applications to communicate over the network.

    • Key Elements:

      • Session establishment, maintenance, and termination

      • Synchronization (checkpoints to resume communication after interruptions)

      • Dialog control (full-duplex or half-duplex communication).

    • Example: SMB (Server Message Block), NetBIOS, RPC (Remote Procedure Call).

  6. Presentation Layer

    • Function: The Presentation layer is responsible for translating data between the application layer and the network. It ensures that the data sent by one system is readable by another by handling data formats, encryption, and compression.

    • Key Elements:

      • Data encryption and decryption

      • Data compression and decompression

      • Data format translation (e.g., from text encoding like ASCII to binary format).

    • Example: SSL/TLS (encryption for secure data transmission), JPEG, GIF, MPEG (data formatting standards).

  7. Application Layer

    • Function: The Application layer is the closest layer to the end-user and provides network services directly to applications. It enables interaction with software applications and handles high-level protocols that manage the exchange of information between users.

    • Key Elements:

      • User interface and interaction with applications

      • High-level protocols for communication (email, file transfer, etc.)

      • Services like email, file transfer, web browsing.

    • Example: HTTP (HyperText Transfer Protocol), FTP (File Transfer Protocol), SMTP (Simple Mail Transfer Protocol), DNS (Domain Name System).

Summary of OSI Layers

Layer Function Examples
7. Application Interface for end-user services and network apps HTTP, FTP, SMTP, DNS
6. Presentation Data formatting, encryption, compression SSL/TLS, JPEG, MPEG, ASCII
5. Session Manages sessions between applications SMB, RPC, NetBIOS
4. Transport Reliable data transfer, error handling, flow control TCP, UDP
3. Network Routing and forwarding of packets across networks IP, ICMP, routers
2. Data Link Transfers frames between devices within the same network Ethernet, MAC addresses, Wi-Fi
1. Physical Transmits raw data as electrical or radio signals Cables, Wi-Fi, Bluetooth, hubs

The OSI model serves as a theoretical framework. In practice, many protocols span multiple layers. For example, the TCP/IP model, commonly used in modern networking, combines some layers (e.g., Presentation and Application layers into one). Nonetheless, the OSI model is a useful way to understand how data moves through a network and how different protocols work together to ensure communication.

OSI in Practice

The following example demonstrates how each layer of the OSI model is used when a user accesses a website via a browser. The data flows through each layer to ensure successful transmission and reception.

  1. Physical Layer

    • Function: The Physical layer transmits raw binary data over the physical medium, such as Ethernet cables or Wi-Fi signals.

    • Example: The network adapter (e.g., Ethernet port or Wi-Fi chip) on your computer sends electrical or radio signals representing bits across the network. The connection could be made through a cable or over a wireless network.

  2. Data Link Layer

    • Function: The Data Link layer creates frames and handles error detection and correction for data transmitted within the local network.

    • Example: Your computer’s MAC address is used to identify it on the local network. The router uses your MAC address to direct the request to the next point in the network. Data is encapsulated into Ethernet frames for transmission within the local area network (LAN).

  3. Network Layer

    • Function: The Network layer manages IP addressing and routing, determining the best path for data to travel across different networks.

    • Example: The router identifies your computer’s IP address and uses it to route your request to the web server hosting the website. The data is broken into packets and forwarded to the web server through the internet.

  4. Transport Layer

    • Function: The Transport layer ensures reliable data transfer, error recovery, and flow control, splitting data into segments.

    • Example: TCP (Transmission Control Protocol) breaks your HTTP request into segments and ensures that the segments are delivered in the correct order to the web server. It also handles retransmission if any segments are lost during transmission.

  5. Session Layer

    • Function: The Session layer manages and maintains the communication session between the client (your browser) and the server.

    • Example: When you open a connection to the web server (via HTTP), the session layer manages the communication session, ensuring that it stays open while you browse and closes it when you’re done.

  6. Presentation Layer

    • Function: The Presentation layer translates data between the application and network formats, handling encryption and data formatting.

    • Example: If the website uses HTTPS, SSL/TLS encryption is applied here, ensuring that sensitive information is encrypted before it is transmitted over the network. Data is also compressed or formatted for efficient transmission.

  7. Application Layer

    • Function: The Application layer provides services directly to end-user applications, enabling interaction between applications and the network.

    • Example: HTTP at the Application layer governs the exchange of web content. When you enter a URL, the browser sends an HTTP GET request to the web server. The server responds with HTML content, which your browser renders as a webpage.

Explanation of the End-to-End Process When a user enters a URL into a browser, the browser (Application layer) sends an HTTP request to the web server. The data is encrypted (Presentation layer), and the session is established (Session layer). The transport protocol (Transport layer) breaks the data into segments for transmission. The Network layer divides it into packets, which are encapsulated into frames (Data Link layer) and sent as signals (Physical layer). The server responds by reversing this process, ensuring successful communication.


Types of Communication Networks

Different types of networks exist based on their scope, size, and use cases. Below is a breakdown of common network types:

  1. Personal Area Network (PAN) - Very short range (usually within a few meters).

    • Purpose: Interconnects devices around an individual for personal use.

    • Examples: Bluetooth, Infrared (IR), USB connections.

    • Use Cases: Connecting a smartphone to a smartwatch, Bluetooth headphones, or other personal devices.

  2. Local Area Network (LAN) - Small geographic area, such as a home, office, or building.

    • Purpose: Connects devices within a limited area to enable resource sharing and communication.

    • Examples: Ethernet (wired LAN), Wi-Fi (wireless LAN).

    • Use Cases: Office networks, home networks connecting computers, printers, and servers.

  3. Wireless Local Area Network (WLAN) - Similar to LAN but uses wireless technology.

    • Purpose: Provides wireless communication within a limited area.

    • Examples: Wi-Fi.

    • Use Cases: Internet access in homes, offices, cafes, and public spaces.

  4. Metropolitan Area Network (MAN) - Covers a city or large campus.

    • Purpose: Connects multiple LANs within a metropolitan area to enable communication across distances greater than a LAN but smaller than a WAN.

    • Examples: City-wide wireless networks, cable TV networks.

    • Use Cases: Connecting multiple offices of a company across a city, university campuses, municipal broadband.

  5. Wide Area Network (WAN) - Large geographic areas, such as countries or even globally.

    • Purpose: Connects multiple LANs and MANs across large distances, often via public or leased communication infrastructures.

    • Examples: The internet, corporate networks spanning multiple locations worldwide.

    • Use Cases: Communication across countries or continents, global internet access.

  6. Campus Area Network (CAN) - A specific campus or group of buildings, such as a university, military base, or industrial complex.

    • Purpose: Provides networking between multiple LANs within a limited geographic area.

    • Examples: University campus networks, company campuses.

    • Use Cases: Connecting all buildings on a university or industrial complex.

  7. Storage Area Network (SAN) - A specialized network to provide block-level storage.

    • Purpose: Connects storage devices (e.g., disk arrays, tape libraries) to servers, providing centralized storage management.

    • Examples: Fibre Channel SAN, iSCSI.

    • Use Cases: Data centers, large-scale enterprise storage systems.

  8. System Area Network (SAN) - A high-performance network connecting clusters of computers or servers.

    • Purpose: Provides fast and low-latency communication between servers.

    • Examples: Infiniband.

    • Use Cases: Supercomputers, high-performance computing clusters.

  9. Home Area Network (HAN) - Limited to a home environment.

    • Purpose: Connects devices in a home for sharing resources like internet access, media, and automation systems.

    • Examples: Wi-Fi, Zigbee, Z-Wave.

    • Use Cases: Smart homes, connecting computers, smart appliances, security systems.

  10. Virtual Private Network (VPN) - Spans across different networks (LAN, WAN) and provides secure communication over public networks.

    • Purpose: Creates a secure tunnel for private communication over a public network, like the internet.

    • Examples: VPN services for secure internet access, corporate VPNs.

    • Use Cases: Secure remote access to a company’s network, encrypting internet connections.

  11. Global Area Network (GAN) - Worldwide communication.

    • Purpose: Connects networks across the globe, often used for mobile communication.

    • Examples: Satellite networks, cellular networks.

    • Use Cases: International mobile phone communication, global business networks.

Summary of Network Types

Network Type Scope Examples Use Cases
PAN Personal space Bluetooth, USB Personal devices like smartphones, wearables
LAN Small area (home, office) Ethernet, Wi-Fi Home or office networks
WLAN Small area (wireless) Wi-Fi Wireless internet access in homes, offices
MAN City or large campus City-wide networks Municipal broadband, campus-wide networks
WAN Large geographic area The Internet Global communication and data exchange
CAN Campus or building University networks University, industrial complexes
SAN (Storage) Data center Fibre Channel, iSCSI Centralized storage management
SAN (System) High-performance computing Infiniband Supercomputers, server clusters
HAN Home Zigbee, Wi-Fi Smart homes, home automation
VPN Secure virtual network VPN Services Secure remote access, internet encryption
GAN Worldwide Satellite networks Global communication systems