nerdexam
Linux_Foundation

LFCS · 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 a search directive line.

Submitted by satoshi_tk· Apr 18, 2026Networking

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

(19 responses)
  • A
    95% (18)
  • D
    5% (1)

Why each option

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

AThere is a syntax error.Correct

The `search` directive in `/etc/resolv.conf` is used to specify a list of domain names to append to unqualified hostnames during DNS lookups. IP addresses should be specified using the `nameserver` directive on separate lines, making `search example.com 127.0.0.1 208.77.188.166` a syntax error.

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

This statement assumes valid configuration; due to the syntax error, the DNS servers cannot be correctly parsed and queried in the manner described.

Cexample.com will be appended to all host lookups.

While `example.com` would typically be appended to host lookups if correctly configured, the syntax error on the line prevents the entire line from being correctly interpreted.

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

DNS servers listed with the `nameserver` directive are queried in the order they appear, not in a round-robin fashion unless specifically configured by resolver libraries or local DNS caching daemons, and this line is syntactically incorrect for listing nameservers.

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

The DNS resolver library queries nameservers in order, not based on ping time, and this statement assumes valid configuration which is not the case.

Concept tested: /etc/resolv.conf syntax

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

Topics

#resolv.conf#DNS configuration#Networking files#Syntax errors

Community Discussion

No community discussion yet for this question.

Full LFCS Practice