JobNetWork
← All Prep Trek tracks

🌐 Computer Networks, in 10 cards

No chapters to read. Each card gives you the one-line answer, a picture, a quick try-it and the trap interviewers hope you fall into. About 15 minutes for all ten.

0 of 10 done

1 of 10 · Basics

What are the 7 layers of the OSI model?

Say this first

A 7-layer reference model, from the physical wire at the bottom to the application at the top. Each layer only talks to the one directly above and below it.

Picture it

#LayerDoes what
7ApplicationWhat the user's app actually uses — HTTP, SMTP, FTP
6PresentationFormats/encrypts data — SSL/TLS, encoding
5SessionOpens, manages and closes a connection
4TransportEnd-to-end delivery — TCP, UDP
3NetworkRouting between networks — IP, routers
2Data LinkNode-to-node delivery on one network — MAC, switches
1PhysicalActual bits on the wire/radio — cables, signals

Mnemonic: "All People Seem To Need Data Processing" (7→1).

Try it

A router mainly operates at which layer?

Common trap

Reciting all 7 layers without being able to say what any of them actually do. Interviewers usually only care that you can place TCP/IP and HTTP correctly.

Say it like this

OSI is a 7-layer model from physical wires up to the application; each layer only talks to its direct neighbours.

2 of 10 · Basics

How does the TCP/IP model map to OSI?

Say this first

TCP/IP is the 4-layer model actually used on the real internet — it collapses OSI's top three layers into one, and its bottom two into one.

Picture it

OSI (7 layers)

  • • Application
  • • Presentation
  • • Session
  • • Transport
  • • Network
  • • Data Link
  • • Physical

OSI is the teaching model; TCP/IP is what's actually implemented and running the internet.

Try it

Which model does the real internet actually run on?

Common trap

Saying OSI and TCP/IP are the same thing, or that the internet "runs on OSI." OSI is the map; TCP/IP is the territory.

Say it like this

TCP/IP is the 4-layer model the internet actually runs on — OSI is the 7-layer teaching reference it maps onto.

3 of 10 · Transport

TCP vs UDP — what's the difference?

Say this first

TCP is connection-oriented and reliable — it guarantees delivery and order, at the cost of overhead. UDP is connectionless and fast, with no delivery guarantee.

Picture it

TCP

  • • Connection-oriented (handshake first)
  • • Reliable — guarantees delivery & order
  • • Slower, more overhead
  • • Used by: HTTP, HTTPS, email, file transfer

Try it

Why would a video call use UDP instead of TCP?

Common trap

Saying UDP is "worse" than TCP. It's a trade-off, not a downgrade — each is the right choice for different traffic.

Say it like this

TCP trades speed for reliability with a handshake and delivery guarantees; UDP trades reliability for speed with none of that overhead.

4 of 10 · Transport

Walk me through the TCP three-way handshake.

Say this first

Three steps before any data moves: SYN, SYN-ACK, ACK — both sides confirm they're ready and agree on starting sequence numbers.

Picture it

  1. 1SYN Client sends a SYN packet: "I'd like to connect, here's my starting sequence number."

Closing a connection is a separate 4-step FIN/ACK exchange, not the reverse of this.

Try it

What does the handshake actually establish before data is sent?

Common trap

Confusing the TCP handshake with the TLS/SSL handshake (which negotiates encryption for HTTPS) — they're two different handshakes, back to back.

Say it like this

TCP opens a connection with a 3-step SYN, SYN-ACK, ACK handshake before any actual data is sent.

5 of 10 · Addressing

What's a subnet mask actually for?

Say this first

A subnet mask splits an IP address into a network part and a host part — it tells devices which addresses are "local" versus need routing.

Picture it

NotationMeaning
192.168.1.10An IP address — identifies one device
255.255.255.0Subnet mask — first 3 octets are network, last is host
192.168.1.0/24CIDR notation — same mask, written as a prefix length
192.168.1.255Broadcast address for this subnet — reaches every host on it

/24 = 24 bits of network, 8 bits left for hosts = up to 254 usable host addresses.

Try it

Two devices are on 192.168.1.10/24 and 192.168.1.20/24. Can they talk directly, without a router?

Common trap

Treating the IP address alone as enough information — without the subnet mask, you can't tell which devices are "local" to each other.

Say it like this

The subnet mask splits an IP into network + host parts, which is how a device knows if another address is local or needs a router.

6 of 10 · Addressing

