nerdexam
CompTIA

LX0-104 · Question #277

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

The correct answer is A. There is a syntax error.. The provided /etc/resolv.conf entry contains a syntax error because IP addresses are incorrectly listed on the search directive line instead of using the nameserver directive.

Networking Fundamentals

Question

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

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.
  • DThe DNS servers at 127.0.0.1 and 208.77.188.166 will be queried in a round robin fashion.
  • EThe DNS server with the shortest ping time will be queried first. If the lookup fails, the second server

How the community answered

(32 responses)
  • A
    78% (25)
  • C
    3% (1)
  • D
    6% (2)
  • E
    13% (4)

Why each option

The provided /etc/resolv.conf entry contains a syntax error because IP addresses are incorrectly listed on the `search` directive line instead of using the `nameserver` directive.

AThere is a syntax error.Correct

The `search` directive in /etc/resolv.conf is used to specify a list of domain suffixes to append to hostnames that are not fully qualified. IP addresses like 127.0.0.1 and 208.77.188.166 are only valid arguments for the `nameserver` directive, making the given line syntactically incorrect.

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

The entry is syntactically incorrect, so its behavior for failover cannot be reliably predicted as described.

Cexample.com will be appended to all host lookups.

While `example.com` would typically be appended to host lookups if correctly configured as a `search` domain, the line's inclusion of IP addresses on the `search` line makes the entire entry a syntax error.

DThe DNS servers at 127.0.0.1 and 208.77.188.166 will be queried in a round robin fashion.

DNS servers are queried in the order they appear with the `nameserver` directive, not round-robin, and these IPs are not correctly specified as nameservers.

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

DNS server selection is based on the order in the `nameserver` directives, not ping time, and these IPs are not correctly specified as nameservers.

Concept tested: /etc/resolv.conf syntax and directives

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

Topics

#DNS configuration#resolv.conf#DNS troubleshooting#syntax error

Community Discussion

No community discussion yet for this question.

Full LX0-104 Practice