ESP8266 print DNS address (obtained via DHCP) I've set up an ESP8266 (Wemos D1 Mini) to get IP-information via DHCP.
Everything works fine and I can print the information :

Serial.print(WiFi.macAddress());
Serial.print(WiFI.localIP());
Serial.print(WiFi.subnetMask());
Serial.print(WiFi.gateway.IP());

But how do I print the DNS-address ??

I cant find a function for this ???

/Kind regards : Gurra
Serial.println(WiFi.dnsIP());


If you have more than one DNS server you can specify the index:

Serial.println(WiFi.dnsIP(1));