Chapter 2 – The Open Systems Interconnection (OSI) Specifications

CompTIA Network+ Exam Objective 1.1

  • Focus: Compare and contrast networking appliances, applications, and functions across the seven OSI layers.
  • Layers examined: 1 Physical, 2 Data-Link, 3 Network, 4 Transport, 5 Session, 6 Presentation, 7 Application.

Internetworking Models & History

  • Late 1970s: International Organization for Standardization (ISO) produced the Open Systems Interconnection (OSI) Reference Model.
    • Goal: Enable vendors to create interoperable network hardware & software.
    • Became the primary architectural model for modern networks.
    • Describes how data travels from an application on one computer, through media, to an application on another.
  • Approach: Divide the end-to-end communication process into 7 logical layers, each providing services to the layer above and using services of the layer below.

Advantages of the Layered Reference Model

  • Breaks a complex process into smaller, simpler components → easier design, development & troubleshooting.
  • Promotes multi-vendor interoperability through standardized functions at each layer.
  • Encapsulates change: modifications in one layer do not ripple to others.
  • Encourages industry-wide standardization & fosters innovation.
  • Allows heterogeneous hardware & software to coexist and communicate.

OSI Layers (Top → Bottom)

  1. Application (7)
  2. Presentation (6)
  3. Session (5)
  4. Transport (4)
  5. Network (3)
  6. Data-Link (2)
  7. Physical (1)

Layer-by-Layer Functional Detail

Upper Layers (7–5)

  • Application (L7)
    • Provides the user interface & high-level services (file, print, messaging, DB access, custom apps).
  • Presentation (L6)
    • Data translation, character set conversion, compression, encryption/decryption.
    • Ensures data from the application layer of one system is readable by the application layer of another.
  • Session (L5)
    • Establishes, manages & terminates dialogues.
    • Keeps data streams from different applications separate (e.g., you can browse the web while transferring a file).

Transport Layer (L4)

  • Provides end-to-end connection services.
  • Can be connection-oriented (reliable) or connectionless (best-effort).
  • Key tasks:
    • Segmentation & reassembly.
    • Error detection & recovery (retransmit if necessary).
    • Flow control (prevent congestion; see windowing below).

Network Layer (L3)

  • Provides logical addressing & routing.
  • Determines best path through the internetwork (handled by routers).
  • Devices: Routers, multilayer switches.

Data-Link Layer (L2)

  • Responsible for framing, MAC addressing, and access to the physical media.
  • Error detection (Frame Check Sequence – FCS) but not correction.
  • Two sublayers:
    • Logical Link Control (LLC) – defined by IEEE 802.2802.2; multiplexes protocols, error checking.
    • Media Access Control (MAC) – defined by IEEE 802.3802.3 (Ethernet) & 802.11802.11 (Wi-Fi); controls access to shared medium.

Physical Layer (L1)

  • Moves bits (1s & 0s) across the medium.
  • Defines electrical/optical voltage, timing, pin-outs, cable specs & data rates.
  • Devices: Hubs, repeaters, cables, connectors.

Transport Layer: Reliability Concepts

  • Connection-oriented session (TCP-like)
    1. Three-way handshake – Sender → SYN\text{SYN}, Receiver → SYN/ACK\text{SYN\,/\,ACK}, Sender → ACK\text{ACK} (connection established).
    2. Data segments transferred.
    3. FIN / ACK pairs close the session gracefully.
  • Reliable transport guarantees:
    • Every segment is acknowledged.
    • Lost segments are retransmitted.
    • Segments are sequenced on arrival.
    • Flow is controlled so buffers don’t overflow.

Flow Control Mechanisms

  • Stop-and-Wait (simple)
    • Receiver advertises “STOP!” when its buffer is full and “GO!” when ready.
  • Windowing (sliding window)
    • Sender transmits multiple segments (window size).
    • Receiver acknowledges the last in-order segment (e.g., Ack 4\text{Ack 4}). Lost segment triggers retransmission.
    • Window size can grow/shrink dynamically to match network capacity.

Acknowledgement Example (Lost Segment)

  • Sender transmits segments 1–7; segment 5 lost.
  • Receiver acks up to 4 (last good).
  • Sender retransmits 5, then continues.

Routing & Layer-3 Example Topology

  • Networks:
    • 192.168.1.0/24192.168.1.0/24
    • 192.168.2.0/24192.168.2.0/24
    • 192.168.3.0/24192.168.3.0/24
  • Router A interfaces: 192.168.1.1192.168.1.1 (Fa0/1) & 192.168.2.1192.168.2.1 (S0/0).
  • Router B interfaces: 192.168.2.2192.168.2.2 (S0/0) & 192.168.3.1192.168.3.1 (Fa0/0).
  • Sample routing tables (cost = metric):
    • Router A
    • 192.168.1.0/24192.168.1.0/24 → Fa0/1 (metric 0)
    • 192.168.2.0/24192.168.2.0/24 → S0/0 (metric 0)
    • 192.168.3.0/24192.168.3.0/24 → S0/0 (metric 1)
    • Router B
    • 192.168.3.0/24192.168.3.0/24 → Fa0/1 (metric 0)
    • 192.168.2.0/24192.168.2.0/24 → S0/0 (metric 0)
    • 192.168.1.0/24192.168.1.0/24 → S0/0 (metric 1)
  • Broadcast domains
    • Each router interface is its own broadcast domain.
    • Routers break up broadcasts by default and provide WAN connectivity.

Data Encapsulation & Protocol Data Units (PDUs)

  • Application, Presentation, Session layers → Data
  • Transport (L4) → Segments
  • Network (L3) → Packets / Datagrams
  • Data-Link (L2) → Frames
  • Physical (L1) → Bits

Ordered encapsulation example (top-down):

  1. Application data
  2. Add Transport header (e.g., TCP) → Segment
  3. Add Network header (e.g., IP) → Packet
  4. Add Data-Link header & trailer (incl. FCS) → Frame
  5. Convert frame to electrical/optical pulses → Bits on the wire

Ethical / Practical Implications & Real-World Relevance

  • Layered design lets vendors update hardware (e.g., faster Ethernet at Layer 1) without changing higher-layer software.
  • Security features (encryption/compression) are isolated in the Presentation layer, allowing uniform application across many protocols.
  • Troubleshooting uses the model as a systematic approach: start at the physical layer and move up (or vice-versa) to isolate faults.

Key Numbers & Standards to Memorize

  • OSI layer count: 77.
  • IEEE sublayer standards: 802.2802.2 (LLC), 802.3802.3 (Ethernet MAC), 802.11802.11 (Wi-Fi MAC).
  • Common private IP space example: 192.168.0.0/16192.168.0.0/16, with /24 subnets used in diagrams.
  • Control flags in TCP handshakes: SYN, ACK, FIN.

Exam Preparation Checklist

  • Be able to name, order, and describe all 7 OSI layers.
  • Map common devices & protocols to their corresponding layers (e.g., router → L3, switch → L2, hub → L1, TCP → L4, SSL/TLS → L6).
  • Explain connection-oriented vs connectionless transport, including flow control & reliability.
  • Draw and interpret simple routing tables and subnet diagrams.
  • Identify the purpose of LLC vs MAC sublayers and the associated IEEE standards.
  • Describe the data encapsulation process & the names of PDUs at each layer.