components/bind/Solaris/named.8
changeset 4980 b0ec15659025
parent 4438 5c17d084f39b
child 5768 e6d4e608e866
equal deleted inserted replaced
4979:43ca747f5e4a 4980:b0ec15659025
       
     1 '\" te
       
     2 .\" Copyright (C) 2010 Internet Systems Consortium, Inc. ("ISC")
       
     3 .\" Permission to use, copy, modify, and/or distribute this software for any purpose  with or without fee is hereby granted, provided that the above copyright notice  and this permission notice appear in all copies.  THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF  MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL,  DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING  FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE  USE OR PERFORMANCE OF THIS SOFTWARE.
       
     4 .\" Portions Copyright (c) 2010, Sun Microsystems, Inc. All Rights Reserved.
       
     5 .TH named 8 "19 Oct 2015" "SunOS 5.12" "System Administration Commands"
       
     6 .SH NAME
       
     7 named, in.named \- Internet domain name server
       
     8 .SH SYNOPSIS
       
     9 .LP
       
    10 .nf
       
    11 \fBnamed\fR [\fB-fgsVv\fR] [\fB-c\fR \fIconfig-file\fR] [\fB-d\fR \fIdebug-level\fR] [\fB-m\fR \fIflag\fR]
       
    12      [\fB-n\fR \fI#cpus\fR] [\fB-p\fR \fIport\fR] [\fB-S\fR \fI#max-socks\fR] [\fB-t\fR \fIdirectory\fR]
       
    13      [\fB-u\fR \fIuser\fR] [\fB-x\fR \fIcache-file\fR] [\fB-4\fR | \fB-6\fR]
       
    14 .fi
       
    15 
       
    16 .SH DESCRIPTION
       
    17 .sp
       
    18 .LP
       
    19 The \fBnamed\fR utility is a Domain Name System (DNS) server, part of the BIND 9 distribution from ISC. For more information on the DNS, see RFCs 1033, 1034, and 1035.
       
    20 .sp
       
    21 .LP
       
    22 When invoked without arguments, \fBnamed\fR reads the default configuration file \fB/etc/named.conf\fR, reads any initial data, and listens for queries.
       
    23 .sp
       
    24 .LP
       
    25 \fBin.named\fR is a link to \fBnamed\fR.
       
    26 .SH OPTIONS
       
    27 .sp
       
    28 .LP
       
    29 The following options are supported:
       
    30 .sp
       
    31 .ne 2
       
    32 .mk
       
    33 .na
       
    34 \fB\fB-4\fR\fR
       
    35 .ad
       
    36 .sp .6
       
    37 .RS 4n
       
    38 Use only IPv4 transport. By default, both IPv4 and IPv6 transports can be used. Options \fB-4\fR and \fB-6\fR are mutually exclusive.
       
    39 .RE
       
    40 
       
    41 .sp
       
    42 .ne 2
       
    43 .mk
       
    44 .na
       
    45 \fB\fB-6\fR\fR
       
    46 .ad
       
    47 .sp .6
       
    48 .RS 4n
       
    49 Use only IPv6 transport. By default, both IPv4 and IPv6 transports can be used. Options \fB-4\fR and \fB-6\fR are mutually exclusive.
       
    50 .RE
       
    51 
       
    52 .sp
       
    53 .ne 2
       
    54 .mk
       
    55 .na
       
    56 \fB\fB-c\fR \fIconfig-file\fR\fR
       
    57 .ad
       
    58 .sp .6
       
    59 .RS 4n
       
    60 Use \fIconfig-file\fR as the configuration file instead of the default \fB/etc/named.conf\fR. To ensure that reloading the configuration file continues to work after the server has changed its working directory due to to a possible \fIdirectory\fR option in the configuration file, \fIconfig-file\fR should be an absolute pathname.
       
    61 .RE
       
    62 
       
    63 .sp
       
    64 .ne 2
       
    65 .mk
       
    66 .na
       
    67 \fB\fB-d\fR \fIdebug-level\fR\fR
       
    68 .ad
       
    69 .sp .6
       
    70 .RS 4n
       
    71 Set the daemon's debug level to \fIdebug-level\fR. Debugging traces from \fBnamed\fR become more verbose as the debug level increases.
       
    72 .RE
       
    73 
       
    74 .sp
       
    75 .ne 2
       
    76 .mk
       
    77 .na
       
    78 \fB\fB-f\fR\fR
       
    79 .ad
       
    80 .sp .6
       
    81 .RS 4n
       
    82 Run the server in the foreground (that is, do not run as a daemon).
       
    83 .RE
       
    84 
       
    85 .sp
       
    86 .ne 2
       
    87 .mk
       
    88 .na
       
    89 \fB\fB-g\fR\fR
       
    90 .ad
       
    91 .sp .6
       
    92 .RS 4n
       
    93 Run the server in the foreground and force all logging to \fBstderr\fR.
       
    94 .RE
       
    95 
       
    96 .sp
       
    97 .ne 2
       
    98 .mk
       
    99 .na
       
   100 \fB\fB-m\fR \fIflag\fR\fR
       
   101 .ad
       
   102 .sp .6
       
   103 .RS 4n
       
   104 Turn on memory usage debugging flags. Possible flags are \fBusage\fR, \fBtrace\fR, and \fBrecord\fR, \fBsize\fR, and \fBmctx\fR. These correspond to the \fBISC_MEM_DEBUG\fR\fIXXXX\fR flags described in \fB<isc/mem.h>\fR\&.
       
   105 .RE
       
   106 
       
   107 .sp
       
   108 .ne 2
       
   109 .mk
       
   110 .na
       
   111 \fB\fB-n\fR \fI#cpus\fR\fR
       
   112 .ad
       
   113 .sp .6
       
   114 .RS 4n
       
   115 Create \fI#cpus\fR worker threads to take advantage of multiple CPUs. If not specified, \fBnamed\fR will try to determine the number of CPUs present and create one thread per CPU. If it is unable to determine the number of CPUs, a single worker thread will be created.
       
   116 .RE
       
   117 
       
   118 .sp
       
   119 .ne 2
       
   120 .mk
       
   121 .na
       
   122 \fB\fB-p\fR \fIport\fR\fR
       
   123 .ad
       
   124 .sp .6
       
   125 .RS 4n
       
   126 Listen for queries on port \fIport\fR. If not specified, the default is port 53.
       
   127 .RE
       
   128 
       
   129 .sp
       
   130 .ne 2
       
   131 .mk
       
   132 .na
       
   133 \fB\fB-S\fR \fI#max-socks\fR\fR
       
   134 .ad
       
   135 .sp .6
       
   136 .RS 4n
       
   137 Allow \fBnamed\fR to use up to \fI#max-socks\fR sockets.
       
   138 .sp
       
   139 This option should be unnecessary for the vast majority of users. The use of this option could even be harmful, because the specified value might exceed the limitation of the underlying system API. It therefore should be set only when the default configuration causes exhaustion of file descriptors and the operational environment is known to support the specified number of sockets. Note also that the actual maximum number is normally a little smaller than the specified value because \fBnamed\fR reserves some file descriptors for its internal use.
       
   140 .RE
       
   141 
       
   142 .sp
       
   143 .ne 2
       
   144 .mk
       
   145 .na
       
   146 \fB\fB-s\fR\fR
       
   147 .ad
       
   148 .sp .6
       
   149 .RS 4n
       
   150 Write memory usage statistics to \fIstdout\fR on exit. 
       
   151 .sp
       
   152 This option is mainly of interest to BIND 9 developers and might be removed or changed in a future release.
       
   153 .RE
       
   154 
       
   155 .sp
       
   156 .ne 2
       
   157 .mk
       
   158 .na
       
   159 \fB\fB-t\fR \fIdirectory\fR\fR
       
   160 .ad
       
   161 .sp .6
       
   162 .RS 4n
       
   163 Change the root directory using \fBchroot\fR(2) to \fIdirectory\fR after processing the command line arguments, but before reading the configuration file. 
       
   164 .sp
       
   165 This option should be used in conjunction with the \fB-u\fR option, as chrooting a process running as root does not enhance security on most systems; the way \fBchroot()\fR is defined allows a process with root privileges to escape a \fBchroot\fR jail.
       
   166 .RE
       
   167 
       
   168 .sp
       
   169 .ne 2
       
   170 .mk
       
   171 .na
       
   172 \fB\fB-u\fR \fIuser\fR\fR
       
   173 .ad
       
   174 .sp .6
       
   175 .RS 4n
       
   176 Set the real user ID using \fBsetuid\fR(2) to \fIuser\fR after completing privileged operations, such as creating sockets that listen on privileged ports.
       
   177 .RE
       
   178 
       
   179 .sp
       
   180 .ne 2
       
   181 .mk
       
   182 .na
       
   183 \fB\fB-V\fR\fR
       
   184 .ad
       
   185 .sp .6
       
   186 .RS 4n
       
   187 Report the version number and build options, and exit.
       
   188 .RE
       
   189 
       
   190 .sp
       
   191 .ne 2
       
   192 .mk
       
   193 .na
       
   194 \fB\fB-v\fR\fR
       
   195 .ad
       
   196 .sp .6
       
   197 .RS 4n
       
   198 Report the version number and exit.
       
   199 .RE
       
   200 
       
   201 .sp
       
   202 .ne 2
       
   203 .mk
       
   204 .na
       
   205 \fB\fB-x\fR \fIcache-file\fR\fR
       
   206 .ad
       
   207 .sp .6
       
   208 .RS 4n
       
   209 Load data from \fIcache-file\fR into the cache of the default view.
       
   210 .sp
       
   211 Do not use this option. It is of interest only to BIND 9 developers and might be removed or changed in a future release.
       
   212 .RE
       
   213 
       
   214 .SH EXTENDED DESCRIPTION
       
   215 .sp
       
   216 .LP
       
   217 This section describes additional attributes of \fBnamed\fR.
       
   218 .SS "SMF Properties"
       
   219 .sp
       
   220 .LP
       
   221 When starting named from the service management facility, \fBsmf\fR(5), \fBnamed\fR configuration is read from the service configuration repository. Use \fBsvcprop\fR(1) to list the properties and \fBsvccfg\fR(8) to make changes.
       
   222 .sp
       
   223 .LP
       
   224 The following application configuration properties are available to administrators:
       
   225 .sp
       
   226 .ne 2
       
   227 .mk
       
   228 .na
       
   229 \fB\fBoptions\fR/\fIserver\fR\fR
       
   230 .ad
       
   231 .sp .6
       
   232 .RS 4n
       
   233 Specifies the server executable to be used instead of the default server, \fB/usr/sbin/named\fR.
       
   234 .RE
       
   235 
       
   236 .sp
       
   237 .ne 2
       
   238 .mk
       
   239 .na
       
   240 \fB\fBoptions\fR/\fIconfiguration_file\fR\fR
       
   241 .ad
       
   242 .sp .6
       
   243 .RS 4n
       
   244 Specifies the configuration file to be used instead of the default, \fB/etc/named.conf\fR. A directory option might be specified in the configuration file. To ensure that reloading the configuration file continues to work in such a situation, \fIconfiguration_file\fR should be specified as an absolute pathname. This pathname should not include the \fIchroot_dir\fR pathname. This property is the equivalent of the \fB-c\fR option.
       
   245 .RE
       
   246 
       
   247 .sp
       
   248 .ne 2
       
   249 .mk
       
   250 .na
       
   251 \fB\fBoptions\fR/\fIip_interfaces\fR\fR
       
   252 .ad
       
   253 .sp .6
       
   254 .RS 4n
       
   255 Specifies over which IP transport, IPv4 or IPv6, BIND will transmit. Possible values are \fBIPv4\fR or \fBIPv6\fR. Any other setting assumes \fBall\fR, the default. This property is the equivalent of command line option \fB-4\fR or \fB-6\fR
       
   256 .RE
       
   257 
       
   258 .sp
       
   259 .ne 2
       
   260 .mk
       
   261 .na
       
   262 \fB\fBoptions\fR/\fIlisten_on_port\fR\fR
       
   263 .ad
       
   264 .sp .6
       
   265 .RS 4n
       
   266 Specifies the default UDP and TCP port to be used for listening to DNS requests. This property is the equivalent of the command line option \fB-p\fR \fIport\fR.
       
   267 .RE
       
   268 
       
   269 .sp
       
   270 .ne 2
       
   271 .mk
       
   272 .na
       
   273 \fB\fBoptions\fR/\fIdebug_level\fR\fR
       
   274 .ad
       
   275 .sp .6
       
   276 .RS 4n
       
   277 Specifies the default debug level. The default is 0, which means no debugging. The higher the number the more verbose debug information becomes. Equivalent of the command line option \fB-d\fR \fIdebug_level\fR.
       
   278 .RE
       
   279 
       
   280 .sp
       
   281 .ne 2
       
   282 .mk
       
   283 .na
       
   284 \fB\fBoptions\fR/\fIthreads\fR\fR
       
   285 .ad
       
   286 .sp .6
       
   287 .RS 4n
       
   288 Specifies the number of CPU worker threads to create. The default of 0 causes \fBnamed\fR to try and determine the number of CPUs present and create one thread per CPU. Equivalent of command line option \fB-n\fR \fI#cpus\fR.
       
   289 .RE
       
   290 
       
   291 .sp
       
   292 .ne 2
       
   293 .mk
       
   294 .na
       
   295 \fB\fBoptions\fR/\fIchroot_dir\fR\fR
       
   296 .ad
       
   297 .sp .6
       
   298 .RS 4n
       
   299 Specifies the directory to be used as the root directory after processing SMF properties and the command line arguments but before reading the configuration file. Use this property when using a \fBchroot\fR(2) environment. Synonymous to command line option \fB-t\fR \fIpathname\fR.
       
   300 .sp
       
   301 When using \fBchroot\fR(2), \fBnamed\fR is unable to disable itself when receiving \fBrndc\fR(8) \fBstop\fR or \fBhalt\fR commands. Instead, you must use the \fBsvcadm\fR(8) \fBdisable\fR command.
       
   302 .RE
       
   303 
       
   304 .sp
       
   305 .LP
       
   306 In the event of a configuration error originating in one of the above SMF application options, \fBnamed\fR displays a message providing information about the error and the parameters that need correcting. The process then exits with exit code \fBSMF_EXIT_ERR_CONFIG\fR.
       
   307 .sp
       
   308 .LP
       
   309 At startup, in the event of an error other than a configuration error, \fBnamed\fR exits with exit code \fBSMF_EXIT_ERR_FATAL\fR. Both of this code and \fBSMF_EXIT_ERR_CONFIG\fR cause the start method, \fBsmf_method\fR(5), to place the service in the maintenance state, which can be observed with the \fBsvcs\fR(1) command \fBsvcs\fR \fB-x\fR.
       
   310 .sp
       
   311 .LP
       
   312 In addition to the properties listed above, the following property can be used to invoke \fBnamed\fR as a user other than root:
       
   313 .sp
       
   314 .ne 2
       
   315 .mk
       
   316 .na
       
   317 \fB\fBstart\fR/\fIuser\fR\fR
       
   318 .ad
       
   319 .sp .6
       
   320 .RS 4n
       
   321 Specifies the identity of the user that is invoking \fBnamed\fR. See \fBsmf_method\fR(5) and \fBchroot\fR(2). Note that the user must have \fBsolaris.smf.manage.bind\fR authorization. Without this role the \fBnamed\fR will be unable to manage its SMF FMRI and \fBnamed\fR will automatically be restarted by the SMF after an \fBrndc\fR(8) \fBstop\fR or \fBhalt\fR command. See \fBEXAMPLES\fR for a sequence of commands that establishes the correct authorization.
       
   322 .RE
       
   323 
       
   324 .SS "SIGNALS"
       
   325 .sp
       
   326 .LP
       
   327 In routine operation, signals should not be used to control the nameserver; \fBrndc\fR(8) should be used instead.
       
   328 .sp
       
   329 .ne 2
       
   330 .mk
       
   331 .na
       
   332 \fB\fBSIGHUP\fR\fR
       
   333 .ad
       
   334 .sp .6
       
   335 .RS 4n
       
   336 Force a reload of the server.
       
   337 .RE
       
   338 
       
   339 .sp
       
   340 .ne 2
       
   341 .mk
       
   342 .na
       
   343 \fB\fBSIGINT\fR, \fBSIGTERM\fR\fR
       
   344 .ad
       
   345 .sp .6
       
   346 .RS 4n
       
   347 Shut down the server.
       
   348 .RE
       
   349 
       
   350 .sp
       
   351 .LP
       
   352 The result of sending any other signals to the server is undefined.
       
   353 .SS "Configuration"
       
   354 .sp
       
   355 .LP
       
   356 The \fBnamed\fR configuration file is too complex to describe in detail here. A list of configuration options is provided in the \fBnamed.conf\fR man page shipped with the BIND 9 distribution. A complete description is provided in the \fIBIND 9 Administrator Reference Manual\fR.
       
   357 .SH EXAMPLES
       
   358 .LP
       
   359 \fBExample 1 \fRConfiguring \fBnamed\fR to Transmit Only over IPv4 Networks
       
   360 .sp
       
   361 .LP
       
   362 The following command sequence configures \fBnamed\fR such that it will transmit only over IPv4 networks.
       
   363 
       
   364 .sp
       
   365 .in +2
       
   366 .nf
       
   367 # \fBsvccfg -s svc:network/dns/server:default setprop \e\fR
       
   368 \fB> options/ip_interfaces=IPv4\fR
       
   369 # \fBsvcadm refresh svc:network/dns/server:default\fR
       
   370 #
       
   371 .fi
       
   372 .in -2
       
   373 .sp
       
   374 
       
   375 .LP
       
   376 \fBExample 2 \fRListing Current Configuration File and Setting an Alternative File
       
   377 .sp
       
   378 .LP
       
   379 The following sequence of commands lists the current \fBnamed\fR configuration file and sets an alternative file.
       
   380 
       
   381 .sp
       
   382 .in +2
       
   383 .nf
       
   384 # \fBsvcprop -p options/configuration_file dns/server:default\fR 
       
   385 /etc/named.conf
       
   386 # \fBsvccfg -s dns/server:default setprop \e
       
   387 > options/configuration_file=/var/named/named.conf\fR
       
   388 # \fBsvcadm refresh dns/server:default\fR
       
   389 # \fBsvcprop -p options/configuration_file dns/server:default\fR
       
   390 /var/named/named.conf
       
   391 .fi
       
   392 .in -2
       
   393 .sp
       
   394 
       
   395 .LP
       
   396 \fBExample 3 \fREstablishing Appropriate Authorization for \fBnamed\fR
       
   397 .sp
       
   398 .LP
       
   399 To have \fBnamed\fR start with the \fBsolaris.smf.manage.bind\fR authorization, perform the steps shown below.
       
   400 
       
   401 .sp
       
   402 .LP
       
   403 Add the user \fBdnsadmin\fR to the \fBsolaris.smf.manage.bind\fR role:
       
   404 
       
   405 .sp
       
   406 .in +2
       
   407 .nf
       
   408 # \fBusermod -A solaris.smf.manage.bind dnsadmin\fR
       
   409 \fBObserve effect of command:\fR
       
   410 # \fBtail -1 /etc/user_attr\fR
       
   411 dnsadmin::::type=normal;auths=solaris.smf.manage.bind
       
   412 .fi
       
   413 .in -2
       
   414 .sp
       
   415 
       
   416 .sp
       
   417 .LP
       
   418 Modify the service properties:
       
   419 
       
   420 .sp
       
   421 .in +2
       
   422 .nf
       
   423 # \fBsvccfg\fR
       
   424 svc:> \fBselect svc:/network/dns/server:default\fR
       
   425 svc:/network/dns/server:default> \fBsetprop start/user = dnsadmin\fR
       
   426 svc:/network/dns/server:default> \fBsetprop start/group = dnsadmin\fR
       
   427 svc:/network/dns/server:default> \fBexit\fR
       
   428 # \fBsvcadm refresh svc:/network/dns/server:default\fR
       
   429 # \fBsvcadm restart svc:/network/dns/server:default\fR
       
   430 .fi
       
   431 .in -2
       
   432 .sp
       
   433 
       
   434 .sp
       
   435 .LP
       
   436 Because only root has write access to create the default process-ID file,  \fB/var/run/named/named.pid\fR, \fBnamed\fR must be configured to use an alternative path for the user \fBdnsadmin\fR. Here is an example of how to accomplish this:
       
   437 
       
   438 .sp
       
   439 .in +2
       
   440 .nf
       
   441 # \fBmkdir /var/named/tmp\fR
       
   442 # \fBchown dnsadmin /var/named/tmp\fR
       
   443 .fi
       
   444 .in -2
       
   445 .sp
       
   446 
       
   447 .sp
       
   448 .LP
       
   449 Shown below is what you must add to \fBnamed.conf\fR to make use of the directory created above.
       
   450 
       
   451 .sp
       
   452 .in +2
       
   453 .nf
       
   454 # \fBhead /etc/named.conf\fR
       
   455 options {
       
   456 directory "/var/named";
       
   457 pid-file "/var/named/tmp/named.pid";
       
   458 };
       
   459 .fi
       
   460 .in -2
       
   461 .sp
       
   462 
       
   463 .SH FILES
       
   464 .sp
       
   465 .ne 2
       
   466 .mk
       
   467 .na
       
   468 \fB\fB/etc/named.conf\fR\fR
       
   469 .ad
       
   470 .sp .6
       
   471 .RS 4n
       
   472 default configuration file
       
   473 .RE
       
   474 
       
   475 .sp
       
   476 .ne 2
       
   477 .mk
       
   478 .na
       
   479 \fB\fB/var/run/named/named.pid\fR\fR
       
   480 .ad
       
   481 .sp .6
       
   482 .RS 4n
       
   483 default process-ID file
       
   484 .RE
       
   485 
       
   486 .SH ATTRIBUTES
       
   487 .sp
       
   488 .LP
       
   489 See \fBattributes\fR(5) for descriptions of the following attributes:
       
   490 .sp
       
   491 
       
   492 .sp
       
   493 .TS
       
   494 tab() box;
       
   495 cw(2.75i) |cw(2.75i) 
       
   496 lw(2.75i) |lw(2.75i) 
       
   497 .
       
   498 ATTRIBUTE TYPEATTRIBUTE VALUE
       
   499 _
       
   500 Availabilityservice/network/dns/bind
       
   501 _
       
   502 Interface StabilityVolatile
       
   503 .TE
       
   504 
       
   505 .SH SEE ALSO
       
   506 .sp
       
   507 .LP
       
   508 \fBsvcs\fR(1), \fBnamed-checkconf\fR(8), \fBnamed-checkzone\fR(8), \fBrndc\fR(8), \fBrndc-confgen\fR(8), \fBsvcadm\fR(8), \fBsvccfg\fR(8), \fBsvcprop\fR(1), \fBchroot\fR(2), \fBsetuid\fR(2), \fBbind\fR(3C), \fBattributes\fR(5), \fBsmf\fR(5), \fBsmf_method\fR(5)
       
   509 .sp
       
   510 .LP
       
   511 \fIRFC 1033\fR, \fIRFC 1034\fR, \fIRFC 1035\fR
       
   512 .sp
       
   513 .LP
       
   514 See the BIND 9 \fIAdministrator's Reference Manual\fR. As of the date of publication of this man page, this document is available at https://www.isc.org/software/bind/documentation\&.
       
   515 .sp
       
   516 .LP
       
   517 The \fBnamed.conf\fR man page shipped with the BIND 9 distribution