Resolving IP addresses

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JoderCoder
    New Member
    • Feb 2008
    • 18

    Resolving IP addresses

    I have an application, which has a few server connections. Any suggestions on how to find out the way application resolves the IP addresses of the servers. For example;
    a. is it looking into local hosts file first?
    b. is it always requiring DNS to resolve the IP from the name without even looking into hosts file?

    any idea shared greatly appreciated!
  • sicarie
    Recognized Expert Specialist
    • Nov 2006
    • 4677

    #2
    Well, you could look into the documentation of the application.

    My guess is that the IPs of the server resources are given to the app on installation. This means it goes out and searches for a specific IP. You didn't post the app, though, so that's just a guess.

    You could always test by doing fun things (that should only be done in a controlled dev environment as they will probably break other things) removing the hosts file, or telling a firewall in between the two that it's not allowed to talk to DNS...

    Comment

    • Arulmurugan
      New Member
      • Jan 2008
      • 90

      #3
      Originally posted by JoderCoder
      I have an application, which has a few server connections. Any suggestions on how to find out the way application resolves the IP addresses of the servers. For example;
      a. is it looking into local hosts file first?
      b. is it always requiring DNS to resolve the IP from the name without even looking into hosts file?

      any idea shared greatly appreciated!
      Hello,
      First it looks into /etc/hosts,if it does not find then it goes to DNS server1, server2 , etc..., This ans is default behavoiur of any resolver.but when we configure nsswitch. it would be depend on your nss configuration. you call verify all this by using getaddrinfo or dig command.

      Regards,
      Arul

      Comment

      Working...