diff --unified --recursive dhcp-2.0b1pl6-orig/CHANGES dhcp-2.0b1pl6/CHANGES --- dhcp-2.0b1pl6-orig/CHANGES Tue Jun 10 01:51:49 1997 +++ dhcp-2.0b1pl6/CHANGES Mon Aug 30 01:29:36 1999 @@ -1,3 +1,8 @@ +990830 + +- Added -ql (quiet log) command-line option to reduce the volume of + information sent to the syslog. + 970609 - Don't trust hostnames provided by client - Win95 allows *spaces* in diff --unified --recursive dhcp-2.0b1pl6-orig/common/errwarn.c dhcp-2.0b1pl6/common/errwarn.c --- dhcp-2.0b1pl6-orig/common/errwarn.c Fri May 9 04:03:44 1997 +++ dhcp-2.0b1pl6/common/errwarn.c Mon Aug 30 01:23:37 1999 @@ -48,6 +48,8 @@ #include "dhcpd.h" #include +int quietlog = 0; + static void do_percentm PROTO ((char *obuf, char *ibuf)); static char mbuf [1024]; @@ -122,6 +124,8 @@ va_dcl { va_list list; + + if (quietlog == 1) return 0; do_percentm (fbuf, fmt); diff --unified --recursive dhcp-2.0b1pl6-orig/server/dhcpd.8 dhcp-2.0b1pl6/server/dhcpd.8 --- dhcp-2.0b1pl6-orig/server/dhcpd.8 Mon Oct 20 17:38:13 1997 +++ dhcp-2.0b1pl6/server/dhcpd.8 Mon Aug 30 01:26:43 1999 @@ -54,6 +54,9 @@ .B -q ] [ +.B -ql +] +[ .B -cf .I config-file ] @@ -187,6 +190,12 @@ startup. To avoid printing this message, the .B -q flag may be specified. +.PP +When there are many clients or frequent renewal requests, the amount of +information logged by dhcpd can get quite overwhelming. The +.B -ql +(quiet log) flag may be used to turn off logging for normal events. +Errors and warnings will still be logged. .SH CONFIGURATION The syntax of the dhcpd.conf(5) file is discussed seperately. This section should be used as an overview of the configuration process, diff --unified --recursive dhcp-2.0b1pl6-orig/server/dhcpd.c dhcp-2.0b1pl6/server/dhcpd.c --- dhcp-2.0b1pl6-orig/server/dhcpd.c Fri Jun 26 17:11:01 1998 +++ dhcp-2.0b1pl6/server/dhcpd.c Mon Aug 30 01:23:51 1999 @@ -93,6 +93,7 @@ int daemon = 1; #endif int quiet = 0; + extern int quietlog; /* Initially, log errors to stderr as well as to syslogd. */ #ifdef SYSLOG_4_2 @@ -152,6 +153,8 @@ } else if (!strcmp (argv [i], "-q")) { quiet = 1; quiet_interface_discovery = 1; + } else if (!strcmp (argv [i], "-ql")) { + quietlog = 1; } else if (argv [i][0] == '-') { usage (); } else { diff --unified --recursive dhcp-2.0b1pl6-orig/server/dhcpd.cat8 dhcp-2.0b1pl6/server/dhcpd.cat8 --- dhcp-2.0b1pl6-orig/server/dhcpd.cat8 Sat Nov 22 02:15:53 1997 +++ dhcp-2.0b1pl6/server/dhcpd.cat8 Mon Aug 30 01:28:07 1999 @@ -8,15 +8,15 @@ dhcpd - Dynamic Host Configuration Protocol Server SSYYNNOOPPSSIISS - ddhhccppdd [ --pp _p_o_r_t ] [ --ff ] [ --dd ] [ --qq ] [ --ccff _c_o_n_f_i_g_-_f_i_l_e ] - [ --llff _l_e_a_s_e_-_f_i_l_e ] [ _i_f_0 [ _._._._i_f_N ] ] + ddhhccppdd [ --pp _p_o_r_t ] [ --ff ] [ --dd ] [ --qq ] [ --qqll ] [ --ccff _c_o_n_- + _f_i_g_-_f_i_l_e ] [ --llff _l_e_a_s_e_-_f_i_l_e ] [ _i_f_0 [ _._._._i_f_N ] ] DDEESSCCRRIIPPTTIIOONN The Internet Software Consortium DHCP Server, dhcpd, implements the Dynamic Host Configuration Protocol (DHCP) and the Internet Bootstrap Protocol (BOOTP). DHCP allows hosts on a TCP/IP network to request and be assigned IP - addresses, and also to discover information about the net­ + addresses, and also to discover information about the net- work to which they are attached. BOOTP provides similar functionality, with certain restrictions. @@ -24,7 +24,7 @@ The DHCP protocol allows a host which is unknown to the network administrator to be automatically assigned a new IP address out of a pool of IP addresses for its network. - In order for this to work, the network administrator allo­ + In order for this to work, the network administrator allo- cates address pools in each subnet and enters them into the dhcpd.conf(5) file. @@ -52,7 +52,7 @@ refresh its memory about what leases have been assigned. New leases are appended to the end of the dhcpd.leases - file. In order to prevent the file from becoming arbi­ + file. In order to prevent the file from becoming arbi- trarily large, from time to time dhcpd creates a new dhcpd.leases file from its in-core lease database. Once this file has been written to disk, the old file is @@ -80,7 +80,7 @@ longer needed. It is still possible to dynamically assign addresses to BOOTP clients, but some administrative process for reclaiming addresses is required. By - default, leases are granted to BOOTP clients in perpetu­ + default, leases are granted to BOOTP clients in perpetu- ity, although the network administrator may set an earlier cutoff date or a shorter lease length for BOOTP leases if that makes sense. @@ -93,7 +93,7 @@ Whenever changes are made to the dhcpd.conf file, dhcpd must be restarted. To restart dhcpd, send a SIGTERM (signal 15) to the process ID contained in - _/_v_a_r_/_r_u_n_/_d_h_c_p_d_._p_i_d, and then re-invoke dhcpd. Because the + _R_U_N_D_I_R_/_d_h_c_p_d_._p_i_d, and then re-invoke dhcpd. Because the DHCP server database is not as lightweight as a BOOTP database, dhcpd does not automatically restart itself when it sees a change to the dhcpd.conf file. @@ -115,8 +115,8 @@ unable to identify non-broadcast interfaces, but should not be required on other systems. If no interface names are specified on the command line dhcpd will identify all - network interfaces which are up, elimininating non-broad­ - cast interfaces if possible, and listen for DHCP broad­ + network interfaces which are up, elimininating non-broad- + cast interfaces if possible, and listen for DHCP broad- casts on each interface. If dhcpd should listen on a port other than the standard @@ -142,10 +142,10 @@ under a debugger, or when running it out of inittab on System V systems. - To have dhcpd log to the standard error descriptor, spec­ + To have dhcpd log to the standard error descriptor, spec- ify the --dd flag. This can be useful for debugging, and also at sites where a complete log of all dhcp activity - must be kept but syslogd is not reliable or otherwise can­ + must be kept but syslogd is not reliable or otherwise can- not be used. Normally, dhcpd will log all output using the syslog(3) function with the log facility set to LOG_DAEMON. @@ -162,8 +162,14 @@ copyright message on startup. To avoid printing this message, the --qq flag may be specified. + When there are many clients or frequent renewal requests, + the amount of information logged by dhcpd can get quite + overwhelming. The --qqll (quiet log) flag may be used to turn + off logging for normal events. Errors and warnings will + still be logged. + CCOONNFFIIGGUURRAATTIIOONN - The syntax of the dhcpd.conf(5) file is discussed seper­ + The syntax of the dhcpd.conf(5) file is discussed seper- ately. This section should be used as an overview of the configuration process, and the dhcpd.conf(5) documentation should be consulted for detailed reference information. @@ -171,7 +177,7 @@ SSuubbnneettss dhcpd needs to know the subnet numbers and netmasks of all - subnets for which it will be providing service. In addi­ + subnets for which it will be providing service. In addi- tion, in order to dynamically allocate addresses, it must be assigned one or more ranges of addresses on each subnet which it can in turn assign to client hosts as they boot. @@ -184,12 +190,6 @@ Multiple address ranges may be specified like this: - subnet 239.252.197.0 netmask 255.255.255.0 { - range 239.252.197.10 239.252.197.107; - range 239.252.197.113 239.252.197.250; - } - - If a subnet will only be provided with BOOTP service and @@ -202,6 +202,12 @@ dhcpd(8) dhcpd(8) + subnet 239.252.197.0 netmask 255.255.255.0 { + range 239.252.197.10 239.252.197.107; + range 239.252.197.113 239.252.197.250; + } + + If a subnet will only be provided with BOOTP service and no dynamic address assignment, the range clause can be left out entirely, but the subnet statement must appear. @@ -215,10 +221,10 @@ For example, in an office environment where systems are added from time to time and removed from time to time, but move relatively infrequently, it might make sense to allow - lease times of a month of more. In a final test environ­ + lease times of a month of more. In a final test environ- ment on a manufacturing floor, it may make more sense to assign a maximum lease length of 30 minutes - enough time - to go through a simple test procedure on a network appli­ + to go through a simple test procedure on a network appli- ance before packaging it up for delivery. It is possible to specify two lease lengths: the default @@ -250,12 +256,6 @@ specify the client network interface's hardware address and the IP address to assign to that client. If the client needs to be able to load a boot file from the - server, that file's name must be specified. A simple - bootp client declaration might look like this: - - host haagen { - hardware ethernet 08:00:2b:4c:59:23; - fixed-address 239.252.197.9; @@ -268,6 +268,12 @@ dhcpd(8) dhcpd(8) + server, that file's name must be specified. A simple + bootp client declaration might look like this: + + host haagen { + hardware ethernet 08:00:2b:4c:59:23; + fixed-address 239.252.197.9; filename "/tftpboot/haagen.boot"; } @@ -283,7 +289,7 @@ for BOOTP clients, also on a per-client basis. In the event that a BOOTP client declaration specifies options that are also specified in its subnet declaration, the - options specified in the client declaration take prece­ + options specified in the client declaration take prece- dence. An reasonably complete DHCP configuration might look something like this: @@ -297,7 +303,7 @@ option domain-name "isc.org"; } - A bootp host on that subnet that needs to be in a differ­ + A bootp host on that subnet that needs to be in a differ- ent domain and use a different name server might be declared as follows: @@ -313,15 +319,9 @@ is provided in dhcpd.conf(5). FFIILLEESS - //eettcc//ddhhccppdd..ccoonnff,, //vvaarr//ddbb//ddhhccppdd..lleeaasseess,, //vvaarr//rruunn//ddhhccppdd..ppiidd,, - //vvaarr//ddbb//ddhhccppdd..lleeaasseess~~.. + EETTCCDDIIRR//ddhhccppdd..ccoonnff,, DDBBDDIIRR//ddhhccppdd..lleeaasseess,, RRUUNNDDIIRR//ddhhccppdd..ppiidd,, + DDBBDDIIRR//ddhhccppdd..lleeaasseess~~.. -SSEEEE AALLSSOO - dhclient(8), dhcrelay(8), dhcpd.conf(5), dhcpd.leases(5) - -AAUUTTHHOORR - ddhhccppdd((88)) was written by Ted Lemon under a - contract with Vixie Labs. Funding for this project was @@ -334,15 +334,15 @@ dhcpd(8) dhcpd(8) - provided by the Internet Software Corporation. Informa­ +SSEEEE AALLSSOO + dhclient(8), dhcrelay(8), dhcpd.conf(5), dhcpd.leases(5) + +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 at hhttttpp::////wwwwww..iisscc..oorrgg//iisscc.. - - - - - -