---
title: "Quiz: The OSI Model"
domain: networking
level: beginner
questions: 10
---

# Quiz: The OSI Model

## Questions

### 1. In a layered network model, how does each layer relate to the others?
*Objective: 1 — Explain why layered network models exist and what problems they solve.*

- A) Each layer talks directly to every other layer on the same machine, so any layer can skip the ones in between.
- B) Each layer uses the service of the layer below, provides a service to the layer above, and talks to the same layer on the other machine through a protocol.
- C) Each layer must come from the same vendor as the layers next to it, so their formats match.
- D) Each layer needs to know which physical medium is in use, so it can format its data for the cable or radio.

### 2. Users report that an internal web application is unreachable. A technician checks the link lights, then pings the server's Internet Protocol (IP) address, then tests whether Transmission Control Protocol (TCP) port 443 answers, and only then looks at the application logs. Which benefit of a layered model is the technician using?
*Objective: 1 — Explain why layered network models exist and what problems they solve.*

- A) Modularity: each layer can be replaced without changing the others.
- B) Interoperability: equipment from different vendors works together.
- C) Encapsulation: each layer adds its own header to the data.
- D) Troubleshooting: testing one layer at a time rules out whole classes of causes.

### 3. Which list shows the seven Open Systems Interconnection (OSI) layers in the correct order, from Layer 1 to Layer 7?
*Objective: 2 — Identify the seven OSI layers in order, with each layer's main role and its protocol data unit (PDU).*

- A) Physical, Data Link, Network, Transport, Session, Presentation, Application
- B) Physical, Network, Data Link, Transport, Session, Presentation, Application
- C) Physical, Data Link, Network, Session, Transport, Presentation, Application
- D) Physical, Data Link, Transport, Network, Presentation, Session, Application

### 4. Which row correctly matches an OSI layer with its main role and its PDU?
*Objective: 2 — Identify the seven OSI layers in order, with each layer's main role and its protocol data unit (PDU).*

- A) Network — moves data between devices on the same link — frame
- B) Data Link — chooses paths across multiple networks — packet
- C) Transport — delivers data between processes end to end — segment (TCP) or datagram (User Datagram Protocol, UDP)
- D) Physical — detects transmission errors with a checksum — frame

### 5. While reviewing a capture, you see a Domain Name System (DNS) query for `example.com` carried in a UDP datagram to port 53. Which mapping of these two protocols to OSI layers is correct?
*Objective: 3 — Map common protocols and devices to their layer (HTTP, TLS, TCP/UDP, IP, Ethernet, switch, router…).*

- A) DNS at Layer 7 (Application); UDP at Layer 4 (Transport)
- B) DNS at Layer 3 (Network), because it deals with IP addresses; UDP at Layer 4 (Transport)
- C) DNS at Layer 7 (Application); UDP at Layer 3 (Network), because it has no connections
- D) DNS at Layer 5 (Session); UDP at Layer 2 (Data Link)

### 6. A web server sits behind a stateful firewall that only allows TCP port 443. Attackers still reach the application with malicious input hidden inside normal-looking HTTP Secure (HTTPS) requests. Which additional control works at the layer where this attack happens?
*Objective: 3 — Map common protocols and devices to their layer (HTTP, TLS, TCP/UDP, IP, Ethernet, switch, router…).*

- A) Port security on the access switch, which limits the Media Access Control (MAC) addresses allowed per port
- B) Ingress filtering on the edge router (Best Current Practice 38, BCP 38), which drops packets with spoofed source IP addresses
- C) A web application firewall (WAF) that inspects Hypertext Transfer Protocol (HTTP) requests after Transport Layer Security (TLS) is decrypted
- D) Closing more TCP ports on the stateful firewall

### 7. You open a captured frame in Wireshark and see these lines in the packet details pane. When the destination host decapsulates this frame, which field tells its IP layer to hand the payload to TCP?
*Objective: 4 — Describe encapsulation and decapsulation as data travels from sender to receiver.*

