2. Network Architecture and Design Principles

2.2. OSI and TCP/IP models explained

1. OSI Model (Open Systems Interconnection)

The OSI model is a conceptual framework that standardizes the functions of a networking system into seven layers. It was developed by the International Organization for Standardization (ISO) to promote interoperability.

OSI Model Layers

  1. Physical Layer:

    • Function: Handles the physical connection between devices.
    • Examples: Ethernet cables, hubs, and signal transmission (voltage, light, radio waves).
  2. Data Link Layer:

    • Function: Ensures reliable data transfer by handling error detection and correction.
    • Examples: MAC addresses, switches, and ARP (Address Resolution Protocol).
  3. Network Layer:

    • Function: Manages data routing and addressing between devices across multiple networks.
    • Examples: IP addressing, routers, and protocols like IPv4 and IPv6.
  4. Transport Layer:

    • Function: Ensures reliable data delivery with error checking, flow control, and retransmission.
    • Examples: TCP (Transmission Control Protocol) and UDP (User Datagram Protocol).
  5. Session Layer:

    • Function: Establishes, manages, and terminates communication sessions.
    • Examples: APIs, session management in web applications.
  6. Presentation Layer:

    • Function: Translates, encrypts, and compresses data for compatibility between systems.
    • Examples: SSL/TLS encryption, JPEG, and ASCII.
  7. Application Layer:

    • Function: Provides network services to end-users.
    • Examples: HTTP, FTP, SMTP, and DNS.

2. TCP/IP Model (Transmission Control Protocol/Internet Protocol)

The TCP/IP model is a more practical and widely used framework for internet communication. It simplifies the OSI model into four layers and is based on protocols that power the internet.

TCP/IP Model Layers

  1. Network Interface Layer (Link Layer):

    • Function: Manages physical transmission and links between devices.
    • Equivalent to: OSI Physical and Data Link Layers.
    • Examples: Ethernet, Wi-Fi.
  2. Internet Layer:

    • Function: Handles addressing, routing, and packet forwarding.
    • Equivalent to: OSI Network Layer.
    • Examples: IP, ICMP (Internet Control Message Protocol).
  3. Transport Layer:

    • Function: Ensures reliable communication and data flow between applications.
    • Equivalent to: OSI Transport Layer.
    • Examples: TCP (reliable), UDP (unreliable).
  4. Application Layer:

    • Function: Provides services and protocols for user applications.
    • Equivalent to: OSI Application, Presentation, and Session Layers.
    • Examples: HTTP, FTP, SMTP, DNS.