Difference between DHCP options 'Domain-Name' and 'Domain-Search'

20,306

The domain-name option specifies the client's domain name (of which there can only be one), and is specified in resolv.conf with the domain keyword. This is the domain which will be used when running hostname -f on the client.

The domain-search option specifies a list of domains to use when looking up bare hostnames, and is specified in resolv.conf with the search keyword. If this option isn't provided it defaults to the single domain provided by domain-name.

Share:
20,306

Related videos on Youtube

Rauffle
Author by

Rauffle

Updated on September 18, 2022

Comments

  • Rauffle
    Rauffle over 1 year

    What is the difference between the two?

    I had thought that domain-name would put the client on the specified domain (ie. If the domain-name was set to "foo.bar" the clients FQDN would be 'hostname.foo.bar'), but http://linux.die.net/man/5/dhcp-options seems to imply that both options ('Domain-Name' and 'Domain-Search') simply specify a search domain.

    If domain-name does not set the domain for the client, what option would?

  • Ray Foss
    Ray Foss over 4 years
    A valid value is .local or maybe .company.com. The default of naked lookups is usually fine.