```text
Ethernet II, Src: 00:00:5e:00:53:10, Dst: 00:00:5e:00:53:01
    Type: IPv4 (0x0800)
Internet Protocol Version 4, Src: 192.0.2.10, Dst: 203.0.113.80
    Protocol: TCP (6)
Transmission Control Protocol, Src Port: 50514, Dst Port: 80
Hypertext Transfer Protocol
```

- A) The Ethernet Type field, `0x0800`
- B) The IP Protocol field, `6`
- C) The TCP destination port, `80`
- D) The destination MAC address, `00:00:5e:00:53:01`

### 8. A capture on an Ethernet link with a maximum transmission unit (MTU) of 1500 bytes shows a full-size TCP segment over IPv4. The IPv4 header is 20 bytes. The TCP header is 32 bytes because it carries a 12-byte timestamp option. How many bytes of application data does the segment carry?
*Objective: 4 — Describe encapsulation and decapsulation as data travels from sender to receiver.*

- A) 1482
- B) 1500
- C) 1460
- D) 1448

### 9. Which layer of the TCP/IP model in RFC 1122 covers the jobs of OSI Layers 1 (Physical) and 2 (Data Link)?
*Objective: 5 — Compare the OSI model with the TCP/IP model.*

- A) Internet
- B) Transport
- C) Link
- D) Application

### 10. A colleague says: "The Internet runs on TCP/IP, not OSI, so we should stop calling our device a Layer 7 load balancer." What is the best response?
*Objective: 5 — Compare the OSI model with the TCP/IP model.*

- A) They are right: OSI layer numbers don't apply to networks that run TCP/IP.
- B) They are wrong: the Internet actually runs the original OSI protocols at every layer.
- C) They are wrong: TCP/IP also has seven layers, so the numbers line up exactly.
- D) They are wrong: TCP/IP is what devices run, but OSI remains the shared reference vocabulary, so "Layer 7" still clearly means "works with application data."

---

## Answer key

<details>
<summary>Show answers</summary>

| # | Answer | Explanation |
|---|---|---|
| 1 | B | Each layer offers a service upward, uses the service below, and talks to its peer layer through a protocol. That is what keeps layers independent, so they don't need to know about the medium (D) or come from one vendor (C). |
| 2 | D | Checking the link, then IP reachability, then the port, then the application tests one layer at a time, which narrows the fault quickly. Modularity (A) is about swapping a layer's technology, not about diagnosing faults. |
| 3 | A | From the bottom: Physical, Data Link, Network, Transport, Session, Presentation, Application ("Please Do Not Throw Sausage Pizza Away"). The distractors swap neighbouring layers, a common slip when memorising. |
| 4 | C | The Transport layer delivers data between processes end to end, and its PDU is a segment (TCP) or datagram (UDP). Moving frames on one link is Data Link work, choosing paths is Network work, and the Physical layer only sends bits. |
| 5 | A | DNS is an application protocol (Layer 7) even though it answers questions about IP addresses. UDP is a transport protocol (Layer 4) with ports; having no connections doesn't move it to Layer 3. |
| 6 | C | The attack is inside HTTP requests, so it needs a Layer 7 control such as a WAF. A Layer 4 firewall only sees addresses and ports, so closing more ports (D) doesn't help when the attack uses the allowed port 443. |
| 7 | B | The IP Protocol field says what the IP payload is: `6` means TCP and `17` means UDP. The Ethernet Type (A) is read one step earlier and only says "the payload is IPv4"; the port (C) is read after TCP has the segment. |
| 8 | D | The MTU limits the IP packet, so 1500 − 20 (IPv4) − 32 (TCP with options) = 1448 bytes. 1460 (C) assumes a 20-byte TCP header without options; 1482 (A) wrongly subtracts the Ethernet header, which isn't counted in the MTU. |
| 9 | C | RFC 1122's Link layer covers OSI Layers 1 and 2 (for example Ethernet and Wi-Fi). The Internet layer (A) matches OSI Layer 3, where IP works. |
| 10 | D | TCP/IP is what runs, but engineers and vendors still use OSI layer numbers as a common vocabulary. TCP/IP in RFC 1122 has four layers (not seven), and the original OSI protocols are rarely used today. |

</details>
