---
description: Nerd Cafe
---

# OSI Model: Layers 1-7 (Functions & Devices)

The <mark style="color:red;">**OSI (Open Systems Interconnection) Model**</mark> is a conceptual framework that standardizes the functions of a telecommunication or computing system into seven distinct layers. This helps in troubleshooting, designing networks, and understanding how data flows through a network.

### <mark style="color:blue;">**Why is the OSI Model Important?**</mark>

* Helps in understanding network communication.
* Assists in troubleshooting network issues.
* Ensures interoperability between different vendors’ devices.
* Provides a clear separation of networking tasks.

### <mark style="color:blue;">**OSI Model Overview**</mark>

The OSI Model is divided into <mark style="color:red;">**7 layers**</mark>, from <mark style="color:red;">**Layer 1 (Physical)**</mark> to <mark style="color:red;">**Layer 7 (Application)**</mark>. Each layer has specific <mark style="color:red;">**functions**</mark> and is associated with certain <mark style="color:red;">**devices**</mark>.

<table><thead><tr><th width="67">Layer</th><th width="125">Name</th><th width="374">Function</th><th>Devices</th></tr></thead><tbody><tr><td>7</td><td>Application</td><td>User interaction with network services</td><td>Web browsers, Email clients</td></tr><tr><td>6</td><td>Presentation</td><td>Data encryption, compression, translation</td><td>SSL, TLS, JPEG, MPEG</td></tr><tr><td>5</td><td>Session</td><td>Establishing, maintaining, terminating sessions</td><td>NetBIOS, RPC</td></tr><tr><td>4</td><td>Transport</td><td>Reliable/unreliable data delivery, segmentation</td><td>TCP, UDP</td></tr><tr><td>3</td><td>Network</td><td>Routing and addressing</td><td>Routers, IP, IPv4, IPv6</td></tr><tr><td>2</td><td>Data Link</td><td>MAC addressing, error detection, framing</td><td>Switches, MAC address</td></tr><tr><td>1</td><td>Physical</td><td>Transmission of raw data (bits) over the medium</td><td>Cables, Hubs, NICs</td></tr></tbody></table>

### <mark style="color:blue;">**Layer 1: Physical Layer**</mark>

#### **Functions:**

* Responsible for <mark style="color:red;">**raw bit transmission**</mark> over the network.
* Defines <mark style="color:red;">**cabling**</mark>, <mark style="color:red;">**voltage levels**</mark>, and <mark style="color:red;">**physical connections**</mark>.
* Determines network topology (star, bus, mesh).

#### **Devices:**

* **Network Interface Cards (NICs)**
* **Hubs**
* **Cables** (Coaxial, Fiber Optic, Twisted Pair)
* **Repeaters**
* **Modems**

#### **Practical Example:**

🔧 _Scenario:_\
A company is experiencing slow network speeds. A network technician checks the **cabling** and discovers a broken **Ethernet cable**. Replacing the cable resolves the issue.

### <mark style="color:blue;">**Layer 2: Data Link Layer**</mark>

#### **Functions:**

* Manages <mark style="color:red;">**MAC addresses**</mark> and <mark style="color:red;">**switching**</mark>.
* Detects and corrects errors in <mark style="color:red;">**frame transmission**</mark>.
* Breaks packets into <mark style="color:red;">**frames**</mark>.
* Uses <mark style="color:red;">**Media Access Control (MAC) addressing**</mark>.

#### **Devices:**

* **Switches**
* **Bridges**

#### **Practical Example:**

🔧 _Scenario:_\
A computer is connected to a switch but cannot communicate. Using the `ipconfig /all` command, the technician notices the **MAC address** is missing. **Replacing the faulty NIC** fixes the problem.

### <mark style="color:blue;">**Layer 3: Network Layer**</mark>

#### **Functions:**

* Responsible for <mark style="color:red;">**IP addressing**</mark> and <mark style="color:red;">**routing**</mark>.
* Uses <mark style="color:red;">**logical addressing**</mark> (IP addresses).
* Determines <mark style="color:red;">**best paths for data**</mark> to travel.

#### **Devices:**

* **Routers**
* **Layer 3 Switches**
* **Firewalls (Some operate at Layer 3)**

#### **Practical Example:**

🔧 _Scenario:_\
A user cannot reach a website. The `ping` command fails. The technician checks the **router configuration** and finds that the **default gateway is incorrect**. Updating the **routing table** resolves the issue.

### <mark style="color:blue;">**Layer 4: Transport Layer**</mark>

#### **Functions:**

* Manages <mark style="color:red;">**end-to-end communication**</mark>.
* <mark style="color:red;">**Segmenting**</mark> and <mark style="color:red;">**reassembling data**</mark>.
* Uses <mark style="color:red;">**TCP (Reliable)**</mark> or <mark style="color:red;">**UDP (Unreliable)**</mark>.

