Interview Q&A / Computer Networks

INTERVIEW Q&A · 55 QUESTIONS

Computer Networks interview questions

What happens when you open a website, TCP vs UDP, DNS and HTTP.

  1. How does DNS resolution work, step by step?

    Your device asks a recursive resolver, which checks its cache and, if needed, asks a root server, then the TLD server (like .com), then the domain's authoritative server, which returns the IP address. Every answer carries a TTL, so resolvers and devices cache it and skip most of these steps next time.

    IntermediateIn-depth4 min read
  2. What is DNS TTL, and why do DNS changes seem to take time to "propagate"?

    TTL is how many seconds resolvers may cache a record. When you change a record, resolvers that cached the old one keep serving it until its TTL expires, so different users see the change at different times.

    BeginnerQuick answer1 min read
  3. How does traceroute discover the path to a server?

    It sends packets with TTL set to 1, then 2, then 3 and so on. Each router that drops a packet at TTL 0 replies with an ICMP Time Exceeded message, revealing its address, until the destination itself replies.

    IntermediateQuick answer1 min read
  4. What changes in a packet as it passes through routers?

    The IP source and destination stay the same (without NAT), but each router decrements the TTL by 1 and the Ethernet frame is rebuilt with new source and destination MAC addresses for the next link.

    IntermediateQuick answer1 min read