OPNsense Forum

English Forums => 19.1 Production Series => Topic started by: bimmerdriver on December 15, 2018, 05:56:05 pm

Title: Anyone having problems with dhcpd6?
Post by: bimmerdriver on December 15, 2018, 05:56:05 pm
I have two opnsense systems, both running on windows server 2012r2 hyper-v. One system is running the latest release and the other is running 19.1b. Yesterday, I updated both of them and now dhcpd6 is broken on both of them.

My ISP provides a /56 prefix. I also have two other *sense systems running on the same hyper-v server. Both are working properly, so I don't think this issue is related to my ISP.

Here is a message from the general log:

Quote
opnsense-devel: /usr/local/etc/rc.newwanipv6: The command '/usr/local/sbin/dhcpd -6 -user dhcpd -group dhcpd -chroot /var/dhcpd -cf /etc/dhcpdv6.conf -pf /var/run/dhcpdv6.pid hn1' returned exit code '1', the output was 'Internet Systems Consortium DHCP Server 4.4.1 Copyright 2004-2018 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ /etc/dhcpdv6.conf line 15: network mask too short prefix6 2001:560:74c0:b800:: 2001:560:74c0:b800::/48; ^ Configuration file errors encountered -- exiting If you think you have received this message due to a bug rather than a configuration issue please read the section on submitting bugs on either our web page at www.isc.org or in the README file before submitting a bug. These pages explain the proper process and the information we find helpful for debugging. exiting.'

Note, the message is referring to /48. Not sure where that comes from.
Title: Re: Anyone having problems with dhcpd6?
Post by: bimmerdriver on December 16, 2018, 12:47:57 am
This is sorted out, thanks marjohn56. I guess there was a change in the dhcpd6 default settings. It was trying to set up the LAN using a /48, which is not possible, considering there is only a /56 prefix from the ISP. Changed the prefix size to /64 with ::00 to ::FF as the range and now it's working. I've never had to touch those settings before when installing a "basic" configuration. (I like it better the old way, FWIW.)
Title: Re: Anyone having problems with dhcpd6?
Post by: marjohn56 on December 16, 2018, 07:51:23 am
I've taken a look at this and I'm not not sure how it worked properly before when there was no entry in the 'from' and 'to' fields. I've issued a PR to fix this so that if there is no entry in either or both of those fields then a PD range will not be written to dhcpd6.conf.
Title: Re: Anyone having problems with dhcpd6?
Post by: bimmerdriver on December 16, 2018, 06:11:05 pm
@marjohn56 Thanks very much.
Title: Re: Anyone having problems with dhcpd6?
Post by: bimmerdriver on December 19, 2018, 02:34:57 am
I've noticed a couple more issues with dhcpd6. (This pertains to 19.1b, have not tested on 18.7.)

Without the setting to change UTC to local, lease times are displayed in local. If you apply the setting, the times are displayed early.

Also, I've noticed that leases are either not being displayed or they are being deleted. For example, there was a current lease. I changed the time zone setting, saved and applied. The lease was gone. Normally when I disable and enable the network interface (windows 10 client), it forces new leases to be created. However, this only works for dhcpd4, not dhcpd6. For dhcpd6, I have to use ipconfig /release6 and ipconfig /renew6. I don't believe that was the case previously.
Title: Re: Anyone having problems with dhcpd6?
Post by: bimmerdriver on December 22, 2018, 02:00:36 am
Am I the only one having these problems with dhcpd6? There is definitely a problem with leases not being displayed.
Title: Re: Anyone having problems with dhcpd6?
Post by: marjohn56 on December 22, 2018, 03:53:50 pm
I'll take a look at it over Xmas, I've been working abroad all week and have just got back.
Title: Re: Anyone having problems with dhcpd6?
Post by: marjohn56 on December 27, 2018, 12:52:43 pm
A commit has been done which should improve this. It's on beta now if you update.
Title: Re: Anyone having problems with dhcpd6?
Post by: bimmerdriver on January 06, 2019, 06:16:00 pm
I just updated to OPNsense 19.1.b_586-amd64 and the dhcpv6 lease is being displayed and release /renew is working properly. The only anomaly is that that the time for the dhcpv6 lease is still being displayed in the local time zone, even without the setting to change to local being enabled.
Title: Re: Anyone having problems with dhcpd6?
Post by: marjohn56 on January 06, 2019, 08:38:08 pm
Yes I fixed it. What time would you like it in? The time shown is the time in the lease file.
Title: Re: Anyone having problems with dhcpd6?
Post by: bimmerdriver on January 06, 2019, 09:38:37 pm
Yes I fixed it. What time would you like it in? The time shown is the time in the lease file.
Lease times should be displayed using UTC unless the setting "Change DHCP display lease time from UTC to local time." is used. I just checked again and it seems that for dhcpv4, the setting has no effect (utc is always used), dhcpv6, the setting is backwards (for UTC, it displays local and for local, it displays local minus (UTC-local)).
Title: Re: Anyone having problems with dhcpd6?
Post by: marjohn56 on January 06, 2019, 11:59:15 pm
Difficult for me to test that, for me they are the same :)
Title: Re: Anyone having problems with dhcpd6?
Post by: bimmerdriver on January 07, 2019, 01:41:33 am
Difficult for me to test that, for me they are the same :)
Maybe if you set the time zone in System: Settings: General to America/Vancouver, you will see what I'm seeing. The problem probably has arisen because dhcpd and dhcpd6 both default to UTC and the arithmetic to calculate the local time zone is broken. Without looking at the code, I'm only speculating. This problem also existed in **sense, but it was fixed.
Title: Re: Anyone having problems with dhcpd6?
Post by: marjohn56 on January 07, 2019, 11:32:35 pm
yep... certainly is a bit out isn't it.


I'll try and take a look this week sometime.
Title: Re: Anyone having problems with dhcpd6?
Post by: franco on January 08, 2019, 07:09:03 am
Do you have a link to the bug report?


Cheers,
Franco
Title: Re: Anyone having problems with dhcpd6?
Post by: marjohn56 on January 08, 2019, 07:28:59 am
Did not get around to doing one last night, I've done one now, only for dhcpdv6 though #3103
Title: Re: Anyone having problems with dhcpd6?
Post by: marjohn56 on January 08, 2019, 08:06:23 am
Bimmerdriver - core and upgrade should see you ok now.
Title: Re: Anyone having problems with dhcpd6?
Post by: bimmerdriver on January 09, 2019, 05:52:54 am
Bimmerdriver - core and upgrade should see you ok now.
Just updated and it's fixed. Another one bites the dust!