This might had been asked before, if you know the answer, pls point it out.
The ethernet.h (.cpp) seems to be only retrieve 1 DNS server IP address from the DHCP server.
How to retrieve the 2nd, or even the 3rd DNS IP address. I wonder if one has to dig into the dhcp.cpp file to make the modification. If so, has it been done somewhere?
Thanks
Any particular reason why you need these addresses? In most (home) setups, DNS 1 is just the router/modem/default gateway. DNS 2&3 are probably just 8.8.8.8 and 8.8.4.4.
Pieter
Thanks for your relying!
If one DNS server is failed/unreachabe, then the 2nd DNS resolver can kick it.
It is for DNS resolver backup purpose. Modern network device has more than 1 DNS server in it, isn't it?
Do you have any suggestion or experience on how to retrieve the 2nd DNS server IP from using/modifying the existing Ethernet core library ?
Momoino:
If one DNS server is failed/unreachabe, then the 2nd DNS resolver can kick it.
You can just use 8.8.8.8 if that fails.
But if the DNS server is in the router to the Internet (which is pretty likely), the Internet connection will probably fail as well.
This won't work if you need to look up the address of a device on the local network, of course.
Momoino:
It is for DNS resolver backup purpose. Modern network device has more than 1 DNS server in it, isn't it?
Not that I know of. Why would you need two DNS servers running on a single device?
Momoino:
Do you have any suggestion or experience on how to retrieve the 2nd DNS server IP from using/modifying the existing Ethernet core library ?
No, I've never used that library.
Pieter
Thank you, Pieter for the commenting.
Best wish!