OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • 24.1 Legacy Series »
  • 24.1 - DHCP server moves to KEA - implications?
« previous next »
  • Print
Pages: 1 [2] 3 4 ... 6

Author Topic: 24.1 - DHCP server moves to KEA - implications?  (Read 35634 times)

tessus

  • Jr. Member
  • **
  • Posts: 67
  • Karma: 2
    • View Profile
Re: 24.1 - DHCP server moves to KEA - implications?
« Reply #15 on: January 29, 2024, 06:58:40 am »
Quote from: newsense on January 20, 2024, 04:11:35 am
There were no plans for migrating the existing DHCP data to Kea as far as I now.

This certainly is a deal breaker. I do have more than 50 DHCP Static Mappings on about 20 VLANs. I am not really inclined to recreate all of them manually.
Logged

sorano

  • Full Member
  • ***
  • Posts: 153
  • Karma: 21
    • View Profile
Re: 24.1 - DHCP server moves to KEA - implications?
« Reply #16 on: January 30, 2024, 08:29:58 am »
Then don't lol.

Current DHCPB is not going away (yet).


I'm very happy to see them implement KEA as it's the way.
Logged
2x 23.7 VMs & CARP, 4x 2.1GHz, 8GB
Cisco L3 switch, ESXi, VDS, vmxnet3
DoT, Chrony, HAProxy + NAXSI, Suricata
VPN: IPSec, OpenVPN, Wireguard
MultiWAN: Fiber 500/500Mbit dual stack + 4G failover

--
Available for private support.
Did my answer help you? Feel free to click [applaud] to the left

Patrick M. Hausen

  • Hero Member
  • *****
  • Posts: 6925
  • Karma: 583
    • View Profile
Re: 24.1 - DHCP server moves to KEA - implications?
« Reply #17 on: January 30, 2024, 10:02:30 pm »
I was about to make the switch in my home lab when I found you cannot even serve the domain name to clients. Sorry, that is not going to fly.
Logged
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

GrantSquirt8415

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
    • View Profile
Re: 24.1 - DHCP server moves to KEA - implications?
« Reply #18 on: January 31, 2024, 10:15:48 pm »
Hello all,
Upgraded from 23.7.12 to 23.7.12_5 and then immediately to 24.1_1.
Running 4 physical interfaces with separate networks on each, 2 wan, 2 lan with DCHP service.
Switched from ISC to Kea DHCPv4
Transitioned to the Kea DHCPv4 service was simple but seems to be an all or nothing issue.
Attempting to get Kea listening on interface 1 would not work with ISC DHCPv4 listening on interface 2 (seems the ISC DHCPv4 server locks the port on all interfaces).
Once I had both subnets defined (you can do them separately for clarity) and disabled the ISC DHCPv4 instances Kea was able to start as per the logs and as per GUI.
I would be happy to test the Kea implementation further.
Thanks
Logged

jonny5

  • Newbie
  • *
  • Posts: 38
  • Karma: 3
    • View Profile
Re: 24.1 - DHCP server moves to KEA - implications?
« Reply #19 on: February 01, 2024, 03:05:43 am »
Have not attempted to use the new KEA

Have used ISC to do static reservations, and enable the Dynamic DNS feature to external BIND (Primary & Secondary), and finally just got all of the /24 subnetting squared away necessary for the Reverse DNS portion of the protocol to do its thing (/24s for each zone). All subnets populating, no syslog errors for DHCP registrations (also cleared up my pools - the static assigned used / dynamic pool space)!

This is to comment excitement for the new feature, I've been interested in using an IPAM, and setting up details that allow auto subnetting / DHCP pool expressions - seems this might enable that future quite nicely.

Of current transition to KEA primary need is:
  • serve domain name
  • serve domain suffix search
  • enable dynamic dns with config of master bind, domain key, more or less the dynamic dns functionality that exists for ISC in OPNSense now

There's probably a reasonable list of features others have used for BOOTP/etc. though I'm not trying to swim in that pool that deep right now and cannot comment to their use or have any testability in that space.
Logged

bimbar

  • Sr. Member
  • ****
  • Posts: 445
  • Karma: 25
    • View Profile
Re: 24.1 - DHCP server moves to KEA - implications?
« Reply #20 on: February 01, 2024, 10:37:37 am »
DHCPd opens a raw interface on all network interfaces. I don't think it is possible (at least with ISC DHCPd) to use two different DHCP daemons on one host simultaneously.
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 17709
  • Karma: 1618
    • View Profile
Re: 24.1 - DHCP server moves to KEA - implications?
« Reply #21 on: February 01, 2024, 05:19:56 pm »
Quote from: bimbar on February 01, 2024, 10:37:37 am
DHCPd opens a raw interface on all network interfaces. I don't think it is possible (at least with ISC DHCPd) to use two different DHCP daemons on one host simultaneously.

Correct for ISC-DHCP.
Logged

SFC

  • Newbie
  • *
  • Posts: 30
  • Karma: 3
    • View Profile
Re: 24.1 - DHCP server moves to KEA - implications?
« Reply #22 on: February 02, 2024, 06:55:47 pm »
Quote from: newsense on January 20, 2024, 04:11:35 am
Kea and the old client can run in parallel on different vlans. Simply disable the old server on a vlan, copy all reservations/useful data to a text editor, go to Kea and set up the vlan in Subnets, add the Reservations, then to Settings to have Kea run on the interface.

Should there be a need, disable Kea on the interface and reenable it on the other side.

But how are you associating VLAN >> Subnet?  Does it just guess based on the interface IP address?  I don't see any option to associate a subnet to a VLAN in the Kea config whereas ISC there's a direct mapping to VLAN/Interface >> DHCP Subnet.
Logged

