nerdexam
CompTIA

LX0-104 · Question #527

Which of the following statements is true regarding the following /etc/resolv.conf file? search example.com nameserver 208.77.188.166 nameserver 208.77.188.167

The correct answer is D. example.com will be appended to host names when they do not contain dots.. In the provided /etc/resolv.conf file, the search example.com directive ensures that example.com will be appended to hostnames that do not contain any dots during DNS lookups.

Networking Fundamentals

Question

Which of the following statements is true regarding the following /etc/resolv.conf file? search example.com nameserver 208.77.188.166 nameserver 208.77.188.167

Options

  • AThere is a syntax error.
  • BIf DNS queries to the localhost fail, the server 208.77.188.166 will be queried.
  • Cexample.com will be appended to all host lookups.
  • Dexample.com will be appended to host names when they do not contain dots.
  • EThe DNS server with the shortest ping time will be queried first. If the lookup fails, the second

How the community answered

(35 responses)
  • A
    3% (1)
  • C
    6% (2)
  • D
    89% (31)
  • E
    3% (1)

Why each option

In the provided `/etc/resolv.conf` file, the `search example.com` directive ensures that `example.com` will be appended to hostnames that do not contain any dots during DNS lookups.

AThere is a syntax error.

The provided `/etc/resolv.conf` file snippet `search example.com` and `nameserver 208.77.188.166 nameserver 208.77.188.167` uses correct syntax for configuring DNS resolution.

BIf DNS queries to the localhost fail, the server 208.77.188.166 will be queried.

DNS queries to localhost are typically handled locally or fail if no local resolver is configured, and the `nameserver` entries are for querying external DNS servers, not for fallback from localhost failures.

Cexample.com will be appended to all host lookups.

`example.com` is not appended to *all* host lookups; it's specifically applied to unqualified hostnames (those without dots) or in some cases, partially qualified names where the initial lookup fails.

Dexample.com will be appended to host names when they do not contain dots.Correct

The `search` directive in `/etc/resolv.conf` specifies a domain suffix list. When the resolver attempts to resolve a hostname that is a single label (i.e., contains no dots), it appends each domain in the search list, in order, until a match is found or the list is exhausted.

EThe DNS server with the shortest ping time will be queried first. If the lookup fails, the second

The `nameserver` entries in `/etc/resolv.conf` are queried sequentially in the order they appear, with subsequent servers acting as fallbacks; there is no mechanism for querying based on shortest ping time.

Concept tested: DNS resolution with /etc/resolv.conf search directive

Source: https://man7.org/linux/man-pages/man5/resolv.conf.5.html

Topics

#DNS#resolv.conf#domain resolution

Community Discussion

No community discussion yet for this question.

Full LX0-104 Practice