Two NetIf with one DHCP server instance
Posted: 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
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