newsense

  • Hero Member
  • *****
  • Posts: 1038
  • Karma: 77
    • View Profile
Re: 24.1 - DHCP server moves to KEA - implications?
« Reply #23 on: February 02, 2024, 07:30:12 pm »
Quote from: franco on February 01, 2024, 05:19:56 pm
Quote from: bimbar on February 01, 2024, 10:37:37 am
DHCPd opens a raw interface on all network interfaces. I don't think it is possible (at least with ISC DHCPd) to use two different DHCP daemons on one host simultaneously.

Correct for ISC-DHCP.

As previously stated, ISC-DHCP and KEA can run in parallel on different interfaces. I've done the transition on production systems with no downtime - as follows:


1) Create Subnet and Reservations for VLAN X in Kea

2) Go to ISC DHCP and disable it on VLAN X -- leaving it running on the other VLANs

3) Go to Kea and enable VLAN X in Settings

4) Validate and continue with the next VLAN in scope were Kea can run without missing any ISC functionality


QED :)
Logged

doug.dimick

  • Newbie
  • *
  • Posts: 18
  • Karma: 7
    • View Profile
Re: 24.1 - DHCP server moves to KEA - implications?
« Reply #24 on: February 03, 2024, 08:48:45 pm »
I am unable to set the correct DNS server in the subnet configuration. I input the correct IP address for my DNS server, which is not on OPNsense, save & apply, but when I go back into the subnet configuration screen, the IP address has been overwritten with that of the OPNsense LAN interface. I have not tested any further to see what address would actually be provided to the client, though. Bug?
Logged

newsense

  • Hero Member
  • *****
  • Posts: 1038
  • Karma: 77
    • View Profile
Re: 24.1 - DHCP server moves to KEA - implications?
« Reply #25 on: February 03, 2024, 09:08:56 pm »
Untick Auto collect option data on the subnet
Logged

MandyBaxter

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
    • View Profile
Re: 24.1 - DHCP server moves to KEA - implications?
« Reply #26 on: February 03, 2024, 09:53:28 pm »
To the original question --
You'll need adjust your ruleset for UDP 67 & 68 on whichever interface(s) you expect to support. Apparently, OPNsense automatically sets up a rule for ISC dhcpd when it's enabled on an interface, but not for KEA dhcpd. (In the logging, the ISC rule shows up with the label "allow access to DHCP server").

On missing features --
OPNSense's web interface for KEA doesn't cover logging options. (Or, if it does, I haven't found it yet.) Remote syslog to a centralized server is kinda key. Mr. Google helpfully finds examples on how to set this up manually for KEA. So, it seems the KEA dhcpd has this capability.


Logged

newsense

  • Hero Member
  • *****
  • Posts: 1038
  • Karma: 77
    • View Profile
Re: 24.1 - DHCP server moves to KEA - implications?
« Reply #27 on: February 03, 2024, 09:59:12 pm »
Quote from: MandyBaxter on February 03, 2024, 09:53:28 pm
To the original question --
You'll need adjust your ruleset for UDP 67 & 68 on whichever interface(s) you expect to support. Apparently, OPNsense automatically sets up a rule for ISC dhcpd when it's enabled on an interface, but not for KEA dhcpd. (In the logging, the ISC rule shows up with the label "allow access to DHCP server").



It is coming in 24.1.1, it can be added now if needed:

https://github.com/opnsense/core/commit/b1685d8e467d755fa1cf7203a82b63f2a115cb05

Code: [Select]
opnsense-patch b1685d8
Logged

agh1701

  • Jr. Member
  • **
  • Posts: 77
  • Karma: 2
    • View Profile
Re: 24.1 - DHCP server moves to KEA - implications?
« Reply #28 on: February 04, 2024, 01:50:06 am »
Quote from: Patrick M. Hausen on January 30, 2024, 10:02:30 pm
I was about to make the switch in my home lab when I found you cannot even serve the domain name to clients. Sorry, that is not going to fly.

Has anyone tried kea and verified that it does not serve the routers domain name?  Even thou it is not configurable in kea.
« Last Edit: February 04, 2024, 01:54:41 am by agh1701 »
Logged

antonym

  • Newbie
  • *
  • Posts: 8
  • Karma: 1
    • View Profile
Re: 24.1 - DHCP server moves to KEA - implications?
« Reply #29 on: February 04, 2024, 04:23:28 am »
Quote from: RedVortex on January 22, 2024, 04:25:49 am
I tried using kea without luck so far... Even though I disabled the ISC server on my vlan 630, stopped and started ISC to make sure it frees up the listening on port 67 on 192.168.63.1 but kea still complains it's unable to start properly

Code: [Select]
WARN [kea-dhcp4.dhcpsrv.0x83359d000] DHCPSRV_OPEN_SOCKET_FAIL failed to open socket: Failed to open socket on interface ix1_vlan630, reason: failed to bind fallback socket to address 192.168.63.1, port 67, reason: Address already in use - is another DHCP server running?

Checking netstat, I see *:67 so I guess ISC is listening on *:67 and prevents kea from running side-by-side.

Still trying to see if there is a way around this...

I have multiple vlans and was getting the same type of error messages. What worked for me was stopping the ISC DHCP service and then starting the KEA DHCP service. Before shutting down ISC DHCP service (clicking the red square button) I only disabled the particular VLAN interface within ISC DHCP that I wanted to test in KEA DHCP. I thought that was enough but it wasn't because ISC DHCP was still running and binding to the VLAN interface eventhough I had disabled listening on it in ISC DHCP.
Logged

  • Print
Pages: 1 [2] 3 4 ... 6
« previous next »
  • OPNsense Forum »
  • English Forums »
  • 24.1 Legacy Series »
  • 24.1 - DHCP server moves to KEA - implications?
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2