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 is the difference between HTTP and HTTPS, and what does TLS actually do?

    HTTPS is HTTP sent inside a TLS connection. TLS gives three things plain HTTP lacks - encryption so others on the network cannot read the data, integrity so it cannot be changed in transit, and authentication through a certificate so you know you are talking to the real site.

    BeginnerIn-depth4 min read
  2. What is the difference between cookies, sessions and tokens like JWT?

    A cookie is just a small piece of data the browser stores and sends back automatically. A session keeps login state on the server and puts only a random session ID in a cookie. A JWT is a signed token that carries the user's data itself, so the server can verify it without a lookup, but it is harder to revoke before it expires.

    AdvancedIn-depth5 min read
  3. What is DNS cache poisoning, and how is it prevented?

    An attacker tricks a resolver into caching a forged answer, such as a bank's name mapped to the attacker's IP. Later users of that resolver are sent to the fake site. Defences include random source ports and query IDs, and DNSSEC, which signs records.

    AdvancedQuick answer1 min read