Get information abuot arduino ethernet card

I am using an Arduino-uno connected to a local network via an Ethernet Shield and I am trying to get the configuration information of its ethernet card (for example: IP address, subnet mask, gateway, DNS). Is there a function that allows me to get this data and save it in some variables?

>Solution :

You can use the Ethernet class to set and query information like IP address, subnet mask and alike.

For example, Ethernet.localIP() will return, well the local IP address.

More information here.

Leave a Reply