From owner-freebsd-questions@freebsd.org Sat Mar 5 12:48:59 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9A549DBB18 for ; Sat, 5 Mar 2016 12:48:59 +0000 (UTC) (envelope-from gandalf@shopzeus.com) Received: from shopzeus.com (shopzeus.com [87.229.70.149]) by mx1.freebsd.org (Postfix) with ESMTP id 5EA903CD for ; Sat, 5 Mar 2016 12:48:59 +0000 (UTC) (envelope-from gandalf@shopzeus.com) Received: from [127.127.127.127] (localhost [127.127.127.127]) (Authenticated sender: gandalf) by shopzeus.com (Postfix) with ESMTPSA id 8A717889C486 for ; Sat, 5 Mar 2016 07:48:49 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shopzeus.com; s=shopzeus_com; t=1457182130; bh=NaiWsE5GHvPd+u7+zfB/7q8v/hE7UcA17wTMBUO3D1o=; h=To:From:Subject:Date:From; b=dJB3Cs16t1BvqpaMDt3IcQeG04sqEEyemEFl849H/hyfiE0Ei7ohUdWznarzNQfXv apFqL6gxQxr1z/QG/akmbXeFmvdgAiWGcHATOJEZbdH5N4/Gc3mS/uLNCJJpzvmpar Az+lEonmBLMjK5XP9oAFRcV+ZyDH0FqG58QGI3IO+P6FqIjlV8ErbTBpuTBElS2kON PxrByrWgkNkmJRzPQCLVZz6GXlrT1me1utflR3JX6vrlROX9+QP59iZYxn9QrrkPRj SbKSwyBtaV9gdmIQUMFZw79TrxyB4sveEEeURniXVkMH9DcWp7/VAyyM51eGYPaAOg ufE1oWScMA03g== To: freebsd-questions@freebsd.org From: =?UTF-8?Q?Nagy_L=c3=a1szl=c3=b3_Zsolt?= Subject: Even more DHCPD problems Message-ID: <56DAD57A.2060705@shopzeus.com> Date: Sat, 5 Mar 2016 13:47:54 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Mar 2016 12:48:59 -0000 FreeBSD 10.2 RELEASE with dhcpd 5. Here is a working /usr/local/etc/dhcpd.conf: -------------------- authoritative; allow unknown-clients; use-host-decl-names on; default-lease-time 1814400; # 21 days max-lease-time 1814400; # 21 days #db-time-format default; #ddns-updates on; #ddns-update-style interim; #update-static-leases on; #key rndc-key { algorithm hmac-md5; secret 12345678901234567890=3D=3D; } option domain-name "visznet"; option domain-name-servers 192.168.5.1; option subnet-mask 255.255.255.0; subnet 192.168.5.0 netmask 255.255.255.0 { range 192.168.5.100 192.168.5.199; option broadcast-address 192.168.5.0; option routers 192.168.5.1; } -------------------- This configuration does work. But if I try to activate any of the commented lines, then I get errors like this: Mar 5 13:36:01 gw dhcpd: /usr/local/etc/dhcpd.conf line 1: expecting a parameter or declaration. Mar 5 13:36:01 gw dhcpd: db-time-format Mar 5 13:36:01 gw dhcpd: ^ Mar 5 13:36:01 gw dhcpd: Configuration file errors encountered Mar 5 13:36:01 gw dhcpd: exiting. Mar 5 13:36:01 gw gandalf: /usr/local/etc/rc.d/dhcpd: WARNING: failed to start dhcpd Exact package version: dhcpd-5.8.20151202. It seem that it does not know many of the configuration parameters that I want. *Most importantly:* how can I set it up to do ddns updates on the nameserver? Not so important questions: * Why can't I change the date format? * Why can't I store static leases in the leases file? * Why does it store epoch for all start/end leases instead of the good values? Here is an example lease: lease 192.168.5.115 { starts 4 1970/01/01 00:00:00 UTC; ends 4 1970/01/01 00:00:00 UTC; hardware ethernet 64:70:02:2b:6e:fb; uid 01:64:70:02:2b:6e:fb; client-hostname "Adam-PC"; } The "starts" and "ends" values are always epoch, and when I start the server I always get these messages: Mar 5 13:45:12 gw dhcpd: ^ Mar 5 13:45:12 gw dhcpd: /var/db/dhcpd.leases line 117: unparseable time string Mar 5 13:45:12 gw dhcpd: ends 4 1970/01/01 00:00:00 UTC; Mar 5 13:45:12 gw dhcpd: ^ Mar 5 13:45:12 gw dhcpd: /var/db/dhcpd.leases line 123: unparseable time string Mar 5 13:45:12 gw dhcpd: starts 4 1970/01/01 00:00:00 UTC; Mar 5 13:45:12 gw dhcpd: ^ Mar 5 13:45:12 gw dhcpd: /var/db/dhcpd.leases line 124: unparseable time string Mar 5 13:45:12 gw dhcpd: ends 4 1970/01/01 00:00:00 UTC; If I remove all dates from the lease file and restart the server, then it starts up without warning, but writes out these epoch values immediately. Next time I restart it is complaining about the unparseable time strings again. Why is that? Thanks, Laszlo