dns client not working

Hi All,

I have configured linux server as local dns server (practice level).

I have given the IP and hostname details in /etc/hosts

-bash-3.00# cat /etc/hosts
#
# Internet host table
#
::1 localhost
127.0.0.1 localhost
192.168.1.78 dummy.set.com loghost
192.168.1.57 cent.set.com # dns server
192.168.1.67 next.set.com

-bash-3.00# grep hosts /etc/nsswitch.conf
# DNS for hosts lookups, otherwise it does not use any other naming service.
# �hosts:� and �services:� in this file are used only if the
hosts: files dns
# before searching the hosts databases.

I have given following entries in solaris client /etc/resolv.conf

-bash-3.00# cat /etc/resolv.conf
search set.com
nameserver 192.168.1.57

-bash-3.00# svcs -a | grep dns
disabled 8:38:39 svc:/network/dns/server:default
online 8:39:14 svc:/network/dns/client:default

-bash-3.00# nslookup dummy.set.com
Server: 192.168.1.57
Address: 192.168.1.57#53
** server can�t find dummy.set.com.set.com: REFUSED

:confused:

have you configured BIND on your linux box? based on what you have posted, it seems you only have edited the hosts file and the nsswitch.conf. the changes that you have done on nsswitch.conf file only tells the local machine to search dns if the host can't be found on the hosts file.

you have to configure and run bind if you wish to do nslookup. hostname in file can be cross checked by doing a ping / telnet etc etc. nslookup will try to get it via dns db file not file(/etc/hosts)

ping dummy.set.com
telnet dummy.set.com
ftp dummy.set.com
:slight_smile:

Your problem is described in the last line of output:

** server can�t find dummy.set.com.set.com: REFUSED

Try a lookup doing

nslookup dummy.set.com.

The last dot will tell the resolver not to append the search domain, but treat this as the full DNS record requested.