Resolve host name to an ip address

后端 未结 5 723
醉话见心
醉话见心 2021-02-01 02:33

I developed a client/server simulation application. I deployed client and server on two different Windows XP machines. Somehow, the client is not able to send requests to the se

5条回答
  •  情歌与酒
    2021-02-01 03:14

    Go to your client machine and type in:

    nslookup server.company.com
    

    substituting the real host name of your server for server.company.com, of course.

    That should tell you which DNS server your client is using (if any) and what it thinks the problem is with the name.

    To force an application to use an IP address, generally you just configure it to use the IP address instead of a host name. If the host name is hard-coded, or the application insists on using a host name in preference to an IP address (as one of your other comments seems to indicate), then you're probably out of luck there.

    However, you can change the way that most machine resolve the host names, such as with /etc/resolv.conf and /etc/hosts on UNIXy systems and a local hosts file on Windows-y systems.

提交回复
热议问题