On Tue, 21 Nov 2000, Ron Auer wrote:

> Configuration question
> 
> After I finished the configuration, I loaded an application that requires it
> to resolve IP address based on host name.  So if I have a computer with name
> of mypc.mt.org, it wants to resolve on mypc (since all PC must be in the
> same domain).  So when I do a ping mypc, it can not find it.  If I do a ping
> mypc.mt.org it works fine.  Same problem with nslookup when I type nslookup
> mypc I get:
> 
> Server:       unix.mt.org
> Address:      138.39.153.1
> 
> *** unix.mt.org can't fine mypc:  Non-existent host/domain
> 
> However, when I do a nslookup mypc.mt.org I get:
> 
> Server:       unix.mt.org
> Address:      138.39.153.1
> 
> Name:  mypc.mt.org
> Address:  138.39.167.30
> 
> When I do dnsdomain name I get mt.org.
> When I do domainname it is blank.
> 
> To fix the ping problem, I put in /etc/hosts the ipaddress and mypc as an
> alias.  However, this does not fix nslookup problem.  But even more
> importantly, I did not want to put anything in the /etc/hosts if possible as
> there are a lot of PCs on the network and IP addresses get changed and we
> may be going to dhcp soon.
> 
> My question, what did I configure incorrectly so Linux isn't appending the
> domainname to the hostname when I do something like ping or nslookup?
> 
> Thanks
> 
> Ron
> 
> 

In /etc/resolv.conf, there is a directive called
search.  It looks like:
                search mt.org

this would make the resolver append mypc.org to the end of any domain
names that you type in.  So if you type in ping mypc, the resolver will
automatically append mt.org to that.

Dan


Reply via email to