United States-English |
|
|
HP-UX Reference > Hhosts_to_named(1M)BIND 9.3HP-UX 11i Version 3: February 2007 |
|
NAMEhosts_to_named — translate host table to name server file format SYNOPSIShosts_to_named {-d domain}... {-n network-number [:mask]}... [-a network-number] [-b bootfile] [-c subdomain]... [-e subdomain]... [-f file] [-h host] [-m weight:mailhub]... [-o refresh:retry:expire: min] [-p domain]... [-q] [-r] [-s server]... [-t] [-u user] [-w] [-z internet-address]... [-A] [-ARPA] [-C file] [-D] [-F] [-H host-file] [-M] [-N netmask] [-S server]... [-Z internet-address]... DESCRIPTIONhosts_to_named translates the host table, /etc/hosts, into files that are usable by the name server, named (see named(1M)). The format of these files is defined in RFC 1035. 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 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. Optionshosts_to_named has the following options:
Operationhosts_to_named 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. The hosts_to_named configuration file migration script does not add the listen-on-v6 option to the named.conf file on dual stack machine. In order to enable DNS services to listen on IPv6 interfaces, this entry needs to be added manually. Alias (CNAME) records are created for subdomains delegated with the -c option. Lines from the host table that contain names in subdomains from the -c and -e options 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 host names 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 next. 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 are placed in db.10. Network 10.1 data are placed in db.10.1. Address (AAAA) records and A6 records are created for mapping host names to IPv6 addresses. Pointer (PTR) records are created for mapping IPv6 addresses to host names. The IPv6 PTR records are placed in db.IP6.ARPA, if the -ARPA option is specified; otherwise, they are placed in db.IP6.INT. 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 the -w option is used. The only service listed is SMTP. Text (TXT) records are created for comments associated with hosts in the host table if the -t option is used. The comments do not include [no smtp]. 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 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 version 4.x) or conf.cacheonly (if bind is version 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
FILES
SEE ALSORequests for Comments (RFC): 1034, 1035, available online at http://www.rfc-editor.org/. HP-UX IP Address and Client Management Administrator's Guide, available online at http://docs.hp.com. BIND 9 Administrator Reference Manual, available from the Internet Systems Consortium at http://www.isc.org/sw/bind/arm93. |
Printable version | ||
|