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. What does a UDP header contain, and how big is it?

    A UDP header is 8 bytes with four 16-bit fields: source port, destination port, length, and checksum. A TCP header is at least 20 bytes. That small size is part of why UDP is light.

    BeginnerQuick answer1 min read
  2. What is a port number, and how is it different from an IP address?

    An IP address identifies a machine on a network. A port number (0 to 65535) identifies which program on that machine should receive the data. Together they pick out one exact conversation endpoint.

    BeginnerQuick answer1 min read
  3. When would you choose UDP over TCP? Give real examples.

    Choose UDP when speed and low delay matter more than perfect delivery, or when the app wants its own control: live video calls, online games, DNS lookups, and streaming. Old data is useless in real time, so waiting for a retransmission is worse than skipping it.

    BeginnerQuick answer1 min read