Last Minute Notes

Networking Interview Playbook

Networking interview rehearsal: the full 'what happens when you type a URL' answer with a diagram, a 50-question bank from beginner to senior with pointers, scenario questions, cheat sheets for ports, layers, and subnets, common mistakes, and a 7-day study plan.

📘 Networking Interview Playbook

The other pages teach the material. This page is for rehearsal: the most famous networking question answered in full, a question bank with what a strong answer contains, scenario prompts, cheat sheets, and a study plan.

Table of Contents

  1. What Interviewers Look For
  2. What Happens When You Type a URL
  3. Question Bank
  4. Scenario Questions
  5. Cheat Sheets
  6. Common Mistakes
  7. Study Plan

1. What Interviewers Look For

LevelExpected
Junior / new gradOSI and TCP/IP layers, TCP vs UDP, handshake, DNS basics, HTTP vs HTTPS, subnet math, common ports
MidTLS handshake, HTTP/2 vs HTTP/3, load balancers L4 vs L7, CDN caching, WebSockets, NAT, debugging with curl, dig, ss
SeniorCongestion and flow control, TIME_WAIT and connection pooling, timeouts and retries across hops, MTU issues, DDoS and zero trust, cloud VPC design
SRE / infraBGP and anycast, packet captures, kernel tuning, load balancer internals, incident narratives with numbers

Signals that raise your rating: you quote rough numbers (RTTs, MTU, TTLs), you name the failure mode of each component, and you can say which tool you would use to prove a hypothesis.


2. What Happens When You Type a URL

The classic question. Go layer by layer and let the interviewer choose where to dig.

Points to hit, in order:

  1. URL parsing: scheme, host, port, path; non-URLs go to the search engine, and HSTS may upgrade http to https.
  2. Caches: browser HTTP cache, service worker, then DNS caches (browser, OS, /etc/hosts).
  3. DNS: recursive resolver, root, TLD, authoritative; TTLs; possibly an HTTPS record advertising HTTP/3; Happy Eyeballs races IPv6 and IPv4.
  4. Routing to the IP: the OS picks a route; for off-subnet destinations it ARPs for the default gateway; NAT at the home router; ISP; BGP across autonomous systems; often anycast to the nearest CDN edge.
  5. Transport: TCP three-way handshake (1 RTT), or QUIC which combines transport and TLS.
  6. TLS: ClientHello with SNI and ALPN, key exchange (X25519 or post-quantum hybrid), certificate chain validation, 1 RTT in TLS 1.3.
  7. HTTP request: method, path, headers, cookies; HTTP/2 or HTTP/3 multiplexing.
  8. Server side: CDN cache, load balancer (L7 routing, TLS termination), reverse proxy, application, database and caches, response.
  9. Response: status, headers (Cache-Control, Set-Cookie, Content-Encoding), body.
  10. Rendering: parse HTML into the DOM, CSS into the CSSOM, execute JS, layout, paint, composite; further requests reuse the same connection.

Deep dives to have ready: DNS caching and TTLs, the TLS handshake, TCP slow start, CDN cache hits vs misses, and the critical rendering path (see Frontend System Design).


3. Question Bank

3.1 Fundamentals (10)

#QuestionStrong answer includesRead
1Explain the OSI model.Seven layers with a protocol and device each, why layering helpsFundamentals
2OSI vs TCP/IP?Reference vs practice, how layers mapFundamentals
3Hub vs switch vs router?L1 repeat vs L2 MAC forwarding vs L3 IP routingFundamentals
4MAC vs IP address?Link-local vs end-to-end, flat vs hierarchical, MAC changes per hopFundamentals
5What is encapsulation?Headers per layer, frame / packet / segmentFundamentals
6Bandwidth vs latency vs throughput?Capacity vs delay vs achieved rate, BDPFundamentals
7What is MTU and what breaks when it is wrong?1500, fragmentation, PMTUD, black holesFundamentals
8What is a VLAN?Logical LAN on shared switches, 802.1Q tags, broadcast domainsFundamentals
9Collision domain vs broadcast domain?Per switch port vs per VLAN, routers split broadcastsFundamentals
10What is a socket?OS endpoint, 5-tuple identifies a connectionTCP, UDP, QUIC

3.2 IP and Routing (10)