Public vs private IP — and what does NAT do?

Say this first

Private IPs (like 192.168.x.x) only work inside your local network. NAT translates them to one public IP so your whole home network can share a single internet-facing address.

Picture it

Private IP

  • • Ranges: 10.x, 172.16-31.x, 192.168.x
  • • Only routable within a local network
  • • Free to reuse — every home network uses 192.168.1.x

NAT (Network Address Translation) is what sits at your router, swapping private IPs for the one public IP on the way out.

Try it

Why can every home network reuse 192.168.1.1 for its router without conflicts?

Common trap

Assuming a private IP (192.168.x.x) is directly reachable from the internet. It isn't — NAT at the router is what makes outbound traffic work at all.

Say it like this

Private IPs are only valid inside a local network; NAT at the router translates them to one shared public IP for internet traffic.

7 of 10 · DNS

Walk me through what happens during a DNS lookup.

Say this first

Your browser needs an IP address for a domain name, so it asks a chain of DNS servers — usually resolved in milliseconds and cached afterward.

Picture it

  1. 1Browser/OS cache Check if this domain's IP was already looked up recently.

This whole chain is why a DNS change can take time to "propagate" — caches at every step need to expire.

Try it

You just changed a domain's DNS record, but visitors still see the old server. Why?

Common trap

Expecting DNS changes to take effect immediately everywhere. TTL-based caching is a feature, not a bug — it's what keeps the whole system fast.

Say it like this

DNS resolves a domain to an IP by walking root → TLD → authoritative servers, caching the answer at every step based on its TTL.

8 of 10 · Web

HTTP vs HTTPS — what does the 'S' actually add?

Say this first

HTTPS is HTTP wrapped in TLS encryption — the 'S' adds confidentiality, integrity and a verified identity for the server you're talking to.

Picture it

HTTP

  • • Port 80
  • • Plain text — readable by anyone intercepting it
  • • No identity verification

The TLS handshake (certificate exchange + key negotiation) happens after the TCP handshake, before any HTTP request is sent.

Try it

An attacker on the same public Wi-Fi intercepts your traffic. What can they read on an HTTP site vs an HTTPS one?

Common trap

Thinking HTTPS means a site is trustworthy. It only guarantees the connection is encrypted and the certificate is valid — not that the site's content itself is legitimate.

Say it like this

HTTPS is HTTP over TLS — it encrypts the traffic and verifies the server's identity via a certificate; plain HTTP does neither.

9 of 10 · Basics

What are the common port numbers interviewers expect you to know?

Say this first

A handful of ports come up constantly — know these cold, you'll use them to reason about firewalls, URLs and traffic.

Picture it

PortProtocol
20/21FTP
22SSH
25SMTP (email sending)
53DNS
80HTTP
443HTTPS
3306MySQL
5432PostgreSQL

A port number is just the "which service on this machine" part of an address — the IP gets you to the machine, the port gets you to the right service.

Try it

A firewall blocks outbound port 443. What breaks?

Common trap

Mixing up 80/443 (web) with 25 (email) or 22 (SSH) under interview pressure — these come up fast in rapid-fire rounds, so drill them until they're automatic.

Say it like this

80 is HTTP, 443 is HTTPS, 22 is SSH, 53 is DNS — the handful of ports worth knowing cold.

10 of 10 · Routing

Router vs switch vs hub — what's the actual difference?

Say this first

A hub blindly repeats data to every port. A switch is smarter — it learns MAC addresses and sends data only to the right port. A router connects separate networks and decides the path between them.

Picture it

Switch (Layer 2)

  • • Connects devices within one local network
  • • Learns MAC addresses, forwards only to the right port
  • • Hub does the same job but dumbly — floods every port instead

Try it

Your laptop and printer are both plugged into the same switch and can print fine. Why don't you need a router for that?

Common trap

Calling a home "router" just a router — most consumer boxes are actually a router + switch + Wi-Fi access point combined into one device.

Say it like this

A switch moves traffic within one local network using MAC addresses; a router connects separate networks using IP addresses.

Full Computer Networks Notes

Want the rest?

The free cards cover the basics. The full notes go deeper into the questions that actually come up in interviews:

  • • Routing protocols, NAT edge cases and firewalls
  • • Congestion control, flow control and error detection
  • • IPv4 vs IPv6, ARP, and the full subnetting toolkit
  • • More common interview questions, rapid-fire style
See guides and what's coming →

A prep aid, not a guarantee of a job.