Failure Phenomena :
- Use Telnet ip+ port to test normal, can access;
- via Telnet domain + port mode, hint: unknown name or service (name or services not known).
- Test Baidu's network address, Ping can pass. But ping the domain name, the same hint appears.
According to the above fault phenomenon analysis, the preliminary judgment is the DNS configuration problem.
Troubleshooting process:
By nslookup testing DNS resolution, the local DNS server configuration should be available from the results.
However, the test found that the use of Telnet domain name + port to test the way, still prompt: unknown name or service .
Other machines with the same network segment have been tested, and the configured DNS server x.x.x.x can be parsed properly, so it is still suspected to be a native configuration problem.
Search for relevant information. Found in the Linux system has a configuration file/etc/nsswitch.conf, which defines the domain name resolution of the search order.
In general, the resolution of the domain name is done in two ways. One is static parsing, configured through the/etc/hosts file, and the other is through a DNS server.
Check the/etc/nsswitch.conf, and find that the configuration of the corresponding item is as follows, DNS is commented out, so the host will never use the DNS configuration to resolve the address.
Modify the configuration, remove the comments later, re-test, by the way the domain name Telnet, can pass. Troubleshooting.
Linux hosts fail to access network through domain name