Академический Документы
Профессиональный Документы
Культура Документы
Notes: The h2n script is provided with this documentation (h2n-2.56.tar.gz). h2n translates
/etc/hosts to DNS zone files and creates BIND named.conf configuration files. This tool
can be run once or many times. After converting your host table to DNS format, you can
manually maintain the DNS files, or you can maintain the host table and run h2n each
time you modify /etc/hosts. h2n automatically increments the serial number in each DNS
file when it makes a new one.
The new domain server will be on system 192.168.21.37 which is called utility.
The following /etc/host file has been edit to contain all the DNS entries that
are required:
127.0.0.1 localhost
192.168.21.37 utility utility.mydomain.com loghost
192.168.21.8 kadence kadence.mydomain.com
192.168.21.25 www www.mydomain.com myeb
192.168.21.26 mydev mydev.mydomain.com
192.168.21.32 mytest2-admin mytest2-admin.mydomain.com
192.168.21.33 myv20z myv20z.mydomain.com
192.168.21.34 myt1 myt1.mydomain.com
192.168.21.35 mytest mytest.mydomain.com
192.168.21.36 rlogic rlogic.mydomain.com
192.168.21.41 aix43p aix43p.mydomain.com
2 #mkdir -p /var/named Create a domain run directory to contain the Named services files called
/var/named.
Place the h2n script is this directory from the untar gzip directory of h2n-2.56.
See Prerequisite above.
#mkdir -p /var/named
1 of 4 2/6/2011 3:04 PM
Quick Setup Domain Name System (DNS) for Solaris 10 http://www.logiqwest.com/dataCenter/Demos/RunBooks/DNS/DNSsetup...
4 Obtain and copy The named server needs to know where servers for root zones are. This information is
db.cache files. in the file db.cache. This file must be added to the /var/named directory for the
Solaris 10 DNS server to work. This file is obtained from the web. To create a db.cache
file, the information must be retrieved from the Internet host ftp.rs.internic.net
(198.41.0.6). Use either ftp or a web browser to locate and download a file called
named.root located in the domain directory.
2 of 4 2/6/2011 3:04 PM
Quick Setup Domain Name System (DNS) for Solaris 10 http://www.logiqwest.com/dataCenter/Demos/RunBooks/DNS/DNSsetup...
After downloading the named.root file. Simply rename the file to db.cache and copy
to the /var/named directory.
bash-3.00# ls
boot.cacheonly db.127.0.0 db.cache h2n named.conf
conf.cacheonly db.192.168.21 db.mydomain named.boot
bash-3.00#
# /etc/nsswitch.files:
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# does not use any naming service.
#
# "hosts:" and "services:" in this file are used only if the
# /etc/netconfig file has a "-" for nametoaddr_libs of "inet" transports.
passwd: files
group: files
hosts: files dns
networks: files
protocols: files
: : : : : :
3 of 4 2/6/2011 3:04 PM
Quick Setup Domain Name System (DNS) for Solaris 10 http://www.logiqwest.com/dataCenter/Demos/RunBooks/DNS/DNSsetup...
: : : : : :
The entry above means that for name resolution, the system will first look at the local
/etc/hosts file and then use the dns server which in this case is itself.
6b Create/Edit Create or edit a file called /etc/defaultdomain and add the single entry:
/etc/defaultdomain #vi /etc/defaultdomain
and mydomain.com
Set domain
Execute the domainname command to set the domain as follows:
6c Edit For the /etc/resolv.conf file the following entries need to be established. This first is
/etc/resolv.conf the name of the domain (e.g. mydomain.com) that was assigned with the h2n script.
The second is the nameserver address of the system maintaining that domain assigned
lists (e.g. nameserver 192.168.21.37) of the domain:
#vi /etc/resolv.conf
nameserver 12.11.108.15
nameserver 12.11.108.16
domain mydomain.com
nameserver 192.168.21.37
7 Start Named Services Named services can be started by issuing the command:
#/usr/sbin/in.named &
Note: This assumes that in Solaris 10 a service configuration repository has been
enabled to run. To enabled the respository use
/network/dns/server must be online for DNS to run properly and initiate if the DNS
server is rebooted.
8 Configurating Clients To use DNS, clients need to modify the /etc/resolv.conf, and /etc/nsswitch.conf
to use DNS as above. The /etc/defaultdomain file must also be created and establsihed as
above.
4 of 4 2/6/2011 3:04 PM