Back to blog
Linux & Servers September 1, 2026

Understanding Root Cause: DNS and Traceroute for SRE Troubleshooting

Automate WhatsApp Alerts
Start Free ➔

Understanding Root Cause: DNS and Traceroute for SRE Troubleshooting

When a distributed web service becomes unreachable, application logs often display ambiguous timeout errors. Because network boundaries obscure failure origins, distinguishing between a broken recursive DNS resolver, an intermediate Autonomous System (AS) routing drop, and a stalled application server requires structured protocol-level diagnostics.

Site Reliability Engineers isolate network layers using systematic probing tools. By correlating recursive lookup chains, traceroute time-to-live (TTL) decrements, and TCP handshakes, teams can determine exact root causes before altering production configurations. This guide explores the diagnostic workflows, mathematical timing models, and troubleshooting runbooks used to debug network failures.


1. Network Latency and DNS Cache Mathematics

To identify whether latency originates in name resolution or application processing, deconstruct the total request duration ((T_{\text{request}})) into its discrete network phases:

[T_{\text{request}} = T_{\text{DNS}} + T_{\text{connect}} + T_{\text{TLS}} + T_{\text{TTFB}} + T_{\text{transfer}}]

Where:

  • (T_{\text{DNS}}): Name resolution time across recursive and authoritative nameservers.
  • (T_{\text{connect}}): TCP three-way handshake completion time.
  • (T_{\text{TLS}}): TLS cryptographic handshake and certificate-chain validation time.
  • (T_{\text{TTFB}}): Time to First Byte (server processing and queue wait time).
  • (T_{\text{transfer}}): Wire transfer duration for the response payload.

DNS records do not propagate instantaneously across global clients due to layered caching policies. We model the effective cache TTL ((T_{\text{effective}})) as:

[T_{\text{effective}} \approx \min(TTL_{\text{authoritative}}, T_{\text{resolver policy}}, T_{\text{local cache}})]

When planning DNS record migrations, reduce your authoritative TTL at least (24\text{ hours}) in advance so that downstream resolvers do not serve stale IP addresses during the cutover window.


2. Traceroute Methodologies Comparison

Different probe protocols interact uniquely with stateful firewalls, access control lists (ACLs), and router control planes:

Probe ProtocolProbe MechanismExpected ResponsePrimary Diagnostic ValueCommon Limitation
UDP TracerouteHigh-port UDP datagramsICMP Time Exceeded / Port UnreachableTraditional path and transit discoveryCorporate firewalls often filter outbound UDP
ICMP TracerouteICMP Echo Request (ping)ICMP Time Exceeded / Echo ReplyCore network transit testingRouters frequently rate-limit ICMP responses
TCP TracerouteTCP SYN packets to port 443TCP SYN/ACK or RST / ICMP ExceededApplication-facing firewall traversalRequires an open, listening target port
IPv6 TracerouteNative IPv6 extension headersICMPv6 Time ExceededDual-stack route asymmetry debuggingSeparate transit paths from IPv4 networks

3. Production Diagnostic Commands

Evaluate authoritative delegation, packet transit loss, and HTTP connection timings using these diagnostic commands:

# Trace full DNS authoritative delegation from root servers
dig +trace pingzoapp.com

# Query specific public recursive resolvers directly
dig @1.1.1.1 pingzoapp.com A +dnssec
dig @8.8.8.8 pingzoapp.com AAAA

# Measure latency and packet loss across 100 cycles with MTR
mtr -rwzc 100 -T -p 443 pingzoapp.com

# Decompose HTTP request latency components using curl
curl -sS -o /dev/null \
  -w 'DNS: %{time_namelookup}s\nTCP: %{time_connect}s\nTLS: %{time_appconnect}s\nTTFB: %{time_starttransfer}s\nTotal: %{time_total}s\n' \
  https://pingzoapp.com/health

[!NOTE] SRE Diagnostic Alert: When investigating geographic resolver discrepancies or DNSSEC validation failures, query your zone using our free DNS Lookup tool. It verifies authoritative delegations and record propagation across independent global nodes.


4. DNS and Network Failure Symptom Matrix

Map observable operational symptoms directly to root causes across the diagnostic chain:

