COMPUTER NETWORKS / OVERVIEW
Computer Networks — The Full Map
How every byte travels from your keyboard to a server across the world
EXPLANATION
A computer network is a system of interconnected devices that can communicate and share resources. Every time you open a browser, the network stack on your machine performs dozens of precisely coordinated operations in milliseconds. The key mental model: communication is hard, so we split the problem into layers. Each layer solves one problem and presents a clean interface to the layer above. This is the OSI and TCP/IP model — the most important design pattern in all of computer science. The two models: • OSI (7 layers) — the academic reference model. Used for understanding and exam questions • TCP/IP (4 layers) — the actual model the internet uses. What your OS implements Why layers matter: your application doesn't need to know if it's on WiFi or Ethernet or fiber. The network layer handles routing, the data link layer handles the physical medium, and your app just sends bytes through a socket. Abstraction at its finest. The full journey of a packet: You type google.com ① Browser calls DNS → resolves to IP address (Application layer) ② TCP connection established via 3-way handshake (Transport layer) ③ Packet given source/dest IP, routing table consulted (Network layer) ④ Packet wrapped in Ethernet frame with MAC addresses (Data Link layer) ⑤ Bits sent over wire/air as electrical/radio signals (Physical layer) ⑥ Router strips frame, reads IP, rewraps, forwards (repeated ~10 times) ⑦ Server receives → unwraps layers → app gets your HTTP request We'll study each layer deeply, then put it all together.
DIAGRAM
OSI MODEL TCP/IP MODEL PROTOCOLS ───────────────────── ──────────────── ────────────────────── 7. Application ─┐ Application HTTP, HTTPS, DNS, FTP, 6. Presentation ─┤ ─────────────── SMTP, WebSocket, gRPC 5. Session ─┘ ──────────────────── ─────────────── 4. Transport Transport TCP, UDP ──────────────────── ─────────────── 3. Network Internet IP, ICMP, ARP ──────────────────── ─────────────── 2. Data Link ─┐ Network Access Ethernet, WiFi (802.11), 1. Physical ─┘ ─────────────── MAC, PPP PACKET JOURNEY: google.com Your App → [HTTP] → [TCP] → [IP] → [Ethernet] → Router → ... → Google
CODE