Back to sections

Networking Interview Questions & Answers

A sample of real Networking interview questions with full answers and explanations - practice for interviews or certification exams.

easy

1. A user tries to visit yoursite.com but accidentally types yuorsite.com into the browser. The browser shows 'This site can't be reached'. What is the most likely technical reason?

The web server returned a 500 error
The DNS system could not find an IP address matching the misspelled domain nameCorrect
The website's firewall blocked the request
The TCP handshake failed due to network congestion

DNS translates domain names into IP addresses, and since the misspelled domain isn't registered, there's no matching DNS record, so the browser can't find any server to connect to at all. It isn't a firewall or server error, because the request never even reaches a real server.

medium

2. HSRP is configured for gateway redundancy between two routers. When the active router fails, hosts lose connectivity for longer than expected before failover completes. What should be tuned?

The hosts' DNS TTL settings
The HSRP hello and hold timers (shortening them for faster failover detection)Correct
The switch's STP priority
The routers' OSPF router IDs

How fast HSRP notices the active router has actually failed is entirely driven by its hello and hold timers, the standby router is just watching for those regular hellos to stop. Shortening those timers means the standby detects a failure and takes over faster, directly cutting down the connectivity gap users experience.

hard

3. STP (802.1D) is enabled network-wide, but topology changes still cause brief broadcast storms during convergence. Which enhancement specifically addresses this compared to classic 802.1D?

Disabling STP entirely to avoid convergence delays altogether
Rapid PVST+ / 802.1w (Rapid Spanning Tree), which converges dramatically faster than classic 802.1D's ~50 second convergence timeCorrect
Switching every port to access mode instead of trunk mode
Increasing the STP hello timer to slow down topology change detection

Classic 802.1D can take up to about 50 seconds to fully settle down after the network topology changes, and during that window, brief loops or storms can occur. Rapid Spanning Tree (802.1w) redesigned how ports transition between states so that same convergence happens in just a few seconds instead, directly closing that risky window.

easy

4. Why would ping succeed but traceroute fail to a destination?

Destination firewall blocks ICMP Echo Reply.
Intermediate routers drop ICMP Time Exceeded messages.Correct
DNS resolution failure.
Source has no default route.

Ping only needs one single reply, from the final destination, to succeed. Traceroute needs a reply from EVERY router along the way to build its full picture, and if any of those routers are configured to ignore or rate-limit that specific kind of reply, traceroute shows gaps or timeouts even though the destination itself is perfectly reachable.

medium

5. A single server hosts HTTPS sites for two completely different domains on the same IP address and port 443. Clients connecting to one of the domains receive a TLS certificate warning because they're being served the OTHER domain's certificate. What's the most likely missing piece?

The server needs a separate IP address for every HTTPS domain it hosts
Server Name Indication (SNI) support, so the correct certificate is selected during the TLS handshakeCorrect
HTTP Strict Transport Security (HSTS) headers
A wildcard certificate covering both domains

SNI lets the client announce which hostname it's trying to reach as part of the TLS handshake itself, before the server has to pick and send a certificate, which is exactly what allows one IP and port to correctly serve multiple certificates for multiple domains. Without SNI support (or an old client that never sends it), the server has to guess and falls back to a single default certificate, causing a mismatch for anyone requesting the other domain. Assigning a separate IP per domain is the older workaround from before SNI existed, and a wildcard certificate only helps if both domains happen to share the same base domain.

hard

6. An API integration works perfectly from the company's office network but fails with connection timeouts from a cloud hosted server. Running dig from both locations returns the same correct IP address for the API's hostname. Running curl with a verbose flag from the cloud server shows the connection attempt just hangs with no response at all, not even an error. What should the engineer investigate next?

Whether the office network's DNS cache is outdated
Whether the API's DNS record is misconfigured, since dig already showed a problem
Whether the API hostname has a typo in the cloud server's configuration
Whether the cloud provider's outbound firewall or security group rules, or the API provider's IP allowlist, are silently blocking traffic from the cloud server's IP addressCorrect

Since dig confirms DNS resolution is identical and correct from both locations, the problem lives beyond name resolution, and a connection that just hangs with no response, rather than an explicit rejection, is a classic symptom of a firewall or IP allowlist silently dropping the traffic rather than rejecting it outright. A hostname typo would have shown up as a DNS resolution failure in dig, which it did not.

easy

7. A network engineer explains: 'One type of proxy sits in front of clients and hides their identity from the servers they connect to, while another type sits in front of servers and hides their identity from clients.' Which proxy hides the servers from the clients?

A reverse proxyCorrect
A forward proxy
A transparent proxy
A NAT gateway

A reverse proxy sits in front of one or more backend servers and accepts requests on their behalf, so clients only ever see the proxy's address, never the real servers. This is why load balancers, CDNs, and API gateways are usually built as reverse proxies. A forward proxy does the opposite: it sits in front of clients and hides THEIR identity from the servers they reach, which is the setup used for corporate outbound web filtering.

medium

8. With NAT overload (PAT) configured, two internal hosts both open connections to the same external server on port 80 at the same time, sharing one public IP. How does the router keep their return traffic separate?

It assigns each host a temporary second public IP automatically
It assigns each session a different translated source port, distinguishing them in the NAT table by port even though the public IP is sharedCorrect
It refuses the second connection until the first one closes
It queues the connections and processes them one at a time

PAT doesn't just track by the shared public IP, it tracks by the COMBINATION of IP and port. So even though both internal hosts are sharing one public address, the router assigns each of their sessions a different translated port number, and that port is what lets return traffic get routed back to the correct internal host.

hard

9. Two users behind two different home routers try to establish a direct peer-to-peer video call. Both NATs only allow inbound packets from an address and port a client has already sent traffic to, so a direct connection attempt from either side alone is rejected by the other's NAT. What class of technique is designed to solve this?

Enabling MASQUERADE on both routers
Lowering the MTU on both connections to avoid fragmentation
Configuring a static route between the two home routers
NAT traversal techniques like STUN and TURN, which discover public endpoints and relay traffic when a direct hole cannot be punchedCorrect

STUN lets each client discover its own public IP and port as seen from outside its NAT, which both sides can then exchange, often via a signaling server, to attempt hole punching, where both send packets simultaneously so each NAT sees outbound traffic and permits the matching return path. When NAT behavior is too restrictive for hole punching to work, such as symmetric NAT, the connection falls back to relaying all traffic through a TURN server instead. MASQUERADE is just the mechanism a NAT itself uses to rewrite outbound source addresses, it doesn't help two separate NATs punch through to each other.

easy

10. An accidental extra cable creates a physical loop between two unmanaged network segments, threatening a broadcast storm. Which protocol is specifically designed to detect and block this kind of loop?

DHCP
OSPF
NAT
Spanning Tree Protocol (STP)Correct

An accidental physical loop lets a broadcast circle endlessly between two paths, multiplying itself into a storm that can bring a whole segment down. Spanning Tree Protocol exists specifically to detect that kind of redundant path and deliberately block one of the looping ports before it ever becomes a problem.

Want to practice under real conditions?

Try the full timed Networking quiz.

    Welcome to OpsQuiz!

    Real scenario-based DevOps questions, hands-on practice, and clear explanations for every answer.