HP-UX Reference (11i v2 03/08) - 1M System Administration Commands A-M (vol 3)
h
hosts_to_named(1M) hosts_to_named(1M)
NAME
hosts_to_named - translate host table to name server file format
SYNOPSIS
hosts_to_named -d
domain -n network-number [ options ]
DESCRIPTION
hosts_to_named
translates the host table, /etc/hosts, into files that are usable by the name server
named(1M). The format of these files is defined in RFC 1035. The files are created in the current direc-
tory. Once the host table is translated, the name server files can be maintained directly, or the transla-
tion can be repeated after each change to the host table.
If a line in the host table contains no domain names, all names on the line are assumed to be in the
default domain. The first domain listed is the "default domain". If data is being created for more than
one domain or if certain options are used, there must be domain names in the host table to determine
which names belong in which domain.
The name server data is referred to as "resource records".
Options are:
-a network-number
Add the information about hosts in the local domain from network network-number.
This is the same as the
-n option except that no pointer (PTR) data is created. This
is useful when there are multiple domains on a network and a different server is
handling the address-to-name mapping for network-number.
-b bootfile Name the boot file bootfile. The default is named.boot
(if named is 4.x) or
named.conf (if named is 8.x or 9.x) in the current directory.
-c subdomain Create alias (CNAME) records for hosts in subdomain of the default domain. When
a subdomain is delegated, it is useful to create aliases for the old names in the
default domain that point to the new names in the subdomain. After creating the
alias (CNAME) records, ignore lines in the host table that contain names in the sub-
domain. This option can be used more than once on the command line. This option
requires domain names in the host table. When the old names in this domain are
no longer used, they can be ignored with the -e option. If the subdomain name
does not have dots, the default domain is appended to subdomain.
-d domain Create data for domain. This option can be used more than once on the command
line if data is being created for more than one domain. The first domain listed is
the "default domain". This option requires domain names in the host table for all
hosts in domains except the default domain.
-e subdomain Eliminate lines from the host table that contain names in the subdomain before
translating. If the subdomain name does not have dots, the default domain is
appended. This option may be used more than once on the command line. This
option requires domain names in the host table.
-f file Read command line options from file. The -f option is not allowed within a file.
-h host Declare host to be the host in the start of authority (SOA) record that the name
server data was created on. Also use host for the electronic mail address of the
responsible user in the SOA record. The default is the host this command is run on.
This option applies to all the domains generated by hosts_to_named. If this
option is specified more than once, the last value will be considered.
-m weight:mailhub
For each canonical hostname from the host table, create mail exchanger (MX)
records with the specified weight and mail hub. The weight is a positive integer.
The mail hub is a hostname. If the mail hub name has no dots, the default domain
is appended. This option can be used more than once on the command line.
-n network-number[:mask]
Create data for network-number. See below for description of network-number.If
only one domain is listed with -d, all data for network-number is assumed to be in
domain. The optional subnet mask mask can be used instead of supplying each
network-number for a subnet using multiple -n options. mask must be in dot nota-
tion. This option is not applicable for creating IPv6 addresses.
HP-UX 11i Version 2: August 2003 − 1 − Hewlett-Packard Company Section 1M−−271