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 is a TCP connection closed, and what is the TIME_WAIT state?

    Each side closes its own direction with FIN and the other side ACKs it, so teardown takes four segments. The side that closes first then waits in TIME_WAIT, about twice the maximum segment lifetime (60 seconds on Linux), to catch late packets and to resend the last ACK if lost.

    IntermediateQuick answer1 min read