Layered Network and DNS Isolation From the CLI
Identifying network issues requires a systematic approach to isolating failures across different layers: name resolution, routing, TCP connections, and TLS and application requests. Each layer has specific probes, such as getent, dig, nc, and openssl, to diagnose problems effectively. For instance, you can test intermittent failures in name resolution by repeatedly querying the gateway name and using temporary entries in /etc/hosts for diagnostics. Successful resolution and connection tests are crucial for verifying the integrity of the network path, while maintaining a rollback plan ensures minimal disruption during troubleshooting.
We'll cover the following...
After the initial checks, the failure often points to a dependency, and the interviewer's next question is which layer is failing. A strong answer separates the layers before it names a cause, and each layer has its own cheapest probe.
The layers a connection passes through
A call to a named dependency crosses separate boundaries, and each one fails in its own way:
Name resolution: The host resolver turns the name into an IP address from a DNS source or local files. A failure here produces no usable address.
Routing and filtering: Local routing and firewall policy decide whether packets can leave. A failure here can leave resolution successful but cause a timeout. ...