Network Troubleshooting and Diagnostics Questions
Systematically diagnosing network problems: a layered troubleshooting methodology, diagnostic tools and commands (ping, traceroute, tcpdump, packet capture), root-cause analysis, and connectivity and user-access issues. Covers isolating faults across the stack, reading packet-level evidence, and driving from symptom to root cause. The diagnostic discipline that spans all networking layers.
Explain how NAT gateway or firewall connection-tracking table exhaustion can cause intermittent connection failures at scale. Describe how you would detect conntrack exhaustion, what metrics to monitor, and how you'd decide between raising the table's capacity versus addressing what's actually driving the churn. Include example commands to view the conntrack table on Linux-based appliances.
Sample Answer
Direct answer
A NAT gateway or firewall's connection-tracking (conntrack) table has a finite size; once it fills up, new connections can't be tracked and are dropped or fail intermittently, and this failure mode is distinctive because it appears only under LOAD (a specific connection count or churn rate), not as a constant, deterministic failure.
Structured elaboration
- Understand what conntrack tracks and why it can exhaust: every distinct connection passing through a stateful NAT or firewall device consumes an entry in its connection-tracking table until that connection closes (or its entry times out); a very large number of concurrent connections, or a high RATE of short-lived connections that don't clean up entries fast enough, can exhaust the table's capacity even if the device's raw throughput is nowhere near its limit.
- Detect conntrack exhaustion specifically: on Linux-based appliances,
conntrack -C(or reading/proc/sys/net/netfilter/nf_conntrack_countagainstnf_conntrack_max) shows current usage against the configured maximum; a count consistently near or at the maximum, correlated with the timing of reported failures, is the direct signature. - Monitor the right metric proactively: track conntrack table utilization as a percentage of its maximum, not just raw connection counts, since the maximum itself may have been sized for a different traffic pattern than what's actually occurring now.
- Remediation options, each with real trade-offs: increasing
nf_conntrack_maxraises the ceiling directly but consumes more memory and doesn't address WHY the table is filling (a genuine traffic-pattern change, or a bug causing connections to accumulate without properly closing); tuning conntrack timeouts more aggressively (reclaiming entries for idle or half-closed connections sooner) helps if many entries are lingering longer than they need to; deploying additional NAT gateways to spread the load reduces per-device table pressure but adds complexity and cost; and stateless NAT (where architecturally feasible) avoids the conntrack limit entirely for the traffic it handles, at the cost of losing some of the visibility and flexibility a stateful table provides. - Consider port-preservation strategies: some NAT implementations can be tuned to reuse or preserve source ports more efficiently, reducing table churn for high-connection-rate workloads without simply raising the ceiling.
Worked example
conntrack -C shows a count sitting at 98% of nf_conntrack_max during the exact windows when clients report intermittent connection failures, and comfortably lower outside those windows. Correlating this against traffic patterns shows a recent change introduced a much higher rate of short-lived connections (a client library switched from connection pooling to opening a fresh connection per request), each consuming a conntrack entry briefly but at a volume the existing table sizing didn't anticipate. Raising nf_conntrack_max provides immediate relief, while the client library's connection-pooling regression is flagged as the actual root cause worth fixing at the source.
Trade-offs & pitfalls
Simply raising the conntrack table's maximum size treats the symptom, not necessarily the cause; if a client-side regression (like the pooling example above) is generating far more connections than intended, raising the ceiling delays the next exhaustion event rather than preventing it. Always correlate exhaustion against what changed in the actual traffic pattern, not just the device's own capacity, before deciding whether to fix the ceiling or the traffic generating the load.
A client reports failed TCP connections that never complete the 3-way handshake. Using packet capture and netstat/ss output, describe the steps you would take to determine whether the failure is due to a firewall dropping SYNs, the server not accepting connections, SYN flood protection, or client-side problems. Provide the tcpdump/tshark display filter you would use to inspect the handshake for a specific IP and port.
Sample Answer
Direct answer
A TCP connection that never completes its handshake at all has four candidate causes worth checking in order: a firewall silently dropping the SYN, the server not accepting connections at all, SYN-flood protection on the server rejecting legitimate attempts along with attack traffic, or a purely client-side problem. Packet capture plus socket state on each side distinguishes between them cleanly, and a scoped filter isolating the exact handshake in question is the first concrete step.
Structured elaboration
- Isolate the handshake with a scoped capture filter (tcpdump/BPF):
tcpdump -n -i eth0 host <client-ip> and port <server-port> and 'tcp[tcpflags] & (tcp-syn|tcp-ack) != 0'captures only SYN, SYN-ACK, and any RST/ACK-flagged packets for this specific 4-tuple, keeping the capture small on a busy interface while still showing every step of the handshake attempt. - The equivalent Wireshark/tshark display filter for the same isolation, once captured:
ip.addr == <client-ip> && tcp.port == <server-port> && (tcp.flags.syn == 1 || tcp.flags.reset == 1), or more simplytcp.stream eq <N>once you've identified the specific stream index for this connection attempt in the capture, to see every packet belonging to just this one handshake in isolation from all other traffic on the interface. - Confirm the SYN actually leaves the client: a capture on the client side, using the filter above, confirms the SYN was sent; if it wasn't, the problem is entirely client-side.
- Confirm whether the SYN reaches the server: the same filter applied to a capture at (or as close as possible to) the server reveals whether the SYN arrives at all; if it never arrives despite leaving the client, something in between (most likely a firewall) is dropping it silently.
- Check the server's listening state and backlog:
ss -ltnon the server confirms it's listening on the expected port; a FULL accept backlog can cause the kernel to silently drop new SYNs, producing a symptom indistinguishable from a firewall drop purely from the client's perspective. - Check for SYN-flood protection specifically: server or perimeter SYN-cookie/rate-limiting logs and counters (e.g.,
netstat -s | grep -i syncookieon Linux) show whether this client's attempts are being caught by mitigation designed for a flood. - Distinguish client-side causes: a local firewall on the client, a broken local route, or exhausted local ephemeral ports/resources can all prevent a SYN from ever properly leaving, ruled in or out by the very first capture step above.
Worked example
A client-side capture using tcpdump -n host 10.1.1.10 and port 443 and 'tcp[tcpflags] & tcp-syn != 0' confirms the SYN leaves cleanly. The same filter run as close as possible to the server shows the SYN never arrives. This isolates the cause to somewhere between the client and server; checking a firewall device's logs along that specific path reveals a rule was recently tightened, unintentionally blocking this specific client's IP range.
Trade-offs & pitfalls
A completely silent SYN drop (no RST, no ICMP unreachable) can be caused by several genuinely different things (a firewall configured to silently drop, a full accept backlog, or SYN-flood protection), and all of them look identical from the client's perspective alone; capturing with a tightly-scoped filter at multiple points (client and as close to the server as feasible) is what actually distinguishes them, rather than trying to infer the cause from client-side symptoms alone. A capture filter can express this handshake-isolation cleanly (it only needs per-packet flag/address matching, no cross-packet state), unlike retransmission detection, which genuinely requires a display filter.
During a major outage you were the on-call network engineer and had to lead triage, coordinate with application and security teams, and communicate with stakeholders. Using the STAR method, describe the situation, the tasks you owned, the specific actions you took to diagnose and remediate the network misconfiguration, and the measurable results. Include what post-incident changes you proposed to prevent recurrence.
Sample Answer
Direct answer
Situation: during a major outage, I was the on-call network engineer and had to simultaneously diagnose a network misconfiguration, coordinate application and security teams who each suspected their own layer, and keep stakeholders informed, all while the clock was working against a clean root-cause investigation.
Structured elaboration
- Task: my responsibility was narrowly the network diagnosis and remediation, but I also needed to establish who was doing what across teams quickly, since without that, application and security engineers would (understandably) each start independently chasing their own layer based on incomplete information, duplicating effort and sometimes contradicting each other's findings.
- Actions, in the order I actually took them: first, I gathered baseline evidence (recent change log, current routing/interface state) before touching anything, specifically so a fix wouldn't destroy evidence I might need later; second, I established a single shared channel and a short, explicit statement of what I was checking and what I needed FROM each other team (specific log windows, specific error messages) rather than leaving them to guess what was useful; third, once the evidence pointed at a specific misconfigured route change, I proposed and got a quick sign-off on a targeted rollback rather than a broader, riskier change; fourth, I confirmed the rollback actually restored service using the same evidence sources I'd used to diagnose it, not just anecdotal "seems better now."
- Results: the misconfiguration was identified and rolled back within a defined window, and just as importantly, the application and security teams had clear, concrete asks from me throughout, which meant they weren't duplicating my diagnosis effort or independently pursuing dead ends based on partial information.
- Post-incident changes I proposed: a specific automated pre-check for the class of route change that caused this (so a similar future change would be flagged before deployment, not after); and a standing template for the FIRST cross-team communication in a network incident, since improvising that message under pressure the first time cost real minutes I wanted to save on any future incident.
Worked example
The specific proposed pre-check: before this incident, route changes of this type went through a manual review, but nothing programmatically checked for the specific error pattern (an overlapping prefix advertisement) that caused this outage; adding an automated validation step to the change pipeline that flags this specific pattern before it's ever deployed is a concrete, durable prevention this incident directly motivated.
Trade-offs & pitfalls
It's tempting, when recounting this kind of story, to focus entirely on the technical diagnosis and skip the coordination detail, but the coordination choices (a single shared channel, explicit asks rather than vague updates) are exactly what a behavioral interviewer is trying to assess, distinct from whether you found the right root cause technically. Be specific about what you actually asked other teams for, not just that you "communicated," since vague coordination claims are the most common weak point in this kind of story.
Users report one-way audio in VoIP calls: they can hear remote parties but remote parties cannot hear them. Provide a systematic troubleshooting approach focused on RTP media path, including separating SIP signaling from RTP media, checking NAT traversal and pinholes, verifying symmetric RTP, confirming media port ranges and ACLs, and using packet capture or RTP tools to confirm media packets are flowing in both directions.
Sample Answer
Direct answer
One-way audio in VoIP, where you hear the remote party but they don't hear you, is almost always a MEDIA-PATH (RTP) problem specific to one direction, not a signaling (SIP) problem, since the call was clearly established successfully; the diagnostic focus should be on NAT traversal and symmetric-RTP behavior for the specific direction that's failing.
Structured elaboration
- Separate SIP signaling from RTP media explicitly: confirm the call setup (SIP) succeeded (which it clearly did, since audio flows in at least one direction) and focus entirely on the RTP media path, since signaling and media often take genuinely different paths and are affected by different issues.
- Check NAT traversal for the media specifically: SIP signaling often successfully traverses NAT because of specific handling in SIP-aware devices (ALGs, Application Layer Gateways) or because signaling uses a well-known port; RTP media, using dynamically negotiated ports per call, is more prone to NAT-related asymmetry, where one direction's NAT mapping works but the other doesn't, producing exactly a one-way-audio symptom.
- Verify symmetric RTP is actually occurring: symmetric RTP means a device sends its media back to the SAME IP/port it received media FROM, rather than to whatever address was originally negotiated in the SIP signaling (which can be wrong after NAT rewrites the actual source); if a device isn't using symmetric RTP correctly, it may keep sending to a negotiated address that NAT-mapping quirks have made unreachable in one direction while still receiving fine in the other.
- Confirm media port ranges and ACLs allow the FULL negotiated port range, in BOTH directions: a firewall or ACL rule that only permits a subset of the negotiated RTP port range, or that's asymmetric between inbound and outbound, can allow media in one direction while blocking the specific ports needed for the other.
- Use packet capture or dedicated RTP tools to confirm the actual flow directionality: a capture at the affected endpoint (or a point that sees both directions) directly confirms whether RTP packets are actually leaving in the "silent" direction at all; if they ARE leaving but not arriving at the remote end, the problem is somewhere in the path (NAT, firewall); if they're never leaving the sending endpoint at all, the problem is local to that device's own media handling.
Worked example
A capture at the affected caller's device shows RTP packets ARE being sent toward the remote party consistently. A capture (or corroborating evidence) at the remote party's side never shows these packets arriving. Checking the caller's NAT device shows its RTP media port mapping is asymmetric: inbound mapping for the negotiated port works correctly (explaining why THEY can be heard), but the specific OUTBOUND mapping for THIS caller's RTP stream isn't being correctly maintained by the NAT device, dropping their outbound audio silently before it ever leaves the local network's edge. Enabling or correcting symmetric RTP handling on the NAT device (or the calling endpoint itself, if it supports it) resolves the one-way audio.
Trade-offs & pitfalls
It's easy to investigate SIP/signaling first, since it's often the more familiar troubleshooting territory, when a fully successful call SETUP (which the audio-in-one-direction symptom implies, since the call connected at all) already rules signaling out as the primary suspect; focus directly on the RTP media path and NAT/symmetric-RTP behavior instead. Confirming with a capture whether packets are actually LEAVING the affected device (versus leaving but not arriving) is what distinguishes a local device/NAT issue from a problem further along the path, and skipping that check risks investigating the wrong side of the connection.
You capture a TCP flow exhibiting retransmissions and duplicate ACKs. Describe how you would use the capture together with system/network metrics (server CPU, NIC errors, switch interface counters) to identify whether the root cause is network congestion, packet corruption, server slowness, or a middlebox interfering. What signs in the capture point to each cause?
Sample Answer
Direct answer
Reading a capture in isolation can suggest several different causes for the same retransmission-and-duplicate-ACK pattern; correlating it against independent system and network metrics (server CPU, NIC errors, switch counters) taken from the SAME time window is what actually distinguishes congestion, corruption, server slowness, and middlebox interference from each other.
Structured elaboration
- Congestion signature: if switch or router interface counters show rising queue depth, utilization, or output drops correlated with the exact timing of the retransmissions, congestion at that specific point is the likely cause; the capture alone shows the SYMPTOM (loss/retrans), but the switch counter is what confirms WHERE and WHY.
- Packet corruption signature: rising CRC or input-error counters on a specific interface, correlated with the timing of retransmissions, points at corruption rather than congestion; distinguishing this from congestion in the capture ALONE is often not possible, since both can produce similar-looking loss/retransmission patterns from the TCP layer's perspective.
- Server slowness signature: if server-side CPU or memory metrics show the server was under heavy load or had exhausted socket buffers during the exact window, and NEITHER the network path's counters (switch, NIC) show anything unusual, the delay/loss the capture shows is likely a symptom of the SERVER being slow to process or acknowledge, not the network dropping anything.
- Middlebox interference signature: if the pattern of retransmissions is oddly consistent or specific (for example, always affecting the SAME segment size, or correlating with specific packet content in a way pure congestion wouldn't) and neither switch counters nor server metrics show anything abnormal, suspect a middlebox altering or interfering with specific traffic, which the capture alone might hint at (unusual, repeatable patterns) but external metrics can't directly confirm or deny, requiring closer packet-level inspection instead.
- The general method: pull all four evidence sources (the capture itself, switch/router counters, server resource metrics, and if relevant, dedicated middlebox logs) for the SAME precise time window, and look for which one shows an anomaly that CORRELATES with the capture's retransmission timestamps; the source that correlates is very likely the actual cause, while the others, showing nothing unusual during that window, can be reasonably ruled out.
Worked example
Retransmissions in the capture cluster tightly around a specific 90-second window. Switch interface counters for the relevant link show a clear utilization spike and output-queue drops during that EXACT same window, with no corresponding server CPU spike and no rising CRC/error counters anywhere in the path. This correlation points decisively at network congestion at that specific switch interface as the cause, ruling out server slowness (server metrics were normal) and corruption (no CRC errors) without needing further capture-level analysis.
Trade-offs & pitfalls
Trying to determine the root cause from the packet capture ALONE, without pulling correlating system and network metrics for the same window, leaves you guessing among several plausible explanations that produce very similar-looking capture signatures; always correlate against independent evidence for the SAME precise time window, since that's what actually discriminates between the candidate causes rather than the capture's pattern alone.
Unlock Full Question Bank
Get access to all Network Troubleshooting and Diagnostics interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.