Day 3: OSI Model and TCP/IP Suite
OSI Model & TCP/IP Suite
Networking Models: Overview
A networking model categorizes and provides structure for networking protocols and standards.
Protocol = A set of logical rules defining how network devices and software communicate and function.
Networking models help engineers understand which layer is responsible for which functions, making troubleshooting and design much easier.
OSI Model
What is the OSI Model?
OSI = Open Systems Interconnection Model
-
Conceptual model created by ISO (International Organization for Standardization)
-
Standardizes different functions in a network across 7 layers
-
Purpose: Provide a reference framework for understanding how networks operate
-
These 7 layers work together hierarchically to enable end-to-end communication
Key Concept: Data Movement
As data moves through the layers, it follows two processes:
Encapsulation (Top → Bottom, Layers 7 → 1)
-
Data travels DOWN the OSI stack
-
Each layer adds its own header/trailer to the data
-
Headers contain layer-specific information needed for that layer's function
-
Happens at the sender's device
De-encapsulation (Bottom → Top, Layers 1 → 7)
-
Data travels UP the OSI stack
-
Each layer removes (strips) its header/trailer
-
Extracts the information needed at that layer
-
Happens at the receiver's device
Key Concept: Layer Interactions
Adjacent-Layer Interaction
-
Communication between different layers on the same device
-
Example: Layer 5 sends data to Layer 4, Layer 4 adds header and sends to Layer 3
Same-Layer Interaction
-
Communication between the same layer on different devices
-
Example: The HTTP layer (Layer 7) on your PC browser talks to HTTP layer on a web server
-
You can analyze one layer's interaction in isolation, ignoring what other layers do
The 7 Layers of the OSI Model
Layer 7 - APPLICATION
What it does:
-
Closest to the end user
-
Interacts directly with user applications and software
-
Provides services that enable network communication for applications
Key Functions:
-
Identifying and locating communication partners
-
Synchronizing communication between applications
-
Providing user-visible network services
Common Layer 7 Protocols:
-
HTTP / HTTPS (web browsing)
-
FTP (file transfer)
-
SMTP / POP3 (email)
-
DNS (domain name resolution)
-
Telnet / SSH (remote login)
Who uses it: Application developers and end users
Layer 6 - PRESENTATION
What it does:
-
Translates data into an appropriate format for transmission
-
Converts between application format and network transmission format
-
Handles data encryption, compression, and translation
Key Functions:
-
Data formatting and conversion
-
Encryption/Decryption of data
-
Data compression
-
Character encoding (ASCII, Unicode, etc.)
Who uses it: Application developers
Layer 5 - SESSION
What it does:
-
Controls "dialogues" (sessions) between communicating applications
-
Manages the connection lifecycle between local and remote applications
Key Functions:
-
Establishing connections
-
Managing (maintaining) connections
-
Terminating connections
-
Dialog control and synchronization
Common Session Layer Examples:
-
Remote Desktop Protocol (RDP)
-
X Window System
Who uses it: Application developers
⚠️ Important Note: Top 3 Layers
Network engineers rarely work directly with Layers 5-7.
These layers are the domain of application developers who design software to use networks. When troubleshooting network issues, most work happens at Layers 1-4.
Layer 4 - TRANSPORT
What it does:
-
Segments (breaks up) and reassembles data for communication between end hosts
-
Provides HOST-TO-HOST (end-to-end) communication
Why segmentation matters:
-
Large pieces of data are broken into smaller segments
-
Smaller segments are easier to send across the network
-
If an error occurs, only the affected segment needs retransmission (not the entire message)
Key Protocols:
-
TCP (Transmission Control Protocol) — reliable, connection-oriented
-
UDP (User Datagram Protocol) — fast, connectionless
PDU (Protocol Data Unit) at Layer 4:
-
When Layer 7-5 data arrives at Layer 4, Layer 4 adds a Layer 4 Header
-
Result: SEGMENT
-
Format: [DATA + L4 Header]
Common Layer 4 Port Numbers (CCNA exam-relevant):
-
TCP 80 (HTTP)
-
TCP 443 (HTTPS)
-
TCP 22 (SSH)
-
UDP 53 (DNS)
Layer 3 - NETWORK
What it does:
-
Provides connectivity between different networks (outside the local LAN)
-
Provides logical addressing using IP addresses (unlike Layer 2's MAC addresses)
-
Performs path selection — determines the best route for data to travel from source to destination
-
Works with routers to forward data between networks
Key Functions:
-
IP addressing and routing
-
Path selection using routing protocols
-
Logical addressing (not physical)
Device operating at Layer 3:
-
Routers — forward packets between networks based on IP addresses
PDU (Protocol Data Unit) at Layer 3:
-
When Layer 4 header arrives at Layer 3, Layer 3 adds a Layer 3 Header
-
Result: PACKET
-
Format: [DATA + L4 Header + L3 Header]
-
Contains: Source/destination IP addresses
Common Layer 3 Protocols:
-
IP (IPv4, IPv6)
-
ICMP (ping)
-
IGMP
Layer 2 - DATA LINK
What it does:
-
Provides NODE-TO-NODE connectivity and data transfer
-
Examples: PC to Switch, Switch to Router, Router to Router
-
Defines how data is formatted for transmission over physical medium (e.g., UTP cables)
-
Detects (and sometimes corrects) physical layer errors
-
Uses Layer 2 addressing (MAC addresses) — separate from Layer 3 IP addresses
Key Functions:
-
Node-to-node delivery
-
Physical addressing (MAC addresses)
-
Framing and error detection
-
Media access control (determining who uses the network when)
Device operating at Layer 2:
-
Switches — forward frames between ports based on MAC addresses
PDU (Protocol Data Unit) at Layer 2:
-
When Layer 3 packet arrives at Layer 2, Layer 2 adds both a Header AND a Trailer
-
Result: FRAME
-
Format: [L2 Header + DATA + L4 Header + L3 Header + L2 Trailer]
-
Contains: Source/destination MAC addresses
Common Layer 2 Protocols:
-
Ethernet
-
PPP (Point-to-Point Protocol)
-
Frame Relay
Layer 1 - PHYSICAL
What it does:
-
Defines the physical characteristics of the network medium
-
Converts digital bits into electrical or radio signals for transmission
-
Receives signals and converts them back to digital bits
Key Functions:
-
Physical medium specifications (copper, fiber, wireless)
-
Voltage levels and signal timing
-
Maximum transmission distances
-
Physical connectors and cable specifications
-
Bit transmission (0s and 1s)
Examples of Layer 1:
-
RJ-45 connectors
-
Ethernet cables (UTP, fiber-optic)
-
Hub devices (simple repeaters)
-
The actual wires and wireless frequencies
-
All content from your Networking Devices and Interfaces & Cables notes is Layer 1 related
OSI Model: PDU Summary
A PDU (Protocol Data Unit) is the formatted data at each layer of the OSI model. As data moves down the stack, each layer adds information to the PDU.
Encapsulation Process (Sender, Top to Bottom):
Layer 7-5: [DATA]
↓
Layer 4: [DATA + L4 Header] = SEGMENT
↓
Layer 3: [DATA + L4 Header + L3 Header] = PACKET
↓
Layer 2: [L2 Header + DATA + L4 Header + L3 Header + L2 Trailer] = FRAME
↓
Layer 1: Convert Frame to bits (0s and 1s) = BITS
De-encapsulation Process (Receiver, Bottom to Top):
-
Layer 1 converts bits to frame
-
Layer 2 strips L2 header/trailer, checks for errors
-
Layer 3 strips L3 header, checks IP address
-
Layer 4 strips L4 header, hands data to upper layers
-
Layers 5-7 process the original data
Quick Reference Table:
|
OSI Layer |
PDU Name |
Headers/Trailers Added |
Key Information |
|
7-5 |
DATA |
None (origination) |
User data |
|
4 |
SEGMENT |
Layer 4 Header |
Port numbers (TCP/UDP) |
|
3 |
PACKET |
Layer 3 Header |
IP addresses |
|
2 |
FRAME |
L2 Header + L2 Trailer |
MAC addresses |
|
1 |
BITS |
None (transmission) |
0s and 1s |
TCP/IP Suite (Modern Model)
What is TCP/IP?
TCP/IP Suite:
-
Actual set of communications protocols used in the modern Internet and networks
-
Named after two foundational protocols: TCP and IP
-
Developed by U.S. Department of Defense through DARPA (Defense Advanced Research Projects Agency)
-
This is the model actually deployed and in use today
How is it Different from OSI?
Similarities:
-
Both are layered models
-
Both help organize network functions
Key Differences:
|
Aspect |
OSI Model |
TCP/IP Model |
|
Layers |
7 layers |
4-5 layers (varies by source) |
|
Status |
Conceptual reference |
Practical, in-use model |
|
Development |
International standards body (ISO) |
U.S. Department of Defense (DARPA) |
|
Protocol specificity |
Generic, protocol-agnostic |
Built around TCP/IP protocols |
|
Use |
Teaching and troubleshooting framework |
Actual implementation |
TCP/IP Model Layers (Simplified)
Most commonly shown as 4 layers:
-
Application Layer (Layers 5-7 in OSI)
-
Protocols: HTTP, HTTPS, FTP, SMTP, DNS, SSH
-
-
Transport Layer (Layer 4 in OSI)
-
Protocols: TCP, UDP
-
-
Internet Layer (Layer 3 in OSI)
-
Protocols: IP, ICMP
-
-
Link Layer (Layers 1-2 in OSI)
-
Protocols: Ethernet, PPP
-
Physical medium and hardware
-
OSI vs. TCP/IP: Why OSI Still Matters
Although TCP/IP is the working model:
-
OSI model still influences how network engineers think and talk about networks
-
CCNA exam heavily emphasizes OSI model concepts
-
OSI's 7-layer breakdown is clearer for teaching individual functions
-
Both models coexist in professional environments
Quick Reference: Which Device Operates at Which Layer?
|
Device |
OSI Layer |
Function |
|
Hub |
Layer 1 |
Repeats signals |
|
Switch |
Layer 2 |
Forwards frames by MAC address |
|
Router |
Layer 3 |
Forwards packets by IP address |
|
Firewall |
Layer 3-7 |
Filters traffic based on multiple criteria |
|
PC / Server |
Layers 1-7 |
All layers |
Key Takeaways for CCNA
✅ Understand encapsulation/de-encapsulation — This is fundamental to how networks work
✅ Know what each layer does — Particularly Layers 1-4 for network engineers
✅ Understand PDU names — Segment, Packet, Frame, Bits (test questions often ask "what is this called?")
✅ Know device-to-layer mapping — Switches at Layer 2, Routers at Layer 3
✅ Understand adjacent vs. same-layer interaction — Helps with troubleshooting concepts
✅ TCP/IP is the real model — OSI is the teaching model; they're used together in practice