TCP/IP Interview Questions and Answers
TCP/IP fundamentals appear in nearly every networking and even developer interview. The legendary "what happens when you type google.com and press Enter?" lives here. These answers show you understand how the internet actually moves data — see the TCP/IP guide.
How to prepare
The famous "what happens when you type a URL" question is really a full TCP/IP walkthrough: DNS resolves the name, ARP finds the gateway MAC, TCP handshakes, TLS secures, HTTP requests, the server responds. Being able to narrate that end to end — touching DNS, ARP, TCP, routing — is the single most impressive interview answer you can give.
Frequently asked questions
What happens when you type a URL and press Enter?
DNS resolves the name to an IP; the OS checks if it's local or remote and ARPs for the gateway; a TCP three-way handshake opens; TLS negotiates encryption; an HTTP request is sent; the server responds and the browser renders the page.
What is the TCP three-way handshake?
Connection setup: client sends SYN, server replies SYN-ACK, client sends ACK — then data flows.
What is the difference between TCP and UDP?
TCP is connection-oriented and reliable (acknowledgments, ordering, retransmission); UDP is connectionless and best-effort — faster, used for voice, video and DNS.
What port does DNS use, and why both TCP and UDP?
Port 53 — UDP for normal fast lookups, TCP for larger responses like zone transfers that exceed UDP limits.
What is the difference between the OSI and TCP/IP models?
OSI has 7 conceptual layers; TCP/IP has 4 practical layers that the internet actually uses. OSI's top three collapse into TCP/IP's Application layer.
What does ARP do?
It resolves a known IP address to a MAC address on the local network so frames can be delivered at Layer 2.
What is DHCP and how does it work?
It auto-assigns IP configuration through the DORA exchange: Discover, Offer, Request, Acknowledge.
At which OSI layer does a router operate?
Layer 3 (Network) — it forwards packets using IP addresses. Switches operate at Layer 2 using MAC addresses.
Related articles
Want hands-on training?
Learn this on real Cisco lab devices with placement support at Attila Technologies, Ahmedabad.