From: Ted Lemon Date: Mon, 9 Sep 1996 07:04:29 +0000 (+0000) Subject: Add use-host-decl-names keyword X-Git-Tag: BETA_5_9~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c256bae9ba4f17a5c97ba34a53cea95575280ec8;p=thirdparty%2Fdhcp.git Add use-host-decl-names keyword --- diff --git a/common/conflex.c b/common/conflex.c index 2c9f8056c..b8b6a1952 100644 --- a/common/conflex.c +++ b/common/conflex.c @@ -42,7 +42,7 @@ #ifndef lint static char copyright[] = -"$Id: conflex.c,v 1.18 1996/08/29 23:02:38 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; +"$Id: conflex.c,v 1.19 1996/09/09 07:04:28 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -452,6 +452,8 @@ static int intern (atom, dfv) return UID; if (!strcasecmp (atom + 1, "ser-class")) return USER_CLASS; + if (!strcasecmp (atom + 1, "se-host-decl-names")) + return USE_HOST_DECL_NAMES; break; case 'v': if (!strcasecmp (atom + 1, "endor-class")) diff --git a/conflex.c b/conflex.c index 2c9f8056c..b8b6a1952 100644 --- a/conflex.c +++ b/conflex.c @@ -42,7 +42,7 @@ #ifndef lint static char copyright[] = -"$Id: conflex.c,v 1.18 1996/08/29 23:02:38 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; +"$Id: conflex.c,v 1.19 1996/09/09 07:04:28 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -452,6 +452,8 @@ static int intern (atom, dfv) return UID; if (!strcasecmp (atom + 1, "ser-class")) return USER_CLASS; + if (!strcasecmp (atom + 1, "se-host-decl-names")) + return USE_HOST_DECL_NAMES; break; case 'v': if (!strcasecmp (atom + 1, "endor-class")) diff --git a/confpars.c b/confpars.c index e1f08e6fc..3ff58b6dd 100644 --- a/confpars.c +++ b/confpars.c @@ -42,7 +42,7 @@ #ifndef lint static char copyright[] = -"$Id: confpars.c,v 1.32 1996/09/02 21:16:25 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; +"$Id: confpars.c,v 1.33 1996/09/09 07:04:28 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -143,6 +143,7 @@ void read_leases () | BOOT_UNKNOWN_CLIENTS boolean | ONE_LEASE_PER_CLIENT boolean | GET_LEASE_HOSTNAMES boolean + | USE_HOST_DECL_NAME boolean | NEXT_SERVER ip-addr-or-hostname SEMI | option_parameter | SERVER-IDENTIFIER ip-addr-or-hostname SEMI @@ -290,6 +291,12 @@ int parse_statement (cfile, group, type, host_decl, declaration) group -> get_lease_hostnames = parse_boolean (cfile); break; + case USE_HOST_DECL_NAMES: + if (type == HOST_DECL) + parse_warn ("use-host-decl-names not allowed here."); + group -> use_host_decl_names = parse_boolean (cfile); + break; + case NEXT_SERVER: tree = parse_ip_addr_or_hostname (cfile, 0); if (!tree) @@ -518,7 +525,8 @@ void parse_host_declaration (cfile, group) declaration); } while (1); - if (!host -> group -> options [DHO_HOST_NAME]) { + if (!host -> group -> options [DHO_HOST_NAME] && + host -> group -> use_host_decl_names) { host -> group -> options [DHO_HOST_NAME] = new_tree_cache ("parse_host_declaration"); if (!host -> group -> options [DHO_HOST_NAME]) @@ -1321,15 +1329,22 @@ struct lease *parse_lease_declaration (cfile) lease.uid_len = strlen (val) + 1; lease.uid = (unsigned char *) malloc (lease.uid_len); + if (!lease.uid) { + warn ("no space for uid"); + return (struct lease *)0; + } memcpy (lease.uid, val, lease.uid_len); } else { lease.uid_len = 0; lease.uid = parse_numeric_aggregate (cfile, (unsigned char *)0, &lease.uid_len, ':', 16, 8); - if (!lease.uid) + if (!lease.uid) { + warn ("no space for uid"); return (struct lease *)0; + } if (lease.uid_len == 0) { + lease.uid = (unsigned char *)0; parse_warn ("zero-length uid"); seenbit = 0; break; diff --git a/dhcpd.conf.5 b/dhcpd.conf.5 index 73b796e54..d4653c497 100644 --- a/dhcpd.conf.5 +++ b/dhcpd.conf.5 @@ -615,6 +615,39 @@ each address in the lease pool and use that address for the DHCP \fIhostname\fR option. If \fIflag\fR is true, then this lookup is done for all addresses in the current scope. By default, or if \fIflag\fR is false, no lookups are done. +.PP +.B The +.I use-host-decl-names +.B statement +.PP + \fBuse-host-decl-names\fR \fIflag\fR\fB;\fR +.PP +If the \fIuse-host-decl-names\fR parameter is true in a given scope, +then for every host declaration within that scope, the name provided +for the host declaration will be supplied to the client as its +hostname. So, for example, +.PP +.nf + group { + use-host-decl-names on; + + host joe { + hardware ethernet 08:00:2b:4c:29:32; + fixed-address joe.fugue.com; + } + } + +is equivalent to + + host joe { + hardware ethernet 08:00:2b:4c:29:32; + fixed-address joe.fugue.com; + option host-name "joe"; + } +.fi +.PP +An \fIoption host-name\fR statement within a host declaration will +override the use of the name in the host declaration. .SH REFERENCE: OPTION STATEMENTS .PP DHCP \fIoption\fR statements always start with the \fIoption\fR diff --git a/dhcpd.conf.cat5 b/dhcpd.conf.cat5 index fce81ada7..f6eb58628 100644 --- a/dhcpd.conf.cat5 +++ b/dhcpd.conf.cat5 @@ -641,17 +641,17 @@ dhcpd.conf(5) dhcpd.conf(5) current scope. By default, or if _f_l_a_g is false, no lookups are done. -RREEFFEERREENNCCEE:: OOPPTTIIOONN SSTTAATTEEMMEENNTTSS - DHCP _o_p_t_i_o_n statements always start with the _o_p_t_i_o_n key- - word, followed by an option name, followed by option data. - The option names and data formats are described below. - It is not necessary to exhaustively specify all DHCP - options - only those options which are needed by clients - must be specified. + TThhee _u_s_e_-_h_o_s_t_-_d_e_c_l_-_n_a_m_e_s ssttaatteemmeenntt - Option data comes in a variety of formats, as defined - below: + uussee--hhoosstt--ddeeccll--nnaammeess _f_l_a_g;; + If the _u_s_e_-_h_o_s_t_-_d_e_c_l_-_n_a_m_e_s parameter is true in a given + scope, then for every host declaration within that scope, + the name provided for the host declaration will be sup- + plied to the client as its hostname. So, for example, + + group { + use-host-decl-names on; @@ -664,178 +664,217 @@ RREEFFEERREENNCCEE:: OOPPTTIIOONN SSTTAATTEEMMEENNTTSS dhcpd.conf(5) dhcpd.conf(5) - The iipp--aaddddrreessss data type can be entered either as an - explicit IP address (e.g., 239.254.197.10) or as a domain + host joe { + hardware ethernet 08:00:2b:4c:29:32; + fixed-address joe.fugue.com; + } + } + + is equivalent to + + host joe { + hardware ethernet 08:00:2b:4c:29:32; + fixed-address joe.fugue.com; + option host-name "joe"; + } + + An _o_p_t_i_o_n _h_o_s_t_-_n_a_m_e statement within a host declaration + will override the use of the name in the host declaration. + +RREEFFEERREENNCCEE:: OOPPTTIIOONN SSTTAATTEEMMEENNTTSS + DHCP _o_p_t_i_o_n statements always start with the _o_p_t_i_o_n key- + word, followed by an option name, followed by option data. + The option names and data formats are described below. + It is not necessary to exhaustively specify all DHCP + options - only those options which are needed by clients + must be specified. + + Option data comes in a variety of formats, as defined + below: + + The iipp--aaddddrreessss data type can be entered either as an + explicit IP address (e.g., 239.254.197.10) or as a domain name (e.g., haagen.isc.org). When entering a domain name, - be sure that that domain name resolves to a single IP + be sure that that domain name resolves to a single IP address. - The iinntt3322 data type specifies a signed 32-bit integer. + The iinntt3322 data type specifies a signed 32-bit integer. The uuiinntt3322 data type specifies an unsigned 32-bit integer. The iinntt1166 and uuiinntt1166 data types specify signed and - unsigned 16-bit integers. The iinntt88 and uuiinntt88 data types - specify signed and unsigned 8-bit integers. Unsigned + unsigned 16-bit integers. The iinntt88 and uuiinntt88 data types + specify signed and unsigned 8-bit integers. Unsigned 8-bit integers are also sometimes referred to as octets. - The ssttrriinngg data type specifies an NVT ASCII string, which - must be enclosed in double quotes - for example, to spec- + The ssttrriinngg data type specifies an NVT ASCII string, which + must be enclosed in double quotes - for example, to spec- ify a domain-name option, the syntax would be option domain-name "isc.org"; - The ffllaagg data type specifies a boolean value. Booleans - can be either true or false (or on or off, if that makes + The ffllaagg data type specifies a boolean value. Booleans + can be either true or false (or on or off, if that makes more sense to you). - The ddaattaa--ssttrriinngg data type specifies either an NVT ASCII - string enclosed in double quotes, or a series of octets - specified in hexadecimal, seperated by colons. For exam- - ple: + The ddaattaa--ssttrriinngg data type specifies either an NVT ASCII + string enclosed in double quotes, or a series of octets + specified in hexadecimal, seperated by colons. For - option client-identifier "CLIENT-FOO"; - or - option client-identifier 43:4c:49:45:54:2d:46:4f:4f; - The documentation for the various options mentioned below - is taken from the latest IETF draft document on DHCP - options. Options which are not listed by name may be - defined by the name option-_n_n_n, where _n_n_n _i_s _t_h_e _d_e_c_i_m_a_l - _n_u_m_b_e_r _o_f _t_h_e _o_p_t_i_o_n _c_o_d_e_. _T_h_e_s_e _o_p_t_i_o_n_s _m_a_y _b_e _f_o_l_l_o_w_e_d - _e_i_t_h_e_r _b_y _a _s_t_r_i_n_g_, _e_n_c_l_o_s_e_d _i_n _q_u_o_t_e_s_, _o_r _b_y _a _s_e_r_i_e_s _o_f - _o_c_t_e_t_s_, _e_x_p_r_e_s_s_e_d _a_s _t_w_o_-_d_i_g_i_t _h_e_x_a_d_e_c_i_m_a_l _n_u_m_b_e_r_s _s_e_p_e_r_- - _a_t_e_d _b_y _c_o_l_o_n_s_. _F_o_r _e_x_a_m_p_l_e_: - option option-133 "my-option-133-text"; - option option-129 1:54:c9:2b:47; + 11 - Because dhcpd does not know the format of these undefined - option codes, no checking is done to ensure the correct- - ness of the entered data. - The standard options are: - ooppttiioonn ssuubbnneett--mmaasskk _i_p_-_a_d_d_r_e_s_s;; - The subnet mask option specifies the client's subnet mask - as per RFC 950. If no subnet mask option is provided +dhcpd.conf(5) dhcpd.conf(5) - 11 + example: + option client-identifier "CLIENT-FOO"; + or + option client-identifier 43:4c:49:45:54:2d:46:4f:4f; + The documentation for the various options mentioned below + is taken from the latest IETF draft document on DHCP + options. Options which are not listed by name may be + defined by the name option-_n_n_n, where _n_n_n _i_s _t_h_e _d_e_c_i_m_a_l + _n_u_m_b_e_r _o_f _t_h_e _o_p_t_i_o_n _c_o_d_e_. _T_h_e_s_e _o_p_t_i_o_n_s _m_a_y _b_e _f_o_l_l_o_w_e_d + _e_i_t_h_e_r _b_y _a _s_t_r_i_n_g_, _e_n_c_l_o_s_e_d _i_n _q_u_o_t_e_s_, _o_r _b_y _a _s_e_r_i_e_s _o_f + _o_c_t_e_t_s_, _e_x_p_r_e_s_s_e_d _a_s _t_w_o_-_d_i_g_i_t _h_e_x_a_d_e_c_i_m_a_l _n_u_m_b_e_r_s _s_e_p_e_r_- + _a_t_e_d _b_y _c_o_l_o_n_s_. _F_o_r _e_x_a_m_p_l_e_: + option option-133 "my-option-133-text"; + option option-129 1:54:c9:2b:47; + Because dhcpd does not know the format of these undefined + option codes, no checking is done to ensure the correct- + ness of the entered data. -dhcpd.conf(5) dhcpd.conf(5) + The standard options are: + ooppttiioonn ssuubbnneett--mmaasskk _i_p_-_a_d_d_r_e_s_s;; - anywhere in scope, as a last resort dhcpd will use the - subnet mask from the subnet declaration for the network on - which an address is being assigned. However, _a_n_y subnet- - mask option declaration that is in scope for the address - being assigned will override the subnet mask specified in - the subnet declaration. + The subnet mask option specifies the client's subnet mask + as per RFC 950. If no subnet mask option is provided any- + where in scope, as a last resort dhcpd will use the subnet + mask from the subnet declaration for the network on which + an address is being assigned. However, _a_n_y subnet-mask + option declaration that is in scope for the address being + assigned will override the subnet mask specified in the + subnet declaration. ooppttiioonn ttiimmee--ooffffsseett _i_n_t_3_2;; - The time-offset option specifies the offset of the + The time-offset option specifies the offset of the client's subnet in seconds from Coordinated Universal Time (UTC). ooppttiioonn rroouutteerrss _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... ];; - The routers option specifies a list of IP addresses for - routers on the client's subnet. Routers should be listed + The routers option specifies a list of IP addresses for + routers on the client's subnet. Routers should be listed in order of preference. ooppttiioonn ttiimmee--sseerrvveerrss _i_p_-_a_d_d_r_e_s_s _[_, _i_p_-_a_d_d_r_e_s_s ... ];; - The time-server option specifies a list of RFC 868 time + The time-server option specifies a list of RFC 868 time servers available to the client. Servers should be listed in order of preference. ooppttiioonn nnaammee--sseerrvveerrss _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... ]; - The name-servers option specifies a list of IEN 116 name + + + 12 + + + + + +dhcpd.conf(5) dhcpd.conf(5) + + + The name-servers option specifies a list of IEN 116 name servers available to the client. Servers should be listed in order of preference. - ooppttiioonn ddoommaaiinn--nnaammee--sseerrvveerrss _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... + ooppttiioonn ddoommaaiinn--nnaammee--sseerrvveerrss _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... ];; - The domain-name-servers option specifies a list of Domain - Name System (STD 13, RFC 1035) name servers available to - the client. Servers should be listed in order of prefer- + The domain-name-servers option specifies a list of Domain + Name System (STD 13, RFC 1035) name servers available to + the client. Servers should be listed in order of prefer- ence. ooppttiioonn lloogg--sseerrvveerrss _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... ];; - The log-server option specifies a list of MIT-LCS UDP log + The log-server option specifies a list of MIT-LCS UDP log servers available to the client. Servers should be listed in order of preference. ooppttiioonn ccooookkiiee--sseerrvveerrss _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... ];; - The cookie server option specifies a list of RFC 865 + The cookie server option specifies a list of RFC 865 cookie servers available to the client. Servers should be listed in order of preference. ooppttiioonn llpprr--sseerrvveerrss _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... ];; - The LPR server option specifies a list of RFC 1179 line - - - - 12 - - - - - -dhcpd.conf(5) dhcpd.conf(5) - - - printer servers available to the client. Servers should + The LPR server option specifies a list of RFC 1179 line + printer servers available to the client. Servers should be listed in order of preference. ooppttiioonn iimmpprreessss--sseerrvveerrss _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... ];; - The impress-server option specifies a list of Imagen - Impress servers available to the client. Servers should + The impress-server option specifies a list of Imagen + Impress servers available to the client. Servers should be listed in order of preference. ooppttiioonn rreessoouurrccee--llooccaattiioonn--sseerrvveerrss _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... ];; - This option specifies a list of RFC 887 Resource Location + This option specifies a list of RFC 887 Resource Location servers available to the client. Servers should be listed in order of preference. ooppttiioonn hhoosstt--nnaammee _s_t_r_i_n_g;; - This option specifies the name of the client. The name + This option specifies the name of the client. The name may or may not be qualified with the local domain name (it is preferable to use the domain-name option to specify the - domain name). See RFC 1035 for character set restric- + domain name). See RFC 1035 for character set restric- tions. ooppttiioonn bboooott--ssiizzee _u_i_n_t_1_6;; - This option specifies the length in 512-octet blocks of + This option specifies the length in 512-octet blocks of + + + + 13 + + + + + +dhcpd.conf(5) dhcpd.conf(5) + + the default boot image for the client. ooppttiioonn mmeerriitt--dduummpp _s_t_r_i_n_g;; This option specifies the path-name of a file to which the - client's core image should be dumped in the event the - client crashes. The path is formatted as a character + client's core image should be dumped in the event the + client crashes. The path is formatted as a character string consisting of characters from the NVT ASCII charac- ter set. ooppttiioonn ddoommaaiinn--nnaammee _s_t_r_i_n_g;; - This option specifies the domain name that client should + This option specifies the domain name that client should use when resolving hostnames via the Domain Name System. ooppttiioonn sswwaapp--sseerrvveerr _i_p_-_a_d_d_r_e_s_s;; @@ -844,170 +883,161 @@ dhcpd.conf(5) dhcpd.conf(5) ooppttiioonn rroooott--ppaatthh _s_t_r_i_n_g;; - This option specifies the path-name that contains the - client's root disk. The path is formatted as a character + This option specifies the path-name that contains the + client's root disk. The path is formatted as a character string consisting of characters from the NVT ASCII charac- ter set. ooppttiioonn iipp--ffoorrwwaarrddiinngg _f_l_a_g;; + This option specifies whether the client should configure + its IP layer for packet forwarding. A value of 0 means + disable IP forwarding, and a value of 1 means enable IP + forwarding. + ooppttiioonn nnoonn--llooccaall--ssoouurrccee--rroouuttiinngg _f_l_a_g;; - 13 + This option specifies whether the client should configure + its IP layer to allow forwarding of datagrams with non- + local source routes (see Section 3.3.5 of [4] for a dis- + cussion of this topic). A value of 0 means disallow for- + warding of such datagrams, and a value of 1 means allow + forwarding. + + ooppttiioonn ppoolliiccyy--ffiilltteerr _i_p_-_a_d_d_r_e_s_s _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s + _i_p_-_a_d_d_r_e_s_s ... ];; + This option specifies policy filters for non-local source + routing. The filters consist of a list of IP addresses + and masks which specify destination/mask pairs with which + to filter incoming source routes. + Any source routed datagram whose next-hop address does not + match one of the filters should be discarded by the + client. -dhcpd.conf(5) dhcpd.conf(5) + 14 - This option specifies whether the client should configure - its IP layer for packet forwarding. A value of 0 means - disable IP forwarding, and a value of 1 means enable IP - forwarding. - ooppttiioonn nnoonn--llooccaall--ssoouurrccee--rroouuttiinngg _f_l_a_g;; - This option specifies whether the client should configure - its IP layer to allow forwarding of datagrams with non- - local source routes (see Section 3.3.5 of [4] for a dis- - cussion of this topic). A value of 0 means disallow for- - warding of such datagrams, and a value of 1 means allow - forwarding. - ooppttiioonn ppoolliiccyy--ffiilltteerr _i_p_-_a_d_d_r_e_s_s _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s - _i_p_-_a_d_d_r_e_s_s ... ];; - This option specifies policy filters for non-local source - routing. The filters consist of a list of IP addresses - and masks which specify destination/mask pairs with which - to filter incoming source routes. +dhcpd.conf(5) dhcpd.conf(5) - Any source routed datagram whose next-hop address does not - match one of the filters should be discarded by the - client. See STD 3 (RFC1122) for further information. ooppttiioonn mmaaxx--ddggrraamm--rreeaasssseemmbbllyy _u_i_n_t_1_6;; - This option specifies the maximum size datagram that the - client should be prepared to reassemble. The minimum + This option specifies the maximum size datagram that the + client should be prepared to reassemble. The minimum value legal value is 576. ooppttiioonn ddeeffaauulltt--iipp--ttttll _u_i_n_t_8_; - This option specifies the default time-to-live that the + This option specifies the default time-to-live that the client should use on outgoing datagrams. ooppttiioonn ppaatthh--mmttuu--aaggiinngg--ttiimmeeoouutt _u_i_n_t_3_2;; This option specifies the timeout (in seconds) to use when - aging Path MTU values discovered by the mechanism defined + aging Path MTU values discovered by the mechanism defined in RFC 1191. ooppttiioonn ppaatthh--mmttuu--ppllaatteeaauu--ttaabbllee _u_i_n_t_1_6 [,, _u_i_n_t_1_6 ... ];; - This option specifies a table of MTU sizes to use when + This option specifies a table of MTU sizes to use when performing Path MTU Discovery as defined in RFC 1191. The - table is formatted as a list of 16-bit unsigned integers, - ordered from smallest to largest. The minimum MTU value + table is formatted as a list of 16-bit unsigned integers, + ordered from smallest to largest. The minimum MTU value cannot be smaller than 68. ooppttiioonn iinntteerrffaaccee--mmttuu _u_i_n_t_1_6;; - - - 14 - - - - - -dhcpd.conf(5) dhcpd.conf(5) - - - This option specifies the MTU to use on this interface. + This option specifies the MTU to use on this interface. The minimum legal value for the MTU is 68. ooppttiioonn aallll--ssuubbnneettss--llooccaall _f_l_a_g;; This option specifies whether or not the client may assume - that all subnets of the IP network to which the client is - connected use the same MTU as the subnet of that network - to which the client is directly connected. A value of 1 + that all subnets of the IP network to which the client is + connected use the same MTU as the subnet of that network + to which the client is directly connected. A value of 1 indicates that all subnets share the same MTU. A value of 0 means that the client should assume that some subnets of the directly connected network may have smaller MTUs. ooppttiioonn bbrrooaaddccaasstt--aaddddrreessss _i_p_-_a_d_d_r_e_s_s;; - This option specifies the broadcast address in use on the + This option specifies the broadcast address in use on the client's subnet. Legal values for broadcast addresses are specified in section 3.2.1.3 of STD 3 (RFC1122). ooppttiioonn ppeerrffoorrmm--mmaasskk--ddiissccoovveerryy _f_l_a_g;; - This option specifies whether or not the client should - perform subnet mask discovery using ICMP. A value of 0 - indicates that the client should not perform mask discov- - ery. A value of 1 means that the client should perform + This option specifies whether or not the client should + perform subnet mask discovery using ICMP. A value of 0 + indicates that the client should not perform mask discov- + ery. A value of 1 means that the client should perform + + + + 15 + + + + + +dhcpd.conf(5) dhcpd.conf(5) + + mask discovery. ooppttiioonn mmaasskk--ssuupppplliieerr _f_l_a_g;; - This option specifies whether or not the client should - respond to subnet mask requests using ICMP. A value of 0 - indicates that the client should not respond. A value of + This option specifies whether or not the client should + respond to subnet mask requests using ICMP. A value of 0 + indicates that the client should not respond. A value of 1 means that the client should respond. ooppttiioonn rroouutteerr--ddiissccoovveerryy _f_l_a_g;; - This option specifies whether or not the client should + This option specifies whether or not the client should solicit routers using the Router Discovery mechanism - defined in RFC 1256. A value of 0 indicates that the - client should not perform router discovery. A value of 1 + defined in RFC 1256. A value of 0 indicates that the + client should not perform router discovery. A value of 1 means that the client should perform router discovery. ooppttiioonn rroouutteerr--ssoolliicciittaattiioonn--aaddddrreessss _i_p_-_a_d_d_r_e_s_s;; - This option specifies the address to which the client + This option specifies the address to which the client should transmit router solicitation requests. - ooppttiioonn ssttaattiicc--rroouutteess _i_p_-_a_d_d_r_e_s_s _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s + ooppttiioonn ssttaattiicc--rroouutteess _i_p_-_a_d_d_r_e_s_s _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s _i_p_-_a_d_d_r_e_s_s ... ];; - This option specifies a list of static routes that the - client should install in its routing cache. If multiple - routes to the same destination are specified, they are + This option specifies a list of static routes that the + client should install in its routing cache. If multiple + routes to the same destination are specified, they are listed in descending order of priority. - - - 15 - - - - - -dhcpd.conf(5) dhcpd.conf(5) - - - The routes consist of a list of IP address pairs. The - first address is the destination address, and the second + The routes consist of a list of IP address pairs. The + first address is the destination address, and the second address is the router for the destination. - The default route (0.0.0.0) is an illegal destination for - a static route. To specify the default route, use the + The default route (0.0.0.0) is an illegal destination for + a static route. To specify the default route, use the rroouutteerrss option. ooppttiioonn ttrraaiilleerr--eennccaappssuullaattiioonn _f_l_a_g;; - This option specifies whether or not the client should - negotiate the use of trailers (RFC 893 [14]) when using - the ARP protocol. A value of 0 indicates that the client - should not attempt to use trailers. A value of 1 means + This option specifies whether or not the client should + negotiate the use of trailers (RFC 893 [14]) when using + the ARP protocol. A value of 0 indicates that the client + should not attempt to use trailers. A value of 1 means that the client should attempt to use trailers. ooppttiioonn aarrpp--ccaacchhee--ttiimmeeoouutt _u_i_n_t_3_2;; @@ -1018,85 +1048,97 @@ dhcpd.conf(5) dhcpd.conf(5) ooppttiioonn iieeeeee880022--33--eennccaappssuullaattiioonn _f_l_a_g;; This option specifies whether or not the client should use - Ethernet Version 2 (RFC 894) or IEEE 802.3 (RFC 1042) + + + + 16 + + + + + +dhcpd.conf(5) dhcpd.conf(5) + + + Ethernet Version 2 (RFC 894) or IEEE 802.3 (RFC 1042) encapsulation if the interface is an Ethernet. A value of - 0 indicates that the client should use RFC 894 encapsula- - tion. A value of 1 means that the client should use RFC + 0 indicates that the client should use RFC 894 encapsula- + tion. A value of 1 means that the client should use RFC 1042 encapsulation. ooppttiioonn ddeeffaauulltt--ttccpp--ttttll _u_i_n_t_8;; - This option specifies the default TTL that the client - should use when sending TCP segments. The minimum value + This option specifies the default TTL that the client + should use when sending TCP segments. The minimum value is 1. ooppttiioonn ttccpp--kkeeeeppaalliivvee--iinntteerrvvaall _u_i_n_t_3_2;; - This option specifies the interval (in seconds) that the - client TCP should wait before sending a keepalive message - on a TCP connection. The time is specified as a 32-bit - unsigned integer. A value of zero indicates that the - client should not generate keepalive messages on connec- + This option specifies the interval (in seconds) that the + client TCP should wait before sending a keepalive message + on a TCP connection. The time is specified as a 32-bit + unsigned integer. A value of zero indicates that the + client should not generate keepalive messages on connec- tions unless specifically requested by an application. ooppttiioonn ttccpp--kkeeeeppaalliivvee--ggaarrbbaaggee _f_l_a_g;; This option specifies the whether or not the client should - send TCP keepalive messages with a octet of garbage for - compatibility with older implementations. A value of 0 + send TCP keepalive messages with a octet of garbage for + compatibility with older implementations. A value of 0 indicates that a garbage octet should not be sent. A value of 1 indicates that a garbage octet should be sent. ooppttiioonn nniiss--ddoommaaiinn _s_t_r_i_n_g;; - - - 16 - - - - - -dhcpd.conf(5) dhcpd.conf(5) - - - This option specifies the name of the client's NIS (Sun - Network Information Services) domain. The domain is for- + This option specifies the name of the client's NIS (Sun + Network Information Services) domain. The domain is for- matted as a character string consisting of characters from the NVT ASCII character set. ooppttiioonn nniiss--sseerrvveerrss _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... ];; - This option specifies a list of IP addresses indicating - NIS servers available to the client. Servers should be + This option specifies a list of IP addresses indicating + NIS servers available to the client. Servers should be listed in order of preference. ooppttiioonn nnttpp--sseerrvveerrss _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... ];; - This option specifies a list of IP addresses indicating - NTP (RFC 1035) servers available to the client. Servers + This option specifies a list of IP addresses indicating + NTP (RFC 1035) servers available to the client. Servers should be listed in order of preference. - ooppttiioonn nneettbbiiooss--nnaammee--sseerrvveerrss _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... + ooppttiioonn nneettbbiiooss--nnaammee--sseerrvveerrss _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... ];; - The NetBIOS name server (NBNS) option specifies a list of + The NetBIOS name server (NBNS) option specifies a list of RFC 1001/1002 NBNS name servers listed in order of prefer- ence. + + + 17 + + + + + +dhcpd.conf(5) dhcpd.conf(5) + + ooppttiioonn nneettbbiiooss--dddd--sseerrvveerr _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... ];; - The NetBIOS datagram distribution server (NBDD) option - specifies a list of RFC 1001/1002 NBDD servers listed in + The NetBIOS datagram distribution server (NBDD) option + specifies a list of RFC 1001/1002 NBDD servers listed in order of preference. ooppttiioonn nneettbbiiooss--nnooddee--ttyyppee _u_i_n_t_8;; - The NetBIOS node type option allows NetBIOS over TCP/IP - clients which are configurable to be configured as - described in RFC 1001/1002. The value is specified as a + The NetBIOS node type option allows NetBIOS over TCP/IP + clients which are configurable to be configured as + described in RFC 1001/1002. The value is specified as a single octet which identifies the client type. A value of - 1 corresponds to a NetBIOS B-node; a value of 2 corre- + 1 corresponds to a NetBIOS B-node; a value of 2 corre- sponds to a P-node; a value of 4 corresponds to an M-node; a value of 8 corresponds to an H-node. @@ -1104,85 +1146,43 @@ dhcpd.conf(5) dhcpd.conf(5) The NetBIOS scope option specifies the NetBIOS over TCP/IP scope parameter for the client as specified in RFC - 1001/1002. See RFC1001, RFC1002, and RFC1035 for charac- + 1001/1002. See RFC1001, RFC1002, and RFC1035 for charac- ter-set restrictions. ooppttiioonn ffoonntt--sseerrvveerrss _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... ];; - This option specifies a list of X Window System Font - servers available to the client. Servers should be listed + This option specifies a list of X Window System Font + servers available to the client. Servers should be listed in order of preference. ooppttiioonn xx--ddiissppllaayy--mmaannaaggeerr _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... ];; - - - 17 - - - - - -dhcpd.conf(5) dhcpd.conf(5) - - - This option specifies a list of systems that are running - the X Window System Display Manager and are available to - the client. Addresses should be listed in order of pref- + This option specifies a list of systems that are running + the X Window System Display Manager and are available to + the client. Addresses should be listed in order of pref- erence. ooppttiioonn ddhhccpp--cclliieenntt--iiddeennttiiffiieerr _d_a_t_a_-_s_t_r_i_n_g;; This option can be used to specify the a DHCP client iden- - tifier in a host declaration, so that dhcpd can find the + tifier in a host declaration, so that dhcpd can find the host record by matching against the client identifier. SSEEEE AALLSSOO - dhcpd.conf(5), dhcpd.leases(5), draft-ietf-dhc- + dhcpd.conf(5), dhcpd.leases(5), draft-ietf-dhc- options-1533update-04.txt, draft-ietf-dhc-dhcp-07.txt. AAUUTTHHOORR ddhhccppdd((88)) was written by Ted Lemon under a - contract with Vixie Labs. Funding for this project was - provided by the Internet Software Corporation. Informa- - tion about the Internet Software Consortium can be found + contract with Vixie Labs. Funding for this project was + provided by the Internet Software Corporation. Informa- + tion about the Internet Software Consortium can be found at hhttttpp::////wwwwww..iisscc..oorrgg//iisscc.. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 18 diff --git a/dhcpd.h b/dhcpd.h index 4336558e9..a966170ca 100644 --- a/dhcpd.h +++ b/dhcpd.h @@ -138,6 +138,7 @@ struct group { int dynamic_bootp; int one_lease_per_client; int get_lease_hostnames; + int use_host_decl_names; struct tree_cache *options [256]; }; diff --git a/dhctoken.h b/dhctoken.h index 5bd491752..bbb02cad9 100644 --- a/dhctoken.h +++ b/dhctoken.h @@ -89,6 +89,7 @@ #define GROUP 293 #define ONE_LEASE_PER_CLIENT 294 #define GET_LEASE_HOSTNAMES 295 +#define USE_HOST_DECL_NAMES 296 #define is_identifier(x) ((x) >= FIRST_TOKEN && \ (x) != STRING && \ diff --git a/includes/dhcpd.h b/includes/dhcpd.h index 4336558e9..a966170ca 100644 --- a/includes/dhcpd.h +++ b/includes/dhcpd.h @@ -138,6 +138,7 @@ struct group { int dynamic_bootp; int one_lease_per_client; int get_lease_hostnames; + int use_host_decl_names; struct tree_cache *options [256]; }; diff --git a/includes/dhctoken.h b/includes/dhctoken.h index 5bd491752..bbb02cad9 100644 --- a/includes/dhctoken.h +++ b/includes/dhctoken.h @@ -89,6 +89,7 @@ #define GROUP 293 #define ONE_LEASE_PER_CLIENT 294 #define GET_LEASE_HOSTNAMES 295 +#define USE_HOST_DECL_NAMES 296 #define is_identifier(x) ((x) >= FIRST_TOKEN && \ (x) != STRING && \ diff --git a/server/confpars.c b/server/confpars.c index e1f08e6fc..3ff58b6dd 100644 --- a/server/confpars.c +++ b/server/confpars.c @@ -42,7 +42,7 @@ #ifndef lint static char copyright[] = -"$Id: confpars.c,v 1.32 1996/09/02 21:16:25 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; +"$Id: confpars.c,v 1.33 1996/09/09 07:04:28 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -143,6 +143,7 @@ void read_leases () | BOOT_UNKNOWN_CLIENTS boolean | ONE_LEASE_PER_CLIENT boolean | GET_LEASE_HOSTNAMES boolean + | USE_HOST_DECL_NAME boolean | NEXT_SERVER ip-addr-or-hostname SEMI | option_parameter | SERVER-IDENTIFIER ip-addr-or-hostname SEMI @@ -290,6 +291,12 @@ int parse_statement (cfile, group, type, host_decl, declaration) group -> get_lease_hostnames = parse_boolean (cfile); break; + case USE_HOST_DECL_NAMES: + if (type == HOST_DECL) + parse_warn ("use-host-decl-names not allowed here."); + group -> use_host_decl_names = parse_boolean (cfile); + break; + case NEXT_SERVER: tree = parse_ip_addr_or_hostname (cfile, 0); if (!tree) @@ -518,7 +525,8 @@ void parse_host_declaration (cfile, group) declaration); } while (1); - if (!host -> group -> options [DHO_HOST_NAME]) { + if (!host -> group -> options [DHO_HOST_NAME] && + host -> group -> use_host_decl_names) { host -> group -> options [DHO_HOST_NAME] = new_tree_cache ("parse_host_declaration"); if (!host -> group -> options [DHO_HOST_NAME]) @@ -1321,15 +1329,22 @@ struct lease *parse_lease_declaration (cfile) lease.uid_len = strlen (val) + 1; lease.uid = (unsigned char *) malloc (lease.uid_len); + if (!lease.uid) { + warn ("no space for uid"); + return (struct lease *)0; + } memcpy (lease.uid, val, lease.uid_len); } else { lease.uid_len = 0; lease.uid = parse_numeric_aggregate (cfile, (unsigned char *)0, &lease.uid_len, ':', 16, 8); - if (!lease.uid) + if (!lease.uid) { + warn ("no space for uid"); return (struct lease *)0; + } if (lease.uid_len == 0) { + lease.uid = (unsigned char *)0; parse_warn ("zero-length uid"); seenbit = 0; break; diff --git a/server/dhcpd.conf.5 b/server/dhcpd.conf.5 index 73b796e54..d4653c497 100644 --- a/server/dhcpd.conf.5 +++ b/server/dhcpd.conf.5 @@ -615,6 +615,39 @@ each address in the lease pool and use that address for the DHCP \fIhostname\fR option. If \fIflag\fR is true, then this lookup is done for all addresses in the current scope. By default, or if \fIflag\fR is false, no lookups are done. +.PP +.B The +.I use-host-decl-names +.B statement +.PP + \fBuse-host-decl-names\fR \fIflag\fR\fB;\fR +.PP +If the \fIuse-host-decl-names\fR parameter is true in a given scope, +then for every host declaration within that scope, the name provided +for the host declaration will be supplied to the client as its +hostname. So, for example, +.PP +.nf + group { + use-host-decl-names on; + + host joe { + hardware ethernet 08:00:2b:4c:29:32; + fixed-address joe.fugue.com; + } + } + +is equivalent to + + host joe { + hardware ethernet 08:00:2b:4c:29:32; + fixed-address joe.fugue.com; + option host-name "joe"; + } +.fi +.PP +An \fIoption host-name\fR statement within a host declaration will +override the use of the name in the host declaration. .SH REFERENCE: OPTION STATEMENTS .PP DHCP \fIoption\fR statements always start with the \fIoption\fR diff --git a/server/dhcpd.conf.cat5 b/server/dhcpd.conf.cat5 index fce81ada7..f6eb58628 100644 --- a/server/dhcpd.conf.cat5 +++ b/server/dhcpd.conf.cat5 @@ -641,17 +641,17 @@ dhcpd.conf(5) dhcpd.conf(5) current scope. By default, or if _f_l_a_g is false, no lookups are done. -RREEFFEERREENNCCEE:: OOPPTTIIOONN SSTTAATTEEMMEENNTTSS - DHCP _o_p_t_i_o_n statements always start with the _o_p_t_i_o_n key- - word, followed by an option name, followed by option data. - The option names and data formats are described below. - It is not necessary to exhaustively specify all DHCP - options - only those options which are needed by clients - must be specified. + TThhee _u_s_e_-_h_o_s_t_-_d_e_c_l_-_n_a_m_e_s ssttaatteemmeenntt - Option data comes in a variety of formats, as defined - below: + uussee--hhoosstt--ddeeccll--nnaammeess _f_l_a_g;; + If the _u_s_e_-_h_o_s_t_-_d_e_c_l_-_n_a_m_e_s parameter is true in a given + scope, then for every host declaration within that scope, + the name provided for the host declaration will be sup- + plied to the client as its hostname. So, for example, + + group { + use-host-decl-names on; @@ -664,178 +664,217 @@ RREEFFEERREENNCCEE:: OOPPTTIIOONN SSTTAATTEEMMEENNTTSS dhcpd.conf(5) dhcpd.conf(5) - The iipp--aaddddrreessss data type can be entered either as an - explicit IP address (e.g., 239.254.197.10) or as a domain + host joe { + hardware ethernet 08:00:2b:4c:29:32; + fixed-address joe.fugue.com; + } + } + + is equivalent to + + host joe { + hardware ethernet 08:00:2b:4c:29:32; + fixed-address joe.fugue.com; + option host-name "joe"; + } + + An _o_p_t_i_o_n _h_o_s_t_-_n_a_m_e statement within a host declaration + will override the use of the name in the host declaration. + +RREEFFEERREENNCCEE:: OOPPTTIIOONN SSTTAATTEEMMEENNTTSS + DHCP _o_p_t_i_o_n statements always start with the _o_p_t_i_o_n key- + word, followed by an option name, followed by option data. + The option names and data formats are described below. + It is not necessary to exhaustively specify all DHCP + options - only those options which are needed by clients + must be specified. + + Option data comes in a variety of formats, as defined + below: + + The iipp--aaddddrreessss data type can be entered either as an + explicit IP address (e.g., 239.254.197.10) or as a domain name (e.g., haagen.isc.org). When entering a domain name, - be sure that that domain name resolves to a single IP + be sure that that domain name resolves to a single IP address. - The iinntt3322 data type specifies a signed 32-bit integer. + The iinntt3322 data type specifies a signed 32-bit integer. The uuiinntt3322 data type specifies an unsigned 32-bit integer. The iinntt1166 and uuiinntt1166 data types specify signed and - unsigned 16-bit integers. The iinntt88 and uuiinntt88 data types - specify signed and unsigned 8-bit integers. Unsigned + unsigned 16-bit integers. The iinntt88 and uuiinntt88 data types + specify signed and unsigned 8-bit integers. Unsigned 8-bit integers are also sometimes referred to as octets. - The ssttrriinngg data type specifies an NVT ASCII string, which - must be enclosed in double quotes - for example, to spec- + The ssttrriinngg data type specifies an NVT ASCII string, which + must be enclosed in double quotes - for example, to spec- ify a domain-name option, the syntax would be option domain-name "isc.org"; - The ffllaagg data type specifies a boolean value. Booleans - can be either true or false (or on or off, if that makes + The ffllaagg data type specifies a boolean value. Booleans + can be either true or false (or on or off, if that makes more sense to you). - The ddaattaa--ssttrriinngg data type specifies either an NVT ASCII - string enclosed in double quotes, or a series of octets - specified in hexadecimal, seperated by colons. For exam- - ple: + The ddaattaa--ssttrriinngg data type specifies either an NVT ASCII + string enclosed in double quotes, or a series of octets + specified in hexadecimal, seperated by colons. For - option client-identifier "CLIENT-FOO"; - or - option client-identifier 43:4c:49:45:54:2d:46:4f:4f; - The documentation for the various options mentioned below - is taken from the latest IETF draft document on DHCP - options. Options which are not listed by name may be - defined by the name option-_n_n_n, where _n_n_n _i_s _t_h_e _d_e_c_i_m_a_l - _n_u_m_b_e_r _o_f _t_h_e _o_p_t_i_o_n _c_o_d_e_. _T_h_e_s_e _o_p_t_i_o_n_s _m_a_y _b_e _f_o_l_l_o_w_e_d - _e_i_t_h_e_r _b_y _a _s_t_r_i_n_g_, _e_n_c_l_o_s_e_d _i_n _q_u_o_t_e_s_, _o_r _b_y _a _s_e_r_i_e_s _o_f - _o_c_t_e_t_s_, _e_x_p_r_e_s_s_e_d _a_s _t_w_o_-_d_i_g_i_t _h_e_x_a_d_e_c_i_m_a_l _n_u_m_b_e_r_s _s_e_p_e_r_- - _a_t_e_d _b_y _c_o_l_o_n_s_. _F_o_r _e_x_a_m_p_l_e_: - option option-133 "my-option-133-text"; - option option-129 1:54:c9:2b:47; + 11 - Because dhcpd does not know the format of these undefined - option codes, no checking is done to ensure the correct- - ness of the entered data. - The standard options are: - ooppttiioonn ssuubbnneett--mmaasskk _i_p_-_a_d_d_r_e_s_s;; - The subnet mask option specifies the client's subnet mask - as per RFC 950. If no subnet mask option is provided +dhcpd.conf(5) dhcpd.conf(5) - 11 + example: + option client-identifier "CLIENT-FOO"; + or + option client-identifier 43:4c:49:45:54:2d:46:4f:4f; + The documentation for the various options mentioned below + is taken from the latest IETF draft document on DHCP + options. Options which are not listed by name may be + defined by the name option-_n_n_n, where _n_n_n _i_s _t_h_e _d_e_c_i_m_a_l + _n_u_m_b_e_r _o_f _t_h_e _o_p_t_i_o_n _c_o_d_e_. _T_h_e_s_e _o_p_t_i_o_n_s _m_a_y _b_e _f_o_l_l_o_w_e_d + _e_i_t_h_e_r _b_y _a _s_t_r_i_n_g_, _e_n_c_l_o_s_e_d _i_n _q_u_o_t_e_s_, _o_r _b_y _a _s_e_r_i_e_s _o_f + _o_c_t_e_t_s_, _e_x_p_r_e_s_s_e_d _a_s _t_w_o_-_d_i_g_i_t _h_e_x_a_d_e_c_i_m_a_l _n_u_m_b_e_r_s _s_e_p_e_r_- + _a_t_e_d _b_y _c_o_l_o_n_s_. _F_o_r _e_x_a_m_p_l_e_: + option option-133 "my-option-133-text"; + option option-129 1:54:c9:2b:47; + Because dhcpd does not know the format of these undefined + option codes, no checking is done to ensure the correct- + ness of the entered data. -dhcpd.conf(5) dhcpd.conf(5) + The standard options are: + ooppttiioonn ssuubbnneett--mmaasskk _i_p_-_a_d_d_r_e_s_s;; - anywhere in scope, as a last resort dhcpd will use the - subnet mask from the subnet declaration for the network on - which an address is being assigned. However, _a_n_y subnet- - mask option declaration that is in scope for the address - being assigned will override the subnet mask specified in - the subnet declaration. + The subnet mask option specifies the client's subnet mask + as per RFC 950. If no subnet mask option is provided any- + where in scope, as a last resort dhcpd will use the subnet + mask from the subnet declaration for the network on which + an address is being assigned. However, _a_n_y subnet-mask + option declaration that is in scope for the address being + assigned will override the subnet mask specified in the + subnet declaration. ooppttiioonn ttiimmee--ooffffsseett _i_n_t_3_2;; - The time-offset option specifies the offset of the + The time-offset option specifies the offset of the client's subnet in seconds from Coordinated Universal Time (UTC). ooppttiioonn rroouutteerrss _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... ];; - The routers option specifies a list of IP addresses for - routers on the client's subnet. Routers should be listed + The routers option specifies a list of IP addresses for + routers on the client's subnet. Routers should be listed in order of preference. ooppttiioonn ttiimmee--sseerrvveerrss _i_p_-_a_d_d_r_e_s_s _[_, _i_p_-_a_d_d_r_e_s_s ... ];; - The time-server option specifies a list of RFC 868 time + The time-server option specifies a list of RFC 868 time servers available to the client. Servers should be listed in order of preference. ooppttiioonn nnaammee--sseerrvveerrss _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... ]; - The name-servers option specifies a list of IEN 116 name + + + 12 + + + + + +dhcpd.conf(5) dhcpd.conf(5) + + + The name-servers option specifies a list of IEN 116 name servers available to the client. Servers should be listed in order of preference. - ooppttiioonn ddoommaaiinn--nnaammee--sseerrvveerrss _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... + ooppttiioonn ddoommaaiinn--nnaammee--sseerrvveerrss _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... ];; - The domain-name-servers option specifies a list of Domain - Name System (STD 13, RFC 1035) name servers available to - the client. Servers should be listed in order of prefer- + The domain-name-servers option specifies a list of Domain + Name System (STD 13, RFC 1035) name servers available to + the client. Servers should be listed in order of prefer- ence. ooppttiioonn lloogg--sseerrvveerrss _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... ];; - The log-server option specifies a list of MIT-LCS UDP log + The log-server option specifies a list of MIT-LCS UDP log servers available to the client. Servers should be listed in order of preference. ooppttiioonn ccooookkiiee--sseerrvveerrss _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... ];; - The cookie server option specifies a list of RFC 865 + The cookie server option specifies a list of RFC 865 cookie servers available to the client. Servers should be listed in order of preference. ooppttiioonn llpprr--sseerrvveerrss _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... ];; - The LPR server option specifies a list of RFC 1179 line - - - - 12 - - - - - -dhcpd.conf(5) dhcpd.conf(5) - - - printer servers available to the client. Servers should + The LPR server option specifies a list of RFC 1179 line + printer servers available to the client. Servers should be listed in order of preference. ooppttiioonn iimmpprreessss--sseerrvveerrss _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... ];; - The impress-server option specifies a list of Imagen - Impress servers available to the client. Servers should + The impress-server option specifies a list of Imagen + Impress servers available to the client. Servers should be listed in order of preference. ooppttiioonn rreessoouurrccee--llooccaattiioonn--sseerrvveerrss _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... ];; - This option specifies a list of RFC 887 Resource Location + This option specifies a list of RFC 887 Resource Location servers available to the client. Servers should be listed in order of preference. ooppttiioonn hhoosstt--nnaammee _s_t_r_i_n_g;; - This option specifies the name of the client. The name + This option specifies the name of the client. The name may or may not be qualified with the local domain name (it is preferable to use the domain-name option to specify the - domain name). See RFC 1035 for character set restric- + domain name). See RFC 1035 for character set restric- tions. ooppttiioonn bboooott--ssiizzee _u_i_n_t_1_6;; - This option specifies the length in 512-octet blocks of + This option specifies the length in 512-octet blocks of + + + + 13 + + + + + +dhcpd.conf(5) dhcpd.conf(5) + + the default boot image for the client. ooppttiioonn mmeerriitt--dduummpp _s_t_r_i_n_g;; This option specifies the path-name of a file to which the - client's core image should be dumped in the event the - client crashes. The path is formatted as a character + client's core image should be dumped in the event the + client crashes. The path is formatted as a character string consisting of characters from the NVT ASCII charac- ter set. ooppttiioonn ddoommaaiinn--nnaammee _s_t_r_i_n_g;; - This option specifies the domain name that client should + This option specifies the domain name that client should use when resolving hostnames via the Domain Name System. ooppttiioonn sswwaapp--sseerrvveerr _i_p_-_a_d_d_r_e_s_s;; @@ -844,170 +883,161 @@ dhcpd.conf(5) dhcpd.conf(5) ooppttiioonn rroooott--ppaatthh _s_t_r_i_n_g;; - This option specifies the path-name that contains the - client's root disk. The path is formatted as a character + This option specifies the path-name that contains the + client's root disk. The path is formatted as a character string consisting of characters from the NVT ASCII charac- ter set. ooppttiioonn iipp--ffoorrwwaarrddiinngg _f_l_a_g;; + This option specifies whether the client should configure + its IP layer for packet forwarding. A value of 0 means + disable IP forwarding, and a value of 1 means enable IP + forwarding. + ooppttiioonn nnoonn--llooccaall--ssoouurrccee--rroouuttiinngg _f_l_a_g;; - 13 + This option specifies whether the client should configure + its IP layer to allow forwarding of datagrams with non- + local source routes (see Section 3.3.5 of [4] for a dis- + cussion of this topic). A value of 0 means disallow for- + warding of such datagrams, and a value of 1 means allow + forwarding. + + ooppttiioonn ppoolliiccyy--ffiilltteerr _i_p_-_a_d_d_r_e_s_s _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s + _i_p_-_a_d_d_r_e_s_s ... ];; + This option specifies policy filters for non-local source + routing. The filters consist of a list of IP addresses + and masks which specify destination/mask pairs with which + to filter incoming source routes. + Any source routed datagram whose next-hop address does not + match one of the filters should be discarded by the + client. -dhcpd.conf(5) dhcpd.conf(5) + 14 - This option specifies whether the client should configure - its IP layer for packet forwarding. A value of 0 means - disable IP forwarding, and a value of 1 means enable IP - forwarding. - ooppttiioonn nnoonn--llooccaall--ssoouurrccee--rroouuttiinngg _f_l_a_g;; - This option specifies whether the client should configure - its IP layer to allow forwarding of datagrams with non- - local source routes (see Section 3.3.5 of [4] for a dis- - cussion of this topic). A value of 0 means disallow for- - warding of such datagrams, and a value of 1 means allow - forwarding. - ooppttiioonn ppoolliiccyy--ffiilltteerr _i_p_-_a_d_d_r_e_s_s _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s - _i_p_-_a_d_d_r_e_s_s ... ];; - This option specifies policy filters for non-local source - routing. The filters consist of a list of IP addresses - and masks which specify destination/mask pairs with which - to filter incoming source routes. +dhcpd.conf(5) dhcpd.conf(5) - Any source routed datagram whose next-hop address does not - match one of the filters should be discarded by the - client. See STD 3 (RFC1122) for further information. ooppttiioonn mmaaxx--ddggrraamm--rreeaasssseemmbbllyy _u_i_n_t_1_6;; - This option specifies the maximum size datagram that the - client should be prepared to reassemble. The minimum + This option specifies the maximum size datagram that the + client should be prepared to reassemble. The minimum value legal value is 576. ooppttiioonn ddeeffaauulltt--iipp--ttttll _u_i_n_t_8_; - This option specifies the default time-to-live that the + This option specifies the default time-to-live that the client should use on outgoing datagrams. ooppttiioonn ppaatthh--mmttuu--aaggiinngg--ttiimmeeoouutt _u_i_n_t_3_2;; This option specifies the timeout (in seconds) to use when - aging Path MTU values discovered by the mechanism defined + aging Path MTU values discovered by the mechanism defined in RFC 1191. ooppttiioonn ppaatthh--mmttuu--ppllaatteeaauu--ttaabbllee _u_i_n_t_1_6 [,, _u_i_n_t_1_6 ... ];; - This option specifies a table of MTU sizes to use when + This option specifies a table of MTU sizes to use when performing Path MTU Discovery as defined in RFC 1191. The - table is formatted as a list of 16-bit unsigned integers, - ordered from smallest to largest. The minimum MTU value + table is formatted as a list of 16-bit unsigned integers, + ordered from smallest to largest. The minimum MTU value cannot be smaller than 68. ooppttiioonn iinntteerrffaaccee--mmttuu _u_i_n_t_1_6;; - - - 14 - - - - - -dhcpd.conf(5) dhcpd.conf(5) - - - This option specifies the MTU to use on this interface. + This option specifies the MTU to use on this interface. The minimum legal value for the MTU is 68. ooppttiioonn aallll--ssuubbnneettss--llooccaall _f_l_a_g;; This option specifies whether or not the client may assume - that all subnets of the IP network to which the client is - connected use the same MTU as the subnet of that network - to which the client is directly connected. A value of 1 + that all subnets of the IP network to which the client is + connected use the same MTU as the subnet of that network + to which the client is directly connected. A value of 1 indicates that all subnets share the same MTU. A value of 0 means that the client should assume that some subnets of the directly connected network may have smaller MTUs. ooppttiioonn bbrrooaaddccaasstt--aaddddrreessss _i_p_-_a_d_d_r_e_s_s;; - This option specifies the broadcast address in use on the + This option specifies the broadcast address in use on the client's subnet. Legal values for broadcast addresses are specified in section 3.2.1.3 of STD 3 (RFC1122). ooppttiioonn ppeerrffoorrmm--mmaasskk--ddiissccoovveerryy _f_l_a_g;; - This option specifies whether or not the client should - perform subnet mask discovery using ICMP. A value of 0 - indicates that the client should not perform mask discov- - ery. A value of 1 means that the client should perform + This option specifies whether or not the client should + perform subnet mask discovery using ICMP. A value of 0 + indicates that the client should not perform mask discov- + ery. A value of 1 means that the client should perform + + + + 15 + + + + + +dhcpd.conf(5) dhcpd.conf(5) + + mask discovery. ooppttiioonn mmaasskk--ssuupppplliieerr _f_l_a_g;; - This option specifies whether or not the client should - respond to subnet mask requests using ICMP. A value of 0 - indicates that the client should not respond. A value of + This option specifies whether or not the client should + respond to subnet mask requests using ICMP. A value of 0 + indicates that the client should not respond. A value of 1 means that the client should respond. ooppttiioonn rroouutteerr--ddiissccoovveerryy _f_l_a_g;; - This option specifies whether or not the client should + This option specifies whether or not the client should solicit routers using the Router Discovery mechanism - defined in RFC 1256. A value of 0 indicates that the - client should not perform router discovery. A value of 1 + defined in RFC 1256. A value of 0 indicates that the + client should not perform router discovery. A value of 1 means that the client should perform router discovery. ooppttiioonn rroouutteerr--ssoolliicciittaattiioonn--aaddddrreessss _i_p_-_a_d_d_r_e_s_s;; - This option specifies the address to which the client + This option specifies the address to which the client should transmit router solicitation requests. - ooppttiioonn ssttaattiicc--rroouutteess _i_p_-_a_d_d_r_e_s_s _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s + ooppttiioonn ssttaattiicc--rroouutteess _i_p_-_a_d_d_r_e_s_s _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s _i_p_-_a_d_d_r_e_s_s ... ];; - This option specifies a list of static routes that the - client should install in its routing cache. If multiple - routes to the same destination are specified, they are + This option specifies a list of static routes that the + client should install in its routing cache. If multiple + routes to the same destination are specified, they are listed in descending order of priority. - - - 15 - - - - - -dhcpd.conf(5) dhcpd.conf(5) - - - The routes consist of a list of IP address pairs. The - first address is the destination address, and the second + The routes consist of a list of IP address pairs. The + first address is the destination address, and the second address is the router for the destination. - The default route (0.0.0.0) is an illegal destination for - a static route. To specify the default route, use the + The default route (0.0.0.0) is an illegal destination for + a static route. To specify the default route, use the rroouutteerrss option. ooppttiioonn ttrraaiilleerr--eennccaappssuullaattiioonn _f_l_a_g;; - This option specifies whether or not the client should - negotiate the use of trailers (RFC 893 [14]) when using - the ARP protocol. A value of 0 indicates that the client - should not attempt to use trailers. A value of 1 means + This option specifies whether or not the client should + negotiate the use of trailers (RFC 893 [14]) when using + the ARP protocol. A value of 0 indicates that the client + should not attempt to use trailers. A value of 1 means that the client should attempt to use trailers. ooppttiioonn aarrpp--ccaacchhee--ttiimmeeoouutt _u_i_n_t_3_2;; @@ -1018,85 +1048,97 @@ dhcpd.conf(5) dhcpd.conf(5) ooppttiioonn iieeeeee880022--33--eennccaappssuullaattiioonn _f_l_a_g;; This option specifies whether or not the client should use - Ethernet Version 2 (RFC 894) or IEEE 802.3 (RFC 1042) + + + + 16 + + + + + +dhcpd.conf(5) dhcpd.conf(5) + + + Ethernet Version 2 (RFC 894) or IEEE 802.3 (RFC 1042) encapsulation if the interface is an Ethernet. A value of - 0 indicates that the client should use RFC 894 encapsula- - tion. A value of 1 means that the client should use RFC + 0 indicates that the client should use RFC 894 encapsula- + tion. A value of 1 means that the client should use RFC 1042 encapsulation. ooppttiioonn ddeeffaauulltt--ttccpp--ttttll _u_i_n_t_8;; - This option specifies the default TTL that the client - should use when sending TCP segments. The minimum value + This option specifies the default TTL that the client + should use when sending TCP segments. The minimum value is 1. ooppttiioonn ttccpp--kkeeeeppaalliivvee--iinntteerrvvaall _u_i_n_t_3_2;; - This option specifies the interval (in seconds) that the - client TCP should wait before sending a keepalive message - on a TCP connection. The time is specified as a 32-bit - unsigned integer. A value of zero indicates that the - client should not generate keepalive messages on connec- + This option specifies the interval (in seconds) that the + client TCP should wait before sending a keepalive message + on a TCP connection. The time is specified as a 32-bit + unsigned integer. A value of zero indicates that the + client should not generate keepalive messages on connec- tions unless specifically requested by an application. ooppttiioonn ttccpp--kkeeeeppaalliivvee--ggaarrbbaaggee _f_l_a_g;; This option specifies the whether or not the client should - send TCP keepalive messages with a octet of garbage for - compatibility with older implementations. A value of 0 + send TCP keepalive messages with a octet of garbage for + compatibility with older implementations. A value of 0 indicates that a garbage octet should not be sent. A value of 1 indicates that a garbage octet should be sent. ooppttiioonn nniiss--ddoommaaiinn _s_t_r_i_n_g;; - - - 16 - - - - - -dhcpd.conf(5) dhcpd.conf(5) - - - This option specifies the name of the client's NIS (Sun - Network Information Services) domain. The domain is for- + This option specifies the name of the client's NIS (Sun + Network Information Services) domain. The domain is for- matted as a character string consisting of characters from the NVT ASCII character set. ooppttiioonn nniiss--sseerrvveerrss _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... ];; - This option specifies a list of IP addresses indicating - NIS servers available to the client. Servers should be + This option specifies a list of IP addresses indicating + NIS servers available to the client. Servers should be listed in order of preference. ooppttiioonn nnttpp--sseerrvveerrss _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... ];; - This option specifies a list of IP addresses indicating - NTP (RFC 1035) servers available to the client. Servers + This option specifies a list of IP addresses indicating + NTP (RFC 1035) servers available to the client. Servers should be listed in order of preference. - ooppttiioonn nneettbbiiooss--nnaammee--sseerrvveerrss _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... + ooppttiioonn nneettbbiiooss--nnaammee--sseerrvveerrss _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... ];; - The NetBIOS name server (NBNS) option specifies a list of + The NetBIOS name server (NBNS) option specifies a list of RFC 1001/1002 NBNS name servers listed in order of prefer- ence. + + + 17 + + + + + +dhcpd.conf(5) dhcpd.conf(5) + + ooppttiioonn nneettbbiiooss--dddd--sseerrvveerr _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... ];; - The NetBIOS datagram distribution server (NBDD) option - specifies a list of RFC 1001/1002 NBDD servers listed in + The NetBIOS datagram distribution server (NBDD) option + specifies a list of RFC 1001/1002 NBDD servers listed in order of preference. ooppttiioonn nneettbbiiooss--nnooddee--ttyyppee _u_i_n_t_8;; - The NetBIOS node type option allows NetBIOS over TCP/IP - clients which are configurable to be configured as - described in RFC 1001/1002. The value is specified as a + The NetBIOS node type option allows NetBIOS over TCP/IP + clients which are configurable to be configured as + described in RFC 1001/1002. The value is specified as a single octet which identifies the client type. A value of - 1 corresponds to a NetBIOS B-node; a value of 2 corre- + 1 corresponds to a NetBIOS B-node; a value of 2 corre- sponds to a P-node; a value of 4 corresponds to an M-node; a value of 8 corresponds to an H-node. @@ -1104,85 +1146,43 @@ dhcpd.conf(5) dhcpd.conf(5) The NetBIOS scope option specifies the NetBIOS over TCP/IP scope parameter for the client as specified in RFC - 1001/1002. See RFC1001, RFC1002, and RFC1035 for charac- + 1001/1002. See RFC1001, RFC1002, and RFC1035 for charac- ter-set restrictions. ooppttiioonn ffoonntt--sseerrvveerrss _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... ];; - This option specifies a list of X Window System Font - servers available to the client. Servers should be listed + This option specifies a list of X Window System Font + servers available to the client. Servers should be listed in order of preference. ooppttiioonn xx--ddiissppllaayy--mmaannaaggeerr _i_p_-_a_d_d_r_e_s_s [,, _i_p_-_a_d_d_r_e_s_s ... ];; - - - 17 - - - - - -dhcpd.conf(5) dhcpd.conf(5) - - - This option specifies a list of systems that are running - the X Window System Display Manager and are available to - the client. Addresses should be listed in order of pref- + This option specifies a list of systems that are running + the X Window System Display Manager and are available to + the client. Addresses should be listed in order of pref- erence. ooppttiioonn ddhhccpp--cclliieenntt--iiddeennttiiffiieerr _d_a_t_a_-_s_t_r_i_n_g;; This option can be used to specify the a DHCP client iden- - tifier in a host declaration, so that dhcpd can find the + tifier in a host declaration, so that dhcpd can find the host record by matching against the client identifier. SSEEEE AALLSSOO - dhcpd.conf(5), dhcpd.leases(5), draft-ietf-dhc- + dhcpd.conf(5), dhcpd.leases(5), draft-ietf-dhc- options-1533update-04.txt, draft-ietf-dhc-dhcp-07.txt. AAUUTTHHOORR ddhhccppdd((88)) was written by Ted Lemon under a - contract with Vixie Labs. Funding for this project was - provided by the Internet Software Corporation. Informa- - tion about the Internet Software Consortium can be found + contract with Vixie Labs. Funding for this project was + provided by the Internet Software Corporation. Informa- + tion about the Internet Software Consortium can be found at hhttttpp::////wwwwww..iisscc..oorrgg//iisscc.. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 18