Paulie's world in a blog

  • March 4, 2013

Configuring a Basic DNS Server + Client in Solaris 11

Guest Author
Configuring the Server

The default install of Solaris 11 does not come with a DNS server, but this can be added easily through IPS like so:
[paulie@griff ~]$ sudo pkg install service/network/dns/bind

Before enabling this service, the named.conf file needs to be modified to support the DNS structure. Here's what mine looks like:
[paulie@griff ~]$ cat /etc/named.conf
options {
directory "/etc/namedb/working";
pid-file "/var/run/named/pid";
dump-file "/var/dump/named_dump.db";
statistics-file "/var/stats/named.stats";
forwarders {;; };
zone "hillvalley" {
type master;
file "/etc/namedb/master/hillvalley.db";
zone "1.168.192.in-addr.arpa" {
type master;
file "/etc/namedb/master/1.168.192.db";

My forwarders use the OpenDNS servers, so any request that the local DNS server can't process goes through there. I've also setup two zones: hillvalley.db for my forward zone and 1.168.192.db for my reverse zone. We need both for a proper configuration. We also need to create some directories to support this file:
[paulie@griff ~]$ sudo mkdir /var/dump
[paulie@griff ~]$ sudo mkdir /var/stats
[paulie@griff ~]$ sudo mkdir -p /var/run/namedb
[paulie@griff ~]$ sudo mkdir -p /etc/namedb/master
[paulie@griff ~]$ sudo mkdir -p /etc/namedb/working

Now, let's populate the DNS server with a forward and reverse file.

Forward file
[paulie@griff ~]$ cat /etc/namedb/master/hillvalley.db 
$TTL 3h
@ IN SOA griff.hillvalley. paulie.griff.hillvalley. (
2013022744 ;serial (change after every update)
3600 ;refresh (1 hour)
3600 ;retry (1 hour)
604800 ;expire (1 week)
38400 ;minimum (1 day)
hillvalley. IN NS griff.hillvalley.
delorean IN A ; Router
biff IN A ; NFS Server
griff IN A ; DNS Server
buford IN A ; LDAP Server
marty IN A ; Workstation
doc IN A ; Laptop
jennifer IN A ; Boxee
lorraine IN A ; Boxee

Reverse File
[paulie@griff ~]$ cat /etc/namedb/master/1.168.192.db 
$TTL 3h
@ IN SOA griff.hillvalley. paulie.griff.hillvalley. (
2013022744 ;serial (change after every update)
3600 ;refresh (1 hour)
3600 ;retry (1 hour)
604800 ;expire (1 week)
38400 ;minimum (1 day)
IN NS griff.hillvalley.
1 IN PTR delorean.hillvalley. ; Router
101 IN PTR biff.hillvalley. ; NFS Server
102 IN PTR griff.hillvalley. ; DNS Server
103 IN PTR buford.hillvalley. ; LDAP Server
104 IN PTR marty.hillvalley. ; Workstation
105 IN PTR doc.hillvalley. ; Laptop
106 IN PTR jennifer.hillvalley. ; Boxee
107 IN PTR lorraine.hillvalley. ; Boxee

For referencing how these files works:
  • paulie is the admin user account name
  • griff is the hostname of the DNS server
  • hillvalley is the domain name of the network
  • I love BTTF

Feel free to tweak this example to match your own network. Finally, enable the DNS service and check that it's online:
[paulie@griff ~]$ sudo svcadm enable dns/server
[paulie@griff ~]$ sudo svcs | grep dns/server
online 22:32:20 svc:/network/dns/server:default

Configuring the Client

We will need the IP address (, hostname (griff), and domain name (hillvalley) to configure DNS with these commands:
[paulie@buford ~]$ sudo svccfg -s network/dns/client setprop config/nameserver = net_address:
[paulie@buford ~]$ sudo svccfg -s network/dns/client setprop config/domain = astring: hillvalley
[paulie@buford ~]$ sudo svccfg -s network/dns/client setprop config/search = astring: hillvalley
[paulie@buford ~]$ sudo svccfg -s name-service/switch setprop config/ipnodes = astring: '"files dns"'
[paulie@buford ~]$ sudo svccfg -s name-service/switch setprop config/host = astring: '"files dns"'

Verify the configuration is correct:
[paulie@buford ~]$ svccfg -s network/dns/client listprop config
config application
config/value_authorization astring solaris.smf.value.name-service.dns.client
config/nameserver net_address
config/domain astring hillvalley
config/search astring hillvalley

And enable:
[paulie@buford ~]$ sudo svcadm enable dns/client

Now we need to test that the DNS server is working using both forward and reverse DNS lookups:
[paulie@buford ~]$ nslookup lorraine
Name: lorraine.hillvalley
[paulie@buford ~]$ nslookup
Address: name = delorean.hillvalley.

Join the discussion

Comments ( 5 )
  • guest Monday, March 4, 2013


    nice entry but you might wanna change NFS to DNS in you topic. ;)

  • Paul Monday, March 4, 2013

    Thanks for the correction!

  • guest Friday, September 12, 2014

    Nice article.

  • guest Sunday, October 4, 2015

    Thank you alot for making this as straight forward as possible. I had no understanding on how Solaris handled DNS on the client end. I kept banging my head on my desk until I came across your post.

  • guest Wednesday, January 6, 2016

    Thank you very much for so wonderful information. I did my first DNS Server on Solaris and connect some clients too. I approciate it.

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.