Networking for Beginners – Tutorial 2
Understanding the OSI Model (7 Layers) with Real-World Examples
Course: Networking for Beginners to Advanced
Lesson: 2 of 30
Introduction
The OSI Model (Open Systems Interconnection Model) is one of the most important concepts in networking.
It helps us understand how data travels from one device to another, such as:
- Computer to Computer
- Computer to Server
- IP Camera to NVR
- NVR to Monitoring Station
- CCTV System to Internet
- Office PC to Website
Every network engineer, CCTV engineer, Cisco engineer, and IT administrator should understand the OSI Model.
What is the OSI Model?
The OSI (Open Systems Interconnection) Model is a framework that divides network communication into 7 layers.
Each layer has a specific function and works together to deliver data successfully.
Imagine sending a parcel through a courier service. The parcel is:
- Packed
- Addressed
- Loaded onto a truck
- Transported
- Delivered
- Unpacked
Data on a network follows a similar process through the seven OSI layers.
The 7 OSI Layers
| Layer | Name | Main Function |
|---|---|---|
| 7 | Application | User applications and services |
| 6 | Presentation | Data formatting and encryption |
| 5 | Session | Creates and manages communication sessions |
| 4 | Transport | Reliable data delivery |
| 3 | Network | IP addressing and routing |
| 2 | Data Link | MAC addressing and switching |
| 1 | Physical | Cables, fiber, connectors, electrical signals |
Easy Way to Remember
From Top to Bottom:
Application Presentation Session Transport Network Data Link Physical
Memory Tip:
"All People Seem To Need Data Processing."
Layer 7 – Application Layer
Purpose
This is where users interact with the network.
Examples:
- Google Chrome
- Microsoft Edge
- Outlook
- Hik-Connect
- HikCentral
- iVMS-4200
- File Explorer
For CCTV systems:
- Viewing live cameras
- Watching playback
- Downloading recordings
- Remote monitoring
Layer 6 – Presentation Layer
Purpose
This layer translates, encrypts, compresses, or decompresses data.
Examples:
- SSL/TLS encryption (HTTPS)
- Video compression (H.264, H.265, H.265+)
- Image formats (JPEG, PNG)
CCTV Example
A Hikvision IP camera compresses video using H.265 before sending it to the NVR. This reduces bandwidth and storage requirements.
Layer 5 – Session Layer
Purpose
This layer establishes, maintains, and ends communication sessions.
Examples:
- Logging in to an NVR
- Connecting to a web interface
- Maintaining a remote desktop session
CCTV Example
When you log in to an NVR using a username and password, the session layer helps maintain that connection until you log out.
Layer 4 – Transport Layer
Purpose
Ensures reliable or fast delivery of data.
Protocols:
- TCP (Transmission Control Protocol)
- UDP (User Datagram Protocol)
TCP
Reliable delivery.
Used for:
- Web browsing
- File transfers
- Configuration changes
UDP
Faster delivery with less overhead.
Used for:
- Live video streaming
- Voice calls
- Real-time CCTV video
Layer 3 – Network Layer
Purpose
Responsible for:
- IP addressing
- Routing
- Packet forwarding
Protocols:
- IPv4
- IPv6
- ICMP
Devices:
- Routers
- Layer 3 switches
- Firewalls (routing functions)
CCTV Example
An IP camera with address 192.168.10.101 sends traffic to an NVR at 192.168.10.201. If the traffic must reach another network or the internet, the router or firewall forwards it.
Layer 2 – Data Link Layer
Purpose
Uses MAC addresses to move data within the same local network.
Devices:
- Layer 2 switches
- PoE switches
- Access switches
CCTV Example
Your Hikvision PoE switch forwards frames from Camera 1 to the correct port connected to the uplink or NVR based on the destination MAC address.
Layer 1 – Physical Layer
Purpose
Transmits raw bits over the physical medium.
Examples:
- CAT6 cable
- Fiber optic cable
- RJ45 connectors
- SFP modules
- Patch panels
- ODFs
CCTV Example
A CAT6 cable connects an IP camera to a PoE switch, while fiber optic cable connects floor switches to the Cisco core switch.
How Data Travels Through the OSI Model
Suppose an IP camera sends video to an NVR.
Step 1 – Application Layer
The camera captures video.
↓
Step 2 – Presentation Layer
The video is compressed using H.265.
↓
Step 3 – Session Layer
A session is established between the camera and the NVR.
↓
Step 4 – Transport Layer
UDP is commonly used to carry the video stream.
↓
Step 5 – Network Layer
The camera adds the destination IP address of the NVR.
↓
Step 6 – Data Link Layer
The switch forwards the frame using MAC addresses.
↓
Step 7 – Physical Layer
The data travels over CAT6 cable and fiber optic cable.
↓
NVR Receives the Video
The process is reversed as the NVR decodes and displays the video.
OSI Model in Your Enterprise CCTV Network
IP Camera │ CAT6 Cable │ Cable Manager │ 24/48-Port PoE Switch │ Floor ODF │ Fiber Optic Cable │ Main ODF (5th Floor) │ Cisco Catalyst C9300X-24Y Core Switch │ Gigabit Switch │ NVR │ LCD / Video Wall
How Each Device Relates to the OSI Model
| Device | OSI Layer(s) | Function |
|---|---|---|
| IP Camera | 7–1 | Captures, compresses, and sends video |
| NVR | 7–1 | Receives, stores, and displays video |
| Layer 2 PoE Switch | 2–1 | Switches frames using MAC addresses and powers PoE devices |
| Cisco Catalyst C9300X-24Y (Layer 3) | 3, 2, 1 | Routes between VLANs and switches traffic |
| Router | 3 | Connects different networks and the internet |
| Firewall | 3–7 | Filters, inspects, and controls network traffic based on security rules |
| ODF | 1 | Terminates and organizes fiber optic connections |
| SFP/SFP28 Module | 1 | Converts electrical signals to optical signals |
| CAT6 Cable | 1 | Copper transmission medium |
| Fiber Optic Cable | 1 | High-speed optical transmission medium |
Real-World Example: Watching Cameras from Home
Imagine you are at home using your mobile phone to view office cameras.
- Your phone opens the Hik-Connect app (Layer 7).
- The connection is encrypted (Layer 6).
- A secure session is established (Layer 5).
- Video is streamed using transport protocols (Layer 4).
- The router and firewall direct the traffic using IP addresses (Layer 3).
- Switches forward frames inside the office using MAC addresses (Layer 2).
- Data travels through fiber and CAT6 cables (Layer 1).
Within seconds, the live camera view appears on your phone.
Common Networking Problems by OSI Layer
| Layer | Example Problem |
|---|---|
| 7 | Incorrect application settings or login failure |
| 6 | Encryption or codec mismatch |
| 5 | Session timeout |
| 4 | TCP/UDP port blocked |
| 3 | Wrong IP address, subnet mask, gateway, or routing |
| 2 | Duplicate MAC, VLAN issue, switch port problem |
| 1 | Broken cable, faulty SFP, damaged fiber, power failure |
Troubleshooting Example
Problem: Camera is offline.
A technician might check the layers in order:
- Layer 1: Is the cable connected? Is the PoE switch supplying power?
- Layer 2: Is the switch port active? Is the camera in the correct VLAN?
- Layer 3: Does the camera have the correct IP address and gateway?
- Layer 4: Are required ports open?
- Layer 7: Is the camera added correctly to the NVR?
Using the OSI model makes troubleshooting faster and more systematic.
Summary
In this lesson, you learned:
- ✅ What the OSI Model is
- ✅ The seven OSI layers and their functions
- ✅ How data travels from an IP camera to an NVR
- ✅ How Cisco switches, routers, firewalls, and IP cameras fit into the OSI model
- ✅ Practical enterprise CCTV examples
- ✅ A structured approach to network troubleshooting
Next Tutorial (Lesson 3)
TCP/IP Model Explained – The Foundation of Modern Networks
In the next lesson, you'll learn:
- What is the TCP/IP Model?
- TCP/IP vs. OSI Model
- TCP vs. UDP
- Common network protocols (HTTP, HTTPS, FTP, SSH, DNS, DHCP, NTP)
- Ports and port numbers
- Packet flow in an enterprise CCTV network
- Real-world Cisco and Hikvision configuration examples
This lesson will build directly on the OSI model and prepare you for configuring enterprise switches, routers, firewalls, and IP camera systems.
0 Comments