Home › Interview questions › Networking
Networking Interview Questions & Answers
68 Networking interview questions in 4 levels — junior to senior, plus 14 production scenarios. Read 3 free answers with real-world analogies.
Free sample answers
What is TCP/IP, and why is it described as the foundation almost everything else on the internet is actually built on?
One-liner
TCP/IP is the set of rules that lets computers on different networks actually find each other and reliably exchange data, and it's the foundation because nearly every internet application relies on it underneath, whether it's a web page, an email, or a video call.
Real-world analogy
It's like the postal system's own basic rules for addressing and delivering a letter — regardless of what's actually written inside, every single letter relies on the exact same underlying addressing and delivery system to actually get where it's going.
Detailed explanation
- IP (Internet Protocol) handles addressing — giving every device a unique address and figuring out how to actually route data between two specific devices.
- TCP (Transmission Control Protocol) handles reliable delivery — making sure data actually arrives complete, in the correct order, and resending anything that gets lost along the way.
- Together, TCP/IP forms the basic set of rules that essentially every other internet protocol (HTTP, email, and more) is actually built directly on top of.
Scenario
A developer troubleshooting why an application can't reach a specific server starts by checking basic connectivity — can the two machines actually reach each other at the IP level at all — before even worrying about anything at a higher, more specific level like the actual application itself.
Best practices
- Understand TCP/IP as the foundational layer beneath almost everything else in networking.
- When troubleshooting connectivity, check the most basic layer first before assuming a more complex, higher-level issue.
- Learn IP addressing and TCP's reliable delivery mechanism as the genuine starting point for understanding networking overall.
What is a CDN, and how does it actually improve performance for users far from your primary server?
One-liner
A CDN (Content Delivery Network) caches your content at edge locations distributed around the world, so a user is served from a location physically close to them, rather than always reaching all the way back to your one original, primary server.
Real-world analogy
It's like a large retail chain keeping small regional stock rooms close to customers, rather than shipping every single order from one central warehouse on the other side of the country every single time.
Detailed explanation
- A CDN caches your content (especially static content like images and scripts) at edge locations, and a user's request is automatically routed to the nearest edge location that actually has it.
- This considerably reduces latency for users far from your primary server, since their request doesn't need to travel the entire physical distance back to it.
- CDNs also help absorb traffic spikes, since much of the actual load gets served directly from edge caches rather than hitting your primary origin server every single time.
Scenario
A company serving users worldwide from a single origin server in one region notices considerably slower load times for users far from that region. Setting up a CDN means users everywhere are served from a nearby edge location instead, considerably improving load times without needing to actually deploy infrastructure in every single region themselves.
Best practices
- Use a CDN for any content served to a genuinely geographically distributed user base.
- Set appropriate cache expiration times based on how frequently your actual content genuinely changes.
- Use a CDN even for dynamic content in some cases, since it can still help absorb traffic spikes at the network edge.
DNS resolution works intermittently — sometimes a domain resolves correctly, and sometimes it fails entirely. How do you investigate?
One-liner
Check whether multiple DNS servers are actually returning different or genuinely inconsistent results, and check for a TTL or caching issue where a stale, previously-cached answer is intermittently being served alongside a newer, correct one.
Real-world analogy
It's like asking several different people the exact same question and getting genuinely inconsistent answers — you'd want to check where each specific answer is actually coming from, and whether some sources genuinely have outdated information.
Detailed explanation
- Querying several different DNS servers directly for the same domain can reveal whether they're actually returning genuinely inconsistent results, pointing to a propagation or replication issue.
- Checking the record's TTL and confirming when it was last actually changed can reveal whether some genuinely still-cached, older answers are intermittently being served alongside a newer, correct one.
- An intermittent issue can also point to one specific DNS server (among several configured ones) genuinely having a problem, while the others continue to work correctly.
Scenario
A team notices a domain resolves correctly most of the time, but occasionally fails, and querying several different DNS servers directly reveals one specific server is actually returning a stale, previously-cached answer, while the others correctly return the current, up-to-date one. Waiting for that server's cache to naturally expire (or manually flushing it, if possible) resolves the intermittent inconsistency.
Best practices
- Query multiple DNS servers directly to check for genuinely inconsistent results, rather than only ever checking from one single location.
- Check the record's TTL and when it was actually last changed, to understand whether stale caching might genuinely be involved.
- Consider lowering TTL temporarily while actively investigating, to reduce how long a stale, incorrect answer can genuinely persist.
A preview of the 68 questions in the Networking guide
Junior (20)
- What is TCP/IP, and why is it described as the foundation almost everything else on the internet is actually built on?
- What is the OSI model, and why is it still commonly referenced even though real systems don't strictly follow it layer by layer?
- What is an IP address, and what's the difference between a public and a private one?
- What is subnetting, at a basic conceptual level, and why would a network actually be divided into smaller subnets?
+ 16 more Junior questions, with full answers, in the guide.
Mid-level (20)
- What is the TCP three-way handshake, and why does a connection actually need this specific process before any real data is sent?
- What are the common HTTP methods, and what's the actual conventional difference between PUT and PATCH?
- What's the practical difference between HTTP/1.1, HTTP/2, and HTTP/3?
- What actually happens during a TLS handshake, at a working level of understanding?
+ 16 more Mid-level questions, with full answers, in the guide.
Senior (14)
- How would you design network architecture for a microservices application with many internal services communicating with each other?
- What is a service mesh, at a working level of understanding, and what specific problems does it actually solve?
- How would you design networking for an application spanning multiple geographic regions, considering the real latency between them?
- What are the common strategies for mitigating a DDoS attack, and how would you actually design for this kind of resilience?
+ 10 more Senior questions, with full answers, in the guide.
Scenario (14)
- A user can't reach your website, but the server itself appears to be running completely fine. How do you troubleshoot it?
- DNS resolution works intermittently — sometimes a domain resolves correctly, and sometimes it fails entirely. How do you investigate?
- A load balancer's health check keeps marking a genuinely healthy server as unhealthy, repeatedly removing it from rotation. How do you troubleshoot it?
- A TLS certificate expires unexpectedly, causing an outage, even though you thought renewal was properly automated. How do you investigate and prevent this from happening again?
+ 10 more Scenario questions, with full answers, in the guide.
Get the full DevOps / SRE Interview Guide