hosts_to_named (HPUX)
par
popularité : 2%
hosts_to_named(1M)
|
NAME
hosts_to_named - translate host table to name server file format
SYNOPSIS
<b><font color="#ff0000">hosts_to_named</font></b>
-d
domain -n
network-number [options]
<b><font color="#ff0000">hosts_to_named</font></b>
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 RFC1035. The files are created in the current directory. Once the host table is translated, the name server files can be maintained directly, or the translation 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 1 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 :
|
||
|
Add the information about hosts in the local domain from network network-number. This is the same as the |
|
|
|
Name the boot file bootfile. The default is |
|
|
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 subdomain. 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 |
|
|
Create data for domain. This option can be used more than once on the command line if data is being created for more than 1 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. |
|
|
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. |
|
|
Read command line options from file. The |
|
|
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. |
|
||
|
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. |
|
|
||
|
Create data for network-number. See below for description of network-number. If only one domain is listed with |
|
|
||
|
Set the values in the start-of-authority (SOA) record to those specified. See below for description of the start-of-authority (SOA) record. |
|
|
|
Create only pointer (PTR) data for hosts in domain. This is useful when there are multiple domains on a network and a different server is responsible for domain, but this server is responsible for the address-to-name mapping. This option can be used more than once on the command line. This option requires domain names in the host table. |
|
|
Run quietly. No messages are printed. |
|
|
Create name server data indicating that the name server is authoritative for |
|
|
Create name server (NS) records that declare server is an authoritative name server for all of the domains created. If more than 1 server is authoritative, each needs to be declared. If the server name does not have any dots in it, the default domain is appended. The default server is the host this script is run on. This option can be used more than once on the command line. |
|
|
Create text (TXT) records from the comments that appear with host data. The comments will all be in lower case because the host table is translated to lower case. If |
|
|
Declare user to be the electronic mail address of the person responsible for this domain. This is used in the start of authority (SOA) record. The format required in the name server data is |
|
|
Create well known services (WKS) data declaring that the host provides the SMTP service. This is done only when mail exchanger (MX) data is also being created and only for hosts without |
|
||
|
Create a secondary boot file, |
|
|
|
Do not create name server data for aliases in the host table. |
|
|
Create resource records from strings in the comment field of the host table. Each string in the comment field (except |
|
|
Do not create name server data for domain names in the host table. |
|
|
By default, the serial number is incremented for a domain only if the data has changed (pointer (PTR) data only). This option forces the serial number to be incremented, even if the data has not changed. |
|
|
Use host-file instead of |
|
|
Do not create mail exchanger (MX) records for hosts in the host table. |
|
|
Apply the default subnet mask mask to each network-number specified with |
|
|
This option is the same as the |
|
||
|
Create a secondary boot file, |
|
|
|
This option is obsolete. |
<b><font color="#ff0000">hosts_to_named</font></b>
translates the host table to lower case to help eliminate duplicate data. Since the name server treats uppercase and lowercase as equivalent, names that differ only in case are considered the same.
Alias (CNAME) records are created for subdomains delegated with -c
. Lines from the host table that contain names in subdomains from -c
and -e
are removed from the lowercase copy of the host table.
The host table is then used to create the name server data for each network-number declared on the command line. Do not include the trailing 0’s in the network number. No distinction is made between class A, B, or C addresses nor is there any understanding of subnets unless a subnet mask is supplied. Example network numbers are : 10 (for all addresses of the form 10.*.*.*), 10.1 (for addresses of the form 10.1.*.*), or 10.2.2 (for addresses of the form 10.2.2.*).
Address (A) records are created for mapping hostnames to IP addresses. Alias (CNAME) records are created for aliases of hosts that are not multi-homed. The data are placed in a file named db.
DOMAIN where DOMAIN is the first part of the domain from the command line. For the domain div.inc.com
, the file is named db.div
. All other name server data goes in this file except the pointer (PTR) records described below.
Pointer (PTR) records are created for mapping IP addresses to host names. PTR records are placed in a file named db.
NET where NET is the network number from the command line. Network 10 data is placed in db.10
. Network 10.1 data are placed in "db.10.1".
Mail exchanger (MX) records are created unless the -M
option is used. The default MX record has a weight of 10 with the host itself as its mail exchanger. No default MX record is created for a host if [no
smtp]
is in the comment section of that line in the host table. MX records for each mail hub declared with the -m
option are added for each host even if [no smtp]
is in the comment section.
Well known services (WKS) records are created for each host that handles SMTP mail (does not have [no smtp]
) if -w
is used. The only service listed is SMTP.
Text (TXT) records are created for comments associated with hosts in the host table if -t
is used. The comments do not include [no smtp]
.
For each domain, a start of authority (SOA) record is created. The SOA record requires 2 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 <b><font color="#ff0000">hosts_to_named</font></b>
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 <b><font color="#ff0000">hosts_to_named</font></b>
is run, it creates a default boot file for a primary name server. Each subsequent time <b><font color="#ff0000">hosts_to_named</font></b>
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
, is created if it does not exist. The boot files for secondary servers, boot.sec.save
and boot.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.
Create name server data for networks 15.19.8 and 15.19.9 in div.inc.com.
<code><b><font color="#ff0000">hosts_to_named</font></b> -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 2 mail hubs - aaa.div.inc.com
and bbb.mkt.inc.comk
. Put all of the options in a file.
<code><b><font color="#ff0000">hosts_to_named</font></b> -f option_file
Option_file
contains the following lines :
<code>-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
).
<code><b><font color="#ff0000">hosts_to_named</font></b> -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 network 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.
<code><b><font color="#ff0000">hosts_to_named</font></b> -d div.inc.com -n 15.19.8 -a 15.19.15
<b><font color="#ff0000">hosts_to_named</font></b>
was developed by HP.
|
|
The host table |
|
|
Primary server boot file |
|
||
|
Caching only server boot file |
|
|
||
|
Secondary server boot file |
|
|
|
Secondary server boot file |
|
|
Pointer information for 127.0.0.1 |
|
|
Stub cache file for root server addresses |
|
|
Data for servers for the root domain |
|
|
Address and other data for a domain |
|
||
|
Pointer data for all network-numbers |
|
|
|
Pointer data for a network-number |
|
|
Commentaires Forum fermé