Hi all,
I always thought DNS server = provide DNS response (host to ip / ip to host) to DNS client (which send DNS resolve request).
So in my solaris 10 box, i setup /etc/resolv/conf, /etc/nsswitch.conf (added in dns) etc.
Yes, i am able to dig and nslookup. But.. am i a DNS client ?
svcs -a | grep dns
disabled svc:/network/dns/client:default
disabled svc:/network/dns/server:default
================================
DNS client service is disabled and yet i am sending DNS request to be resolved successfully.
Am i a DNS client ? what does the DNS client service actually does ?
Confused Noob.
nslookup is indeed a DNS client but your Solaris box might not be configured as a DNS client, i.e. doesn't resolve names through the DNS service.
For example if this command doesn't work, you would enable the dns client service:
ping www.unix.com
Are you sure you are running Solaris 10 and not Solaris 11 ?
1 Like
I have never bothered about the svc:/network/dns/client:default
In fact it is disabled on most Solaris 10 boxes; not needed.
It is not a service, just a status that can be used as a requirement for other services.
# svcs -l svc:/network/dns/client:default
fmri svc:/network/dns/client:default
name DNS resolver
enabled false
state disabled
next_state none
state_time Sat Sep 26 19:26:57 2015
restarter svc:/system/svc/restarter:default
dependency require_all/none svc:/system/filesystem/minimal (online)
dependency require_all/none svc:/network/service (online)
dependency require_all/none file://localhost/etc/resolv.conf (online)
dependency require_any/error svc:/network/loopback (online)
dependency optional_all/error svc:/milestone/network (online)
The following does the libc host resolving (just like ping, but without doing a ping)
getent hosts www.unix.com
1 Like
Yes, you are right. I just checked on Solaris 10 machine configured with DHCP and being a DNS client and the dns/client client is nevertheless reported as disabled.
# cat /etc/resolv.conf
nameserver 212.27.40.240
nameserver 212.27.40.241
# grep "^hosts" /etc/nsswitch.conf
hosts: files dns # Added by DHCP
# getent hosts www.unix.com
4.59.125.171 www.unix.com
# svcs dns/client
STATE STIME FMRI
disabled 23:18:38 svc:/network/dns/client:default
# cat /etc/release
Oracle Solaris 10 1/13 s10x_u11wos_24a X86
Copyright (c) 1983, 2013, Oracle and/or its affiliates. All rights reserved.
Assembled 17 January 2013
1 Like
jlliagre:
Yes, you are right. I just checked on Solaris 10 machine configured with DHCP and being a DNS client and the dns/client client is nevertheless reported as disabled.
# cat /etc/resolv.conf
nameserver 212.27.40.240
nameserver 212.27.40.241
# grep "^hosts" /etc/nsswitch.conf
hosts: files dns # Added by DHCP
# getent hosts www.unix.com
4.59.125.171 www.unix.com
# svcs dns/client
STATE STIME FMRI
disabled 23:18:38 svc:/network/dns/client:default
# cat /etc/release
Oracle Solaris 10 1/13 s10x_u11wos_24a X86
Copyright (c) 1983, 2013, Oracle and/or its affiliates. All rights reserved.
Assembled 17 January 2013
Hi jlliagre, MadeInGermany,
Yea.. thanks for your advices.
That's precisely where I am confused. The use of this DNS client service. Seems pretty redundant ?
I am thinking if this is turn on, maybe DNS caching will take place ?
Hmm.
Regards,
Noob
No it won't have a practical effect.
The nscd service does host caching:
svcs svc:/system/name-service-cache:default
nscd -g | awk '$1=="CACHE:" {if ($2=="hosts") p=1; else p=0} p>0'
1 Like