how to find hosts not in hosts file?
Hi all,
This is not necessarily a programming question, however, I figured at least one of the knowledgeable people here would know. On my system at work I can open a command prompt window and say "telnet myhostname" and it takes me to one of the servers here. However, I cannot find out the IP address of that host name because it is not in the windows host file in the typical location...is there another file somewhere else, or what am I missing?
Thanks!
Re: how to find hosts not in hosts file?
Quote:
Originally Posted by
andersod2
Hi all,
This is not necessarily a programming question, however, I figured at least one of the knowledgeable people here would know. On my system at work I can open a command prompt window and say "telnet myhostname" and it takes me to one of the servers here. However, I cannot find out the IP address of that host name because it is not in the windows host file in the typical location...is there another file somewhere else, or what am I missing?
Thanks!
Hi, I guess you can easily obtain the IP address of the `myhostname` by using `ping` or `nslookup` command.
`ping` command:
Code:
xxxxxxxx:xxx xandertan$ ping www.codeguru.com
PING www.codeguru.com (63.236.73.79): 56 data bytes
^C
--- www.codeguru.com ping statistics ---
5 packets transmitted, 0 packets received, 100% packet loss
`nslookup` command:
Code:
xxxxxxxx:xxx xandertan$ nslookup www.codeguru.com
Server: 172.20.132.1
Address: 172.20.132.1#53
Non-authoritative answer:
Name: www.codeguru.com
Address: 63.236.73.79
Sorry, I did try those commands on MacOS as I don't have Windows machine. However, I believe that Windows has similar executable (http://support.microsoft.com/kb/200525).