what does domain and search in resolv.conf mean

Karl Auer kauer at biplane.com.au
Mon Jun 1 06:23:45 UTC 2015


On Mon, 2015-06-01 at 07:48 +0200, robert rottermann wrote:
> what does domain and search in resolv.conf mean?

The domain value is stuck on the end of "bare" names. So if you have
"domain mydomain.com" and you try "ping fred" it is as if you typed
"ping fred.mydomain,com".

The search values are tried, one after the other, when attempting to
resolve a "bare" name. So if you do "ping fred" and your search list is
".com, .net, .org", lookups of fred.com, fred.net and fred.org" will be
attempted, until one of then resolves.

search and domain are mutually exclusive. If you have both, the last one
wins. If you have more than one of either, the last one wins.

"man resolv.conf" is your friend.

> Who / what process is changing it?

Probably NetworkManager and/or the DHCP client.

> on the raspberry the name resolution does NOT work and it has the following 
> entries:
> 
> nameserver 195.186.152.33
> nameserver 195.186.216.33
> domain v.cablecom.net
> search v.cablecom.net

The domain entry might as well not be there.

>From the pi, what happen when you do a dig @195.186.152.33 or
@195.186.216.33?

Does it work if you provide a fully qualified domain name like
"www.google.com." (not the final dot)?

Does resolv.conf get re-written when you restart networking or reboot
the pi?

If you want better control over resolv.conf, uninstall dnsmasq.

Regards, K.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer at biplane.com.au)
http://www.biplane.com.au/kauer
http://twitter.com/kauer389

GPG fingerprint: 3C41 82BE A9E7 99A1 B931 5AE7 7638 0147 2C3C 2AC4
Old fingerprint: EC67 61E2 C2F6 EB55 884B E129 072B 0AF0 72AA 9882






More information about the ubuntu-users mailing list