OPNsense Forum

Archive => 21.7 Legacy Series => Topic started by: Udo on September 09, 2021, 01:34:13 PM

Title: 21.7.2_1: DHCPv4 - do not send out NTP-servers (option 42)
Post by: Udo on September 09, 2021, 01:34:13 PM
Hello,

I've configured "Services -> DHCPv4 -> [Interface] -> NTP servers" with one IP.

A packet analysis with Wireshark shows that OPNsense DHCPv4 do not send out this NTP-server, option 42 is missing in DHCP-packet. Why is that?

Udo
Title: Re: 21.7.2_1: DHCPv4 - do not send out NTP-servers (option 42)
Post by: MartB on September 12, 2021, 02:06:58 AM
I can confirm, i dont see any option 42 being set in the offer.
I dont know if it ever worked tho!

grep "ntp" /var/dhcpd/etc/dhcpd.conf
  option ntp-servers 10.0.1.1;
Title: Re: 21.7.2_1: DHCPv4 - do not send out NTP-servers (option 42)
Post by: larsd on September 12, 2021, 06:10:03 PM
is your client requesting option 42?
Title: Re: 21.7.2_1: DHCPv4 - do not send out NTP-servers (option 42)
Post by: franco on September 13, 2021, 09:06:59 AM
That's a good question. :)


Cheers,
Franco
Title: Re: 21.7.2_1: DHCPv4 - do not send out NTP-servers (option 42)
Post by: MartB on September 19, 2021, 06:15:00 PM
The option is not directly requested, but i wonder where the behavior difference to the new version of iscs dhcp implementation (https://www.isc.org/kea/) comes from.
Kea sends it to me all the time regardless of the discovery and it gets ACKed by the client at the end.
Title: Re: 21.7.2_1: DHCPv4 - do not send out NTP-servers (option 42)
Post by: Fright on September 19, 2021, 06:53:43 PM
@MartB
based on https://kea.readthedocs.io/en/latest/arm/dhcp4-srv.html#id2
by default Kea should also not send this option if it is not requested (perhaps the 'always-send' flag was used?)
Title: Re: 21.7.2_1: DHCPv4 - do not send out NTP-servers (option 42)
Post by: Patrick M. Hausen on September 19, 2021, 08:28:43 PM
TIL something new - thanks guys. I always thought DHCP would just send all configured options to everybody asking on a subnet and it was up to the client to decide which ones were relevant and which ones were not.
So this is a request-response protocol ... interesting. Need to read up a bit on DHCP.

Kind regards,
Patrick
Title: Re: 21.7.2_1: DHCPv4 - do not send out NTP-servers (option 42)
Post by: MartB on September 21, 2021, 05:22:05 PM
Quote from: Fright on September 19, 2021, 06:53:43 PM
@MartB
based on https://kea.readthedocs.io/en/latest/arm/dhcp4-srv.html#id2
by default Kea should also not send this option if it is not requested (perhaps the 'always-send' flag was used?)

Checking back with a colleague that has kea running, trying to get a pcap so i can check whats actually going on there. This was just a quick test for us bcs we were both running win10.