Computer Networking Fundamentals for Interviews

OSI Model (7 Layers)

  1. Physical - Raw bit transmission over wire/fiber.
  2. Data Link - Frames, MAC addresses, Ethernet, ARP.
  3. Network - IP routing, packet forwarding (IP, ICMP).
  4. Transport - End-to-end communication (TCP, UDP).
  5. Session - Manages sessions between applications.
  6. Presentation - Data translation, encryption, compression (SSL/TLS).
  7. Application - User-facing protocols (HTTP, FTP, SMTP, DNS).

HTTP Methods

  • GET: Retrieve a resource (idempotent, no body).
  • POST: Submit an entity to create a resource (non-idempotent).
  • PUT: Replace a resource entirely (idempotent).
  • PATCH: Partial modification of a resource.
  • DELETE: Remove a resource.

DNS Resolution Flow

  1. Browser checks local cache → OS cache → Router cache.
  2. Recursive query to ISP's DNS resolver.
  3. Root nameserver → TLD nameserver (.com, .org) → Authoritative nameserver.
  4. IP address returned and cached.