Date: Sat, 5 Mar 2016 13:47:54 +0100 From: =?UTF-8?Q?Nagy_L=c3=a1szl=c3=b3_Zsolt?= <gandalf@shopzeus.com> To: freebsd-questions@freebsd.org Subject: Even more DHCPD problems Message-ID: <56DAD57A.2060705@shopzeus.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?56DAD57A.2060705>