Computer Networks Deep Dive | Resources by Shumbul Arifa

🌐 Computer Networks Deep Dive

Every web app talks over a network, so interviewers love this subject. Learn the layers, protocols, and the famous "what happens when you type a URL" walkthrough, with a quiz after each section and a scored final quiz.

🎯 Interview-oriented 📝 Quiz after each section 🏆 Final scored quiz

OSI & TCP/IP models

Networking is built in layers, each doing one job and talking only to the layers next to it. The OSI model has 7 layers (a teaching model); the TCP/IP model has 4 (what the internet actually uses).

Layer (top to bottom)JobExample
ApplicationWhat the user's app speaksHTTP, DNS
TransportReliable/fast delivery between appsTCP, UDP
NetworkRouting across networksIP
LinkDelivery on the local wire/wifiEthernet, MAC
Analogy: sending a gift. You write a note (application), box it (transport), address it to a city and street (network/IP), and the local courier hands it to the right door (link). Each layer only cares about its own job.

TCP vs UDP

Both are transport-layer protocols, but they make opposite trade-offs.

TCPUDP
Reliable?Yes, confirms delivery, retransmitsNo guarantees
Ordered?Yes, in-orderNo
SpeedSlower (overhead)Faster (lean)
Use forWeb, email, file transferVideo calls, games, live streams

TCP starts with a three-way handshake (SYN → SYN-ACK → ACK) to set up a reliable connection before any data flows.

Analogy: TCP is a phone call, you confirm the other person heard you ("can you hear me? yes"). UDP is shouting across a field, fast and simple, but you do not know if every word landed. For a live match, missing a frame is fine; for a bank transfer, it is not.

HTTP, HTTPS & status codes

HTTP is the application-layer protocol browsers use to request web resources. HTTPS is HTTP wrapped in TLS encryption, so no one in the middle can read or tamper with it.

Status code families:
  • 2xx success (200 OK).
  • 3xx redirect (301 moved permanently).
  • 4xx client error (404 not found, 401 unauthorized).
  • 5xx server error (500 internal server error).

Common methods: GET (read), POST (create), PUT (update/replace), DELETE (remove).

DNS: names to addresses

DNS (Domain Name System) is the internet's phone book: it translates a human name like github.com into the IP address machines actually use to connect.

Analogy: you remember "Mom" in your contacts, not her full phone number. DNS is that contact list for the whole internet, you type a name, it finds the number.

A lookup may pass through several DNS servers (resolver → root → TLD → authoritative), and results are cached along the way so repeat visits are fast.

What happens when you visit a URL

The classic interview question. Here is the chain, left to right:

In words: the browser resolves the domain to an IP via DNS, opens a TCP connection (plus a TLS handshake for HTTPS), sends an HTTP request, the server returns HTML, and the browser renders it, fetching CSS, JS, and images as needed. You can watch this live with curl -v in the Networking Toolkit.

Final quiz

Ten questions across models, TCP/UDP, HTTP, DNS, and the URL walkthrough. Aim for 7+.

What to do next

🌱 How to use this

Read each section, then take its quiz. The final quiz scores you out of 10. Want to see these concepts run on your own machine? Pair this with the hands-on Networking Toolkit. It is also the deep dive for the CS Fundamentals Networks section. Stuck? Tap ✦ Ask AI.