Account Links: Cart | Your Account | Logout

Skip to content

Red Hat Knowledgebase

Red Hat Knowledgebase Search:

Updated Within the Last:

New Solutions within the last day New Solutions within the last week New Solutions within the last month

Browse by topics:


Click to View a Topic
Red Hat Enterprise Linux > Configuration > Issue <<  245 of 606 >>

Solution Tools:


Email a Solution Postcard Printer version Submit a comment on this answer Update notifications Request an answer Back

Article Reference

Article ID: 6371
Last update: 09-27-05
Issue:
How do I configure a system so that the resolver will append search path extensions to hostnames that have dots in them?
Resolution:

Suppose we have a domain example.com and within that domain we have a two subdomains; sales.example.com and eng.example.com. Now, suppose we have 2 hosts named:

server.sales.example.com
server.eng.example.com

The resolv.conf file on our client system has a search path like:

search sales.example.com example.com

The following lookup works without an issue:

$ host server.eng.example.com

and this lookup returns the address for server.sales.example.com

$ host server

But this lookup fails:

$ host server.eng

The reason for this is that, by default, the resolver presumes that any hostname with a dot in the name is a fully qualified domain name (FQDN) and will not attempt to append domains listed in the search path to these names.

This is configurable, however, by setting the ndots option in the /etc/resolv.conf file. For instance, adding the following line should make the last lookup work:

options ndots:2

This tells the resolver not to try appending any search path domains to hostnames with two or more dots in the name (the default for ndots is 1). After making this change, a lookup of server.eng should work.


How well did this entry answer your question?


good wrong incomplete out of date
Red Hat Enterprise Linux > Configuration > Issue <<   245  of  606  >>