This week's giveaways are in the MongoDB and Jobs Discussion forums. We're giving away four copies of Mongo DB Applied Patterns and 4 resume reviews from Five Year Itch and have the authors/reps on-line! See this thread and this one for details.
I need to compare the Connection used by a DataSource against a set of DriverManager parameters to determine if they are "equivalent". I do this by comparing the hostname, datbasename, and port. My problem is that I am given the DriverManager parameter DNSname but when I retrieve the hostname from the DataSource Connection, I am given the TCP/IP address.
Can anybody tell me how to translate the DNSName into it's TCP/IP address so that I can compare on these properties?
Joined: Jan 02, 2001
To resolve the IP address to then DNS name, ping with the -a argument.
example: ping -a 188.8.131.52
If it can resolve the address, it will return:
Of course, this doesn't work well the other way, as multiple DNS names can point to the same IP address.