Two NetIf with one DHCP server instance

htw8866
Posts: 2
Joined: Sun May 30, 2021 9:32 am

Two NetIf with one DHCP server instance

Postby htw8866 » Sun May 30, 2021 9:45 am

Hi,

I'm looking for a solution to run two network interfaces on a esp32-s2 with DHCP server support.

Scenario:
- interface 1 is usb cdc-ecm (could be ethernet as well) - subnet 192.168.1.x
- interface 2 is WiFi - subnet 192.168.2.x

Both shall support a DHCP server.
Hence I enabled DHCP server inside esp-idf.

However as I checked the dhcp_server_start function, I found no option to start it for both interfaces.
Furthermore there is no multi instance support inside of the DHCP server module - at least to my understanding.

Question:
Can anyone give me some pointers how to do that?
Is there an already available solution for this?
Do I need to extend the DHCP server module?

Many thanks in advance,
Torsten

BenSuffolk
Posts: 2
Joined: Wed Aug 17, 2022 5:36 am

Re: Two NetIf with one DHCP server instance

Postby BenSuffolk » Sun Mar 19, 2023 8:54 pm

Did you find a solution?

I’m wanting to run a dhcp server on an Ethernet interface and have the softAP WiFi enabled. I have found that when I do this the Ethernet interface no longer issues dhcp addresses. When you connect to the soft ap I see the logs issue 2 identical ip addresses. So clearly the server is still running twice, but they are then both bound to the soft ap.

htw8866
Posts: 2
Joined: Sun May 30, 2021 9:32 am

Re: Two NetIf with one DHCP server instance

Postby htw8866 » Mon Mar 20, 2023 10:06 am

Hi,

unfortunately no solution yet.

As far as I know the dhcp server - currently available - can not handle different sub-networks yet.

Hence somebody need to improve the dhcp server.

Regards Torsten

Who is online

Users browsing this forum: ESP_Roland and 85 guests