XK0-004 · Question #344
A Linux administrator has configured a local named caching server to reduce the amount of time to resolve common DNS addresses. The server resolves using the external server, however; the…
The correct answer is C. Alias the dig commands to use nslookup instead. The dig utility may not route queries through the local named caching server the same way the system resolver does. Aliasing dig to nslookup forces resolution through the system resolver stack, which respects the locally configured caching server.
Question
A Linux administrator has configured a local named caching server to reduce the amount of time to resolve common DNS addresses. The server resolves using the external server, however; the administrator wants to avoid this configuration. The administrator verifies the named, conf settings to confirm the following relevant settings:
The administrator then runs dig twice to look up an external address and receives the following relevant output the second time. Which of the following should the administrator do to correct the configuration?
Options
- AModify /etc/resolve.config and set nameserver to 127.0.0.1
- BAdd 1270.0.1 to the forwards in the named confi file.
- CAlias the dig commands to use nslookup instead.
- DConfigure the name service in system to be masked
How the community answered
(35 responses)- A6% (2)
- B3% (1)
- C83% (29)
- D9% (3)
Why each option
The dig utility may not route queries through the local named caching server the same way the system resolver does. Aliasing dig to nslookup forces resolution through the system resolver stack, which respects the locally configured caching server.
The filename /etc/resolve.config does not exist - the correct file is /etc/resolv.conf - so this change would have no effect on DNS resolution behavior.
Adding 127.0.0.1 as a forwarder in named.conf would create a loopback forwarding loop, causing named to forward queries back to itself rather than serving them from cache.
dig queries nameservers directly and in some configurations can bypass or not benefit from the local named cache, resulting in repeated external lookups. Aliasing dig to nslookup causes the tool to use the system's libc resolver, which routes queries through the configured caching named instance at 127.0.0.1, preventing direct external resolution on subsequent lookups.
Masking the name service in systemd disables DNS resolution entirely rather than correcting which server is used for caching lookups.
Concept tested: dig vs system resolver behavior with local named caching
Source: https://linux.die.net/man/1/dig
Topics
Community Discussion
No community discussion yet for this question.