#### **Devices:**

* **Firewalls (Stateful inspection)**
* **Load balancers**

#### **Protocols:**

* **TCP (Transmission Control Protocol)** – Reliable, ordered delivery (e.g., web browsing, email).
* **UDP (User Datagram Protocol)** – Unreliable, fast delivery (e.g., VoIP, live streaming).

#### **Practical Example:**

🔧 _Scenario:_\
A company’s **VoIP calls** are dropping. The technician discovers that the **network prioritizes TCP traffic** over UDP. **Configuring Quality of Service (QoS)** to prioritize **UDP traffic** improves call quality.

### <mark style="color:blue;">**Layer 5: Session Layer**</mark>

#### **Functions:**

* Establishes, maintains, and terminates <mark style="color:red;">**sessions**</mark> between applications.
* Provides **authentication** and **permissions**.

#### **Devices & Protocols:**

* **NetBIOS**
* **Remote Procedure Call (RPC)**
* **Active Directory (For authentication sessions)**

#### **Practical Example:**

🔧 _Scenario:_\
A user cannot access a **remote desktop session**. The technician checks the **session timeout settings** on the server and increases the session time, solving the problem.

### <mark style="color:blue;">**Layer 6: Presentation Layer**</mark>

#### **🔹 Functions:**

* <mark style="color:red;">**Translates**</mark> data into a format the application can read.
* Handles <mark style="color:red;">**encryption**</mark> and <mark style="color:red;">**compression**</mark>.

#### **🔹 Devices & Protocols:**

* **SSL/TLS (Secure Sockets Layer/Transport Layer Security)**
* **JPEG, GIF, PNG (Image formats)**
* **MPEG, MP3 (Media formats)**

#### **🔹 Practical Example:**

🔧 _Scenario:_\
A website is showing a **certificate error**. The technician checks the **SSL/TLS certificate** and finds it **expired**. Renewing the certificate resolves the issue.

### <mark style="color:blue;">**Layer 7: Application Layer**</mark>

#### **🔹 Functions:**

* Provides <mark style="color:red;">**network services**</mark> directly to users.
* Handles <mark style="color:red;">**web browsing**</mark>**,&#x20;**<mark style="color:red;">**file transfer**</mark>**,&#x20;**<mark style="color:red;">**email**</mark>.

#### **🔹 Devices & Protocols:**

* **Web Browsers (Chrome, Firefox)**
* **Email Clients (Outlook, Gmail)**
* **FTP (File Transfer Protocol)**
* **DNS (Domain Name System)**
* **HTTP/HTTPS (Web traffic)**

#### **🔹 Practical Example:**

🔧 _Scenario:_\
A user cannot access **Google.com**. The technician checks the **DNS settings** and finds that the **DNS server is unreachable**. Changing the DNS server to **8.8.8.8 (Google DNS)** resolves the issue.

### <mark style="color:blue;">Practical OSI Model Troubleshooting Steps</mark>

<table><thead><tr><th>Problem</th><th width="208">Likely OSI Layer</th><th>Solution</th></tr></thead><tbody><tr><td>No internet connection</td><td><strong>Layer 1</strong> (Physical)</td><td>Check cables, power, NIC</td></tr><tr><td>Cannot connect to a website</td><td><strong>Layer 3</strong> (Network)</td><td>Check IP settings, router</td></tr><tr><td>Slow file downloads</td><td><strong>Layer 4</strong> (Transport)</td><td>Check TCP settings, congestion</td></tr><tr><td>Corrupt file transfer</td><td><strong>Layer 6</strong> (Presentation)</td><td>Verify file formats, compression</td></tr><tr><td>Unable to log in to a web service</td><td><strong>Layer 7</strong> (Application)</td><td>Check credentials, service status</td></tr></tbody></table>

## <mark style="color:blue;">**Final Thoughts**</mark>

* The OSI Model helps in structured <mark style="color:red;">**troubleshooting**</mark> and <mark style="color:red;">**network design**</mark>.
* <mark style="color:red;">**Each layer**</mark> has <mark style="color:red;">**specific responsibilities**</mark> and <mark style="color:red;">**devices**</mark>.
* Understanding <mark style="color:red;">**how data moves**</mark> across layers <mark style="color:red;">**simplifies debugging**</mark>.

### <mark style="color:blue;">Keywords</mark>

`OSI Model`, `Network Layers`, `Physical Layer`, `Data Link Layer`, `Network Layer`, `Transport Layer`, `Session Layer`, `Presentation Layer`, `Application Layer`, `TCP/IP`, `MAC Address`, `IP Address`, `Routing`, `Switching`, `Protocols`, `Encapsulation`, `Network Devices`, `Troubleshooting`, `Packet Transmission`, `Networking`, `نتورک پلاس`
