Computer networks for placements: interview questions by topic
Computer networks is one of the core CS subjects in placement interviews, along with operating systems, DBMS and OOP, and it matters beyond networking roles: backend, cloud and security engineers all rely on it every day. Interviews mix definitions with small calculations, such as the network and broadcast addresses of a subnet, the hosts a prefix can hold, or how a congestion window grows.
Expect to explain the layers of the OSI model and which protocols and devices live in each, how TCP differs from UDP and how its handshake works, how a switch differs from a router, how routing protocols find paths, and what happens when a browser opens a URL, from DNS to HTTP. Interviewers look for answers that connect the layers, because real problems cross them, and written tests add numerical problems on subnets, windows and error detection, so the arithmetic is worth practising as well.
The pages below take one topic each, with answers and worked examples whose figures were recomputed independently, and one question exactly as the diagnostic asks it. The diagnostic draws from every networking topic in the bank and names the ones to read first.
Computer Networks topics, one page each
8 of the 8 Computer Networks topics in the bank have a page so far; the diagnostic draws from all 8.
- OSI model interview questions
The OSI model for interviews: the seven layers and their jobs, OSI vs TCP/IP, devices by layer, the transport layer, ports and the presentation layer.
- IP addressing and subnetting interview questions
IP addressing for interviews: IPv4 and CIDR, subnet masks and network addresses worked out, counting hosts, IPv4 vs IPv6, classful addressing.
- TCP vs UDP interview questions
TCP and UDP for interviews: how they differ, the three-way handshake, how TCP delivers reliably, when UDP fits, sockets and SYN floods.
- TCP flow and congestion control interview questions
Flow and congestion control for interviews: the difference, sliding windows, slow start, AIMD, detecting loss, ARQ protocols and the receive window.
- Data link layer interview questions
The data link layer for interviews: framing and MAC, how ARP works, CSMA/CD and CSMA/CA, CRC error detection, VLANs and Hamming codes.
- Routing protocols interview questions
Routing for interviews: routing tables, distance vector vs link state, count to infinity, BGP, interior vs exterior routing, default routes and TTL.
- DNS and HTTP interview questions
DNS and HTTP for interviews: how DNS resolves a name, what happens when you open a URL, HTTP vs HTTPS, GET vs POST, status codes and cookies.
- Hub, switch and router interview questions
Network devices for interviews: hub vs switch vs router, collision and broadcast domains, gateways, firewalls, load balancers, proxies and modems.
One question, exactly as the diagnostic asks it
From the Computer Networks bank — 30 questions across 8 topics. The answer is marked because this one is public; in a sitting you choose first, then see why each option is right or wrong.
A client opens a TCP connection by sending a SYN with sequence number 100. What acknowledgment number does the server's SYN-ACK carry?
- 1101correct
- 2100
- 30
- 41
In the three-way handshake, the SYN flag consumes one sequence number even though it carries no data. The server acknowledges it by sending the next sequence number it expects, 100 + 1 = 101, along with its own initial sequence number; the client's final ACK then acknowledges the server's ISN + 1. 100 would acknowledge nothing, since an ACK names the next expected number. 0 and 1 confuse the real value with relative sequence numbers, which tools such as Wireshark display by default.
Measure it
Reading the answers tells you what’s true. A diagnostic tells you what you get wrong.
10 Computer Networks questions across its topics, easy to hard, about fifteen minutes. You get a readiness figure with the arithmetic shown, the topics you missed named, and a practice set sized for today. Free: 1 diagnostic a month and 15 problems a day. No card.