LFCS · Question #268
Suppose that the command netstat -a hangs for a long time without producing output. An administrator might suspect:
The correct answer is B. a problem with DNS. A hanging netstat -a command often indicates issues with DNS resolution, as the command attempts to resolve IP addresses to hostnames, which can delay output if DNS servers are unreachable or slow.
Question
Options
- Aa problem with NFS
- Ba problem with DNS
- Ca problem with NIS
- Da problem with routing
- Ethat the netstat daemon has crashed
How the community answered
(49 responses)- A2% (1)
- B92% (45)
- C2% (1)
- E4% (2)
Why each option
A hanging `netstat -a` command often indicates issues with DNS resolution, as the command attempts to resolve IP addresses to hostnames, which can delay output if DNS servers are unreachable or slow.
A problem with NFS would typically manifest as issues accessing mounted file systems, not as a hang in `netstat -a` during connection listing.
The `netstat -a` command, by default, attempts to resolve IP addresses of connected hosts and listening services into hostnames. If the DNS server is unreachable, slow, or experiencing issues, `netstat` will wait indefinitely for these lookups to complete, causing the command to hang.
A problem with NIS (Network Information Service) would affect user/group lookups across the network, but generally not cause `netstat -a` to hang.
Routing problems would prevent network connections, but `netstat -a` would still display local connections and listening ports, and wouldn't hang specifically on hostname resolution.
`netstat` is a utility, not a daemon, and therefore does not 'crash' in the sense of a daemon process failing.
Concept tested: netstat troubleshooting and DNS
Source: https://man7.org/linux/man-pages/man8/netstat.8.html
Topics
Community Discussion
No community discussion yet for this question.