Understanding the OSI Model Layers

Aug 6, 2024

OSI Model Overview Lecture Notes

Introduction

  • OSI Model: Open Systems Interconnection Reference Model
  • Purpose: Describe how traffic moves from one part of the network to another
  • Usage: Common language for IT professionals
  • Primary Protocol Today: TCP/IP, but OSI model is still used as a reference

OSI Model Layers

  1. Physical Layer (Layer 1)

    • Focus: Signaling and transmission of raw data
    • Components: Cables, fiber optics, connectors, adapter cards
    • Troubleshooting: Check cabling, connectors, loopback tests
  2. Data Link Layer (Layer 2)

    • Focus: Data transfer between adjacent network nodes
    • Components: Media Access Control (MAC) addresses, switches
    • Protocols: Ethernet, DLC protocols
    • Role: Forwarding decisions based on MAC addresses
  3. Network Layer (Layer 3)

    • Focus: Data transfer across different networks
    • Components: IP addresses, routers
    • Functions: Routing, fragmentation of data packets
  4. Transport Layer (Layer 4)

    • Focus: Reliable data transfer
    • Protocols: TCP (Transmission Control Protocol), UDP (User Datagram Protocol)
    • Functions: Data segmentation, reassembly
  5. Session Layer (Layer 5)

    • Focus: Managing sessions between applications
    • Functions: Establishing, maintaining, and terminating connections
    • Typical Usage: Control protocols, tunneling protocols
  6. Presentation Layer (Layer 6)

    • Focus: Data translation and encryption
    • Functions: Encoding, encryption, data formatting
    • Often Combined: With the Application Layer (Layer 7)
  7. Application Layer (Layer 7)

    • Focus: Network services for applications
    • Components: Browsers, FTP, DNS, HTTP/HTTPS
    • Role: End-user interaction with network services

Practical Examples

  • Layer 1: Holding a cable, analyzing signal
  • Layer 2: Switch forwarding based on MAC addresses
  • Layer 3: Routers making decisions based on IP addresses
  • Layer 4: Using TCP/UDP protocols, port numbers
  • Layer 5: Tunneling, setting up communications
  • Layer 6: Encryption (e.g., HTTPS)
  • Layer 7: User applications and services (e.g., web browsers)

Real-World Application: Packet Analysis with Wireshark

  • Wireshark: Tool for capturing and analyzing network traffic
  • Screen Sections:
    • Top: Summary view (one frame per line)
    • Middle: Detailed view (breaks down communication by OSI layers)
    • Bottom: Hexadecimal and ASCII representation
  • Frame Example (Frame 88):
    • Layer 1: Physical layer, bytes on wire
    • Layer 2: Ethernet frame, MAC addresses
    • Layer 3: IP addresses
    • Layer 4: TCP protocol, port numbers
    • Layers 5-7: Secure Sockets Layer (SSL)

Use Case: Google Mail

  • Layer 7: Application layer (mail.google.com interface)
  • Layer 6: Presentation layer (SSL encryption)
  • Layer 5: Session layer (linking layers)
  • Layer 4: Transport layer (TCP 443)
  • Layer 3: Network layer (IP addresses)
  • Layer 2: Data link layer (Ethernet frames)
  • Layer 1: Physical layer (signals)

Conclusion

  • Benefits: Facilitates communication and troubleshooting within IT
  • Applications: Understanding and managing network communications and applications