60.11 DNS Search Options

20180422

When searching for a mapping from a host name to an IP address we will sometimes be regularly wanting to find host names within a common domain. For example, you might set up a collection of computers with hostnames like theano and nyx. These might belong to the domain name togaware.com. Thus their fully qualified domain names would be theano.togaware.com and nyx.togaware.com. You may find yourself connecting to these computers often using ssh, for example.

  $ ssh theano.togaware.com

The IP address lookup for hostnames can be configured to attempt to search for the address after appending the domain name to the provided hostname. Thus you can provide theano and the DNS server will be asked for the IP address of theano.togaware.com. Then you can simply type the hostname with ssh to connect to the expected computer.

  $ ssh theano

With a Network Manager setup you can add these additional search domains to the configuration. Click the Network Manager icon in the panel to select Edit Connections… and to then double click the network connection (e.g., Wired connection 1) Switch to the IPv4 Settings tab and update the Search domains: field with a comma-separated list of domains. Then click Save. Then disconnect and reconnect to have the changes take effect.

A more traditional approach was done by adding those other domains to /etc/resolv.conf with the search keyword.

  search togaware.com

In even older times PPP would add its own ISP related resolv.conf file on successful dial up to contain the ISP’s domain name automatically for convenience and sourced that file from /etc/ppp/resolv/provider



Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0