#QuestionStrong answer includesRead
11Subnet 192.168.5.77/26: network, broadcast, hosts?192.168.5.64, .127, 62 hostsIP and Routing
12Split a /24 into 8 subnets./27, 32 addresses, 30 hosts eachIP and Routing
13What are private IP ranges?10/8, 172.16/12, 192.168/16, why NATIP and Routing
14How does NAT work?Port-based translation table, costs, traversalIP and Routing
15IPv4 vs IPv6?Address size, header, SLAAC, NDP, no NAT needed, dual stackIP and Routing
16How does ARP work?Broadcast request, unicast reply, cache, gateway MAC for remote IPs, spoofingIP and Routing
17Explain DHCP.DORA, lease contents, relay, snoopingIP and Routing
18How does a router choose a path?Longest prefix match, TTL, next hopIP and Routing
19OSPF vs BGP?Link state inside an AS vs policy path vector between ASes, RPKIIP and Routing
20What is anycast and who uses it?Same prefix from many sites, DNS roots, CDNs, DDoS absorptionIP and Routing

3.3 Transport (12)

#QuestionStrong answer includesRead
21TCP vs UDP, with use cases?Guarantees vs overhead, DNS / VoIP / games / QUICTCP, UDP, QUIC
22Explain the three-way handshake. Why not two?ISNs in both directions, old duplicate SYNsTCP, UDP, QUIC
23Explain connection teardown and TIME_WAIT.FIN each way, 2 x MSL, why, consequencesTCP, UDP, QUIC
24What does CLOSE_WAIT piling up mean?App never closes socketsTCP, UDP, QUIC
25How does TCP guarantee reliability?Sequence numbers, ACKs, RTO, fast retransmit, SACK, checksumTCP, UDP, QUIC
26Flow control vs congestion control?rwnd vs cwnd, receiver vs networkTCP, UDP, QUIC
27Explain slow start and AIMD.Exponential then linear, halve on lossTCP, UDP, QUIC
28CUBIC vs BBR?Loss-based vs model-based, lossy long pathsTCP, UDP, QUIC
29What is a SYN flood and SYN cookies?Half-open exhaustion, stateless cookie in ISNTCP, UDP, QUIC
30What is head-of-line blocking?In-order delivery stalls later data, HTTP/1.1, HTTP/2 over TCP, QUIC fixTCP, UDP, QUIC
31Why was QUIC built on UDP?Kernel and middlebox ossification, user-space evolutionTCP, UDP, QUIC
32Nagle's algorithm and TCP_NODELAY?Coalesce small writes, delayed ACK interaction, 40 ms stallsTCP, UDP, QUIC

3.4 DNS, HTTP, TLS (10)

#QuestionStrong answer includesRead
33Walk through DNS resolution.Caches, recursive resolver, root / TLD / authoritative, TTLDNS, HTTP, TLS
34A, AAAA, CNAME, MX, TXT, NS?What each maps, CNAME apex ruleDNS, HTTP, TLS
35How do you migrate DNS with minimal downtime?Lower TTL early, switch, verify, raise TTL, watch pinned clientsDNS, HTTP, TLS
36HTTP/1.1 vs HTTP/2 vs HTTP/3?Keep-alive, multiplexing, HPACK, QUIC, HOLDNS, HTTP, TLS
37HTTP vs HTTPS?TLS adds confidentiality, integrity, authentication; port 443DNS, HTTP, TLS
38Explain the TLS 1.3 handshake.ClientHello key share, ServerHello, cert, CertificateVerify, Finished, 1 RTTDNS, HTTP, TLS
39Symmetric vs asymmetric encryption in TLS?Asymmetric for auth and key agreement, symmetric for bulkDNS, HTTP, TLS
40How does certificate validation work?Chain to root, signatures, dates, SAN, revocationDNS, HTTP, TLS
41What is forward secrecy?Ephemeral ECDHE, past sessions safe after key leakDNS, HTTP, TLS
42What is mTLS and where is it used?Client certs, service mesh, zero trustDNS, HTTP, TLS

3.5 Infrastructure and Security (8)

#QuestionStrong answer includesRead
43L4 vs L7 load balancer?Per connection vs per request, TLS, features, costInfrastructure
44Load balancing algorithms?Round-robin, least connections, P2C, consistent hashingInfrastructure
45Forward vs reverse proxy?Acts for clients vs servers, uses, X-Forwarded-For trustInfrastructure
46How does a CDN work?Edges, anycast or DNS steering, cache headers, invalidation, shieldInfrastructure
47WebSockets vs SSE vs polling?Direction, transport, scalingInfrastructure
48Stateful vs stateless firewall?Connection tracking, SG vs NACLSecurity
49What is a DDoS and how do you mitigate it?Volumetric / protocol / L7, amplification, anycast absorb, rate limitSecurity
50What is zero trust?Identity per request, mTLS, no implicit network trustSecurity

4. Scenario Questions

Answer each with: clarify scope, form hypotheses, name the tool that proves each, fix, prevent.

