Q80Architecture
How would you troubleshoot an end-to-end request path?
Trace DNS, routing, TCP, TLS, HTTP, proxy routing, application work, and downstream dependencies. Compare evidence from each layer.
Answer
Trace DNS, routing, TCP, TLS, HTTP, proxy routing, application work, and downstream dependencies. Compare evidence from each layer. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
User/Client -> Command or tool -> Linux subsystem -> Observed result -> Next diagnostic step
Syntax
Client -> DNS -> Route/NAT -> Firewall -> TCP -> TLS -> Proxy -> App -> Database
Collect timestamps, status codes, and request IDs at each hop.
# Diagnostic flow
User/Client -> Command or tool -> Linux subsystem -> Observed result -> Next diagnostic step
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q81TCP/IP
What is TCP TIME_WAIT and should it be removed?
TIME_WAIT helps prevent delayed packets from corrupting later connections. It is usually normal; inspect connection churn before changing kernel setti
Answer
TIME_WAIT helps prevent delayed packets from corrupting later connections. It is usually normal; inspect connection churn before changing kernel settings. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
Process -> Socket -> Route lookup -> Interface/gateway -> Network -> Destination
Syntax
ss -tan state time-wait | wc -l
ss -s
# Diagnostic flow
Process -> Socket -> Route lookup -> Interface/gateway -> Network -> Destination
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q82TCP/IP
What are SYN backlog and accept queue issues?
The SYN backlog tracks incomplete handshakes; the accept queue holds established connections waiting for the application to accept them.
Answer
The SYN backlog tracks incomplete handshakes; the accept queue holds established connections waiting for the application to accept them. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
Process -> Socket -> Route lookup -> Interface/gateway -> Network -> Destination
Syntax
ss -lnt
nstat -az | grep -Ei 'ListenOverflows|ListenDrops|Syncookies'
# Diagnostic flow
Process -> Socket -> Route lookup -> Interface/gateway -> Network -> Destination
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q83TCP/IP
How does TCP congestion control affect throughput?
Congestion control adjusts sending rate based on path feedback. RTT, loss, and bandwidth-delay product influence throughput.
Answer
Congestion control adjusts sending rate based on path feedback. RTT, loss, and bandwidth-delay product influence throughput. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
Process -> Socket -> Route lookup -> Interface/gateway -> Network -> Destination
Syntax
sysctl net.ipv4.tcp_congestion_control
ss -ti dst <REMOTE_IP>
# Diagnostic flow
Process -> Socket -> Route lookup -> Interface/gateway -> Network -> Destination
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q84TCP/IP
How do you diagnose an MTU black hole?
Look for connections that establish but stall on larger packets; test packet sizes and inspect ICMP Packet Too Big or fragmentation-needed messages.
Answer
Look for connections that establish but stall on larger packets; test packet sizes and inspect ICMP Packet Too Big or fragmentation-needed messages. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
Process -> Socket -> Route lookup -> Interface/gateway -> Network -> Destination
Syntax
tracepath <DESTINATION>
ping -M do -s 1400 -c 3 <DESTINATION>
sudo tcpdump -ni any 'icmp or icmp6'
# Diagnostic flow
Process -> Socket -> Route lookup -> Interface/gateway -> Network -> Destination
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q85TCP/IP
What is connection-tracking exhaustion?
Conntrack stores flow state for firewall/NAT decisions. If its table fills, new connections can fail even when the application is healthy.
Answer
Conntrack stores flow state for firewall/NAT decisions. If its table fills, new connections can fail even when the application is healthy. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
Process -> Socket -> Route lookup -> Interface/gateway -> Network -> Destination
Syntax
sysctl net.netfilter.nf_conntrack_count 2>/dev/null
sysctl net.netfilter.nf_conntrack_max 2>/dev/null
sudo conntrack -S 2>/dev/null
# Diagnostic flow
Process -> Socket -> Route lookup -> Interface/gateway -> Network -> Destination
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q86DNS
How would you troubleshoot intermittent DNS failures?
Compare resolver latency, error rates, TTLs, upstream health, client caches, and UDP/TCP behavior. Query the configured and authoritative paths.
Answer
Compare resolver latency, error rates, TTLs, upstream health, client caches, and UDP/TCP behavior. Query the configured and authoritative paths. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
Application -> NSS/resolver -> Recursive DNS -> Authoritative DNS -> Record answer
Syntax
for i in {1..5}; do dig +time=2 +tries=1 api.example.com; done
dig +trace api.example.com
# Diagnostic flow
Application -> NSS/resolver -> Recursive DNS -> Authoritative DNS -> Record answer
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q87DNS
Why might dig work while an application name lookup fails?
Applications may use NSS, search domains, caches, proxy-specific resolution, or container resolver configuration that differs from direct DNS queries.
Answer
Applications may use NSS, search domains, caches, proxy-specific resolution, or container resolver configuration that differs from direct DNS queries. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
Application -> NSS/resolver -> Recursive DNS -> Authoritative DNS -> Record answer
Syntax
getent hosts api.internal
cat /etc/nsswitch.conf
cat /etc/resolv.conf
# Diagnostic flow
Application -> NSS/resolver -> Recursive DNS -> Authoritative DNS -> Record answer
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q88TLS
How do you diagnose TLS hostname or certificate errors?
Inspect certificate chain, expiry, SAN hostnames, SNI selection, trust store, and system time.
Answer
Inspect certificate chain, expiry, SAN hostnames, SNI selection, trust store, and system time. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
Client -> DNS -> TCP -> TLS (HTTPS) -> HTTP request -> Proxy/server -> Response
Syntax
openssl s_client -connect host.example:443 -servername host.example -showcerts </dev/null
curl -v https://host.example
# Diagnostic flow
Client -> DNS -> TCP -> TLS (HTTPS) -> HTTP request -> Proxy/server -> Response
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q89TLS
What are SNI and ALPN?
SNI tells the server which hostname the client wants; ALPN negotiates the application protocol such as HTTP/1.1 or HTTP/2.
Answer
SNI tells the server which hostname the client wants; ALPN negotiates the application protocol such as HTTP/1.1 or HTTP/2. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
Client -> DNS -> TCP -> TLS (HTTPS) -> HTTP request -> Proxy/server -> Response
Syntax
openssl s_client -connect example.com:443 -servername example.com -alpn 'h2,http/1.1' </dev/null
# Diagnostic flow
Client -> DNS -> TCP -> TLS (HTTPS) -> HTTP request -> Proxy/server -> Response
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q90HTTP
How do you diagnose a 502 or 504 from a reverse proxy?
Check proxy logs, upstream address and port, DNS, TLS, connection refusals, timeout settings, and upstream health.
Answer
Check proxy logs, upstream address and port, DNS, TLS, connection refusals, timeout settings, and upstream health. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
Client -> DNS -> TCP -> TLS (HTTPS) -> HTTP request -> Proxy/server -> Response
Syntax
journalctl -u nginx --since '-10 min'
curl -v --connect-timeout 2 http://<UPSTREAM_IP>:<PORT>/health
ss -tnp
# Diagnostic flow
Client -> DNS -> TCP -> TLS (HTTPS) -> HTTP request -> Proxy/server -> Response
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q91Containers
How do cgroups affect resource diagnosis?
Cgroups constrain and account for CPU, memory, and I/O. A container can be throttled or OOM-killed while the host appears healthy.
Answer
Cgroups constrain and account for CPU, memory, and I/O. A container can be throttled or OOM-killed while the host appears healthy. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
User/Client -> Command or tool -> Linux subsystem -> Observed result -> Next diagnostic step
Syntax
cat /sys/fs/cgroup/cpu.max 2>/dev/null
cat /sys/fs/cgroup/memory.max 2>/dev/null
cat /sys/fs/cgroup/memory.events 2>/dev/null
# Diagnostic flow
User/Client -> Command or tool -> Linux subsystem -> Observed result -> Next diagnostic step
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q92Containers
How do you investigate CPU throttling in a container?
Inspect CPU quota and throttling counters and correlate them with request latency and workload patterns.
Answer
Inspect CPU quota and throttling counters and correlate them with request latency and workload patterns. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
User/Client -> Command or tool -> Linux subsystem -> Observed result -> Next diagnostic step
Syntax
cat /sys/fs/cgroup/cpu.max 2>/dev/null
cat /sys/fs/cgroup/cpu.stat 2>/dev/null
# Diagnostic flow
User/Client -> Command or tool -> Linux subsystem -> Observed result -> Next diagnostic step
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q93Memory
How do you investigate an OOM kill?
Inspect kernel logs, cgroup memory events, process memory, and application allocation patterns; identify whether host or container limits were reached
Answer
Inspect kernel logs, cgroup memory events, process memory, and application allocation patterns; identify whether host or container limits were reached. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
Process -> Filesystem/memory subsystem -> Kernel accounting -> Metrics/logs
Syntax
journalctl -k --since '-1 hour' | grep -i -E 'oom|killed process'
cat /sys/fs/cgroup/memory.events 2>/dev/null
free -h
# Diagnostic flow
Process -> Filesystem/memory subsystem -> Kernel accounting -> Metrics/logs
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q94Security
How do Linux capabilities differ from root?
Capabilities split some privileged operations into smaller permissions. Grant only those required and understand their security implications.
Answer
Capabilities split some privileged operations into smaller permissions. Grant only those required and understand their security implications. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
User/process identity -> Mode bits/ACL/policy -> Kernel access check -> Allow or deny
Syntax
getcap -r /usr/bin 2>/dev/null | head
capsh --print 2>/dev/null
# Diagnostic flow
User/process identity -> Mode bits/ACL/policy -> Kernel access check -> Allow or deny
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q95Security
How can SELinux or AppArmor cause access failures?
Mandatory access controls can deny operations even when Unix mode bits allow them. Inspect denial logs and policy state before weakening enforcement.
Answer
Mandatory access controls can deny operations even when Unix mode bits allow them. Inspect denial logs and policy state before weakening enforcement. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
User/process identity -> Mode bits/ACL/policy -> Kernel access check -> Allow or deny
Syntax
getenforce 2>/dev/null
sudo ausearch -m AVC -ts recent 2>/dev/null
sudo aa-status 2>/dev/null
# Diagnostic flow
User/process identity -> Mode bits/ACL/policy -> Kernel access check -> Allow or deny
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q96Security
How do you safely change firewall rules on a remote host?
Record current rules, make a narrow change, maintain a recovery path, test from a separate session, and verify persistence.
Answer
Record current rules, make a narrow change, maintain a recovery path, test from a separate session, and verify persistence. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
User/process identity -> Mode bits/ACL/policy -> Kernel access check -> Allow or deny
Syntax
sudo nft list ruleset
# Apply a scoped rule; keep console access or timed rollback available.
# Diagnostic flow
User/process identity -> Mode bits/ACL/policy -> Kernel access check -> Allow or deny
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q97Routing
What is policy-based routing?
Policy routing chooses tables using rules such as source address, packet mark, or interface, not only destination prefixes.
Answer
Policy routing chooses tables using rules such as source address, packet mark, or interface, not only destination prefixes. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
Process -> Socket -> Route lookup -> Interface/gateway -> Network -> Destination
Syntax
ip rule show
ip route show table all
ip route get <DEST_IP> from <SOURCE_IP>
# Diagnostic flow
Process -> Socket -> Route lookup -> Interface/gateway -> Network -> Destination
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q98Routing
What is reverse-path filtering?
Reverse-path filtering checks whether a packet's source would be routed back through an expected interface; strict mode can conflict with asymmetric r
Answer
Reverse-path filtering checks whether a packet's source would be routed back through an expected interface; strict mode can conflict with asymmetric routing. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
Process -> Socket -> Route lookup -> Interface/gateway -> Network -> Destination
Syntax
sysctl net.ipv4.conf.all.rp_filter
sysctl net.ipv4.conf.default.rp_filter
# Diagnostic flow
Process -> Socket -> Route lookup -> Interface/gateway -> Network -> Destination
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q99Routing
How do you troubleshoot asymmetric routing?
Compare forward and return routes, policy rules, firewall state, and packet captures on both ends.
Answer
Compare forward and return routes, policy rules, firewall state, and packet captures on both ends. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
Process -> Socket -> Route lookup -> Interface/gateway -> Network -> Destination
Syntax
ip route get <CLIENT_IP>
ip rule show
sudo tcpdump -ni any host <CLIENT_IP>
# Diagnostic flow
Process -> Socket -> Route lookup -> Interface/gateway -> Network -> Destination
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q100Networking
What is link aggregation or bonding?
Bonding combines interfaces for redundancy or throughput depending on mode and switch configuration.
Answer
Bonding combines interfaces for redundancy or throughput depending on mode and switch configuration. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
Process -> Socket -> Route lookup -> Interface/gateway -> Network -> Destination
Syntax
cat /proc/net/bonding/bond0
ip -s link show bond0
# Diagnostic flow
Process -> Socket -> Route lookup -> Interface/gateway -> Network -> Destination
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q101Networking
How does a Linux bridge learn MAC addresses?
A bridge learns source MAC addresses on incoming ports and uses its forwarding database to direct frames.
Answer
A bridge learns source MAC addresses on incoming ports and uses its forwarding database to direct frames. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
Process -> Socket -> Route lookup -> Interface/gateway -> Network -> Destination
Syntax
bridge link show
bridge fdb show br br0
# Diagnostic flow
Process -> Socket -> Route lookup -> Interface/gateway -> Network -> Destination
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q102Networking
How do VLANs affect troubleshooting?
VLAN tags and port membership determine layer-2 broadcast domains. A tag mismatch can isolate a host despite link being up.
Answer
VLAN tags and port membership determine layer-2 broadcast domains. A tag mismatch can isolate a host despite link being up. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
Process -> Socket -> Route lookup -> Interface/gateway -> Network -> Destination
Syntax
ip -d link show
bridge vlan show
# Diagnostic flow
Process -> Socket -> Route lookup -> Interface/gateway -> Network -> Destination
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q103Containers
How do you debug a container network namespace?
Inspect routes, listeners, DNS, MTU, and the host-side veth/bridge from both the container and host namespaces.
Answer
Inspect routes, listeners, DNS, MTU, and the host-side veth/bridge from both the container and host namespaces. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
User/Client -> Command or tool -> Linux subsystem -> Observed result -> Next diagnostic step
Syntax
ip netns exec <NS> ip route
nsenter -t <PID> -n ss -lntp
bridge link
# Diagnostic flow
User/Client -> Command or tool -> Linux subsystem -> Observed result -> Next diagnostic step
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q104Observability
What is eBPF used for in network troubleshooting?
eBPF-based tools can observe kernel events, packet drops, latency, and flow behavior when supported by the kernel and permissions.
Answer
eBPF-based tools can observe kernel events, packet drops, latency, and flow behavior when supported by the kernel and permissions. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
User/Client -> Command or tool -> Linux subsystem -> Observed result -> Next diagnostic step
Syntax
sudo bpftool prog show 2>/dev/null
# Use a supported eBPF observability tool for the environment.
# Diagnostic flow
User/Client -> Command or tool -> Linux subsystem -> Observed result -> Next diagnostic step
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q105Observability
How can strace diagnose a failing process?
`strace` records system calls and signals, revealing missing files, permission errors, blocked calls, and connection failures.
Answer
`strace` records system calls and signals, revealing missing files, permission errors, blocked calls, and connection failures. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
User/Client -> Command or tool -> Linux subsystem -> Observed result -> Next diagnostic step
Syntax
strace -f -tt -T -p <PID>
strace -f -o trace.log ./app
# Diagnostic flow
User/Client -> Command or tool -> Linux subsystem -> Observed result -> Next diagnostic step
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q106Observability
How do you inspect socket queues and TCP details?
`ss` displays socket state, queue sizes, timers, and TCP metrics; sample repeatedly and correlate with application latency.
Answer
`ss` displays socket state, queue sizes, timers, and TCP metrics; sample repeatedly and correlate with application latency. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
User/Client -> Command or tool -> Linux subsystem -> Observed result -> Next diagnostic step
Syntax
ss -s
ss -lnt
ss -ti
# Diagnostic flow
User/Client -> Command or tool -> Linux subsystem -> Observed result -> Next diagnostic step
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q107Observability
How do you inspect kernel networking messages?
Read kernel logs for link changes, driver errors, dropped traffic reports, and other subsystem messages.
Answer
Read kernel logs for link changes, driver errors, dropped traffic reports, and other subsystem messages. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
User/Client -> Command or tool -> Linux subsystem -> Observed result -> Next diagnostic step
Syntax
journalctl -k --since '-30 min'
dmesg -T | tail -100
# Diagnostic flow
User/Client -> Command or tool -> Linux subsystem -> Observed result -> Next diagnostic step
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q108Reliability
How would you design an on-call network troubleshooting checklist?
Start with impact and scope, then test DNS, route, socket, TLS/HTTP, logs, metrics, and dependencies. Preserve evidence before remediation.
Answer
Start with impact and scope, then test DNS, route, socket, TLS/HTTP, logs, metrics, and dependencies. Preserve evidence before remediation. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
User/Client -> Command or tool -> Linux subsystem -> Observed result -> Next diagnostic step
Syntax
1. Scope and timestamp
2. DNS: getent/dig
3. Route: ip route get
4. Socket: ss/nc
5. TLS/HTTP: curl/openssl
6. Logs/metrics/capture
7. Mitigate and verify
# Diagnostic flow
User/Client -> Command or tool -> Linux subsystem -> Observed result -> Next diagnostic step
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q109Reliability
How do you distinguish network latency from application latency?
Measure DNS, TCP connect, TLS, time to first byte, total response time, server traces, and downstream timing.
Answer
Measure DNS, TCP connect, TLS, time to first byte, total response time, server traces, and downstream timing. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
User/Client -> Command or tool -> Linux subsystem -> Observed result -> Next diagnostic step
Syntax
curl -sS -o /dev/null -w 'dns=%{time_namelookup} connect=%{time_connect} tls=%{time_appconnect} ttfb=%{time_starttransfer} total=%{time_total}\n' https://example.com
# Diagnostic flow
User/Client -> Command or tool -> Linux subsystem -> Observed result -> Next diagnostic step
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q110Reliability
What is a safe mitigation strategy during a network incident?
Prefer reversible, scoped actions with success criteria; communicate impact, preserve evidence, and validate recovery and side effects.
Answer
Prefer reversible, scoped actions with success criteria; communicate impact, preserve evidence, and validate recovery and side effects. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
User/Client -> Command or tool -> Linux subsystem -> Observed result -> Next diagnostic step
Syntax
ip route get <DEST_IP>
curl -fsS --max-time 3 https://service.example/health
journalctl -u service --since '-5 min'
# Diagnostic flow
User/Client -> Command or tool -> Linux subsystem -> Observed result -> Next diagnostic step
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q111Networking
How can NIC offloading affect packet captures?
GRO, GSO, and checksum offload can make host captures differ from wire-level packet boundaries or checksum appearance.
Answer
GRO, GSO, and checksum offload can make host captures differ from wire-level packet boundaries or checksum appearance. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
Process -> Socket -> Route lookup -> Interface/gateway -> Network -> Destination
Syntax
ethtool -k eth0
sudo tcpdump -ni eth0 -s 0 -w capture.pcap
# Diagnostic flow
Process -> Socket -> Route lookup -> Interface/gateway -> Network -> Destination
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q112Networking
How do you troubleshoot interface errors?
Compare link state, driver logs, interface counters, speed/duplex, and peer-side counters before changing configuration.
Answer
Compare link state, driver logs, interface counters, speed/duplex, and peer-side counters before changing configuration. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
Process -> Socket -> Route lookup -> Interface/gateway -> Network -> Destination
Syntax
ip -s link show dev eth0
ethtool eth0 2>/dev/null
journalctl -k --since '-1 hour' | grep -i eth0
# Diagnostic flow
Process -> Socket -> Route lookup -> Interface/gateway -> Network -> Destination
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q113Processes
How do file descriptor limits cause service failures?
Per-process or system-wide descriptor exhaustion can prevent opening files or sockets; logs may show EMFILE or ENFILE.
Answer
Per-process or system-wide descriptor exhaustion can prevent opening files or sockets; logs may show EMFILE or ENFILE. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
User/service manager -> Process -> System calls -> Kernel -> Resource or exit status
Syntax
cat /proc/<PID>/limits
ls /proc/<PID>/fd | wc -l
ulimit -n
# Diagnostic flow
User/service manager -> Process -> System calls -> Kernel -> Resource or exit status
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q114Performance
A service has high latency but low CPU. What do you investigate?
Investigate blocking I/O, lock contention, downstream latency, queueing, DNS, connection pools, throttling, and packet loss.
Answer
Investigate blocking I/O, lock contention, downstream latency, queueing, DNS, connection pools, throttling, and packet loss. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
User/Client -> Command or tool -> Linux subsystem -> Observed result -> Next diagnostic step
Syntax
ss -s
iostat -xz 1 3
vmstat 1 5
journalctl -u app --since '-10 min'
# Diagnostic flow
User/Client -> Command or tool -> Linux subsystem -> Observed result -> Next diagnostic step
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q115Routing
What is a route metric?
A route metric helps choose among comparable routes; prefix specificity and policy rules also affect route selection.
Answer
A route metric helps choose among comparable routes; prefix specificity and policy rules also affect route selection. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
Process -> Socket -> Route lookup -> Interface/gateway -> Network -> Destination
Syntax
ip route show
ip route get <DEST_IP>
# Diagnostic flow
Process -> Socket -> Route lookup -> Interface/gateway -> Network -> Destination
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q116Security
How do you verify services are not unintentionally exposed?
Inventory listening sockets, identify bind addresses and processes, and compare them with intended exposure and firewall policy.
Answer
Inventory listening sockets, identify bind addresses and processes, and compare them with intended exposure and firewall policy. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
User/process identity -> Mode bits/ACL/policy -> Kernel access check -> Allow or deny
Syntax
sudo ss -lntup
sudo nft list ruleset
# Diagnostic flow
User/process identity -> Mode bits/ACL/policy -> Kernel access check -> Allow or deny
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q117DNS
How do you investigate split-horizon DNS?
Split-horizon DNS intentionally returns different answers based on resolver or client network; query each intended resolver explicitly.
Answer
Split-horizon DNS intentionally returns different answers based on resolver or client network; query each intended resolver explicitly. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
Application -> NSS/resolver -> Recursive DNS -> Authoritative DNS -> Record answer
Syntax
dig internal.example.com
dig @<INTERNAL_DNS> internal.example.com A
dig @<EXTERNAL_DNS> internal.example.com A
# Diagnostic flow
Application -> NSS/resolver -> Recursive DNS -> Authoritative DNS -> Record answer
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q118Storage
A disk is full but du cannot account for the space. What do you check?
Check deleted-but-open files, mount points, snapshots, reserved blocks, and filesystem-specific usage.
Answer
Check deleted-but-open files, mount points, snapshots, reserved blocks, and filesystem-specific usage. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
Process -> Filesystem/memory subsystem -> Kernel accounting -> Metrics/logs
Syntax
df -h
sudo lsof +L1 2>/dev/null | head
findmnt
# Diagnostic flow
Process -> Filesystem/memory subsystem -> Kernel accounting -> Metrics/logs
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q119DNS
A hostname resolves to the wrong server after deployment. What do you check?
Check authoritative records, TTL, recursive caches, local overrides, split DNS, proxy caches, and A/AAAA records.
Answer
Check authoritative records, TTL, recursive caches, local overrides, split DNS, proxy caches, and A/AAAA records. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
Application -> NSS/resolver -> Recursive DNS -> Authoritative DNS -> Record answer
Syntax
dig +trace app.example.com
dig app.example.com A
getent hosts app.example.com
cat /etc/hosts
# Diagnostic flow
Application -> NSS/resolver -> Recursive DNS -> Authoritative DNS -> Record answer
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.
Q120IPv6
How do you troubleshoot a service that fails only over IPv6?
Compare AAAA records, IPv6 addresses/routes, firewall policy, MTU, listener bindings, and IPv6-specific requests.
Answer
Compare AAAA records, IPv6 addresses/routes, firewall policy, MTU, listener bindings, and IPv6-specific requests. Example workflow: run the command against the affected host, compare the observed output with a known-good host or expected state, and narrow the fault to one layer before changing configuration. Diagram:
Process -> Socket -> Route lookup -> Interface/gateway -> Network -> Destination
Syntax
curl -4 -v https://service.example
curl -6 -v https://service.example
ip -6 route show
ss -lntp
# Diagnostic flow
Process -> Socket -> Route lookup -> Interface/gateway -> Network -> Destination
Key Points
- Run commands with the least privilege needed and protect sensitive output.
- Compare evidence before and after a change; avoid destructive fixes without a rollback.
- Separate DNS, routing, transport, TLS/HTTP, process, and resource symptoms.