2

I am very new to kea-dhcp. I am trying to use kea-dhcp 2.0.1 version. below is my interface configuration mentioned in "dhcp.conf"

"Dhcp4": {
    "interfaces-config": {
         "interfaces":[ "eth1", "eth2" ],
         "dhcp-socket-type" : "raw"
     }, 

When i try to start dhcp server it gives below error

058 ERROR [kea-dhcp4.dhcp4/37797.139924860343616] DHCP4_PARSER_FAIL failed to create or run parser for configuration element interfaces-config: Failed to select interface: interface 'eth1' doesn't exist in the system (/tmp/kea-dhcp.conf:1:49) (/tmp/kea-dhcp.conf:1:34)

By the time i start dhcp server "eth1" did not get created, "eth2" interace is up and has valid IP but dhcp server failed to start since 1st interface mentioned in the "interface-config" is not created.

How can i resolve this problem? Is there any option where dhcp server checks all interfaces mentiond and try to start and listen on interfaces which are created and UP?

6
  • to rule out the easiest solution first: waiting until eth1 is started is not an option, right? Commented Jan 31, 2024 at 12:49
  • yes. In my case i need dhcp server to start listnening on interfaces which are UP instead of waiting on eth1 Commented Jan 31, 2024 at 14:58
  • will you need it to listen on eth1 if that comes up later? Commented Jan 31, 2024 at 15:07
  • yes. i need to listen on eth1 once it comes up. But first i want to overcome 1st problem where DHCP should start with other interfaces which are UP and running in the list. Is there a way for that? or does kea-dhcp later versions support this? Commented Feb 1, 2024 at 6:44
  • You should state your version anyway. Commented Feb 1, 2024 at 7:05

2 Answers 2

1

There's a feature request about this exact problem documented on KEA's source repository in issues 3188:

Support hot plugging network interfaces Open
Issue created 1 month ago by Jakub Okoński

name: Feature request about: Suggest an idea for this project

I'm migrating to kea from the previous ISC DHCP4 server and I noticed a difference in behavior. Kea refuses to start if an interface declared in interfaces-config is not present when Kea starts.

Tomek Mrugalski @tomek 1 month ago Owner

Yup, it's a problem we have in Kea. And @farnoy is not the first (or second) person to complain about it. I've linked previous tickets. I'm sure there are more if we dig deep enough.

So yeah, the time when we'll finally implement this is getting closer. But as usual, not promises about specific dates.

This is a missing feature. KEA developers are aware of this and are working on it. So there's no magic configuration to be done for this to work until this is resolved. Only workarounds.

Among various workaround, perhaps consider instantiating KEA, one KEA daemon per interface, if all possible parameters (eg lease file location etc.) can be changed. That way an instance could fail (and be restarted automatically) without affecting an other instance.

2
  • Thank you for the response. I have read the issue which you have shared. That is the case with single interface defined in interface list of dhcp server conf. Is it the same with multiple interfaces also? Commented Feb 1, 2024 at 9:31
  • From my link: " Without support from Kea, I'd need to keep two different configs and reload Kea": this implies OP sometimes uses a standard interface (or more than 1), sometimes uses two (or more than 2) interfaces (the 2nd being the USB additional interface). If OP was only using USB, there would be no need to "keep two different configs", but only to run or not run KEA with a single configuration. This means that what you suggest: "That is the case with single interface defined in interface list" doesn't look to be the case. Commented Feb 1, 2024 at 13:01
0

I have raised query in git lab for the issue https://gitlab.isc.org/isc-projects/kea/-/issues/3241

And also, after checking kea-dhcp server code i understood that kea-dhcp server will refuse to start with error "interface doesn't exist in the system" if any interface defined in the interface-config is not created by the time dhcp server is started.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.