ScenarioStrong direction
"The site is slow for users in Australia only."Measure with RUM by region; RTT math (about 200 ms to US), handshake count; CDN edge or regional deployment; TLS 1.3 and HTTP/3; cache static assets at edge
"Service A gets intermittent 502s from service B through an LB."Idle timeout ordering (B's keep-alive timeout shorter than LB's), deploy draining, B crashes; check LB logs for backend reset; set server idle timeout > LB's
"After moving to Kubernetes, DNS lookups add 20 ms."ndots:5 search-domain expansion, conntrack races on UDP, CoreDNS load; use FQDNs with trailing dot, NodeLocal DNSCache
"Large file uploads hang, small ones work, only over the VPN."MTU reduced by tunnel headers, ICMP blocked; test with ping -M do; MSS clamping
"We need 1 million concurrent WebSocket connections."Per-connection memory, file descriptor limits, ephemeral ports at the LB, pub/sub backplane, graceful drain, heartbeat intervals
"The payment provider asks for a fixed IP allowlist."Egress through NAT gateway with elastic IPs, or a forward proxy; watch port exhaustion; high availability of the NAT
"Design the network for a new three-tier app on AWS."VPC CIDR planning, public / private / data subnets across 3 AZs, ALB, NAT per AZ, SGs by tier, VPC endpoints, flow logs
"A certificate expired in production at 3 AM."Immediate renewal and deploy; root cause in the renewal automation; monitor expiry with alerts at 30 / 14 / 7 days; shorter lifetimes coming make automation mandatory

5. Cheat Sheets

Ports

PortServicePortService
20, 21FTP443HTTPS (TCP), HTTP/3 (UDP)
22SSH, SFTP465, 587SMTP submission
23Telnet853DNS over TLS
25SMTP993IMAPS
53DNS1433SQL Server
67, 68DHCP3306MySQL
80HTTP3389RDP
110POP35432PostgreSQL
123NTP6379Redis
143IMAP8080Alternate HTTP
179BGP9092Kafka
389, 636LDAP, LDAPS27017MongoDB

Layers and devices

LayerUnitAddressDeviceProtocols
7 ApplicationMessageURL, hostnameL7 LB, proxy, WAFHTTP, DNS, TLS, SSH
4 TransportSegmentPortL4 LB, stateful firewallTCP, UDP, QUIC
3 NetworkPacketIPRouterIP, ICMP, BGP, OSPF
2 Data linkFrameMACSwitch, bridge, APEthernet, Wi-Fi, ARP
1 PhysicalBitNoneHub, repeater, cableFiber, copper, radio

Subnets

PrefixHostsBlock size in last octet
/24254256
/25126128
/266264
/273032
/281416
/2968
/3024

TCP vs UDP

TCPUDP
ConnectionHandshakeNone
ReliabilityACKs, retransmitNone
OrderingYesNo
BoundariesByte streamDatagrams
Congestion controlYesNo
Header20 to 60 bytes8 bytes
UsesHTTP/1.1 and HTTP/2, SSH, databasesDNS, VoIP, games, QUIC

6. Common Mistakes

  • Saying TLS is "at layer 6" as a fact; it sits between transport and application and does not map cleanly.
  • Confusing flow control with congestion control.
  • Claiming UDP is "unreliable so never use it"; QUIC and all real-time media run on it.
  • Forgetting that HTTP/2 still suffers TCP head-of-line blocking.
  • Thinking DNS changes "propagate"; caches expire by TTL.
  • Treating NAT as a security control.
  • Saying "ping fails, so the server is down".
  • Blocking all ICMP.
  • Using L4 load balancing for gRPC and wondering why one backend is hot.
  • Not setting timeouts, or setting the client idle timeout longer than the server's.
  • Opening a new connection per request under load.

7. Study Plan

DayFocusOutput
1Fundamentals: layers, addresses, devices, numbersDraw OSI from memory with a protocol per layer
2IP and Routing: subnetting drills, NAT, ARP, DHCPSolve 10 subnet problems by hand, check with Python
3TCP, UDP, QUIC: handshake, teardown, reliability, congestionDraw the state machine and the congestion sawtooth
4DNS, HTTP, TLSRun dig +trace and openssl s_client on a real site
5Infrastructure and SecurityExplain L4 vs L7, CDN caching, DDoS layers
6TroubleshootingUse curl timing and tcpdump on your own traffic
7This pageSay "what happens when you type a URL" out loud in 5 minutes, then answer the question bank

Related: Operating Systems for sockets, file descriptors, and epoll, and System Design for how these pieces combine at scale.

On this page