← QA

Networks Interview Questions and Answers

Networking for QA and developers: TCP/IP and the OSI model, IP addresses, ports, NAT and DHCP, DNS records and caching, HTTP methods, status codes, headers and caching, HTTPS, TLS and certificates, HTTP/2 and HTTP/3, CORS and cookies, proxies, load balancers and CDNs, DevTools Network, curl, Charles and Wireshark, and testing on slow or broken networks.

225 questions for Networks interviews with answers and explanations - Junior, Middle and Senior levels. Sample questions, online quizzes and coding tasks.

Questions by level

Sample questions

A few questions from each level with the correct answer and an explanation.

Networks · Junior

  1. What does an IP address identify?
    Show the answer

    Correct answer: A network interface of a device on an IP network

    An IP address lets packets find a device's network interface. One machine can have several addresses, and pages or users are identified at higher layers.

  2. What is a port number used for?
    Show the answer

    Correct answer: To pick which process on a host gets the traffic

    The IP address finds the host, the port finds the service on it, e.g. 443 for HTTPS. Together with the protocol they identify one endpoint of a connection.

  3. Which port does HTTPS use by default?
    Show the answer

    Correct answer: 443

    HTTPS listens on 443 by default and plain HTTP on 80. 8080 is a common choice for development servers, not a standard.

  4. Which port does DNS use by default?
    Show the answer

    Correct answer: 53

    DNS uses port 53, mostly over UDP and over TCP for large answers. 25 is SMTP and 22 is SSH.

All 75 questions with answers →

Networks · Middle

  1. What's the difference between a recursive resolver and an authoritative DNS server?
    Show the answer

    Correct answer: The resolver finds answers for clients; the authoritative server owns the zone

    Your ISP or 8.8.8.8 is a recursive resolver: it walks root, TLD and authoritative servers and caches the result. The authoritative server holds the real records.

  2. You plan to move a site to a new IP tomorrow. What should you do with the A record's TTL today?
    Show the answer

    Correct answer: Lower it in advance so caches expire quickly after the switch

    Resolvers keep the old answer until its TTL ends. Lowering the TTL a day ahead makes the switch take minutes, not hours.

  3. Why can't a bare domain like example.com usually be a CNAME?
    Show the answer

    Correct answer: The zone apex must hold SOA and NS records, which can't sit beside a CNAME

    A CNAME can't coexist with other records at the same name. DNS providers offer ALIAS or ANAME (CNAME flattening) for the apex.

  4. After a DNS change, some testers see the new site and others the old one. Why?
    Show the answer

    Correct answer: Resolvers and devices still have the old answer cached

    Each resolver caches independently until the TTL runs out. Check with dig @8.8.8.8 and flush the local DNS cache.

All 75 questions with answers →

Networks · Senior

  1. A Node.js API behind a cloud load balancer returns rare 502s under steady load. What timeout mismatch is a classic cause?
    Show the answer

    Correct answer: The app closes idle keep-alive sockets before the balancer does

    If the backend's keep-alive timeout is shorter than the LB idle timeout, the LB may reuse a socket the app just closed. Keep the app timeout longer than the LB's.

  2. Services in a private subnet get random connection timeouts to one external API at peak. What should you suspect first?
    Show the answer

    Correct answer: Port exhaustion on the NAT gateway for that destination

    A NAT has a limited number of source ports per destination IP. Many short connections exhaust them; pooling and keep-alive help.

  3. What is HTTP request smuggling?
    Show the answer

    Correct answer: Proxy and backend parse message boundaries differently, so one request hides another

    Conflicting Content-Length and Transfer-Encoding can make the backend see a second request the proxy never checked. Test proxy and server pairs, not each alone.

  4. What is web cache poisoning?
    Show the answer

    Correct answer: An unkeyed input changes a response that the cache then serves to everyone

    If a header like X-Forwarded-Host affects the page but isn't in the cache key, one crafted request can poison the cached copy for all users.

All 75 questions with answers →

Coding tasks

Write your solution right in the browser, and tests check it instantly. JavaScript interview classics (debounce, deepClone, Promise.all, an LRU cache), TypeScript tasks on generics, narrowing and utility types checked by the real compiler, Node.js backend logic (middleware, rate limiters, job queues), SQL queries in real PostgreSQL, and React components and hooks like a todo list, tabs, useDebounce and useInterval.

Open tasks →