Interview Q&A / Computer Networks
Computer Networks interview questions
What happens when you open a website, TCP vs UDP, DNS and HTTP.
Prefer rapid revision? Practise Computer Networks short interview answers →
- UDP is unreliable. How can an application still get reliable delivery over it?
The application adds what it needs on top: sequence numbers to order and detect gaps, acknowledgements and retransmission for missing data, and timers. QUIC, used by HTTP/3, does exactly this over UDP, along with congestion control and encryption.
AdvancedQuick answer1 min read - What is BGP, and why is it called the routing protocol of the internet?
BGP (Border Gateway Protocol) exchanges routes between autonomous systems, the independently run networks that make up the internet, such as ISPs and large companies. It chooses paths by policy and AS path length, not simply the shortest link.
AdvancedQuick answer1 min read - 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 - What is head-of-line blocking, and how do HTTP/2 and HTTP/3 deal with it?
Head-of-line blocking is when one slow or lost item holds up everything queued behind it. HTTP/1.1 blocks at the request level, HTTP/2 fixes that with multiplexing but still blocks at the TCP level on packet loss, and HTTP/3 over QUIC removes even that.
AdvancedQuick answer1 min read - What is HTTP/3, and why does it run over QUIC instead of TCP?
HTTP/3 is HTTP carried over QUIC, a protocol built on UDP that has its own reliable streams, congestion control and built-in TLS 1.3. It avoids TCP head-of-line blocking, connects faster, and survives network changes such as moving from Wi-Fi to mobile data.
AdvancedQuick answer1 min read - Why can you not put a CNAME record on the root domain, such as example.com?
A CNAME means this name is an alias for another name, so no other record may exist at it. The root of a zone must also hold NS and SOA records, so a CNAME there would conflict. Providers offer ALIAS, ANAME or CNAME flattening as a workaround.
AdvancedQuick answer1 min read