Computer networks is a staple CS subject in placements and a frequent topic for backend, DevOps, and systems interviews. The questions are predictable and concept-driven, anchored by one classic that ties everything together: "what happens when you type a URL and press enter?" Here are the computer networks interview questions that actually get asked, with answers.
Models & protocols
- Explain the OSI model's seven layers and what each does.
- OSI vs TCP/IP model.
- TCP vs UDP — reliability, ordering, and when to use each.
- What is the TCP three-way handshake?
- What does the IP layer do; IPv4 vs IPv6.
The web stack
- What is DNS and how does resolution work?
- HTTP vs HTTPS; how TLS secures a connection.
- HTTP methods and status codes (our REST API guide).
- What is a socket? What is a port?
The classic: what happens when you type a URL?
This single question tests the whole stack. A strong answer walks through: DNS resolution → TCP connection (and TLS handshake for HTTPS) → HTTP request → server processing → response → browser rendering. Being able to narrate this end to end signals you understand how the internet actually works.
Other common topics
- Routing, switching, and the difference between a router, switch, and hub.
- Subnetting and CIDR basics.
- What is a firewall, NAT, and a load balancer?
- Latency vs bandwidth vs throughput.
How to prepare
These questions are entirely verbal — you explain mechanisms and walk through flows. Practise narrating the stack out loud, especially the URL question. Greenroom runs spoken technical interviews that follow up on your reasoning and give feedback. Pair it with our OS and backend guides.
Frequently asked questions
What are the most common computer networks interview questions?
Common questions cover the OSI model's seven layers and OSI vs TCP/IP, TCP vs UDP, the TCP three-way handshake, IP and IPv4 vs IPv6, DNS resolution, HTTP vs HTTPS and TLS, sockets and ports, the classic 'what happens when you type a URL' walkthrough, and networking devices like routers, switches, firewalls, NAT and load balancers.
What is the difference between TCP and UDP?
TCP is connection-oriented and reliable: it establishes a connection via a three-way handshake, guarantees ordered delivery, and retransmits lost packets, which makes it ideal for web pages, email and file transfer. UDP is connectionless and faster with no delivery or ordering guarantees, which suits real-time uses like video streaming, gaming and DNS where speed matters more than perfect reliability.
What happens when you type a URL and press enter?
The browser resolves the domain to an IP via DNS, opens a TCP connection to the server (and performs a TLS handshake for HTTPS), sends an HTTP request, the server processes it and returns a response, and the browser parses the HTML, requests additional resources like CSS and JS, and renders the page. This single walkthrough tests the entire networking stack.
How should I prepare for a computer networks interview?
Build a connected mental model of the stack rather than isolated facts, and especially rehearse the 'what happens when you type a URL' walkthrough layer by layer. Since these questions are entirely verbal, practise narrating mechanisms and flows out loud, ideally with a voice-based mock interview that follows up on your reasoning.