HP-UX Reference (11i v2 07/12) - 1M System Administration Commands A-M (vol 3)
h
hosts_to_named(1M) hosts_to_named(1M)
For each domain, a start of authority (SOA) record is created. The SOA record requires two domain names:
the host that the data is created on and the electronic mail address of the person responsible. The
-h and
-u options influence the names. In addition, the SOA record requires 5 values: a serial number, a refresh
time, a retry time, an expire time, and a minimum ttl (time to live). The first time the data is created, the
serial number is set to 1, the refresh time is set to 3 hours, the retry time is set to 1 hour, the expire time is
set to 1 week, and the minimum ttl is set to 1 day. The
-o option changes these values except for the
serial number. Each subsequent time
hosts_to_named
is run, the serial number is incremented. If
any of the other fields in the SOA record are modified, the changed values are retained.
If there are files named
spcl.
DOMAIN or spcl.NET in the current directory, $INCLUDE directives
are added to the corresponding
db.DOMAIN or db.NET file for the
spcl file. In this way, special data
can be added to the data generated by hosts_to_named.
The first time
hosts_to_named
is run, it creates a default boot file for a primary name server. Each
subsequent time
hosts_to_named
is run, the boot file is updated if necessary. New entries are made in
the boot file for any additional networks or domains not already in the boot file. No entries are deleted
from the boot file.
The boot file for a caching-only server,
boot.cacheonly (if bind is 4.x) or
conf.cacheonly (if
bind is 8.x or 9.x), is created if it does not exist. The boot files for secondary servers, (
boot.sec.save
or conf.sec.save) and (
boot.sec or conf.sec), are created if the -z or -Z options are used. The
boot files for secondary servers are created new each time from the primary server boot file so that they are
equivalent.
EXAMPLES
Create name server data for networks 15.19.8 and 15.19.9 in
div.inc.com.
hosts_to_named -d div.inc.com -n 15.19.8 -n 15.19.9
Create name server data for networks 15.19.8 and 15.19.9 in div.inc.com. Ignore aliases in the host
table and include two mail hubs - aaa.div.inc.com
and bbb.mkt.inc.comk. Put all of the options
in a file.
hosts_to_named -f option_file
Option_file
contains the following lines:
-d div.inc.com
-n 15.19.8 -n 15.19.9
-m 20:aaa
-m 30:bbb.mkt.inc.com
-A
Network 15.19.15 has hosts in the xx.inc.com domain and the div.inc.com domain. Create name
server data for xx.inc.com . Create only pointer (PTR) data for hosts in div.inc.com on network
15.19.15 (this requires the hosts in div.inc.com to have the canonical name or an alias of the form
x.div.inc.com).
hosts_to_named -d xx.inc.com -n 15.19.15 -p div.inc.com
Create name server data for network 15.19.8 in div.inc.com . Include div.inc.com data from net-
work 15.19.15 but do not create pointer (PTR) data for 15.19.15 since that is being handled by the
xx.inc.com server.
hosts_to_named -d div.inc.com -n 15.19.8 -a 15.19.15
Create name server data for multiple domains div1.inc.com , div2.inc.com and div3.inc.com .
You must declare 15.18.1.1 as the host in the start of authority (SOA) record for all the domains. Also,
create a secondary boot file from the primary boot file listing 15.18.1.1 and 15.18.2.1 as the servers to load
the data from, to all the domains. Declare 15.18.2.1 as an authoritative name server for the domain
div2.inc.com in addition to the default server.
hosts_to_named -f option_file
Option_file
contains the following lines:
-d div1.inc.com
-n 15.18.1
-d div2.inc.com
-n 15.18.2
348 Hewlett-Packard Company − 4 − HP-UX 11i Version 2: December 2007 Update