Computer Networks Notes for Placements and Interviews

Computer networks notes for placement interviews: OSI and TCP/IP models, subnetting, TCP vs UDP, DNS, HTTP and HTTPS, routing, with worked examples.

  • Notes: 12
  • Reading time: about 2 hours
  • Cost: Free, no sign-in needed

The OSI and TCP/IP models, IP addressing and subnetting, TCP and UDP, DNS, HTTP, routing and what happens when you type a URL.

Read in this order

  1. Introduction to Computer Networks — Computer networks from the ground up: LAN, MAN and WAN, network topologies, hubs, switches and routers, circuit vs packet switching, and delays worked out.
  2. The OSI Model — The seven OSI layers from application to physical: each layer's job, PDU, protocols and devices, encapsulation step by step, and a mnemonic for the order.
  3. The TCP/IP Model — The TCP/IP model's four layers and the protocols at each, how they map onto the seven OSI layers, and the OSI vs TCP/IP differences interviewers ask about.
  4. IP Addressing and Subnetting — IPv4 addresses, classes A to E, private ranges, CIDR and subnet masks, fully worked subnetting and VLSM examples, supernetting, and IPv4 vs IPv6 compared.
  5. TCP and UDP — TCP and UDP at the transport layer: ports, header fields, the three-way handshake and four-way close, sliding windows, congestion control, and TCP vs UDP.
  6. Domain Name System (DNS) — How DNS turns names into IP addresses: the root, TLD and authoritative hierarchy, recursive and iterative lookups step by step, record types, caching and TTL.
  7. HTTP and HTTPS — How HTTP works: requests and responses, methods, status codes, headers, cookies and sessions, HTTP/1.1 vs HTTP/2 vs HTTP/3, and how HTTPS adds TLS on top.
  8. Routing and Routing Protocols — How routers choose paths: routing tables, longest prefix match, static vs dynamic routing, distance vector and link state worked out, and RIP vs OSPF vs BGP.
  9. Data Link Layer: Framing, Error Control and MAC — The data link layer explained: framing and bit stuffing, parity, checksum and a worked CRC, Hamming code, Go-Back-N and Selective Repeat, ARP and CSMA/CD.
  10. NAT, DHCP and Ports — Well-known port numbers, sockets, how NAT and PAT translate private addresses with a worked translation table, DHCP's DORA process step by step, and APIPA.
  11. What Happens When You Type a URL — The classic networking interview question answered end to end: URL parsing, caches, DNS, ARP, TCP and TLS handshakes, the HTTP request and page rendering.
  12. Network Security Basics — Network security basics: the CIA triad, symmetric vs asymmetric encryption, hashing, digital signatures and certificates, firewalls, VPNs and common attacks.

Test yourself

Other subjects