What is the OSI model?
A 7-layer framework that describes how data travels across a network. Each layer has a specific role.
Each layer has a specific role.
Name the 7 layers of the OSI model in order.
7-Application, 6-Presentation, 5-Session, 4-Transport, 3-Network, 2-Data Link, 1-Physical.
What does Layer 1 (Physical) do?
Transmits raw bits over physical media such as copper cables, fibre optics, or radio waves.
What does Layer 2 (Data Link) do?
Manages data transfer within a single local network. Switches operate here and it’s also responsible for MAC addresses
What does Layer 3 (Network) do?
Handles IP addresses and routes packets between networks. Routers operate here.
IP + Routing + Routers
What does Layer 4 (Transport) do?
Manages end-to-end delivery using port numbers. Uses TCP or UDP.
What does Layer 7 (Application) do?
Provides network services directly to user applications. Protocols: HTTP, DNS, FTP, SMTP.
What is TCP?
A connection-oriented protocol that guarantees reliable, ordered delivery of data. Uses a handshake before transferring data.
What is UDP?
A connectionless protocol with no delivery guarantee. Faster than TCP. Used when speed matters more than reliability.
What are the 3 steps of the TCP handshake?
Give 3 examples of protocols that use TCP.
HTTP, HTTPS, SSH, SMTP, FTP — anything requiring reliable delivery.
Give 3 examples of protocols that use UDP.
DNS, video streaming, VoIP, online gaming — anything where speed matters more than reliability.
What is the main trade-off between TCP and UDP?
TCP = reliable but slower. UDP = fast but no delivery guarantee.
What is an IPv4 address?
A 32-bit number written as four octets (e.g. 192.168.1.10). Each octet ranges from 0 to 255.
What are the three private IPv4 ranges?
10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. These are not routable on the public internet.
What is the loopback address?
127.0.0.1 — always refers to the local machine itself. Also called localhost.
What does /24 mean in CIDR notation?
The first 24 bits are the network. Subnet mask: 255.255.255.0. Allows up to 254 usable host addresses.
What is the difference between a public and private IP?
Public IPs are routable on the internet. Private IPs are used internally and need NAT to reach the internet.
Why was IPv6 introduced?
IPv4 was running out of addresses (only ~4 billion). IPv6 uses 128-bit addresses, providing a vastly larger address space.
What is a port ?
A software-based location that organizes the sending and receiving of data between devices on a network
What are the three port ranges?
0–1023: Well-Known. 1024–49151: Registered. 49152–65535: Dynamic/Ephemeral.
What port does SSH use?
Port 22.
What port does HTTP use?
Port 80.
What port does HTTPS use?
Port 443.