Users type short names such as `wiki` and `build`, and the resolver must try them in corp.example.com first and lab.example.com second. Which /etc/resolv.conf directive expresses that?

LPIC-1 Exam 102-500, objective 109. Networking fundamentals medium

Machine-checked — no person has signed for it. This question was read against the source cited below by an automated pass, which found no contradiction. That is a weaker claim than it sounds: the same kind of process wrote the question, so it can confirm its own mistake.

Treat it as a good draft rather than as settled fact, and read the source below before you rely on it. It is not used in mock exams here — only questions a person has signed for are.

How these questions are written — where each question comes from, what the verification ledger records, and what happens when one is found wrong.

The options

Correct search corp.example.com lab.example.com

Correct. The search directive takes a list of domains, appended to unqualified names in the order given until one resolves.

Not correct domain corp.example.com lab.example.com

Wrong. The domain directive names a single local domain; extra names on the line are ignored, and it is mutually exclusive with search, with the last such directive in the file winning.

Not correct nameserver corp.example.com lab.example.com

Wrong. nameserver takes one IP address of a server to query, not a domain name, and one address per line.

Not correct options ndots:2

Wrong. ndots only sets how many dots a name must contain before it is tried as absolute first. It does not decide which domains are appended.

Why

search and domain both supply suffixes for unqualified names, but domain names a single suffix while search accepts a list tried in order. The two keywords are mutually exclusive, and if both appear the last one in the file wins. Classic accompanying directives are `nameserver` for each server, at most three of which are consulted, and `options` for tuning such as ndots, timeout and attempts. On distributions where resolv.conf is a symlink maintained by systemd-resolved or NetworkManager, set the search domains through the connection profile instead, since direct edits are overwritten.

Where this comes from

Cited
manual page resolv.conf(5)

Practise this

Reading one question is not practice. The trainer will draw a short set from objective 109 and space the ones you get wrong.

Practise LPIC-1 Exam 102-500

More questions on this objective

All questions on Networking fundamentals

Practise LPIC-1 Exam 102-500