First of all, sorry for my english, but i'm from brazil.
I'm working in a project that is a network monitor. The company that i work needs constant internet connection, so I decided to build a network monitor.
What i'm trying to do is to check internet connection by using "ping" on a server like google. Besides that, i want to check if all our services (Email, website and servers) are online.
I am able to connect my arduino uno + ethernet shield to my network, geting a valid IP Address.
So, here is the script I want to build:
1st - Connect the arduino to network with a valid local IP and MAC.
I am able to do this by using "DHCPAddressPrinter" found here. https://www.arduino.cc/en/Tutorial/DhcpAddressPrinter
3rd - Will ping this addresses by using "Ping" example avaliable in "ICMP Ping Library" here.
Since the ping function is working only with an IP address, not a hostname, I need a function that I enter the address "www.google.com" and it returns a number (188.8.131.52 for me in Brazil, right now ). So I think what i need is kinda request for a DNS server to "translate" the website for an IP address.
The servers with "example.mycompany.com" runs on a shared hosting, so there is no fixed IP number
I found that the example "Ethernet" -> "Webclient" makes a HTTP request with "www.google.com", but I could not make it show the IP address of the website.
Of course I don't need the full code for my project, just this part of the "translation" from "www.site.com" for an IP 184.108.40.206 by a DNS server.
Is that possible?
Once I make it work, I will show here the results.
I'm thinking about using an LCD display to show this monitor display.
Thanks for that.