📄 dhcp-options.5
字号:
.\" $Id: dhcp-options.5,v 1.19.2.11 2004/06/10 17:59:15 dhankins Exp $.\".\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC").\" Copyright (c) 1996-2003 by Internet Software Consortium.\".\" Permission to use, copy, modify, and 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..\".\" Internet Systems Consortium, Inc..\" 950 Charter Street.\" Redwood City, CA 94063.\" <info@isc.org>.\" http://www.isc.org/.\".\" This software has been written for Internet Systems Consortium.\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc..\" To learn more about Internet Systems Consortium, see.\" ``http://www.isc.org/''. To learn more about Vixie Enterprises,.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see.\" ``http://www.nominum.com''..TH dhcpd-options 5.SH NAMEdhcp-options - Dynamic Host Configuration Protocol options.SH DESCRIPTIONThe Dynamic Host Configuration protocol allows the client to receive.B optionsfrom the DHCP server describing the network configuration and variousservices that are available on the network. When configuring.B dhcpd(8)or.B dhclient(8) ,options must often be declared. The syntax for declaring options,and the names and formats of the options that can be declared, aredocumented here..SH REFERENCE: OPTION STATEMENTS.PPDHCP \fIoption\fR statements always start with the \fIoption\fRkeyword, followed by an option name, followed by option data. Theoption names and data formats are described below. It is notnecessary to exhaustively specify all DHCP options - only thoseoptions which are needed by clients must be specified..PPOption data comes in a variety of formats, as defined below:.PPThe.B ip-addressdata type can be entered either as an explicit IPaddress (e.g., 239.254.197.10) or as a domain name (e.g.,haagen.isc.org). When entering a domain name, be sure that thatdomain name resolves to a single IP address..PPThe.B int32data type specifies a signed 32-bit integer. The .B uint32data type specifies an unsigned 32-bit integer. The .B int16and.B uint16data types specify signed and unsigned 16-bit integers. The .B int8and.B uint8data types specify signed and unsigned 8-bit integers.Unsigned 8-bit integers are also sometimes referred to as octets..PPThe.B textdata type specifies an NVT ASCII string, which must beenclosed in double quotes - for example, to specify a root-pathoption, the syntax would be.nf.sp 1option root-path "10.0.1.4:/var/tmp/rootfs";.fi.PPThe.B domain-namedata type specifies a domain name, which must notenclosed in double quotes. This data type is not used for anyexisting DHCP options. The domain name is stored just as if it werea text option..PPThe.B flagdata type specifies a boolean value. Booleans can be either true orfalse (or on or off, if that makes more sense to you)..PPThe.B stringdata type specifies either an NVT ASCII stringenclosed in double quotes, or a series of octets specified inhexadecimal, separated by colons. For example:.nf.sp 1 option dhcp-client-identifier "CLIENT-FOO";or option dhcp-client-identifier 43:4c:49:45:54:2d:46:4f:4f;.fi.SH SETTING OPTION VALUES USING EXPRESSIONSSometimes it's helpful to be able to set the value of a DHCP optionbased on some value that the client has sent. To do this, you canuse expression evaluation. The .B dhcp-eval(5)manual page describes how to write expressions. To assign the resultof an evaluation to an option, define the option as follows:.nf.sp 1 \fBoption \fImy-option \fB= \fIexpression \fB;\fR.fi.PPFor example:.nf.sp 1 option hostname = binary-to-ascii (16, 8, "-", substring (hardware, 1, 6));.fi.SH STANDARD DHCP OPTIONSThe documentation for the various options mentioned below is takenfrom the latest IETF draft document on DHCP options. Options notlisted below may not yet be implemented, but it is possible to usesuch options by defining them in the configuration file. Please seethe DEFINING NEW OPTIONS heading later in this document for moreinformation..PPSome of the options documented here are automatically generated bythe DHCP server or by clients, and cannot be configured by the user.The value of such an option can be used in the configuration file ofthe receiving DHCP protocol agent (server or client), for example inconditional expressions. However, the value of the option cannot beused in the configuration file of the sending agent, because the valueis determined only \fIafter\fR the configuration file has beenprocessed. In the following documentation, such options will be shownas "not user configurable".PPThe standard options are:.PP.B option \fBall-subnets-local\fR \fIflag\fR\fB;\fR.RS 0.25i.PPThis option specifies whether or not the client may assume that allsubnets of the IP network to which the client is connected use thesame MTU as the subnet of that network to which the client isdirectly connected. A value of true indicates that all subnets sharethe same MTU. A value of false means that the client should assume thatsome subnets of the directly connected network may have smaller MTUs..RE.PP.B option \fBarp-cache-timeout\fR \fIuint32\fR\fB;\fR.RS 0.25i.PPThis option specifies the timeout in seconds for ARP cache entries..RE.PP.B option \fBbootfile-name\fR \fItext\fR\fB;\fR.RS 0.25i.PPThis option is used to identify a bootstrap file. If supported by theclient, it should have the same effect as the \fBfilename\fRdeclaration. BOOTP clients are unlikely to support this option. SomeDHCP clients will support it, and others actually require it..RE.PP.B option \fBboot-size\fR \fIuint16\fR\fB;\fR.RS 0.25i.PPThis option specifies the length in 512-octet blocks of the defaultboot image for the client..RE.PP.B option \fBbroadcast-address\fR \fIip-address\fR\fB;\fR.RS 0.25i.PPThis option specifies the broadcast address in use on the client'ssubnet. Legal values for broadcast addresses are specified insection 3.2.1.3 of STD 3 (RFC1122)..RE.PP.B option \fBcookie-servers\fR \fIip-address\fR [\fB,\fR \fIip-address\fR...]\fB;\fR.RS 0.25i.PPThe cookie server option specifies a list of RFC 865 cookieservers available to the client. Servers should be listed in orderof preference..RE.PP.B option \fBdefault-ip-ttl\fR \fIuint8;\fR.RS 0.25i.PPThis option specifies the default time-to-live that the client shoulduse on outgoing datagrams..RE.PP.B option \fBdefault-tcp-ttl\fR \fIuint8\fR\fB;\fR.RS 0.25i.PPThis option specifies the default TTL that the client should use whensending TCP segments. The minimum value is 1..RE.PP.B option \fBdhcp-client-identifier\fR \fIstring\fR\fB;\fR.RS 0.25i.PPThis option can be used to specify a DHCP client identifier in ahost declaration, so that dhcpd can find the host record by matchingagainst the client identifier..PPPlease be aware that some DHCP clients, when configured with clientidentifiers that are ASCII text, will prepend a zero to the ASCIItext. So you may need to write:.nf option dhcp-client-identifier "\\0foo";rather than: option dhcp-client-identifier "foo";.fi.RE.PP.B option \fBdhcp-lease-time\fR \fIuint32\fR\fB;\fR.RS 0.25i.PPThis option is used in a client request (DHCPDISCOVER or DHCPREQUEST)to allow the client to request a lease time for the IP address. In aserver reply (DHCPOFFER), a DHCP server uses this option to specifythe lease time it is willing to offer. .PPThis option is not directly user configurable in the server; refer to the\fImax-lease-time\fR and \fIdefault-lease-time\fR server options in.B dhcpd.conf(5)..RE.PP.B option \fBdhcp-max-message-size\fR \fIuint16\fR\fB;\fR.RS 0.25i.PPThis option, when sent by the client, specifies the maximum size ofany response that the server sends to the client. When specified onthe server, if the client did not send a dhcp-max-message-size option,the size specified on the server is used. This works for BOOTP aswell as DHCP responses..RE.PP.B option \fBdhcp-message\fR \fItext\fR\fB;\fR.RS 0.25i.PPThis option is used by a DHCP server to provide an error message to aDHCP client in a DHCPNAK message in the event of a failure. A clientmay use this option in a DHCPDECLINE message to indicate why theclient declined the offered parameters..PPThis option is not user configurable..RE.PP.B option \fBdhcp-message-type\fR \fIuint8\fR\fB;\fR.RS 0.25i.PPThis option, sent by both client and server, specifies the type of DHCPmessage contained in the DHCP packet. Possible values (taken directly fromRFC2132) are:.PP.nf 1 DHCPDISCOVER 2 DHCPOFFER 3 DHCPREQUEST 4 DHCPDECLINE 5 DHCPACK 6 DHCPNAK 7 DHCPRELEASE 8 DHCPINFORM .fi.PPThis option is not user configurable..PP.RE.B option \fBdhcp-option-overload\fR \fIuint8\fR\fB;\fR.RS 0.25i.PPThis option is used to indicate that the DHCP 'sname' or 'file'fields are being overloaded by using them to carry DHCP options. ADHCP server inserts this option if the returned parameters willexceed the usual space allotted for options..PPIf this option is present, the client interprets the specifiedadditional fields after it concludes interpretation of the standardoption fields..PPLegal values for this option are:.PP.nf 1 the 'file' field is used to hold options 2 the 'sname' field is used to hold options 3 both fields are used to hold options .fi.PPThis option is not user configurable..PP.RE.PP.B option \fBdhcp-parameter-request-list\fR \fIuint16\fR\fB;\fR.RS 0.25i.PPThis option, when sent by the client, specifies which options theclient wishes the server to return. Normally, in the ISC DHCPclient, this is done using the \fIrequest\fR statement. If thisoption is not specified by the client, the DHCP server will normallyreturn every option that is valid in scope and that fits into thereply. When this option is specified on the server, the serverreturns the specified options. This can be used to force a client totake options that it hasn't requested, and it can also be used totailor the response of the DHCP server for clients that may need amore limited set of options than those the server would normallyreturn..RE.PP.B option \fBdhcp-rebinding-time\fR \fIuint32\fR\fB;\fR.RS 0.25i.PPThis option specifies the number of seconds from the time a client getsan address until the client transitions to the REBINDING state..PPThis option is not user configurable..PP.RE.PP.B option \fBdhcp-renewal-time\fR \fIuint32\fR\fB;\fR.RS 0.25i.PPThis option specifies the number of seconds from the time a client getsan address until the client transitions to the RENEWING state..PPThis option is not user configurable..PP.RE.PP.B option \fBdhcp-requested-address\fR \fIip-address\fR\fB;\fR.RS 0.25i.PPThis option is used by the client in a DHCPDISCOVER torequest that a particular IP address be assigned. .PPThis option is not user configurable..PP.RE.PP.B option \fBdhcp-server-identifier\fR \fIip-address\fR\fB;\fR.RS 0.25i.PPThis option is used in DHCPOFFER and DHCPREQUEST messages, and mayoptionally be included in the DHCPACK and DHCPNAK messages. DHCPservers include this option in the DHCPOFFER in order to allow theclient to distinguish between lease offers. DHCP clients use thecontents of the 'server identifier' field as the destination addressfor any DHCP messages unicast to the DHCP server. DHCP clients alsoindicate which of several lease offers is being accepted by includingthis option in a DHCPREQUEST message..PPThe value of this option is the IP address of the server..PPThis option is not directly user configurable. See the \fIserver-identifier\fR server option in.B \fIdhcpd.conf(5)..PP.RE.PP.B option \fBdomain-name\fR \fItext\fR\fB;\fR.RS 0.25i.PPThis option specifies the domain name that client should use whenresolving hostnames via the Domain Name System.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -