Page 1 of 1

Preferred and alternate DNS settings in esp32

Posted: Tue Sep 03, 2019 12:34 pm
by akushva
Generally we use the command
network.ifconfig ('xxx.xxx.xxx.xxx', '255.255.255.0', 'xxx.xxx.xxx.xxx', '8.8.8.8')

to set the IP address configuration with network.ifconfig, passing a tuple of four values. Now I want to enter a alternate DNS setting into this command .
Is there any way to make provision for entering alternate DNS setting and also preferred DNS setting as generally done in laptops.

Thanks in advance.. :)

Re: Preferred and alternate DNS settings in esp32

Posted: Tue Sep 03, 2019 12:56 pm
by jimmo
Setting additional DNS servers is supported by the lower level ESP IDF function `tcpip_adapter_set_dns_info` (and also supported by LWIP used by STM32).

It would be a very straightforward feature to implement -- the tricky part is coming up with what the ifconfig API should look like. Maybe if the fourth entry in the tuple was optionally allowed to be tuple of DNS server addresses?