⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dhcpd.conf.5

📁 DHCP服务器源码
💻 5
📖 第 1 页 / 共 5 页
字号:
.I subnet-numbershould be an IP address or domain name which resolves to the subnetnumber of the subnet being described.   The .I netmaskshould be an IP address or domain name which resolves to the subnet maskof the subnet being described.   The subnet number, together with thenetmask, are sufficient to determine whether any given IP address ison the specified subnet..PPAlthough a netmask must be given with every subnet declaration, it isrecommended that if there is any variance in subnet masks at a site, asubnet-mask option statement be used in each subnet declaration to setthe desired subnet mask, since any subnet-mask option statement willoverride the subnet mask declared in the subnet statement..PP.B The.I range.B statement.PP.nf.B range\fR [ \fBdynamic-bootp\fR ] \fIlow-address\fR [ \fIhigh-address\fR]\fB;\fR.fi.PPFor any subnet on which addresses will be assigned dynamically, theremust be at least one \fIrange\fR statement.   The range statementgives the lowest and highest IP addresses in a range.   All IPaddresses in the range should be in the subnet in which the\fIrange\fR statement is declared.   The \fIdynamic-bootp\fR flag maybe specified if addresses in the specified range may be dynamicallyassigned to BOOTP clients as well as DHCP clients.   When specifying asingle address, \fIhigh-address\fR can be omitted..PP.B The.I host.B statement.PP.nf \fBhost\fR \fIhostname\fR {   [ \fIparameters\fR ]   [ \fIdeclarations\fR ] \fB}\fR.fi.PPThe.B hostdeclaration provides a scope in which to provide configuration information abouta specific client, and also provides a way to assign a client a fixed address.The host declaration provides a way for the DHCP server to identify a DHCP orBOOTP client, and also a way to assign the client a static IP address..PPIf it is desirable to be able to boot a DHCP or BOOTPclient on more than one subnet with fixed addresses, more than oneaddress may be specified in the.I fixed-addressdeclaration, or more than one.B hoststatement may be specified..PPIf client-specific boot parameters must change based on the networkto which the client is attached, then multiple .B hostdeclaration shouldbe used..PPIf a client is to be booted using a fixed address if it'spossible, but should be allocated a dynamic address otherwise, then a.B hostdeclaration must be specified without a.B fixed-addressdeclaration..I hostnameshould be a name identifying the host.  If a \fIhostname\fR option isnot specified for the host, \fIhostname\fR is used..PP\fIHost\fR declarations are matched to actual DHCP or BOOTP clientsby matching the \fRdhcp-client-identifier\fR option specified in the\fIhost\fR declaration to the one supplied by the client, or, if the\fIhost\fR declaration or the client does not provide a\fRdhcp-client-identifier\fR option, by matching the \fIhardware\fRparameter in the \fIhost\fR declaration to the network hardwareaddress supplied by the client.   BOOTP clients do not normallyprovide a \fIdhcp-client-identifier\fR, so the hardware address mustbe used for all clients that may boot using the BOOTP protocol..PPPlease be aware that.B onlythe \fIdhcp-client-identifier\fR option and the hardware address can beused to match a host declaration.   For example, it is not possible to matcha host declaration to a \fIhost-name\fR option.   This is because thehost-name option cannot be guaranteed to be unique for any given client,whereas both the hardware address and \fIdhcp-client-identifier\fR optionare at least theoretically guaranteed to be unique to a given client..PP.B The.I group.B statement.PP.nf \fBgroup\fR {   [ \fIparameters\fR ]   [ \fIdeclarations\fR ] \fB}\fR.fi.PPThe group statement is used simply to apply one or more parameters toa group of declarations.   It can be used to group hosts, sharednetworks, subnets, or even other groups..SH REFERENCE: ALLOW AND DENYThe.I allowand.I denystatements can be used to control the response of the DHCP server tovarious sorts of requests.  The allow and deny keywords actually havedifferent meanings depending on the context.  In a pool context, thesekeywords can be used to set up access lists for address allocationpools.  In other contexts, the keywords simply control general serverbehavior with respect to clients based on scope.   In a non-poolcontext, the.I ignorekeyword can be used in place of the.I denykeyword to prevent logging of denied requests..PP.SH ALLOW DENY AND IGNORE IN SCOPEThe following usages of allow and deny will work in any scope,although it is not recommended that they be used in pooldeclarations..PP.B The.I unknown-clients.B keyword.PP \fBallow unknown-clients;\fR \fBdeny unknown-clients;\fR \fBignore unknown-clients;\fR.PPThe \fBunknown-clients\fR flag is used to tell dhcpd whetheror not to dynamically assign addresses to unknown clients.   Dynamicaddress assignment to unknown clients is \fBallow\fRed by default.An unknown client is simply a client that has no host declaration..PPThe use of this option is now \fIdeprecated\fR.  If you are trying torestrict access on your network to known clients, you should use \fBdenyunknown-clients;\fR inside of your address pool, as described under theheading ALLOW AND DENY WITHIN POOL DECLARAIONS..PP.B The.I bootp.B keyword.PP \fBallow bootp;\fR \fBdeny bootp;\fR \fBignore bootp;\fR.PPThe \fBbootp\fR flag is used to tell dhcpd whetheror not to respond to bootp queries.  Bootp queries are \fBallow\fRedby default..PPThis option does not satisfy the requirement of failover peers for denyingdynamic bootp clients.  The \fBdeny dynamic bootp clients;\fR option shouldbe used instead. See the ALLOW AND DENY WITHIN POOL DECLARATIONS sectionof this man page for more details..PP.B The.I booting.B keyword.PP \fBallow booting;\fR \fBdeny booting;\fR \fBignore booting;\fR.PPThe \fBbooting\fR flag is used to tell dhcpd whether or not to respondto queries from a particular client.  This keyword only has meaningwhen it appears in a host declaration.   By default, booting is\fBallow\fRed, but if it is disabled for a particular client, thenthat client will not be able to get an address from the DHCP server..PP.B The.I duplicates.B keyword.PP \fBallow duplicates;\fR \fBdeny duplicates;\fR.PPHost declarations can match client messages based on the DHCP ClientIdentifer option or based on the client's network hardware type andMAC address.   If the MAC address is used, the host declaration willmatch any client with that MAC address - even clients with differentclient identifiers.   This doesn't normally happen, but is possiblewhen one computer has more than one operating system installed on it -for example, Microsoft Windows and NetBSD or Linux..PPThe \fBduplicates\fR flag tells the DHCP server that if a request isreceived from a client that matches the MAC address of a hostdeclaration, any other leases matching that MAC address should bediscarded by the server, even if the UID is not the same.   This is aviolation of the DHCP protocol, but can prevent clients whose clientidentifiers change regularly from holding many leases at the same time.By default, duplicates are \fBallow\fRed..PP.B The.I declines.B keyword.PP \fBallow declines;\fR \fBdeny declines;\fR \fBignore declines;\fR.PPThe DHCPDECLINE message is used by DHCP clients to indicate that thelease the server has offered is not valid.   When the server receivesa DHCPDECLINE for a particular address, it normally abandons thataddress, assuming that some unauthorized system is using it.Unfortunately, a malicious or buggy client can, using DHCPDECLINEmessages, completely exhaust the DHCP server's allocation pool.   Theserver will reclaim these leases, but while the client is runningthrough the pool, it may cause serious thrashing in the DNS, and itwill also cause the DHCP server to forget old DHCP client addressallocations..PPThe \fBdeclines\fR flag tells the DHCP server whether or not to honorDHCPDECLINE messages.   If it is set to \fBdeny\fR or \fBignore\fR ina particular scope, the DHCP server will not respond to DHCPDECLINEmessages..PP.B The.I client-updates.B keyword.PP \fBallow client-updates;\fR \fBdeny client-updates;\fR.PPThe \fBclient-updates\fR flag tells the DHCP server whether or not tohonor the client's intention to do its own update of its A record.This is only relevant when doing \fIinterim\fR DNS updates.   See thedocumentation under the heading THE INTERIM DNS UPDATE SCHEME fordetails..SH ALLOW AND DENY WITHIN POOL DECLARATIONS.PPThe uses of the allow and deny keywords shown in the previous sectionwork pretty much the same way whether the client is sending aDHCPDISCOVER or a DHCPREQUEST message - an address will be allocatedto the client (either the old address it's requesting, or a newaddress) and then that address will be tested to see if it's okay tolet the client have it.   If the client requested it, and it's notokay, the server will send a DHCPNAK message.   Otherwise, the serverwill simply not respond to the client.   If it is okay to give theaddress to the client, the server will send a DHCPACK message..PPThe primary motivation behind pool declarations is to have addressallocation pools whose allocation policies are different.   A clientmay be denied access to one pool, but allowed access to another poolon the same network segment.   In order for this to work, accesscontrol has to be done during address allocation, not after addressallocation is done..PPWhen a DHCPREQUEST message is processed, address allocation simplyconsists of looking up the address the client is requesting and seeingif it's still available for the client.  If it is, then the DHCPserver checks both the address pool permit lists and the relevantin-scope allow and deny statements to see if it's okay to give thelease to the client.  In the case of a DHCPDISCOVER message, theallocation process is done as described previously in the ADDRESSALLOCATION section..PPWhen declaring permit lists for address allocation pools, thefollowing syntaxes are recognized following the allow or deny keywords:.PP \fBknown-clients;\fR.PPIf specified, this statement either allows or prevents allocation fromthis pool to any client that has a host declaration (i.e., is known).A client is known if it has a host declaration in \fIany\fR scope, notjust the current scope..PP \fBunknown-clients;\fR.PPIf specified, this statement either allows or prevents allocation fromthis pool to any client that has no host declaration (i.e., is notknown)..PP \fBmembers of "\fRclass\fB";\fR.PPIf specified, this statement either allows or prevents allocation fromthis pool to any client that is a member of the named class..PP \fBdynamic bootp clients;\fR.PPIf specified, this statement either allows or prevents allocation fromthis pool to any bootp client..PP \fBauthenticated clients;\fR.PPIf specified, this statement either allows or prevents allocation fromthis pool to any client that has been authenticated using the DHCPauthentication protocol.   This is not yet supported..PP \fBunauthenticated clients;\fR.PPIf specified, this statement either allows or prevents allocation fromthis pool to any client that has not been authenticated using the DHCPauthentication protocol.   This is not yet supported..PP \fBall clients;\fR.PPIf specified, this statement either allows or prevents allocation fromthis pool to all clients.   This can be used when you want to write apool declaration for some reason, but hold it in reserve, or when youwant to renumber your network quickly, and thus want the server toforce all clients that have been allocated addresses from this pool toobtain new addresses immediately when they next renew..SH REFERENCE: PARAMETERSThe.I always-broadcaststatement.RS 0.25i.PP.B always-broadcast \fIflag\fR\fB;\fR.PPThe DHCP and BOOTP

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -