OSI Model Practice Quiz
20 multiple-choice questions drawn from all seven layers — PDUs, addressing, ports, subnetting, protocol placement and layer-by-layer troubleshooting. Pick an answer and the explanation appears straight away, so a wrong guess is still worth something.
Nothing is submitted anywhere. Your score stays in this browser, and the home page remembers which layers you have worked through.
All seven layers
-
Which mnemonic gives the OSI layers from Layer 1 up to Layer 7?
“Please Do Not Throw Sausage Pizza Away” reads bottom-up: Physical, Data Link, Network, Transport, Session, Presentation, Application. “All People Seem To Need Data Processing” is the same list top-down.
-
Put these PDUs in order from Layer 1 to Layer 4.
Bit (L1) → frame (L2) → packet (L3) → segment or datagram (L4). Layers 5, 6 and 7 all just call it data.
-
A switch forwards traffic based on what?
A switch is a Layer 2 device. It builds a table of MAC address to port and forwards each frame only where it needs to go.
-
Which layer adds the source and destination IP addresses?
IP addressing is the defining job of the Network Layer, Layer 3. MAC addresses are Layer 2, port numbers are Layer 4.
-
A cable is plugged into the wrong port and the link light is off. Which layer would you troubleshoot first?
No link light means no signal, which is Layer 1. The standard troubleshooting habit is to work up the stack — there is no point checking routes if the cable is dead.
-
Which protocol resolves an IPv4 address into a MAC address?
ARP broadcasts “who has this IP?” on the local segment and caches the MAC address in the reply. DNS resolves names to IPs, which is a different problem.
-
How many usable host addresses are in a /28 subnet?
A /28 has 4 host bits, so 2⁴ = 16 addresses. Take away the network and broadcast addresses and you get 14 usable hosts.
-
What is the correct sequence of the TCP three-way handshake?
SYN, then SYN/ACK, then ACK. FIN is used for teardown, which takes four steps because each direction closes separately.
-
Which of these uses UDP rather than TCP?
DNS queries use UDP port 53 because a lookup fits in one datagram and speed matters more than a handshake. It falls back to TCP for large responses and zone transfers.
-
What does TTL in an IPv4 header prevent?
Every router decrements TTL by one and discards the packet at zero, so a routing loop dies out instead of consuming bandwidth indefinitely.
-
Which layer is responsible for encryption in the OSI model as it is usually taught?
Encryption, compression and character-set translation are all Presentation Layer (Layer 6) concerns. TLS is the usual example, though in practice it straddles several layers.
-
What is the standard MTU of an Ethernet link?
1500 bytes is the standard Ethernet MTU. 1460 is the usual TCP MSS that results from it (1500 − 20 bytes IP − 20 bytes TCP), and 9000 is a jumbo frame.
-
Which device separates broadcast domains?
A router does not pass Layer 2 broadcasts, so each interface is its own broadcast domain. On a switch you need VLANs to achieve the same split.
-
What is the difference between a well-known port and an ephemeral port?
The server listens on a well-known port such as 443, while the client's operating system picks a high-numbered source port for each outgoing connection so replies can be matched to the right process.
-
HTTP, SMTP and DNS all live at which layer?
They are all Application Layer protocols. The transport beneath them (TCP or UDP) is Layer 4.
-
What does the Frame Check Sequence at the end of an Ethernet frame do?
The FCS is a CRC-32 that only detects errors. A corrupt frame is dropped silently, and it is a higher layer such as TCP that notices something is missing and retransmits.
-
In the four-layer TCP/IP model, which OSI layers map onto the Application layer?
TCP/IP collapses Session, Presentation and Application into one layer. That is why session state and encryption end up inside application protocols rather than in layers of their own.
-
Which routing protocol is used between Autonomous Systems on the public internet?
BGP is the internet's exterior gateway protocol, exchanging reachability between ASes. OSPF, RIP and EIGRP are interior protocols that run inside a single AS.
-
You can ping a server by IP address but not by name. Which layer is most likely at fault?
If the IP works, Layers 1 through 4 are clearly fine. Name resolution is DNS, an Application Layer service, so that is where to look.
-
Which statement about UDP is true?
UDP's header is a fixed 8 bytes — source port, destination port, length, checksum — and that is all. No handshake, no acknowledgements, no ordering, no retransmission.