Observable SymptomDNS SignalTraceroute / Socket SignalRoot Cause Classification
Complete Resolution FailureNXDOMAINN/A (Cannot resolve host)Missing A/AAAA record or broken parent zone delegation
Cryptographic Validation HaltSERVFAILN/AExpired DNSSEC RRSIG or mismatched DS record at registrar
Connection Timeout on Port 443Normal IP returnedSYN sent, no SYN/ACK receivedEdge firewall rule, security group drop, or BGP routing blackhole
Dual-Stack Intermittent OutageA & AAAA returnedIPv4 completes, IPv6 path dropsBroken IPv6 peering or MTU blackhole on the IPv6 transit route
Elevated TTFB with Fast DNSNormal IP returnedZero packet loss, low RTTBackend application thread exhaustion or database lock contention

5. Automated SRE Diagnostic Collection Harness

Deploy this bash script during incidents to capture deterministic network state before restarting services:

#!/usr/bin/env bash
set -euo pipefail

TARGET="${1:-pingzoapp.com}"

echo "=== 1. DNS RESOLUTION ==="
dig +noall +answer "$TARGET" A "$TARGET" AAAA

echo "=== 2. AUTHORITATIVE TRACE ==="
dig +trace +nodnssec "$TARGET" | tail -n 6

echo "=== 3. TCP PORT REACHABILITY ==="
nc -zv -w 3 "$TARGET" 443

echo "=== 4. HTTP LATENCY DECOMPOSITION ==="
curl -sS -o /dev/null \
  -w 'HTTP_CODE=%{http_code} DNS=%{time_namelookup}s CONNECT=%{time_connect}s TLS=%{time_appconnect}s TTFB=%{time_starttransfer}s TOTAL=%{time_total}s\n' \
  "https://$TARGET/"

echo "=== 5. TCP TRACEROUTE ==="
traceroute -n -T -p 443 "$TARGET"

6. Troubleshooting DNS and Routing Failures

Follow this ordered diagnostic checklist to identify the exact failing hop during an active incident:

  1. Reproduce the error explicitly: Query the domain from the affected client network to capture the exact error string (SERVFAIL, NXDOMAIN, ETIMEDOUT, or ECONNREFUSED).
  2. Verify recursive resolver consistency: Query multiple public DNS resolvers (1.1.1.1, 8.8.8.8, 9.9.9.9) to isolate local resolver cache poisoning from global outages.
  3. Inspect authoritative nameserver delegations: Trace nameserver responses from the root zone to detect missing glue records or mismatched NS entries:
    dig +trace pingzoapp.com NS
    
  4. Validate DNSSEC cryptographic signatures: Check whether SERVFAIL errors disappear when querying without DNSSEC validation (+cd flag):
    dig pingzoapp.com +cd
    
  5. Separate IPv4 and IPv6 transit paths: Test connectivity using forced -4 and -6 parameters to identify broken dual-stack routes:
    curl -4 -I https://pingzoapp.com
    curl -6 -I https://pingzoapp.com
    
  6. Analyze MTR packet loss patterns: Look for packet loss that persists across every subsequent hop down to the destination. Ignore single intermediate * * * hops that represent ICMP rate limiting.
  7. Inspect TCP SYN retransmissions: Use tcpdump on the server host to check whether incoming client SYN packets are being received or dropped:
    sudo tcpdump -ni any 'tcp[tcpflags] & (tcp-syn) != 0 and port 443'
    
  8. Evaluate Path MTU Discovery (PMTUD): Check if large packets fail while small ICMP pings succeed, indicating that intermediate routers are dropping packets without returning ICMP Fragmentation Needed messages.
  9. Verify application listener health: Confirm that your web server (Nginx/Apache) or reverse proxy is actively bound to the port and not starved of worker connections:
    ss -tlpn '( sport = :443 or sport = :80 )'
    
Zero-Code Uptime Alerts

Stop Finding Out About Outages from Angry Users

Get instant WhatsApp & Discord alerts the second your API, website, or server goes down. Setup in 30 seconds with 60-second checks.

WhatsApp & Discord 60-Second Checks Free Forever Plan
Try Pingzo Free

Know before your users do

Connect official WhatsApp notification channels, Discord webhooks, Telegram bots, and public status pages. Start in 30 seconds.

Create Free Monitor