user56312: 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

user4143: Serial.println(WiFi.dnsIP());

If you have more than one DNS server you can specify the index:
Serial.println(WiFi.dnsIP(1));


56312: <p>I've set up an ESP8266 (Wemos D1 Mini) to get IP-information via DHCP.
Everything works fine and I can print the information :</p>

<p>Serial.print(WiFi.macAddress());
Serial.print(WiFI.localIP());
Serial.print(WiFi.subnetMask());
Serial.print(WiFi.gateway.IP());</p>

<p>But how do I print the DNS-address ??</p>

<p>I cant find a function for this ???</p>

<p>/Kind regards : Gurra</p>
 4143: <pre><code>Serial.println(WiFi.dnsIP());
</code></pre>

<p>If you have more than one DNS server you can specify the index:</p>

<pre><code>Serial.println(WiFi.dnsIP(1));
</code></pre>
